diff options
Diffstat (limited to 'src/modules/objects/class_dockwindow.cpp')
-rw-r--r-- | src/modules/objects/class_dockwindow.cpp | 56 |
1 files changed, 0 insertions, 56 deletions
diff --git a/src/modules/objects/class_dockwindow.cpp b/src/modules/objects/class_dockwindow.cpp index 5e2beb1e..bc491dcb 100644 --- a/src/modules/objects/class_dockwindow.cpp +++ b/src/modules/objects/class_dockwindow.cpp @@ -27,13 +27,8 @@ #include "kvi_frame.h" #include "kvi_locale.h" #include "kvi_qstring.h" -#ifdef COMPILE_USE_QT4 - #include <TQDockWidget> - #define TQT_DOCK_WINDOW TQDockWidget -#else #include <tqdockwindow.h> #define TQT_DOCK_WINDOW TQDockWindow -#endif #include <tqlayout.h> /* @@ -96,13 +91,7 @@ KVSO_END_DESTRUCTOR(KviKvsObject_dockwindow) bool KviKvsObject_dockwindow::init(KviKvsRunTimeContext * pContext,KviKvsVariantList * pParams) { -#ifdef COMPILE_USE_QT4 - TQDockWidget * pWidget = new TQDockWidget(g_pFrame); - pWidget->setObjectName(getName()); - setObject(pWidget); -#else //!COMPILE_USE_QT4 setObject(TQT_TQOBJECT(new TQT_DOCK_WINDOW(g_pFrame,getName())),true); -#endif //!COMPILE_USE_QT4 return true; } @@ -146,23 +135,15 @@ bool KviKvsObject_dockwindow::function_addWidget(KviKvsObjectFunctionCall *c) c->warning(__tr2qs("The added widget is not a child of this dock window")); } -#ifdef COMPILE_USE_QT4 - _pDockWindow->setWidget((TQWidget *)(pWidget->object())); -#else //!COMPILE_USE_QT4 _pDockWindow->boxLayout()->addWidget((TQWidget *)(pWidget->object())); ((TQWidget *)(pWidget->object()))->show(); -#endif //!COMPILE_USE_QT4 return true; } bool KviKvsObject_dockwindow::function_orientation(KviKvsObjectFunctionCall * c) { if(!widget())return true; // hum ? dead ? -#ifdef COMPILE_USE_QT4 - c->returnValue()->setString(TQString("horizontal")); -#else //!COMPILE_USE_QT4 c->returnValue()->setString(_pDockWindow->orientation() == Qt::Horizontal ? TQString("horizontal") : TQString("vertical")); -#endif //!COMPILE_USE_QT4 return true; } @@ -174,20 +155,14 @@ bool KviKvsObject_dockwindow::function_setOrientation(KviKvsObjectFunctionCall * KVSO_PARAMETERS_END(c) if(!widget())return true; // hum ? dead ? -#ifndef COMPILE_USE_QT4 _pDockWindow->setOrientation(KviTQString::equalCI(szOrientation,"vertical") ? Qt::Vertical : Qt::Horizontal); -#endif //!COMPILE_USE_QT4 return true; } bool KviKvsObject_dockwindow::function_resizeEnabled(KviKvsObjectFunctionCall * c) { if(!widget())return true; // hum ? dead ? -#ifdef COMPILE_USE_QT4 - c->returnValue()->setBoolean(false); -#else //!COMPILE_USE_QT4 c->returnValue()->setBoolean(_pDockWindow->isResizeEnabled()); -#endif //!COMPILE_USE_QT4 return true; } @@ -200,9 +175,7 @@ bool KviKvsObject_dockwindow::function_setResizeEnabled(KviKvsObjectFunctionCall if(!widget())return true; // hum ? dead ? -#ifndef COMPILE_USE_QT4 _pDockWindow->setResizeEnabled(bResizeEnabled); -#endif //!COMPILE_USE_QT4 return true; } @@ -215,28 +188,12 @@ bool KviKvsObject_dockwindow::function_setAllowedDockAreas(KviKvsObjectFunctionC if(!widget())return true; // hum ? dead ? -#ifdef COMPILE_USE_QT4 - TQt::DockWidgetAreas fAreas = TQt::NoDockWidgetArea; - if(szFlags.find('t',false))fAreas |= TQt::TopDockWidgetArea; - if(szFlags.find('l',false))fAreas |= TQt::LeftDockWidgetArea; - if(szFlags.find('r',false))fAreas |= TQt::RightDockWidgetArea; - if(szFlags.find('b',false))fAreas |= TQt::BottomDockWidgetArea; - _pDockWindow->setAllowedAreas(fAreas); - TQDockWidget::DockWidgetFeatures fFeatures = _pDockWindow->features(); - if(szFlags.find('f',false)) - fFeatures |= TQDockWidget::DockWidgetFloatable; - else - fFeatures &= ~TQDockWidget::DockWidgetFloatable; - // no support for minimized dock widgets - _pDockWindow->setFeatures(fFeatures); -#else //!COMPILE_USE_QT4 g_pFrame->setDockEnabled(_pDockWindow,TQt::DockTop,szFlags.find('t',false) != -1); g_pFrame->setDockEnabled(_pDockWindow,TQt::DockLeft,szFlags.find('l',false) != -1); g_pFrame->setDockEnabled(_pDockWindow,TQt::DockRight,szFlags.find('r',false) != -1); g_pFrame->setDockEnabled(_pDockWindow,TQt::DockBottom,szFlags.find('b',false) != -1); g_pFrame->setDockEnabled(_pDockWindow,TQt::DockTornOff,szFlags.find('f',false) != -1); g_pFrame->setDockEnabled(_pDockWindow,TQt::DockMinimized,szFlags.find('m',false) != -1); -#endif //!COMPILE_USE_QT4 return true; } @@ -250,18 +207,6 @@ bool KviKvsObject_dockwindow::function_dock(KviKvsObjectFunctionCall * c) KVSO_PARAMETERS_END(c) if(!widget())return true; // hum ? dead ? -#ifdef COMPILE_USE_QT4 - g_pFrame->removeDockWidget(_pDockWindow); - if(szDock.find('m',false) == -1)_pDockWindow->setFloating(false); - if(szDock.find('t',false) != -1)g_pFrame->addDockWidget(TQt::TopDockWidgetArea,_pDockWindow); - else if(szDock.find('l',false) != -1)g_pFrame->addDockWidget(TQt::LeftDockWidgetArea,_pDockWindow); - else if(szDock.find('r',false) != -1)g_pFrame->addDockWidget(TQt::RightDockWidgetArea,_pDockWindow); - else if(szDock.find('b',false) != -1)g_pFrame->addDockWidget(TQt::BottomDockWidgetArea,_pDockWindow); - else if(szDock.find('f',false) != -1)_pDockWindow->setFloating(true); - else if(szDock.find('m',false) != -1)tqDebug("Sorry: no support for minimized dock widgets in TQt4"); - else c->warning(__tr2qs("Invalid dock area specified")); - -#else //!COMPILE_USE_QT4 if(szDock.find('t',false) != -1)g_pFrame->moveDockWindow(_pDockWindow,TQt::DockTop,false,100); else if(szDock.find('l',false) != -1)g_pFrame->moveDockWindow(_pDockWindow,TQt::DockLeft,false,100); else if(szDock.find('r',false) != -1)g_pFrame->moveDockWindow(_pDockWindow,TQt::DockRight,false,100); @@ -269,7 +214,6 @@ bool KviKvsObject_dockwindow::function_dock(KviKvsObjectFunctionCall * c) else if(szDock.find('f',false) != -1)g_pFrame->moveDockWindow(_pDockWindow,TQt::DockTornOff,false,100); else if(szDock.find('m',false) != -1)g_pFrame->moveDockWindow(_pDockWindow,TQt::DockMinimized,false,100); else c->warning(__tr2qs("Invalid dock area specified")); -#endif //!COMPILE_USE_QT4 return true; } |