diff options
| author | 2008-04-30 14:54:44 +0000 | |
|---|---|---|
| committer | 2008-04-30 14:54:44 +0000 | |
| commit | d6901ad9864d9875aa2ac2739d92adfcbbc62512 (patch) | |
| tree | 3dab827ca01bb5c749a07c67cfac69e7b1b7149b | |
| parent | KviTalGroupBox QT4 port (almost completed) (diff) | |
| download | KVIrc-d6901ad9864d9875aa2ac2739d92adfcbbc62512.tar.gz KVIrc-d6901ad9864d9875aa2ac2739d92adfcbbc62512.tar.bz2 KVIrc-d6901ad9864d9875aa2ac2739d92adfcbbc62512.zip | |
kvs groupbox QT4 port
git-svn-id: https://svn.kvirc.de/svn/trunk/kvirc@1631 17fca916-40b9-46aa-a4ea-0a15b648b75c
| -rw-r--r-- | src/modules/objects/class_groupbox.cpp | 52 | ||||
| -rw-r--r-- | src/modules/objects/class_groupbox.h | 3 |
2 files changed, 4 insertions, 51 deletions
diff --git a/src/modules/objects/class_groupbox.cpp b/src/modules/objects/class_groupbox.cpp index 4f35078f1..4ed71cab3 100644 --- a/src/modules/objects/class_groupbox.cpp +++ b/src/modules/objects/class_groupbox.cpp @@ -84,10 +84,6 @@ const int align_cod[] = { Sets the width of the empty space between each of the items in the group to m pixels. !fn: <integer> $insideSpacing() Returns the width of the empty space between each of the items in the group. - !fn: $setColumns(<columns:uint>) - Sets the number of columns or rows (depending of the orientation) in the group box. - !fn: <integer> $columns() - Returns the number of columns or rows in the groupbox. !fn: $addSpace() Adds an empty cell at the next free position. !fn: <string> $alignment() @@ -96,9 +92,6 @@ const int align_cod[] = { Set the alignment of the groupbox; Valid values are Left,Right,HCenter. !fn: $setOrientation<orientation:string> Sets the group box's orientation. Valid values are: Horizontal, Vertical. - !fn: $setColumnLayout(<columns:integer>,<orientation:string>) - Enables the automatic layout management. The children are arranged in n columns with the specified orientation.[br] - Valid values for <orientation> are: Horizontal, Vertical. @examples: [example] |-Start:[br] @@ -163,15 +156,14 @@ KVSO_BEGIN_REGISTERCLASS(KviKvsObject_groupbox,"groupbox","widget") KVSO_REGISTER_HANDLER(KviKvsObject_groupbox,"insideMargin", functionInsideMargin) KVSO_REGISTER_HANDLER(KviKvsObject_groupbox,"setInsideSpacing", functionSetInsideSpacing) KVSO_REGISTER_HANDLER(KviKvsObject_groupbox,"insideSpacing", functionInsideSpacing) - KVSO_REGISTER_HANDLER(KviKvsObject_groupbox,"setColumns", functionSetColumns) - KVSO_REGISTER_HANDLER(KviKvsObject_groupbox,"columns", functionColumns) KVSO_REGISTER_HANDLER(KviKvsObject_groupbox,"addSpace", functionAddSpace) KVSO_REGISTER_HANDLER(KviKvsObject_groupbox,"alignment", functionAlignment) KVSO_REGISTER_HANDLER(KviKvsObject_groupbox,"setAlignment", functionSetAlignment) KVSO_REGISTER_HANDLER(KviKvsObject_groupbox,"setOrientation", functionSetOrientation) + KVSO_REGISTER_HANDLER(KviKvsObject_groupbox,"setLayoutOrientation", functionSetOrientation) KVSO_REGISTER_HANDLER(KviKvsObject_groupbox,"isChecked", functionIsChecked) KVSO_REGISTER_HANDLER(KviKvsObject_groupbox,"setChecked", functionSetChecked) - KVSO_REGISTER_HANDLER(KviKvsObject_groupbox,"setColumnLayout",functionSetColumnLayout) + KVSO_END_REGISTERCLASS(KviKvsObject_groupbox) KVSO_BEGIN_CONSTRUCTOR(KviKvsObject_groupbox,KviKvsObject_widget) @@ -279,24 +271,7 @@ bool KviKvsObject_groupbox::functionInsideSpacing(KviKvsObjectFunctionCall *c) if (widget()) c->returnValue()->setInteger(((KviTalGroupBox *)widget())->insideSpacing()); return true; } -// FIXME - -bool KviKvsObject_groupbox::functionSetColumns(KviKvsObjectFunctionCall *c) -{ - kvs_uint_t uColums; - KVSO_PARAMETERS_BEGIN(c) - KVSO_PARAMETER("colums",KVS_PT_UNSIGNEDINTEGER,0,uColums) - KVSO_PARAMETERS_END(c) -// if (widget()) ((KviTalGroupBox *)widget())->setColumns(uColums); - return true; -} -// FIXME -bool KviKvsObject_groupbox::functionColumns(KviKvsObjectFunctionCall *c) -{ -// if (widget()) c->returnValue()->setInteger(((KviTalGroupBox *)widget())->columns()); - return true; -} bool KviKvsObject_groupbox::functionAddSpace(KviKvsObjectFunctionCall *c) { kvs_uint_t iSpace; @@ -350,32 +325,13 @@ bool KviKvsObject_groupbox::functionSetOrientation(KviKvsObjectFunctionCall *c) KVSO_PARAMETERS_END(c) if(!widget())return true; if(KviQString::equalCI(szMode, "Horizontal")) - ((KviTalGroupBox *)widget())->setOrientation(Qt::Horizontal); + ((KviTalGroupBox *)widget())->setOrientation(Qt::Vertical); else if(KviQString::equalCI(szMode, "Vertical")) - ((KviTalGroupBox *)widget())->setOrientation(Qt::Vertical); + ((KviTalGroupBox *)widget())->setOrientation(Qt::Horizontal); else c->warning( __tr2qs("Unknown orientation: ")); return true; } -// FIXME -bool KviKvsObject_groupbox::functionSetColumnLayout(KviKvsObjectFunctionCall *c) -{ - QString szMode; - kvs_uint_t uCol; - KVSO_PARAMETERS_BEGIN(c) - KVSO_PARAMETER("columns",KVS_PT_UNSIGNEDINTEGER,0,uCol) - KVSO_PARAMETER("orientation",KVS_PT_STRING,0,szMode) - KVSO_PARAMETERS_END(c) - if(!widget())return true; -// if(szMode=="Horizontal") -/* ((KviTalGroupBox *)widget())->setColumnLayout(uCol,Qt::Horizontal); - else - if(szMode=="Vertical") - ((KviTalGroupBox *)widget())->setColumnLayout(uCol,Qt::Vertical); - else c->warning( __tr2qs("Unknown orientation: ")); -*/ - return true; -} diff --git a/src/modules/objects/class_groupbox.h b/src/modules/objects/class_groupbox.h index 08329dd64..6dda5b3de 100644 --- a/src/modules/objects/class_groupbox.h +++ b/src/modules/objects/class_groupbox.h @@ -49,15 +49,12 @@ protected: bool functionInsideMargin(KviKvsObjectFunctionCall *c); bool functionSetInsideSpacing(KviKvsObjectFunctionCall *c); bool functionInsideSpacing(KviKvsObjectFunctionCall *c); - bool functionSetColumns(KviKvsObjectFunctionCall *c); - bool functionColumns(KviKvsObjectFunctionCall *c); bool functionAddSpace(KviKvsObjectFunctionCall *c); bool functionAlignment(KviKvsObjectFunctionCall *c); bool functionSetAlignment(KviKvsObjectFunctionCall *c); bool functionSetOrientation(KviKvsObjectFunctionCall *c); bool functionIsChecked(KviKvsObjectFunctionCall *c); bool functionSetChecked(KviKvsObjectFunctionCall *c); - bool functionSetColumnLayout(KviKvsObjectFunctionCall *c); }; #endif //!_CLASS_GROUPBOX_H_ |
