diff options
Diffstat (limited to 'src/modules/objects')
| -rw-r--r-- | src/modules/objects/class_dockwindow.cpp | 30 | ||||
| -rw-r--r-- | src/modules/objects/class_toolbar.cpp | 34 |
2 files changed, 0 insertions, 64 deletions
diff --git a/src/modules/objects/class_dockwindow.cpp b/src/modules/objects/class_dockwindow.cpp index f3f375be8..44768bb47 100644 --- a/src/modules/objects/class_dockwindow.cpp +++ b/src/modules/objects/class_dockwindow.cpp @@ -45,17 +45,10 @@ [class]widget[/class] @description: A window dockable to the KVIrc main frame borders (like a toolbar). - The window has an implicit layout that will automatically manage - the children depending on the dock window's orientation. @functions: !fn: $addWidget(<widget:hobject>) Adds <widget> to the internal layout of this dock window.[br] The widget must be a child of this dock window (otherwise strange things may happen). - !fn: <string> $orientation() - Returns the string "vertical" or "horizontal" depending on the orientation of this dock window. - !fn: $setOrientation(<orientation:string>) - Forces the orentation of this dock window. <ordientation> must be either "horizontal" or "vertical".[br] - Please note that KVIrc sets the orientation automatically when it is moved between the main frame docks by the user. !fn: <bool> $resizeEnabled() Returns $true if resizing of this window is enabled and false otherwise. !fn: $setResizeEnabled(<bEnabled:bool>) @@ -72,8 +65,6 @@ KVSO_BEGIN_REGISTERCLASS(KviKvsObject_dockwindow,"dockwindow","widget") KVSO_REGISTER_HANDLER(KviKvsObject_dockwindow,"addWidget",function_addWidget) - KVSO_REGISTER_HANDLER(KviKvsObject_dockwindow,"orientation",function_orientation) - KVSO_REGISTER_HANDLER(KviKvsObject_dockwindow,"setOrientation",function_setOrientation) KVSO_REGISTER_HANDLER(KviKvsObject_dockwindow,"resizeEnabled",function_resizeEnabled) KVSO_REGISTER_HANDLER(KviKvsObject_dockwindow,"setResizeEnabled",function_setResizeEnabled) KVSO_REGISTER_HANDLER(KviKvsObject_dockwindow,"setAllowedDockAreas",function_setAllowedDockAreas) @@ -141,27 +132,6 @@ bool KviKvsObject_dockwindow::function_addWidget(KviKvsObjectFunctionCall *c) _pDockWindow->setWidget((QWidget *)(pWidget->object())); return true; } - -bool KviKvsObject_dockwindow::function_orientation(KviKvsObjectFunctionCall * c) -{ - if(!widget())return true; // hum ? dead ? - c->returnValue()->setString(QString("horizontal")); - return true; -} - -bool KviKvsObject_dockwindow::function_setOrientation(KviKvsObjectFunctionCall * c) -{ - QString szOrientation; - KVSO_PARAMETERS_BEGIN(c) - KVSO_PARAMETER("orientation",KVS_PT_NONEMPTYSTRING,0,szOrientation) - KVSO_PARAMETERS_END(c) - - if(!widget())return true; // hum ? dead ? -#ifndef COMPILE_USE_QT4 - _pDockWindow->setOrientation(KviQString::equalCI(szOrientation,"vertical") ? Qt::Vertical : Qt::Horizontal); -#endif //!COMPILE_USE_QT4 - return true; -} // Fix me bool KviKvsObject_dockwindow::function_resizeEnabled(KviKvsObjectFunctionCall * c) { diff --git a/src/modules/objects/class_toolbar.cpp b/src/modules/objects/class_toolbar.cpp index d98ab4bb1..ef66f85c5 100644 --- a/src/modules/objects/class_toolbar.cpp +++ b/src/modules/objects/class_toolbar.cpp @@ -54,8 +54,6 @@ Sets the toolbar's label. !fn: <string> $label() Returns the toolbar's label. - !fn: $setStretchableWidget(<widget:object>) - Sets the <widget> to be expanded. !fn: $clear() Deletes all the toolbar's child widgets. @@ -66,7 +64,6 @@ KVSO_BEGIN_REGISTERCLASS(KviKvsObject_toolbar,"toolbar","object") KVSO_REGISTER_HANDLER(KviKvsObject_toolbar,"addSeparator", functionaddSeparator) KVSO_REGISTER_HANDLER(KviKvsObject_toolbar,"setLabel", functionsetLabel) KVSO_REGISTER_HANDLER(KviKvsObject_toolbar,"label", functionlabel) - KVSO_REGISTER_HANDLER(KviKvsObject_toolbar,"setStretchableWidget", functionsetStretchableWidget) KVSO_REGISTER_HANDLER(KviKvsObject_toolbar,"clear", functionclear) KVSO_END_REGISTERCLASS(KviKvsObject_toolbar) @@ -117,37 +114,6 @@ bool KviKvsObject_toolbar::functionlabel(KviKvsObjectFunctionCall *c) if (widget()) c->returnValue()->setString(((KviTalToolBar *)widget())->windowTitle()); return true; } -//FIX ME -bool KviKvsObject_toolbar::functionsetStretchableWidget(KviKvsObjectFunctionCall *c) -{ - KviKvsObject *ob; - kvs_hobject_t hObject; - KVSO_PARAMETERS_BEGIN(c) - KVSO_PARAMETER("widget",KVS_PT_HOBJECT,0,hObject) - KVSO_PARAMETERS_END(c) - ob=KviKvsKernel::instance()->objectController()->lookupObject(hObject); - if (!widget()) return true; - if (!ob) - { - c->warning(__tr2qs("Widget parameter is not an object")); - return true; - } - if (!ob->object()) - { - c->warning(__tr2qs("Widget parameter is not a valid object")); - return true; - } - if(!ob->object()->inherits("KviKvsObject_widget")) - { - c->warning(__tr2qs("Widget object required")); - return TRUE; - } -#ifndef COMPILE_USE_QT4 - // FIXME: no support for this in Qt4 ? - if(widget()) ((KviTalToolBar *)widget())->setStretchableWidget(((QWidget *)(ob->object()))); -#endif //!COMPILE_USE_QT4 - return true; -} bool KviKvsObject_toolbar::functionclear(KviKvsObjectFunctionCall *c) { if (widget()) |
