|
|
@ -1,6 +1,6 @@
|
|
|
|
//=============================================================================
|
|
|
|
//=============================================================================
|
|
|
|
//
|
|
|
|
//
|
|
|
|
// File : class_doctwindow.cpp
|
|
|
|
// File : class_dockwindow.cpp
|
|
|
|
// Created on Thu 29 Dec 2005 23:45:11 by Szymon Stefanek
|
|
|
|
// Created on Thu 29 Dec 2005 23:45:11 by Szymon Stefanek
|
|
|
|
//
|
|
|
|
//
|
|
|
|
// This file is part of the KVIrc IRC Client distribution
|
|
|
|
// This file is part of the KVIrc IRC Client distribution
|
|
|
@ -22,7 +22,7 @@
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//=============================================================================
|
|
|
|
//=============================================================================
|
|
|
|
|
|
|
|
|
|
|
|
#include "class_doctwindow.h"
|
|
|
|
#include "class_dockwindow.h"
|
|
|
|
|
|
|
|
|
|
|
|
#include "kvi_frame.h"
|
|
|
|
#include "kvi_frame.h"
|
|
|
|
#include "kvi_locale.h"
|
|
|
|
#include "kvi_locale.h"
|
|
|
@ -31,15 +31,15 @@
|
|
|
|
#include <TQDockWidget>
|
|
|
|
#include <TQDockWidget>
|
|
|
|
#define TQT_DOCK_WINDOW TQDockWidget
|
|
|
|
#define TQT_DOCK_WINDOW TQDockWidget
|
|
|
|
#else
|
|
|
|
#else
|
|
|
|
#include <tqdoctwindow.h>
|
|
|
|
#include <tqdockwindow.h>
|
|
|
|
#define TQT_DOCK_WINDOW TQDockWindow
|
|
|
|
#define TQT_DOCK_WINDOW TQDockWindow
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
#include <tqlayout.h>
|
|
|
|
#include <tqlayout.h>
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
/*
|
|
|
|
@doc: doctwindow
|
|
|
|
@doc: dockwindow
|
|
|
|
@title:
|
|
|
|
@title:
|
|
|
|
doctwindow class
|
|
|
|
dockwindow class
|
|
|
|
@type:
|
|
|
|
@type:
|
|
|
|
class
|
|
|
|
class
|
|
|
|
@short:
|
|
|
|
@short:
|
|
|
@ -74,27 +74,27 @@
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
KVSO_BEGIN_REGISTERCLASS(KviKvsObject_doctwindow,"doctwindow","widget")
|
|
|
|
KVSO_BEGIN_REGISTERCLASS(KviKvsObject_dockwindow,"dockwindow","widget")
|
|
|
|
KVSO_REGISTER_HANDLER(KviKvsObject_doctwindow,"addWidget",function_addWidget)
|
|
|
|
KVSO_REGISTER_HANDLER(KviKvsObject_dockwindow,"addWidget",function_addWidget)
|
|
|
|
KVSO_REGISTER_HANDLER(KviKvsObject_doctwindow,"orientation",function_orientation)
|
|
|
|
KVSO_REGISTER_HANDLER(KviKvsObject_dockwindow,"orientation",function_orientation)
|
|
|
|
KVSO_REGISTER_HANDLER(KviKvsObject_doctwindow,"setOrientation",function_setOrientation)
|
|
|
|
KVSO_REGISTER_HANDLER(KviKvsObject_dockwindow,"setOrientation",function_setOrientation)
|
|
|
|
KVSO_REGISTER_HANDLER(KviKvsObject_doctwindow,"resizeEnabled",function_resizeEnabled)
|
|
|
|
KVSO_REGISTER_HANDLER(KviKvsObject_dockwindow,"resizeEnabled",function_resizeEnabled)
|
|
|
|
KVSO_REGISTER_HANDLER(KviKvsObject_doctwindow,"setResizeEnabled",function_setResizeEnabled)
|
|
|
|
KVSO_REGISTER_HANDLER(KviKvsObject_dockwindow,"setResizeEnabled",function_setResizeEnabled)
|
|
|
|
KVSO_REGISTER_HANDLER(KviKvsObject_doctwindow,"setAllowedDockAreas",function_setAllowedDockAreas)
|
|
|
|
KVSO_REGISTER_HANDLER(KviKvsObject_dockwindow,"setAllowedDockAreas",function_setAllowedDockAreas)
|
|
|
|
KVSO_REGISTER_HANDLER(KviKvsObject_doctwindow,"dock",function_dock)
|
|
|
|
KVSO_REGISTER_HANDLER(KviKvsObject_dockwindow,"dock",function_dock)
|
|
|
|
KVSO_END_REGISTERCLASS(KviKvsObject_doctwindow)
|
|
|
|
KVSO_END_REGISTERCLASS(KviKvsObject_dockwindow)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
KVSO_BEGIN_CONSTRUCTOR(KviKvsObject_doctwindow,KviKvsObject_widget)
|
|
|
|
KVSO_BEGIN_CONSTRUCTOR(KviKvsObject_dockwindow,KviKvsObject_widget)
|
|
|
|
KVSO_END_CONSTRUCTOR(KviKvsObject_doctwindow)
|
|
|
|
KVSO_END_CONSTRUCTOR(KviKvsObject_dockwindow)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
KVSO_BEGIN_DESTRUCTOR(KviKvsObject_doctwindow)
|
|
|
|
KVSO_BEGIN_DESTRUCTOR(KviKvsObject_dockwindow)
|
|
|
|
KVSO_END_DESTRUCTOR(KviKvsObject_doctwindow)
|
|
|
|
KVSO_END_DESTRUCTOR(KviKvsObject_dockwindow)
|
|
|
|
|
|
|
|
|
|
|
|
#define _pDockWindow ((TQT_DOCK_WINDOW *)widget())
|
|
|
|
#define _pDockWindow ((TQT_DOCK_WINDOW *)widget())
|
|
|
|
|
|
|
|
|
|
|
|
bool KviKvsObject_doctwindow::init(KviKvsRunTimeContext * pContext,KviKvsVariantList * pParams)
|
|
|
|
bool KviKvsObject_dockwindow::init(KviKvsRunTimeContext * pContext,KviKvsVariantList * pParams)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
#ifdef COMPILE_USE_QT4
|
|
|
|
#ifdef COMPILE_USE_QT4
|
|
|
|
TQDockWidget * pWidget = new TQDockWidget(g_pFrame);
|
|
|
|
TQDockWidget * pWidget = new TQDockWidget(g_pFrame);
|
|
|
@ -106,7 +106,7 @@ bool KviKvsObject_doctwindow::init(KviKvsRunTimeContext * pContext,KviKvsVariant
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
bool KviKvsObject_doctwindow::function_addWidget(KviKvsObjectFunctionCall *c)
|
|
|
|
bool KviKvsObject_dockwindow::function_addWidget(KviKvsObjectFunctionCall *c)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
kvs_hobject_t hWidget;
|
|
|
|
kvs_hobject_t hWidget;
|
|
|
|
KVSO_PARAMETERS_BEGIN(c)
|
|
|
|
KVSO_PARAMETERS_BEGIN(c)
|
|
|
@ -155,7 +155,7 @@ bool KviKvsObject_doctwindow::function_addWidget(KviKvsObjectFunctionCall *c)
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
bool KviKvsObject_doctwindow::function_orientation(KviKvsObjectFunctionCall * c)
|
|
|
|
bool KviKvsObject_dockwindow::function_orientation(KviKvsObjectFunctionCall * c)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if(!widget())return true; // hum ? dead ?
|
|
|
|
if(!widget())return true; // hum ? dead ?
|
|
|
|
#ifdef COMPILE_USE_QT4
|
|
|
|
#ifdef COMPILE_USE_QT4
|
|
|
@ -166,7 +166,7 @@ bool KviKvsObject_doctwindow::function_orientation(KviKvsObjectFunctionCall * c)
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
bool KviKvsObject_doctwindow::function_setOrientation(KviKvsObjectFunctionCall * c)
|
|
|
|
bool KviKvsObject_dockwindow::function_setOrientation(KviKvsObjectFunctionCall * c)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
TQString szOrientation;
|
|
|
|
TQString szOrientation;
|
|
|
|
KVSO_PARAMETERS_BEGIN(c)
|
|
|
|
KVSO_PARAMETERS_BEGIN(c)
|
|
|
@ -180,7 +180,7 @@ bool KviKvsObject_doctwindow::function_setOrientation(KviKvsObjectFunctionCall *
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
bool KviKvsObject_doctwindow::function_resizeEnabled(KviKvsObjectFunctionCall * c)
|
|
|
|
bool KviKvsObject_dockwindow::function_resizeEnabled(KviKvsObjectFunctionCall * c)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if(!widget())return true; // hum ? dead ?
|
|
|
|
if(!widget())return true; // hum ? dead ?
|
|
|
|
#ifdef COMPILE_USE_QT4
|
|
|
|
#ifdef COMPILE_USE_QT4
|
|
|
@ -191,7 +191,7 @@ bool KviKvsObject_doctwindow::function_resizeEnabled(KviKvsObjectFunctionCall *
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
bool KviKvsObject_doctwindow::function_setResizeEnabled(KviKvsObjectFunctionCall * c)
|
|
|
|
bool KviKvsObject_dockwindow::function_setResizeEnabled(KviKvsObjectFunctionCall * c)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
bool bResizeEnabled;
|
|
|
|
bool bResizeEnabled;
|
|
|
|
KVSO_PARAMETERS_BEGIN(c)
|
|
|
|
KVSO_PARAMETERS_BEGIN(c)
|
|
|
@ -206,7 +206,7 @@ bool KviKvsObject_doctwindow::function_setResizeEnabled(KviKvsObjectFunctionCall
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
bool KviKvsObject_doctwindow::function_setAllowedDockAreas(KviKvsObjectFunctionCall * c)
|
|
|
|
bool KviKvsObject_dockwindow::function_setAllowedDockAreas(KviKvsObjectFunctionCall * c)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
TQString szFlags;
|
|
|
|
TQString szFlags;
|
|
|
|
KVSO_PARAMETERS_BEGIN(c)
|
|
|
|
KVSO_PARAMETERS_BEGIN(c)
|
|
|
@ -242,7 +242,7 @@ bool KviKvsObject_doctwindow::function_setAllowedDockAreas(KviKvsObjectFunctionC
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bool KviKvsObject_doctwindow::function_dock(KviKvsObjectFunctionCall * c)
|
|
|
|
bool KviKvsObject_dockwindow::function_dock(KviKvsObjectFunctionCall * c)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
TQString szDock;
|
|
|
|
TQString szDock;
|
|
|
|
KVSO_PARAMETERS_BEGIN(c)
|
|
|
|
KVSO_PARAMETERS_BEGIN(c)
|
|
|
@ -273,4 +273,4 @@ bool KviKvsObject_doctwindow::function_dock(KviKvsObjectFunctionCall * c)
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#include "m_class_doctwindow.moc"
|
|
|
|
#include "m_class_dockwindow.moc"
|
|
|
|