diff options
Diffstat (limited to 'src/modules/objects')
23 files changed, 322 insertions, 380 deletions
diff --git a/src/modules/objects/KvsObject_buttonGroup.cpp b/src/modules/objects/KvsObject_buttonGroup.cpp index 60fe86439..d2be856c0 100644 --- a/src/modules/objects/KvsObject_buttonGroup.cpp +++ b/src/modules/objects/KvsObject_buttonGroup.cpp @@ -48,8 +48,8 @@ @description: This object organizes buttons in a group. @functions: - !fn: <id:integer> $addButton(<checkbutton or radiobutton:object>) - Adds the given button to the button group and returns an unique identifier. + !fn: <id:integer> $addButton(<checkbutton or radiobutton:object>) + Adds the given button to the button group and returns an unique identifier. !fn: <object> $checkedButton() Returns the button group's checked button, or 0 if no buttons are checked. */ diff --git a/src/modules/objects/KvsObject_groupBox.cpp b/src/modules/objects/KvsObject_groupBox.cpp index 51575049d..2aff37437 100644 --- a/src/modules/objects/KvsObject_groupBox.cpp +++ b/src/modules/objects/KvsObject_groupBox.cpp @@ -52,9 +52,9 @@ const int align_cod[] = { /* @doc: groupbox @keyterms: - groupbox object class, + groupbox, group @title: - groupbox class + groupbox object class @type: class @short: @@ -71,15 +71,15 @@ const int align_cod[] = { !fn: $setTitle(<text:String>) Sets the group box title to <text>. !fn: <string> $title() - Returns the group box title text. + Returns the groupbox title text. !fn: $setFlat(<bflag:boolean>) Sets whether the group box is painted flat. Valid Values are 1 or 0. !fn: <boolean> $isFlat() - Returns 1 (true) if the group box is painted flat; otherwise returns 0 (false). + Returns 1 (true) if the groupbox is painted flat; otherwise returns 0 (false). !fn: <boolean> $isCheckable() Returns 1 (true) if the group box has a checkbox in its title; otherwise returns 0 (false). !fn: $setCheckable(<bflag:boolean>) - Sets whether the group box has a checkbox in its title: Valid values are 1 or 0. + Sets whether the groupbox has a checkbox in its title: Valid values are 1 or 0. !fn: $setInsideMargin(<margin:uint>) Sets the the width of the inside margin to m pixels. !fn: <integer> $insideMargin() @@ -91,47 +91,44 @@ const int align_cod[] = { !fn: $addSpace() Adds an empty cell at the next free position. !fn: <string> $alignment() - Returns the alignment of the group box title. + Returns the alignment of the groupbox title. !fn: $setAlignment(<alignment:string>) - Set the alignment of the groupbox; Valid values are Left,Right,HCenter. + 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. + Sets the groupbox's orientation. Valid values are: Horizontal, Vertical. @examples: [example] - //Let's start. - //First we'll create the main widget. as a dialog + [comment]//First we'll create the main widget. as a dialog[/comment] %widget=$new(dialog) %layout=$new(layout,%widget) - //then the groupbox + [comment]//Then the groupbox[/comment] %gb=$new(groupbox,%widget) %gb->$setTitle(Login) %gb->$setAlignment("Left") - // add the gbox to the main layout + [comment]//Add the groupbox to the main layout[/comment] %layout->$addWidget(%gb,0,0) - // now we create the user field (labels + lineedit) - // in a horizontal box + [comment]//Now we create the user field + (labels + lineedit) in a horizontal box[/comment] %hbox=$new(hbox,%gb) %labeluser=$new(label,%hbox) %labeluser->$settext(User: ) %inputuser=$new(lineedit,%hbox) - //now we create the pass field (labels + lineedit). - // in a horizontal box + [comment]//Now we create the password field + (labels + lineedit) in a horizontal box[/comment] %hbox=$new(hbox,%gb) %labelpass=$new(label,%hbox) %labelpass->$settext(Pass: ) %inputpass=$new(lineedit,%hbox) %inputpass->$setechomode("password") - // now we create the ok/cancel box buttons + [comment]//Now we create the OK/Cancel box buttons[/comment] %hbox=$new(hbox,%gb) %btnok=$new(button,%hbox) %btnok->$settext("OK") %btncancel=$new(button,%hbox) %btncancel->$settext("Cancel") - - //Let's show our nice form + [comment]//Let's show our nice form[/comment] %widget->$show() [/example] - */ KVSO_BEGIN_REGISTERCLASS(KvsObject_groupBox,"groupbox","widget") @@ -275,7 +272,7 @@ KVSO_CLASS_FUNCTION(groupBox,addSpace) CHECK_INTERNAL_POINTER(widget()) kvs_uint_t iSpace; KVSO_PARAMETERS_BEGIN(c) - KVSO_PARAMETER("colums",KVS_PT_UNSIGNEDINTEGER,0,iSpace) + KVSO_PARAMETER("columns",KVS_PT_UNSIGNEDINTEGER,0,iSpace) KVSO_PARAMETERS_END(c) (((KviTalGroupBox *)widget())->addSpace(iSpace)); return true; diff --git a/src/modules/objects/KvsObject_layout.cpp b/src/modules/objects/KvsObject_layout.cpp index 39ade29a3..67ddfa4e3 100644 --- a/src/modules/objects/KvsObject_layout.cpp +++ b/src/modules/objects/KvsObject_layout.cpp @@ -79,24 +79,24 @@ const int align_cod[] = { !fn: $addMultiCellWidget(<widget:object widget>,<start_row:uint>,<end_row:uint>,<start_col:uint>,<end_col:uint>) Adds a widget to this layout spanning multiple grid cells !fn: $setRowStretch(<row:uint>,<stretch:uint>) - Sets the stretch value for a particular row of this layout. The <stretch_value> - must be a positive integer. The rows with bigger stretch values will take more space - in the layout. - !fn: $setColumnStretch(<column:uint>,<stretch:uint>) - Sets the stretch value for a particular column in this layout. The <stretch_value> - must be a positive integer. The rows with bigger stretch values will take more space - in the layout. + Sets the stretch value for a particular row of this layout.[br] + The <stretch_value> must be a positive integer.[br] + The rows with bigger stretch values will take more space in the layout. + !fn: $setColumnStretch(<column:uint>,<stretch:uint>) + Sets the stretch value for a particular column in this layout.[br] + The <stretch_value> must be a positive integer.[br] + The rows with bigger stretch values will take more space in the layout. !fn: $addRowSpacing(<row:uint>,<spacing:uint>) Sets the minimum height of the specified <row> to <spacing> which must be a positive integer !fn: $addColSpacing(<column:uint>,<spacing:uint>) - Sets the minimum width of the specigfied <column> to <spacing> which must be a positive integer + Sets the minimum width of the specified <column> to <spacing> which must be a positive integer !fn: $setSpacing(<spacing:uint>) Sets the default spacing of the widgets in pixels !fn: $setMargin(<margin:uint>) - Sets the dimension of the layout margin : the distance from the border to the outermost child widget edges. + Sets the dimension of the layout margin: the distance from the border to the outermost child widget edges. !fn: $setAlignment(<w:widget>, <flag1:string>, <flag2:string>, ...) Sets the alignment for widget w to flags, given as parameters. - Valid flags are:Right,Left,Top,Bottom,HCenter,VCenter,Center + Valid flags are: Right, Left, Top, Bottom, HCenter, VCenter, Center !fn: $setResizeMode(<resize_mode:string>) Sets the resize mode of the parent widget in relation to this layout. <mode> can be one of:[br] diff --git a/src/modules/objects/KvsObject_lcd.cpp b/src/modules/objects/KvsObject_lcd.cpp index 0abe4bbc9..b770a1ac5 100644 --- a/src/modules/objects/KvsObject_lcd.cpp +++ b/src/modules/objects/KvsObject_lcd.cpp @@ -1,8 +1,8 @@ //============================================================================= // // File : KvsObject_lcd.cpp -// Creation date : Mon Gen 27 14:30:48 CEST 2005 by Tonino Imbesi(Grifisx) -// and Alessandro Carbone(Noldor) +// Creation date : Mon Gen 27 14:30:48 CEST 2005 +// by Tonino Imbesi(Grifisx) and Alessandro Carbone(Noldor) // // This file is part of the KVIrc IRC client distribution // Copyright (C) 2005 Alessandro Carbone (elfonol at gmail dot com) @@ -44,8 +44,8 @@ @inherits: @description: - It can display a number in just about any size. It can display decimal, - hexadecimal, octal or binary numbers. + It can display a number in just about any size.[br] + It can display decimal, hexadecimal, octal or binary numbers. @functions: !fn: $displayStr(<number:string>) Displays the number represented by the string s. @@ -54,18 +54,18 @@ !fn: $displayDouble(<number:double>) Sets the displayed value to number (double). !fn: $setMode(<mode:string>) - Sets the current display mode (number base): valid mode are HEX,BIN,OCT,DEC. + Sets the current display mode (number base): valid mode are: [b]HEX[/b], [b]BIN[/b], [b]OCT[/b] and [b]DEC[/b]. !fn: $setSegmentStyles(<style:string>) - Sets the style of the lcdnumber, valid styles are: Outline,Filled,Flat. + Sets the style of the lcdnumber, valid styles are: [b]Outline[/b], [b]Filled[/b] and [b]Flat[/b]. !fn: $setNumDigits(<number:integer>) - Sets the lcd number value. + Sets the lcdnumber value. !fn: <boolean> $checkOverflow() - Returns true if num is too big to be displayed in its entirety; - otherwise returns false. - !fn: $setSmallDecimalPoint(<bflag:boolean>) - Sets the the decimal point style, valid bool values are 1 or 0. + Returns 1 (true) if the number is too big to be displayed in its entirety; + otherwise returns 0 (false). + !fn: $setSmallDecimalPoint(<bFlag:boolean>) + Sets the the decimal point style, valid bool values are 1 (true) or 0 (false). !fn: <boolean> $checkOverflow(<number:integer>) - Returns 1 (true) if num is too big to be displayed in its entirety; otherwise returns 0 (false). + Returns 1 (true) if the number is too big to be displayed in its entirety; otherwise returns 0 (false). */ KVSO_BEGIN_REGISTERCLASS(KvsObject_lcd,"lcdnumber","widget") @@ -177,7 +177,7 @@ KVSO_CLASS_FUNCTION(lcd,setSmallDecimalPoint) CHECK_INTERNAL_POINTER(widget()) bool bFlag; KVSO_PARAMETERS_BEGIN(c) - KVSO_PARAMETER("bflag",KVS_PT_BOOLEAN,0,bFlag) + KVSO_PARAMETER("bFlag",KVS_PT_BOOLEAN,0,bFlag) KVSO_PARAMETERS_END(c) ((QLCDNumber *)widget())->setSmallDecimalPoint(bFlag); return true; diff --git a/src/modules/objects/KvsObject_lcd.h b/src/modules/objects/KvsObject_lcd.h index 3738f1f5f..86212e76b 100644 --- a/src/modules/objects/KvsObject_lcd.h +++ b/src/modules/objects/KvsObject_lcd.h @@ -3,8 +3,8 @@ //============================================================================= // // File : KvsObject_lcd.h -// Creation date : Mon Gen 27 14:30:48 CEST 2005 by Tonino Imbesi(Grifisx) -// and Alessandro Carbone(Noldor) +// Creation date : Mon Gen 27 14:30:48 CEST 2005 +// by Tonino Imbesi(Grifisx) and Alessandro Carbone(Noldor) // // This file is part of the KVIrc IRC client distribution // Copyright (C) 2005 Alessandro Carbone (elfonol at gmail dot com) diff --git a/src/modules/objects/KvsObject_lineEdit.cpp b/src/modules/objects/KvsObject_lineEdit.cpp index eebb863f3..8a194cef7 100644 --- a/src/modules/objects/KvsObject_lineEdit.cpp +++ b/src/modules/objects/KvsObject_lineEdit.cpp @@ -73,8 +73,8 @@ static const int mode_cod[] = { !fn: $setEchoMode(<echo_mode:string>) Sets the line edit's echo mode. Possible value are:[br] -Normal: display chars as they entered[br] - -Noecho : do not display anything[br] - -Password : display asterisks instead of the characters actually entered[br] + -Noecho: do not display anything[br] + -Password: display asterisks instead of the characters actually entered[br] See also [classfnc]$echoMode[/classfnc](). !fn: <string> $echoMode() Return the line edit's echo mode. @@ -129,37 +129,38 @@ static const int mode_cod[] = { !fn: $setDragEnabled(<bEnabled:bool>) With this property user can drag text in the lineedit. !fn: $setReadOnly(<bReadonly:boolean>) - Sets the lineedit to read only mode. + Sets the lineedit to read-only mode. !fn: $setInputMask(<mask:string>) Sets the validation input mask to inputMask.[br] - Example:[br] - [br] + [b]Example:[/b][br] + [example] %ledit_example->$setInputMask( "+99 99 99 99 99;_" );[br] %ledit_example->$setInputMask( "000.000.000.000;_" );[br] - %ledit_example->Ip Number Mask.[br] - %ledit_example->setInputMask( ">AAAAA-AAAAA-AAAAA-AAAAA-AAAAA;#" );[br] - [br] + %ledit_example->IP Number Mask.[br] + %ledit_example->setInputMask( ">AAAAA-AAAAA-AAAAA-AAAAA-AAAAA;#" ); + [/example] The mask format understands these mask characters:[br] - Character Meaning[br] - A ASCII alphabetic character required. A-Z, a-z.[br] - a ASCII alphabetic character permitted but not required.[br] - N ASCII alphanumeric character required. A-Z, a-z, 0-9.[br] - n ASCII alphanumeric character permitted but not required.[br] - X Any character required.[br] - x Any character permitted but not required.[br] - 9 ASCII digit required. 0-9.[br] - 0 ASCII digit permitted but not required.[br] - D ASCII digit required. 1-9.[br] - d ASCII digit permitted but not required.[br] - # ASCII digit or plus/minus sign permitted but not required.[br] - > All following alphabetic characters are uppercased.[br] - < All following alphabetic characters are lowercased.[br] - ! Switch off case conversion.[br] - \ Use \ to escape the special characters listed above to use them as separators.[br] - [br] + [example] + [b][comment]Character Meaning[/comment][/b][br] + A - ASCII alphabetic character required. A-Z, a-z.[br] + a - ASCII alphabetic character permitted but not required.[br] + N - ASCII alphanumeric character required. A-Z, a-z, 0-9.[br] + n - ASCII alphanumeric character permitted but not required.[br] + X - Any character required.[br] + x - Any character permitted but not required.[br] + 9 - ASCII digit required. 0-9.[br] + 0 - ASCII digit permitted but not required.[br] + D - ASCII digit required. 1-9.[br] + d - ASCII digit permitted but not required.[br] + # - ASCII digit or plus/minus sign permitted but not required.[br] + > - All following alphabetic characters are uppercased.[br] + < - All following alphabetic characters are lowercased.[br] + ! - Switch off case conversion.[br] + \ - Use \ to escape the special characters listed above to use them as separators. + [/example] The mask consists of a string of mask characters and separators, optionally[br] - followed by a semi-colon and the character used for blanks: the blank characters [br] - are always removed from the text after editing. The default blank character is space. [br] + followed by a semi-colon and the character used for blanks: the blank characters[br] + are always removed from the text after editing. The default blank character is space.[br] !fn: $returnPressedEvent() This function is called by the framework when the enter key is pressed. !fn: $lostFocusEvent() @@ -185,7 +186,6 @@ static const int mode_cod[] = { This signal is emitted by the default implementation of [classfnc]$lostFocusEvent[/classfnc](). !sg: $textChanged() This signal is emitted by the default implementation of [classfnc]$textChangedEvent[/classfnc](). - */ @@ -307,7 +307,7 @@ KVSO_CLASS_FUNCTION(lineEdit,setFrame) CHECK_INTERNAL_POINTER(widget()) bool bFrame; KVSO_PARAMETERS_BEGIN(c) - KVSO_PARAMETER("bframe",KVS_PT_BOOL,0,bFrame) + KVSO_PARAMETER("bFrame",KVS_PT_BOOL,0,bFrame) KVSO_PARAMETERS_END(c) ((QLineEdit *)widget())->setFrame(bFrame); return true; @@ -465,7 +465,7 @@ KVSO_CLASS_FUNCTION(lineEdit,setCompleter) if(KviQString::equalCI(szMode,"InlineCompletion")) mode=QCompleter::InlineCompletion; else if(KviQString::equalCI(szMode,"UnfilteredPopupCompletion")) mode=QCompleter::UnfilteredPopupCompletion; else if(!KviQString::equalCI(szMode,"PopupCompletion")) - c->warning(__tr2qs_ctx("Unkonwn '%Q' completition mode, switching to default popupCompletition","objects"),&szMode); + c->warning(__tr2qs_ctx("Unknown '%Q' completion mode, switching to default PopupCompletion","objects"),&szMode); m_pCompleter->setCompletionMode(mode); ((QLineEdit *)widget())->setCompleter(m_pCompleter); return true; diff --git a/src/modules/objects/KvsObject_list.cpp b/src/modules/objects/KvsObject_list.cpp index 79688eed2..a996df2cc 100644 --- a/src/modules/objects/KvsObject_list.cpp +++ b/src/modules/objects/KvsObject_list.cpp @@ -51,82 +51,64 @@ @functions: !fn: <integer> $count() Returns the number of items in the list - !fn: <boolean> $isEmpty() Returns $true if the list is empty, $false otherwise. - !fn: $clear() Removes all the items from the list.This is the same as [classfnc:list]$removeAll[/classfnc](). - !fn: $removeAll() Removes all the items from the list. This is the same as [classfnc:list]$clear[/classfnc](). - !fn: $append(<item:variant>) Inserts the <item> at the end (tail) of the list. - !fn: $prepend(<item:variant>) Inserts the <item> at the beginning (head) of the list. - !fn: $insert(<index:uint>,<item:variant>) Inserts the <item> at zero-based position <index> in the list. If <index> is greater or equal to [classfnc:list]$count[/classfnc]() then the item is simply appended to the end of the list. - !fn: $add(<index:uint>,<item:variant>) This is exactly the same as [classfnc:list]$insert[/classfnc](). - !fn: <variant> $item(<index:uint>) Returns the item at zero-based <index>. If <index> is greater or equal to [classfnc:list]$count[/classfnc]() (beyond the end of the list) then [fnc]$nothing[/fnc] is returned. - !fn: <boolean> $remove(<index:uint>) Removes the item at zero-based <index>. Returns $true if the item was successfully removed and $false otherwise (i.e. <index> pointed beyond the end of the list). - !fn: <boolean> $removeFirst() Removes the first item from the list. Returns $true if the item was successfully removed (the list was not empty) and $false otherwise. - !fn: <boolean> $removeLast() Removes the last item from the list. Returns $true if the item was successfully removed (the list was not empty) and $false otherwise. - !fn: <boolean> $removeCurrent() Removes the current item from the list. Returns $true if the item was successfully removed or $false otherwise. Invalidates any iteration operation. - !fn: <boolean> $moveFirst() Moves the iterator to the first item in the list and returns - $true if the move was succesfull (i.e., the list is not empty) + $true if the move was successful (i.e., the list is not empty) and $false otherwise. - !fn: <boolean> $moveLast() Moves the iterator to the last item in the list and returns - $true if the move was succesfull (i.e., the list is not empty) + $true if the move was successful (i.e., the list is not empty) and $false otherwise. - !fn: <boolean> $movePrev() Moves the iterator to the previous item and returns $true - if the move was succesfull (i.e., there IS a previous item) + if the move was successful (i.e., there IS a previous item) and $false otherwise. - !fn: <boolean> $moveNext() Moves the iterator to the next item and returns $true - if the move was succesfull (i.e., there IS a next item) + if the move was successful (i.e., there IS a next item) and $false otherwise. - !fn: <boolean> $eof() Returns $true if the iterator points to a valid item in the list (and thus [classfnc:list]$current[/classfnc]() would return a valid value) and $false otherwise. - !fn: <boolean> $current() Returns the item pointed by the current iterator or [fnc]$nothing[/fnc] is the iterator is not valid (points diff --git a/src/modules/objects/KvsObject_listWidget.cpp b/src/modules/objects/KvsObject_listWidget.cpp index 981542476..6e6b62ffd 100644 --- a/src/modules/objects/KvsObject_listWidget.cpp +++ b/src/modules/objects/KvsObject_listWidget.cpp @@ -78,7 +78,7 @@ const char * const itemflags_tbl[] = { In this mode the current item is always one of the selected items.[br] In the "none" mode no items can be selected and the current item may be any item in the list.[br] - In most situations you will operate the listwidget in "single" mode + In most situations you will operate the listwidget in [i]single[/i] mode (and this is the default mode set at widget creation). @functions: !fn: $setSelectionMode(<selection_mode:string>) @@ -90,23 +90,25 @@ const char * const itemflags_tbl[] = { "none" : no items can be selected[br] The default mode is "single" !fn: $setFlag(<idx:integer>,<flag1:string>, <flag2:string>, ...) - Sets the flags for the item at index idz to the given flags. These determine whether the item can be selected or modified. This is often used to disable an item. + Sets the flags for the item at index idz to the given flags. These determine whether the item can be selected or modified. This is often used to disable an item.[br] Supported flags are: + [exmaple] [br]- noitemflag : no flag sets; - [br]- selectable : item is selecatble; + [br]- selectable : item is selectable; [br]- editable : item is editable; [br]- dragEnabled : item can dragged; [br]- dropEnabled : item can used as drop target; [br]- userCheckable : item is checkable; [br]- enabled :item is enabled; [br]- tristate : item is checkable with three separate states. + [/example] !fn: $setChecked(<checkstate:bool>) Sets the eventual item check box 'checked state' to <bool>. !fn: <bool> $isChecked() Returns '1' if the eventual item check box is checked, '0' otherwise.[br] !fn: <string> $selectionMode() Returns the current selection mode - !fn: $insertItem(<text:string>, <index:uint>) + !fn: $insertItem(<text:string>, <index:uint>) Inserts a text item at position <index>. If index is negative or not specified the item is appended. !fn: $changeItem(<text:string>, <index:uint>) @@ -142,8 +144,7 @@ const char * const itemflags_tbl[] = { This function is called by KVIrc when the current item changes. !fn: $itemChangedEvent() This function is called by KVIrc when the current data item changes (i.e. the user check a ckeckable item) . - - @signals: + @signals: !sg: <string> $currentItemChanged() This signal is emitted by the default implementation of [classfnc]$currentItemChangedEvent[/classfnc]().[br] !sg: <string> $itemChanged() @@ -156,7 +157,7 @@ const char * const itemflags_tbl[] = { KVSO_BEGIN_REGISTERCLASS(KvsObject_listWidget,"listbox","widget") - KVSO_REGISTER_HANDLER_BY_NAME(KvsObject_listWidget,insertItem) + KVSO_REGISTER_HANDLER_BY_NAME(KvsObject_listWidget,insertItem) KVSO_REGISTER_HANDLER_BY_NAME(KvsObject_listWidget,insertWidgetItem) KVSO_REGISTER_HANDLER_BY_NAME(KvsObject_listWidget,changeItem) KVSO_REGISTER_HANDLER_BY_NAME(KvsObject_listWidget,removeItem) @@ -342,7 +343,7 @@ KVSO_CLASS_FUNCTION(listWidget,setIcon) obPixmap=KviKvsKernel::instance()->objectController()->lookupObject(obHpixmap); if (!obPixmap->inheritsClass("pixmap")) { - c->warning(__tr2qs_ctx("Pixmap object or image Id required","objects")); + c->warning(__tr2qs_ctx("Pixmap object or image ID required","objects")); return true; } pix=((KvsObject_pixmap *)obPixmap)->getPixmap(); @@ -400,12 +401,12 @@ KVSO_CLASS_FUNCTION(listWidget,setForeground) { if(c->paramCount()<4) { - c->error(__tr2qs_ctx("Color name or triplette rgb/hsv value required","objects")); + c->error(__tr2qs_ctx("Color name or triplet RGB/HSV value required","objects")); return true; } if (!var2->asInteger(iCol2)||!var3->asInteger(iCol3)) { - c->error(__tr2qs_ctx("One of the triplette parameters didn't evaluate to an integer","objects"));\ + c->error(__tr2qs_ctx("One of the triplet parameters didn't evaluate to an integer","objects"));\ return true; } if (c->paramCount()<5) iOpacity=255; @@ -584,7 +585,7 @@ KVSO_CLASS_FUNCTION(listWidget,setSelected) kvs_uint_t uIndex; KVSO_PARAMETERS_BEGIN(c) KVSO_PARAMETER("index",KVS_PT_UNSIGNEDINTEGER,0,uIndex) - KVSO_PARAMETER("benabled",KVS_PT_BOOLEAN,0,bSel) + KVSO_PARAMETER("bEnabled",KVS_PT_BOOLEAN,0,bSel) KVSO_PARAMETERS_END(c) ((QListWidget *)widget())->item(uIndex)->setSelected(bSel); return true; diff --git a/src/modules/objects/KvsObject_listWidget.h b/src/modules/objects/KvsObject_listWidget.h index 4b300a1c8..70427b21f 100644 --- a/src/modules/objects/KvsObject_listWidget.h +++ b/src/modules/objects/KvsObject_listWidget.h @@ -40,7 +40,7 @@ protected: virtual bool init(KviKvsRunTimeContext * pContext,KviKvsVariantList *pParams); - bool insertItem(KviKvsObjectFunctionCall *c); + bool insertItem(KviKvsObjectFunctionCall *c); bool changeItem(KviKvsObjectFunctionCall *c); bool removeItem(KviKvsObjectFunctionCall *c); bool count(KviKvsObjectFunctionCall *c); diff --git a/src/modules/objects/KvsObject_multiLineEdit.cpp b/src/modules/objects/KvsObject_multiLineEdit.cpp index 8f16aa94d..c6a77fff6 100644 --- a/src/modules/objects/KvsObject_multiLineEdit.cpp +++ b/src/modules/objects/KvsObject_multiLineEdit.cpp @@ -62,17 +62,20 @@ Returns current cursor position in "<line:uinteger>, <col:uinteger>" format. !fn: $setReadOnly(<bReadOnly:boolean>) Sets the editor to be read-only if bReadOnly is 1 or - removes the read-only status is ReadOnly is 0 + removes the read-only status if bReadOnly is 0 !fn: <boolean> $atBeginning() - Returns 1(true) if the cursor is placed at the beginning of the text; otherwise returns 0(false). + Returns 1 (true) if the cursor is placed at the beginning of the text; otherwise returns 0 (false). !fn: <boolean> $atEnd() - Returns 1(true) if the cursor is placed at the end of the text; otherwise returns 0(false). + Returns 1 (true) if the cursor is placed at the end of the text; otherwise returns 0 (false). !fn: $setWordWrap(<wrap_mode:string>) - Sets the word wrap mode to mode. Valid Values are:[br] + Sets the word wrap mode to mode.[br] + Valid Values are:[br] + [example] - NoWrap - Do not wrap the text.[br] - WidgetWidth - Wrap the text at the current width of the widget.[br] - FixedPixelWidth - Wrap the text at a fixed number of pixels from the widget's left side.[br] - FixedColumnWidth - Wrap the text at a fixed number of character columns from the widget's left side. + [/example] !fn: <string> $wordWrap() Returns the word wrap mode. NoWrap, WidgetWidth, FixedPixelWidth, FixedColumnWidth. !fn: <string> $text() @@ -102,11 +105,11 @@ !fn: $setUnderline(<bUnderline:boolean>) If the bool value is 1 sets the current format to underline; otherwise, if it's 0 sets the current format to no-underline. !fn: <boolean> $italic() - Returns 1(true) if the current format is italic; otherwise returns 0(false). + Returns 1 (true) if the current format is italic; otherwise returns 0 (false). !fn: <boolean> $bold() - Returns 1(true) if the current format is bold; otherwise returns 0(false). + Returns 1 (true) if the current format is bold; otherwise returns 0 (false). !fn: <boolean> $underline() - Returns 1(true) if the current format is underline; otherwise returns 0(false). + Returns 1 (true) if the current format is underline; otherwise returns 0 (false). !fn: $zoomIn(<zoom_range:integer>) Zooms in on the text by making the base font size range points larger. !fn: $zoomOut(<zoom_range:integer>) @@ -126,13 +129,16 @@ !fn: $setText(<txt:string>) Sets the text edit's text to txt. !fn: $setColor(<rgb_value>) - Sets the foreground color of this widget to <rgb_value>:valid values are: - -hex string: must be a string with 6 hexadecimal digits (like the ones used to - specify colors in html pages). The first two digits specify - the RED component, the third and fourth digit specify the GREEN component - and the last two specify the BLUE component. - -array(red:integer,green:integer,blue:integer) - -red:integer,green:integer,blue:integer. + Sets the foreground color of this widget to <rgb_value> + Valid values are: + [example] + - hex string: must be a string with 6 hexadecimal digits (like the ones used to + specify colors in HTML pages). The first two digits specify + the [b]red[/b] component, the third and fourth digit specify the [b]green[/b] component + and the last two specify the [b]blue[/b] component. + - array(red:integer, green:integer, blue:integer) + - red:integer, green:integer, blue:integer. + [/example] !fn: $setPointSize(<point_size:integer)) Sets the point size of the font. !fn: $setLinkUnderline(<bLinkUnderline:boolean>) @@ -142,25 +148,28 @@ !fn: <string> $textFormat() Returns the text format: rich text or plain text. !fn: $loadFile(<path:string>) - Load the file specified in the <path>, also html files. + Load the file specified in the <path>, also HTML files. !fn: <boolean> $isUndoAvailable () - Returns 1(true) if undo is available; otherwise returns 0(false). + Returns 1 (true) if undo is available; otherwise returns 0 (false). !fn: <boolean> $isRedoAvailable () - Returns 1(true) if redo is available; otherwise returns 0(false). + Returns 1 (true) if redo is available; otherwise returns 0 (false). !fn: <integer> $lines() Returns the number of lines in the multilineedit. !fn: <integer> $lineOfChar(<paragraph:integer>,<index:integer>) Returns the line number of the line in paragraph par in which the character at position index appears.[br] If there is no such paragraph or no such character at the index position -1 is returned. !fn: $setModified(<bModified:boolean>) - Sets whether the document has been modified by the user. Valid Values are 1(true) or 0(false) + Sets whether the document has been modified by the user. Valid Values are 1 (true) or 0 (false) !fn: $setAlignment(<alignment:string>) - Sets the alignment of the current paragraph to <alignment>. Valid values are:[br] - - Auto - Aligns according to the language.[b + Sets the alignment of the current paragraph to <alignment>. + Valid values are: + [example] + - Auto - Aligns according to the language.[br] - Left - Aligns with the left edge.[br] - Right - Aligns with the right edge.[br] - Center - Centers in both dimensions. - Justify - Justify the text. + [/example] */ @@ -586,7 +595,7 @@ bool KvsObject_textedit::functionsetColor(KviKvsObjectFunctionCall * c) { if(pColArray->array()->size() < 3) { - c->error(__tr2qs_ctx("The array passed as parameter must contain at least 3 elements","objects")); + c->error(__tr2qs_ctx("The array passed as parameter must contain at least 3 elements","objects")); return false; } KviKvsVariant * pColR = pColArray->array()->at(0); @@ -595,12 +604,12 @@ bool KvsObject_textedit::functionsetColor(KviKvsObjectFunctionCall * c) if(!(pColR && pColG && pColB)) { - c->error(__tr2qs_ctx("One of the colors array parameters is empty","objects")); + c->error(__tr2qs_ctx("One of the colors array parameters is empty","objects")); return false; } if(!(pColR->asInteger(iColR) && pColG->asInteger(iColG) && pColB->asInteger(iColB))) { - c->error(__tr2qs_ctx("One of the colors array parameters didn't evaluate to an integer","objects")); + c->error(__tr2qs_ctx("One of the colors array parameters didn't evaluate to an integer","objects")); return false; } @@ -631,12 +640,12 @@ bool KvsObject_textedit::functionsetColor(KviKvsObjectFunctionCall * c) } if(c->params()->count() < 3) { - c->error(__tr2qs_ctx("$setColor requires either an array as first parameter or three integers","objects")); + c->error(__tr2qs_ctx("$setColor requires either an array as first parameter or three integers","objects")); return false; } if(!pColArray->asInteger(iColR)) { - c->error(__tr2qs_ctx("The first parameter didn't evaluate to an array nor an integer","objects")); + c->error(__tr2qs_ctx("The first parameter didn't evaluate to an array nor an integer","objects")); return false; } } @@ -724,14 +733,14 @@ bool KvsObject_textedit::functionloadFile(KviKvsObjectFunctionCall * c) KVSO_PARAMETERS_END(c) if ( !QFile::exists(szFile)) { - c->warning(__tr2qs_ctx("I can't find the specified file '%Q'.","objects"),&szFile); + c->warning(__tr2qs_ctx("I can't find the specified file '%Q'.","objects"),&szFile); return true; } QFile file( szFile ); if ( !file.open( QIODevice::ReadOnly ) ) { - c->warning(__tr2qs_ctx("I cannot read the file '%Q'.","objects"),&szFile); + c->warning(__tr2qs_ctx("I can't read the file '%Q'.","objects"),&szFile); return true; } diff --git a/src/modules/objects/KvsObject_painter.cpp b/src/modules/objects/KvsObject_painter.cpp index 745fc6c2d..183e5e276 100644 --- a/src/modules/objects/KvsObject_painter.cpp +++ b/src/modules/objects/KvsObject_painter.cpp @@ -203,7 +203,7 @@ const char * const brushstyles_tbl[] = { /* - @doc: painter + @doc: painter @keyterms: painter object class, line editor, input @title: @@ -216,39 +216,41 @@ const char * const brushstyles_tbl[] = { [class]object[/class] [class]widget[/class] @description: - With this class you can draw many graphics objects from simple lines to complex shapes like pies and chords.[br] - It can also draw aligned text and pixmaps. Normally, it draws in a "natural" coordinate system, but it can also do view and world transformation.[br] + It can also draw aligned text and pixmaps. Normally, it draws in a [i]natural[/i] coordinate system, but it can also do view and world transformation.[br] The class need to be implemented into a [classfnc]$paintEvent[/classfnc](); - @functions: + @functions: !fn: $drawLine(<x1:integer>,<y1_integer>,<x2:integer>,<y2:integer>) Draws a line from (x1, y1) to (x2, y2) and sets the current pen position to (x2, y2). !fn: $begin(<paint_device:object>) - Begins painting the paint device <paint_device>: the parameter MUST be a widget or a pixmap.[br] + Begins painting the paint device <paint_device>: the parameter [b]must[/b] be a widget or a pixmap.[br] Warning: A paint device can only be painted by one painter at a time. !fn: $beginPdf(<file_name:string>) - Begins painting on a file using the pdf format. - At present the pdf support is in experimental state. + Begins painting on a file using the PDF format. + At present the PDF support is in experimental state. !fn: $end() Ends painting. Any resources used while painting are released. !fn: $setPen(<rgb or hsv array value or [<red>,<green>,<blue>][<hue>,<saturation>,<value>],[system color:RGB or HSV) - The pen defines the lines or text, color. You can set it with Red,Green,Blue, or H,S,V value[br] + The pen defines the lines or text, color. You can set it with Red, Green, Blue, or H, S, V value[br] All parameters are in integer form. !fn: $setPen(<rgb or hsv array value or [<red>,<green>,<blue>][<hue>,<saturation>,<value>],[opacity],[system color:RGB or HSV]) - The pen defines the lines or text, color. You can set it with Red,Green,Blue, or H,S,V value[br] + The pen defines the lines or text, color. You can set it with Red, Green, Blue, or H, S, V value[br] All parameters are in integer form. The HSV system, like RGB, has three components:[br] + [pre] * H, for hue, is either 0-359 if the color is chromatic (not gray), or meaningless if it is gray.[br] It represents degrees on the color wheel familiar to most people. Red is 0 (degrees), green is 120 and blue is 240.[br] * S, for saturation, is 0-255, and the bigger it is, the stronger the color is. Grayish colors have saturation near 0; very strong colors have saturation near 255.[br] * V, for value, is 0-255 and represents lightness or brightness of the color. 0 is black; 255 is as far from black as possible.[br] - Examples: RED is H=0, S=255, V=255.[br] - Light RED could have H about 0, S about 50-100, and S=255. + [/pre] + Examples: [b]Red[/b] is H=0, S=255, V=255.[br] + Light red could have H about 0, S about 50-100, and S=255. ES: $setPen(00,00,00) for black;[br] Default color mode is RGB; !fn: $setBrush(<rgb or hsv array value or [<red>,<green>,<blue>][<hue>,<saturation>,<value>],[system color:RGB or HSV) Sets the painter's brush to have the specified color.[br] - Example:[br] + Example: + [example] class (wdg,widget)[br] {[br] paintevent()[br] @@ -261,7 +263,8 @@ const char * const brushstyles_tbl[] = { }[br] }[br] %aa=$new(wdg)[br] - %aa->$show()[br] + %aa->$show() + [/example] !fn: $drawRect(<x:integer>,<y:integer>,<w:unsigned integer>,<h:unsigned integer>) Draws a rectangle with upper left corner at (x, y) and with width w and height h. !fn: $drawRoundRect(<start_angle:integer>,<angle_length:integer>,<width:unsigned integer>,<height:unsigned integer>,<xr:integer>,<y:integer>) @@ -302,12 +305,12 @@ const char * const brushstyles_tbl[] = { !fn: $setFont(<family:string>,<size:integer>[,<style:enum>,<style:enum>,..])[br] Set the font's family, size and style, valid flag for style are:[br] [pre] - italic [br] - bold [br] - underline [br] - overline [br] - strikeout [br] - fixedpitch [br] + italic[br] + bold [br] + underline [br] + overline [br] + strikeout [br] + fixedpitch [br] [/pre] !fn: $setFontSize(<size:unsigned integer>)[br] Set the current painter font's size.[br] @@ -330,9 +333,12 @@ const char * const brushstyles_tbl[] = { !fn: $scale(<dh:real>,<dw:real>) Scales the coordinate system by <dh>, <dv>. !fn: $setBackgroundMode(<bgMode:enum>) - Sets the background mode of the painter to <bgMode>: valid values are:[br] + Sets the background mode of the painter to <bgMode>: + Valid values are:[br] + [pre] - Transparent (that is the default value);[br] - - Opaque.[br] + - Opaque. + [/pre] !fn: $setOpacity(<opacity_factor:real>) Sets the painter opacity that affects all painter operations (drawpixmap, drawtext...). Valid values range are from 0 (total transparency) to 1 (total opacity)[br] You must invoke the [classfnc]$begin[/classfnc] before using it. @@ -345,7 +351,8 @@ const char * const brushstyles_tbl[] = { !fn: $setSmoothPixmapTransform(<boolean>) Enable/disable smooth bilinear pixmap transformation algorithm (such as bilinear). You must call the [classfnc]$begin[/classfnc] before using it. - Example:[br] + Example: + [example] [br] class (hello,widget)[br] {[br] @@ -516,7 +523,7 @@ const char * const brushstyles_tbl[] = { %Hello->$setminimumheight(600)[br] %Hello->$move(10,10)[br] %Hello->$show();[br] [br] - + [/example] */ // ======================================================================== @@ -967,12 +974,12 @@ KVSO_CLASS_FUNCTION(painter,setBrush) { if(c->paramCount()<3) { - c->error(__tr2qs_ctx("Color name or triplette rgb/hsv value required","objects")); + c->error(__tr2qs_ctx("Color name or triplet RGB/HSV value required","objects")); return true; } if (!var2->asInteger(iCol2)||!var3->asInteger(iCol3)) { - c->error(__tr2qs_ctx("One of the triplette parameters didn't evaluate to an integer","objects"));\ + c->error(__tr2qs_ctx("One of the triplet parameters didn't evaluate to an integer","objects"));\ return true; } if (c->paramCount()<5) iOpacity=255; @@ -1048,12 +1055,12 @@ KVSO_CLASS_FUNCTION(painter,setPen) { if(c->paramCount()<3) { - c->error(__tr2qs_ctx("Color name or triplette rgb/hsv value required","objects")); + c->error(__tr2qs_ctx("Color name or triplet RGB/HSV value required","objects")); return true; } if (!var2->asInteger(iCol2)||!var3->asInteger(iCol3)) { - c->error(__tr2qs_ctx("One of the triplette parameters didn't evaluate to an integer","objects"));\ + c->error(__tr2qs_ctx("One of the triplet parameters didn't evaluate to an integer","objects"));\ return true; } if (c->paramCount()<5) iOpacity=255; @@ -1206,7 +1213,7 @@ KVSO_CLASS_FUNCTION(painter,begin) pd=((KvsObject_widget *)pObject)->widget(); else { - c->warning(__tr2qs_ctx("Widget or Pixmap required ","objects")); + c->warning(__tr2qs_ctx("Widget or pixmap required ","objects")); return true; } } else { @@ -1491,7 +1498,7 @@ KVSO_CLASS_FUNCTION(painter,drawPixmapMirrored) KVSO_PARAMETER("y",KVS_PT_REAL,0,rY) KVSO_PARAMETER("pixmap",KVS_PT_HOBJECT,0,hObject) KVSO_PARAMETER("bHorizontal",KVS_PT_BOOLEAN,0,bHorizontal) - KVSO_PARAMETER("bvertical",KVS_PT_BOOLEAN,0,bVertical) + KVSO_PARAMETER("bVertical",KVS_PT_BOOLEAN,0,bVertical) KVSO_PARAMETER("start_x",KVS_PT_INT,KVS_PF_OPTIONAL,iX) KVSO_PARAMETER("start_y",KVS_PT_INT,KVS_PF_OPTIONAL,iY) KVSO_PARAMETER("width",KVS_PT_INT,KVS_PF_OPTIONAL,iW) @@ -1872,12 +1879,12 @@ KVSO_CLASS_FUNCTION(painter,setGradientColor) } else { if(c->paramCount()<4) { - c->error(__tr2qs_ctx("Color name or triplette RGB/HSV values required","objects")); + c->error(__tr2qs_ctx("Color name or triplet RGB/HSV values required","objects")); return true; } if ( !var2->asInteger(iCol2)||!var3->asInteger(iCol3)) { - c->error(__tr2qs_ctx("One of the triplette parameters didn't evaluate to an integer","objects"));\ + c->error(__tr2qs_ctx("One of the triplet parameters didn't evaluate to an integer","objects"));\ return true; } if (c->paramCount()<5) @@ -1960,12 +1967,12 @@ KVSO_CLASS_FUNCTION(painter,fillRect) } else { if(c->paramCount()<7) { - c->error(__tr2qs_ctx("Color name or triplette rgb/hsv value required","objects")); + c->error(__tr2qs_ctx("Color name or triplet RGB/HSV value required","objects")); return true; } if (!var2->asInteger(iCol2)||!var3->asInteger(iCol3)) { - c->error(__tr2qs_ctx("One of the triplette parameters didn't evaluate to an integer","objects"));\ + c->error(__tr2qs_ctx("One of the triplet parameters didn't evaluate to an integer","objects"));\ return true; } if (c->paramCount()<5) diff --git a/src/modules/objects/KvsObject_pixmap.cpp b/src/modules/objects/KvsObject_pixmap.cpp index a25cbf586..e02cf9106 100644 --- a/src/modules/objects/KvsObject_pixmap.cpp +++ b/src/modules/objects/KvsObject_pixmap.cpp @@ -50,36 +50,36 @@ @description: The pixmap class is an off-screen, pixel-based paint device. @functions: - !fn: $fill(<colorname, rgb or hsv array value or [<red>,<green>,<blue>][<hue>,<saturation>,<value>],[opacity],[system color:RGB or HSV]) + !fn: $fill(<colorname, RGB or HSV array value or [<red>, <green>, <blue>][<hue>, <saturation>, <value>], [opacity], [system color:RGB or HSV]) Fills the pixmap with color and opacity.[br] !fn: $resize(<width:integer>,<height:integer>) Resizes the pixmap to w width and h height. Set wh or hg to 0, to have a null pixmap. - !fn: $scale(<width:integer>,<height:integer>,[<aspect_ratio:string>]) - Scales the pixmap or the animation by sx horizontally and sy vertically. + !fn: $scale(<width:integer>,<height:integer>,[<aspect_ratio:string>]) + Scales the pixmap or the animation by sx horizontally and sy vertically. Aspect_ratio values: - IgnoreAspectRatio:the pixmap is scaled ignoring his aspect ratio. - KeepAspectRatio: pixmap is scaled to a rectangle as large as possible inside size, preserving the aspect ratio. - KeepAspectRatioByExpanding, the pixmap is scaled to a rectangle as small as possible outside size, preserving the aspect ratio. Default value is KeepAspectRatio. - !fn: $load(<file_name:string>) - Load a pixmap from the file <file_name>. - !fn: $save(<file_name:string>) - Save the pixmap or the current animation frame to the file <file_name>. - !fn: $loadAnimation(<file_name:string>) - Load an animation from the file <file_name> and start it. - !fn: $startAnimation() - Start the animation. - !fn: $stopAnimation() - Stop the animation. + !fn: $load(<file_name:string>) + Load a pixmap from the file <file_name>. + !fn: $save(<file_name:string>) + Save the pixmap or the current animation frame to the file <file_name>. + !fn: $loadAnimation(<file_name:string>) + Load an animation from the file <file_name> and start it. + !fn: $startAnimation() + Start the animation. + !fn: $stopAnimation() + Stop the animation. !fn: <integer> $height() - Return the height of the pixmap or of the animation. + Return the height of the pixmap or of the animation. !fn: <integer> $width() - Return the width of the pixmap or of the animation. - !fn: $frameChangedEvent() - This event is triggered by KVIrc when the current animation frame changes. - @signals: - !sg: $frameChanged() - This signal is emitted by the default implementation of [classfnc]$frameChangedEvent[/classfnc]().[br] + Return the width of the pixmap or of the animation. + !fn: $frameChangedEvent() + This event is triggered by KVIrc when the current animation frame changes. + @signals: + !sg: $frameChanged() + This signal is emitted by the default implementation of [classfnc]$frameChangedEvent[/classfnc]().[br] */ @@ -158,12 +158,12 @@ KVSO_CLASS_FUNCTION(pixmap,fill) } else { if(c->paramCount()<3) { - c->error(__tr2qs_ctx("Color name or triplette rgb/hsv value required","objects")); + c->error(__tr2qs_ctx("Color name or triplet RGB/HSV value required","objects")); return true; } if (!var2->asInteger(iCol2)||!var3->asInteger(iCol3)) { - c->error(__tr2qs_ctx("One of the triplette parameters didn't evaluate to an integer","objects"));\ + c->error(__tr2qs_ctx("One of the triplet parameters didn't evaluate to an integer","objects"));\ return true; } if (c->paramCount()<5) @@ -262,12 +262,12 @@ KVSO_CLASS_FUNCTION(pixmap,setPixel) } else { if(c->paramCount()<5) { - c->error(__tr2qs_ctx("Color name or triplette rgb/hsv value required","objects")); + c->error(__tr2qs_ctx("Color name or triplet RGB/HSV value required","objects")); return true; } if (!var2->asInteger(iCol2)||!var3->asInteger(iCol3)) { - c->error(__tr2qs_ctx("One of the triplette parameters didn't evaluate to an integer","objects"));\ + c->error(__tr2qs_ctx("One of the triplet parameters didn't evaluate to an integer","objects"));\ return true; } if (c->paramCount()<7) @@ -404,7 +404,7 @@ KVSO_CLASS_FUNCTION(pixmap,mirrored) KVSO_PARAMETERS_BEGIN(c) KVSO_PARAMETER("bHorizontal",KVS_PT_BOOLEAN,0,bHorizontal) - KVSO_PARAMETER("bvertical",KVS_PT_BOOLEAN,0,bVertical) + KVSO_PARAMETER("bVertical",KVS_PT_BOOLEAN,0,bVertical) KVSO_PARAMETERS_END(c) if(m_currentType==Pixmap) { diff --git a/src/modules/objects/KvsObject_popupMenu.cpp b/src/modules/objects/KvsObject_popupMenu.cpp index 32835fe24..aa456f0bf 100644 --- a/src/modules/objects/KvsObject_popupMenu.cpp +++ b/src/modules/objects/KvsObject_popupMenu.cpp @@ -38,7 +38,7 @@ /* - @doc: popupmenu + @doc: popupmenu @keyterms: popupmenu object class, @title: @@ -51,8 +51,8 @@ [class]object[/class] [class]widget[/class] @description: - This widget can be used to display a popup menu.Technically, a popup menu consists of a list of menu items.[br] - You add items with insertItem(). An item is either a string. In addition, items can have an optional icon drawn on the very left side.[br] + This widget can be used to display a popup menu. Technically, a popup menu consists of a list of menu items.[br] + You add items with insertItem(). An item can be a string. In addition, items can have an optional icon drawn on the very left side.[br] @functions: !fn: $insertItem(<text:string>,[icon_id:string]) Inserts menu items into a popup menu with optional icon and return the popup identifier. @@ -85,42 +85,42 @@ [br] @examples: [example] - // first we define a class inherited from popupmenu + [comment]//First we define a class inherited from popupmenu[/comment] class(menu,popupmenu) { constructor() { - // we store the item's id for checkit in activatedEvent - @%tile_id=@$insertItem("Tile",118) - @%cascade_id=@$insertItem("Cascade",115) - @$insertSeparator(3) - @%closeactw_id=@$insertItem("Close Active Window",08) - @%closeallw_id=@$insertItem("Close All Window",58) + [comment]//We store the item's ID for checking in activatedEvent[/comment] + @%tile_id=@$insertItem("Tile",118) + @%cascade_id=@$insertItem("Cascade",115) + @$insertSeparator(3) + @%closeactw_id=@$insertItem("Close Active Window",08) + @%closeallw_id=@$insertItem("Close All Window",58) } activatedEvent() { - // now we emit a signals to the relative to the user choice + [comment]//Now we emit a signals to the relative to the user choice[/comment] %id=$0 if (%id==@%tile_id) @$emit("tile") else if(%id==@%cascade_id) @$emit("cascade") else if (%id==@%closeactw_id) @$emit("closeactive") else @$emit("closeallwindows") - // deleting the popup + [comment]//Deleting the popup[/comment] delete $$ } } class (ws,widget)[br] { - #In the constructor we create everything that belong to the single widget. + [comment]In the constructor we create everything that belong to the single widget.[/comment] constructor() { - #Here we generate a loop to create our labels inside the widget. + [comment]//Here we generate a loop to create our labels inside the widget.[/comment] %lay=$new(layout,$$) - // we use a vbox to managing labels in vertical orientation + [comment]we use a vbox to managing labels in vertical orientation[/comment] %vb=$new(vbox,$$) - // then add the vbox to the main layout + [comment]Then add the vbox to the main layout[/comment] %lay->$addWidget(%vb,0,0) - // let's create our colorful labels + [comment]Let's create our colorful labels[/comment] for(%i=0;%i<15;%i++) { @%label=$new(label,%vb) @@ -131,7 +131,7 @@ } customContextMenuRequestedEvent() { - #We create the popupmenu relative to this widget at runtime. + [comment]//We create the popupmenu relative to this widget at runtime.[/comment] %p=$new(menu,$$) objects.connect %p tile @$parent tile objects.connect %p cascade @$parent cascade @@ -140,27 +140,27 @@ %p->$exec($$,$($0+10),$($1+10)) } } - // we create the workspace widget + [comment]//We create the workspace widget[/comment] %Workspace=$new(workspace) - // we use as space as we have + [comment]//We use as space as we have[/comment] %size[]=%Workspace->$screenResolution() - // resize it + [comment]//Resize it[/comment] %Workspace->$resize(%size[0],%size[1]) - // then create 20 subwidget + [comment]//Then create 20 subwidget[/comment] for(%i=0;%i<20;%i++) { %w=$new(ws,%Workspace) - // let's add avery widget to the workspace + [comment]//Let's add every widget to the workspace[/comment] %Workspace->$addSubWindow(%w) - // then "shake it" a little bit around :-) + [comment]//Then "shake it" a little bit around :-)[/comment] %w->$move($rand($(%size[0]-50)),$rand($(%size[1]-50))) } - // reimplement closeEvent to delete all this :-) + [comment]//Reimplement closeEvent to delete all this :-)[/comment] privateimpl(%Workspace,closeEvent) { delete $$ } - #Let's show! + [comment]//Let's show![/comment] %Workspace->$show() [/example] */ diff --git a/src/modules/objects/KvsObject_slider.cpp b/src/modules/objects/KvsObject_slider.cpp index 60e8b2c62..06651dfb0 100644 --- a/src/modules/objects/KvsObject_slider.cpp +++ b/src/modules/objects/KvsObject_slider.cpp @@ -47,7 +47,7 @@ [class]widget[/class] @description: The slider is the classic widget for controlling a bounded value.[br] - It lets the user move a slider along a horizontal or vertical groove [br] + It lets the user move a slider along a horizontal or vertical groove[br] and translates the slider's position into an integer value within the legal range.[/classfnc]() @functions: !fn: $setOrientation(<orientation:string>) @@ -91,7 +91,7 @@ so it is easy to handle the values from many sliders without reimplementing the [classfnc]$valueChangedEvent[/classfnc]() for every one.[br] Note: If you reimplement this function to catch the slider value, you will have to emit the signal by yourself (if you still need it, obviously). - @signals: + @signals: !sg: $valueChanged() This signal is emitted by the default implementation of [classfnc]valueChangedEvent[/classfnc]().[br] If you reimplement that function you will have to emit the signal manually (if you still need it). diff --git a/src/modules/objects/KvsObject_spinBox.cpp b/src/modules/objects/KvsObject_spinBox.cpp index 60fe55c20..991c82211 100644 --- a/src/modules/objects/KvsObject_spinBox.cpp +++ b/src/modules/objects/KvsObject_spinBox.cpp @@ -88,12 +88,12 @@ Returns the special-value text. See also [classfnc]$setSpecialValueText[/classfnc]() !fn: $valueChangedEvent(<new value:integer>) - This function is called by the framework when the spinbox value is changed and return the new slider value as its argument.[br] + This function is called by the framework when the spin box value is changed and return the new slider value as its argument.[br] The default implementation emits the [classfnc]$valueChanged[/classfnc]() signal, - so it is easy to handle the values from many spinboxes without reimplementing + so it is easy to handle the values from many spin boxes without reimplementing the [classfnc]$valueChangedEvent[/classfnc]() for every one.[br] - Note: If you reimplement this function to catch the spinbox value, you will have to emit the signal by yourself (if you still need it, obviously). - @signals: + Note: If you reimplement this function to catch the spin box value, you will have to emit the signal by yourself (if you still need it, obviously). + @signals: !sg: $valueChanged() This signal is emitted by the default implementation of [classfnc]valueChangedEvent[/classfnc]().[br] If you reimplement that function you will have to emit the signal manually (if you still need it). diff --git a/src/modules/objects/KvsObject_trayIcon.cpp b/src/modules/objects/KvsObject_trayIcon.cpp index 3e7728ee1..b1aeb90b6 100644 --- a/src/modules/objects/KvsObject_trayIcon.cpp +++ b/src/modules/objects/KvsObject_trayIcon.cpp @@ -51,7 +51,7 @@ @functions: !fn: setIcon(<image_id>). Sets the tray icon. - See the [doc:image_id]image identifier[/doc] documentation for the explaination of the <image_id> parameter. + See the [doc:image_id]image identifier[/doc] documentation for the explanation of the <image_id> parameter. !fn: setTooltip(<tooltip:string>). Sets the tray icon tooltip. !fn: show() @@ -73,18 +73,18 @@ !fn: activatedEvent(<reason:string>) This event is triggered when the user click the tray icon. If you reimplement this function the reason parameter will be passed as $0. - Values for reason are: + Values for reason are:[br] + [pre] [br]- Unknown : Unknown reason. [br]- Context : The context menu for the tray icon was requested. [br]- DoubleClick : The tray icon was double clicked. [br]- Trigger : The tray icon was clicked. [br]- MiddleClick : The tray icon was clicked with the middle mouse button. + [/pre] The default implementation emits the [classfnc]$activated[/classfnc]() signal. !fn: messageClickedEvent() This event is triggered when the message displayed using [classfnc]$showMessage[/classfnc]() was clicked by the user. The default implementation emits the [classfnc]$messageClicked[/classfnc]() signal. - - @signals: !sg: $activated() This signal is emitted by the default implementation of [classfnc]$activatedEvent[/classfnc]. diff --git a/src/modules/objects/KvsObject_treeWidget.cpp b/src/modules/objects/KvsObject_treeWidget.cpp index bc7ceac28..498375288 100644 --- a/src/modules/objects/KvsObject_treeWidget.cpp +++ b/src/modules/objects/KvsObject_treeWidget.cpp @@ -55,18 +55,17 @@ The items are added by creating children [class]listviewitem[/class] objects: simply allocating them with $new will add the items to the listview and simply deleting them will remove them. Allocating a [class]listviewtitem[/class] item2 as a child of item1 will insert it to the same listview creating - a subtree of items spannig from item1. The subtree can be opened or closed by a simple click either + a subtree of items spanning from item1. The subtree can be opened or closed by a simple click either on the parent item or on the little plus sign on the side of it (when [classfnc:listview]$setRootIsDecorated[/classfnc] is set to $true. The listview can be in Single, Multi, Extended or NoSelection selection mode. In single selection mode there can be only one selected item at a time and the selected item is also the current item (this mode is the default). In Multi and Extended selection mode there can be multiple selected items - and the current item is one of them. The difference between Multi and Extended is in the way + and the current item is one of them. The difference between multi and extended is in the way that items can be selected by the mouse actions: experiment with the two modes :). The NoSelection mode has obviously no selection at all. @functions: !fn: $addColumn(<text_label:string>,[<width:integer>]) Adds a width pixels wide column with the column header label to the list view. - !fn: $setSorting(<column:integer>,<sort_order:string>) Sets the list view to be sorted by column in ascending order if sort_order is "ascending" or descending order if it is "descending". !fn: $setSortingEnabled(<bEnabled:boolean>) @@ -74,86 +73,64 @@ In order to avoid performance issues, it is recommended that sorting is enabled after inserting the items into the tree. !fn: $hideListViewHeader() Hide the listview column header. - !fn: $showListViewHeader() Show the listview column header. - !fn: <boolean> $isListViewHeaderVisible() Returns '1' if the listview header is currently visible. Otherwise this function returns '0'. - !fn: $setAllColumnsShowFocus(<bAllColumnsShowFocus:boolean>) When the argument is $true, causes the listview to display the focus and selection by highlighting all the columns of the item. When the argument is $false then only the first column is selected/highlighted. - !fn: $setSelectionMode(<mode:string>) Sets the selection mode for this listview. <mode> can be one of "Single","NoSelection","Multi" or "Extended". - !fn: <listviewitem> $selectedItems() Returns the currently selected [class]listviewitem[/class] or $null if no items are selected. This function works only if the list view is in single selection mode. - !fn: <listviewitem:hobject> $itemAt(<x_global_pos:integer>,<y_global_pos:integer>) Returns the listviewitem object at the x,y globals coordinates or $null if no item at. - !fn: <listviewitem> $currentItem() Returns the current [class]listviewitem[/class] or $null if no item is current at the moment. - !fn: <listviewitem> $firstChild() Returns the first child [class]listviewitem[/class] of this listview or $null if there are no items at all. - !fn: <listviewitem> $topLevelItem(<index:int>) Returns the <index> child [class]listviewitem[/class] of this listview or $null if it does not exist. - !fn: <int> $topLevelItemCount() Returns the number of top level items of this listview. - !fn: setAcceptDrops(<benabled:boolean>) If <bEnabled> is true, user can drop files for this listview. The default value is true. - !fn: $clickEvent(<item:object>) This function is called when the user clicks in the list view. In its argument the [class]listviewitem[/class] object clicked or 0 if the user didn't click on an item.[br] The default implementation emits the [classfnc]$clicked[/classfnc]() signal. - !fn: $selectionChangedEvent(<item:object>) This event handle whenever the set of selected items has changed. The argument is the newly selected item if the listview is in single selection mode.[br] - When the listview is in Multi or Extended selection mode then item is always $null.[br] + When the listview is in multi or extended selection mode then item is always $null.[br] The default implementation emits the [classfnc]$selectionChanged[/classfnc]() signal. - !fn: $currentChangedEvent(<item:object>) This event are called whenever the current item has changed. In its argument is the newly selected item or 0 if the change made no item current.[br] The default implementation emits the [classfnc]$currentChanged[/classfnc]() signal. - !fn: $itemActivatedEvent(<item:object>) This s signal is emitted when the user activates an item by single- or double-clicking or pressing 'Enter'.[br] - In its argument the currrent item.[br] + In its argument the current item.[br] The default implementation emits the [classfnc]$itemActivated[/classfnc]() signal. - !fn: $spacePressedEvent(<item:object>) This function is called by the framework when the space key is pressed.[br] - In its arument the currrent item.[br] + In its an argument in the current item.[br] The default implementation emits the [classfnc]$spacePressed[/classfnc]() signal. - !fn: $onItemEvent(<item:object>) - This event is called by framwork when the user moves the mouse cursor onto item. + This event is called by framework when the user moves the mouse cursor onto item. The default implementation emits the [classfnc]$onItem[/classfnc]() signal. - !fn: $itemExpandedEvent(<item:object>) - This event is called when an item has been expanded, i.e. when the children of item are shown. + This event is called when an item has been expanded, i.e. when the child of an item is shown. The default implementation emits the [classfnc]$expanded[/classfnc]() signal. - !fn: $itemCollapsedEvent(<item:object>) - This event is called when an item has been collapsed, i.e. when the children of item are hidden. + This event is called when an item has been collapsed, i.e. when the child of an item is hidden. The default implementation emits the [classfnc]$collapsed[/classfnc]() signal. - !fn: $itemChangedEvent(<item:object>,<col:integer>,<text:string>) This event is called when the item has been renamed in text, e.g. by in in-place renaming, in column col.[br] The default implementation emits the [classfnc]$itemChanged[/classfnc]() signal. - - @signals: !sg: $clicked() This signal is emitted by the default implementation of [classfnc]$clickEvent[/classfnc](). @@ -175,8 +152,6 @@ This signal is emitted by the default implementation of [classfnc]$itemChangedEvent[/classfnc](). !sg: $rightButtonClicked() This signal is emitted by the default implementation of [classfnc]$rightButtonClickedEvent[/classfnc](). - - */ diff --git a/src/modules/objects/KvsObject_treeWidgeteItem.cpp b/src/modules/objects/KvsObject_treeWidgeteItem.cpp index 3005f5f28..d52c68bff 100644 --- a/src/modules/objects/KvsObject_treeWidgeteItem.cpp +++ b/src/modules/objects/KvsObject_treeWidgeteItem.cpp @@ -81,62 +81,50 @@ const char * const itemflags_tbl[] = { @functions: !fn: $setText(<column:integer>,<text:string>) Sets the text in column column to text, if column is a valid column number and text is different from the existing text. - !fn: <string> $text(<column:integer>) Returs the text of the specified column. - !fn: $setPixmap(<column:integer>,<pixmap:hobject or imageID>) Sets the pixmap in column column to pm, if pm is non-null and different from the current pixmap, and if column is non-negative. - Pixmap can be a Kvirc imageid, an image file or a [class]pixmap[/class] object. - + Pixmap can be a KVIrc imageid, an image file or a [class]pixmap[/class] object. !fn: $setItemEditable(<bEnabled:boolean>) If bEnabled is true (1), this item can be in-place editable by the user; otherwise it cannot be editable in-place. - !fn: $isItemEditable() Returns $true if this item is editable and $false otherwise. - !fn: $setEnabled(<bEnabled:boolean>) Enables or disables the item. - !fn: $isEnabled() Returns $true if this item is enabled and $false otherwise. - !fn: $setOpen(<bOpen:boolean>) Opens or closes the item to show its children items. - !fn: $isOpen() Returns the open state of this item - !fn: $setCheckable(<bCheckable:boolean>) Makes this item checkable or not. This function should be called immediately after the item creation: changing this property later at runtime may have strange results (like the item being moved inside the list, text disappearing, hidden children etc... don't do it :D ). - !fn: $isCheckable() Returns $true if this item is checkable and $false otherwise - !fn: $setChecked(<bChecked:boolean>) Sets this item to be checked or not. [classfnc:listviewitem]$setCheckable[/classfnc]() must have been previously called. - !fn: $isChecked() Returns the check status of this item. [classfnc:listviewitem]$setCheckable[/classfnc]() must have been previously called. - !fn: $setFlags(<flag1:string>, <flag2:string>, ...) - Sets the flags for the item to the given flags. These determine whether the item can be selected or modified. This is often used to disable an item. + Sets the flags for the item to the given flags. These determine whether the item can be selected or modified.[br] + This is often used to disable an item. Supported flags are: + [pre] [br]- noitemflag : no flag sets; - [br]- selectable : item is selecatble; + [br]- selectable : item is selectable; [br]- editable : item is editable; [br]- dragEnabled : item can dragged; [br]- dropEnabled : item can used as drop target; [br]- userCheckable : item is checkable; [br]- enabled :item is enabled; [br]- tristate : item is checkable with three separate states. - - + [/pre] */ diff --git a/src/modules/objects/KvsObject_webView.cpp b/src/modules/objects/KvsObject_webView.cpp index 8cce6fd47..f7d2b0168 100644 --- a/src/modules/objects/KvsObject_webView.cpp +++ b/src/modules/objects/KvsObject_webView.cpp @@ -107,8 +107,7 @@ const char * const webattributes_tbl[] = { "PluginsEnabled", "JavascriptCanOpenWindows", "JavascriptCanAccessClipboard", - "ZoomTextOnly" - , + "ZoomTextOnly", "LocalContentCanAccessFileUrls" }; @@ -189,7 +188,7 @@ const char * const actions_tbl[] = { Provides an embedded web browser using webkit. Page structure can be managed by web element's unique identifiers. @functions: !fn: $load(<url:string>) - Sets the current url for the webView and starts loading it + Sets the current URL for the webView and starts loading it !fn: $setHtml(<html_code:string>,[<baseurl:string>]) Sets the content of the web view to the specified <html_code>. External objects such as stylesheets or images referenced in the HTML document are located relative to <baseurl>. @@ -207,7 +206,7 @@ const char * const actions_tbl[] = { Returns an array containing the names of the document frames. !fn: appendWebViewActionToMenu(<menu:h_object>,<webview_action:string>,[<icon_identifier>]) !fn: <id:integer> $firstChild(<element_id:integer>) - Return the identifier of element's first childr. + Return the identifier of element's first child. !fn: <array> $findAll(<element_id:integer>,<query:string>) Searches for all the elements named <query> and stores them in an array of element's identifiers. !fn: <id:integer> $findFirst(<element_id:integer>,<query:string>) @@ -235,11 +234,11 @@ const char * const actions_tbl[] = { Possible value for <style_resolve_strategy> are: [pre] CascadedStyle - the property's value is determined using the rules defined in the document's stylesheet. This is the default strategy. - InlineStyle - the property's value is determined by element definetion, without respecting CSS rules. + InlineStyle - the property's value is determined by element definition, without respecting CSS rules. ComputedStyle - the property's value is determined by the style property resolved from the environment. [/pre] !fn: pixmap $makePreview() - Returns a 212x142 thumbnail of the current webView contants. + Returns a 212x142 thumbnail of the current webView constants. The returned object is an instance of the pixmap class. !fn: string $toPlainText(<element_id>) Returns the string representation of element <element_id>. @@ -263,7 +262,7 @@ const char * const actions_tbl[] = { [br] DelegateAllLinks: Whenever a link is activated the $linkClickedEvent() is executed. !fn: $linkClickedEvent() This function can be called when the user clicks on a link, depending no the current link delegation policy. - The argument of the function is the url that has been clicked.[br] + The argument of the function is the URL that has been clicked.[br] The default implementation emits the [classfnc:webview]$linkClicked[/classfnc]() signal. !fn: $loadStartedEvent() This function is called when the load of the page has started. @@ -278,36 +277,30 @@ const char * const actions_tbl[] = { The default implementation emits the [classfnc:webview]$loadFinished[/classfnc]() signal. !fn: $downloadRequestEvent() This function is called when the user tries to download a file. - The argument of the function is the url of the file.[br] + The argument of the function is the URL of the file.[br] You should return a valid path in the filesystem where to save the file.[br] The default implementation emits the [classfnc:webview]$downloadRequest[/classfnc]() signal. !fn: $downloadProgressEvent() This function can be called during the download of a file. - Three integer arguments are passed to this function: the number of downloaded bytes, the download id, the size of the remove file (if known). + Three integer arguments are passed to this function: the number of downloaded bytes, the download ID, the size of the remove file (if known). The default implementation emits the [classfnc:webview]$downloadProgress[/classfnc]() signal. !fn: $downloadCompletedEvent() This function can be called when a file download finishes. - The argument of the function is the an integer value containing the download id. + The argument of the function is the an integer value containing the download ID. The default implementation emits the [classfnc:webview]$downloadCompleted[/classfnc]() signal. @signals: !sg: linkClicked() This signal is emitted by the default implementation of [classfnc:webview]linkClickedEvent[/classfnc](). - !sg: loadStarted() This signal is emitted by the default implementation of [classfnc:webview]loadStartedEvent[/classfnc](). - !sg: loadProgress() This signal is emitted by the default implementation of [classfnc:webview]loadProgressEvent[/classfnc](). - !sg: loadFinished() This signal is emitted by the default implementation of [classfnc:webview]loadFinishedEvent[/classfnc](). - !sg: downloadRequest() This signal is emitted by the default implementation of [classfnc:webview]downloadRequestEvent[/classfnc](). - !sg: downloadProgress() This signal is emitted by the default implementation of [classfnc:webview]downloadProgressEvent[/classfnc](). - !sg: downloadCompleted() This signal is emitted by the default implementation of [classfnc:webview]downloadCompletedEvent[/classfnc](). */ @@ -541,7 +534,7 @@ KVSO_CLASS_FUNCTION(webView,findAll) QWebElement element=getElement(iEleId); if (element.isNull()) { - c->warning(__tr2qs_ctx("Document element with id %d does not exist","objects"),iEleId); + c->warning(__tr2qs_ctx("Document element with ID %d doesn't exist","objects"),iEleId); return true; } QWebElementCollection elementCollection=element.findAll(szQuery); @@ -596,7 +589,7 @@ KVSO_CLASS_FUNCTION(webView,findFirst) QWebElement element=getElement(iEleId); if (element.isNull()) { - c->warning(__tr2qs_ctx("Document element with id %d does not exist","objects"),iEleId); + c->warning(__tr2qs_ctx("Document element with ID %d doesn't exist","objects"),iEleId); return true; } QWebElement tempElement=element.findFirst(szQuery); @@ -619,7 +612,7 @@ KVSO_CLASS_FUNCTION(webView,removeFromDocument) QWebElement element=getElement(iEleId); if (element.isNull()) { - c->warning(__tr2qs_ctx("Document element with id %d does not exist","objects"),iEleId); + c->warning(__tr2qs_ctx("Document element with ID %d doesn't exist","objects"),iEleId); return true; } element.removeFromDocument(); @@ -634,7 +627,7 @@ KVSO_CLASS_FUNCTION(webView,removeFromDocument) QWebElement element=getElement(iEleId); if (element.isNull()) { - c->warning(__tr2qs_ctx("Document element with id %d does not exist","objects"),iEleId); + c->warning(__tr2qs_ctx("Document element with ID %d doesn't exist","objects"),iEleId); return true; } element.removeFromDocument(); @@ -654,7 +647,7 @@ KVSO_CLASS_FUNCTION(webView,appendInside) QWebElement element=getElement(iEleId); if (element.isNull()) { - c->warning(__tr2qs_ctx("Document element with id %d does not exist","objects"),iEleId); + c->warning(__tr2qs_ctx("Document element with ID %d doesn't exist","objects"),iEleId); return true; } element.appendInside(szCode); @@ -672,7 +665,7 @@ KVSO_CLASS_FUNCTION(webView,appendOutside) QWebElement element=getElement(iEleId); if (element.isNull()) { - c->warning(__tr2qs_ctx("Document element with id %d does not exist","objects"),iEleId); + c->warning(__tr2qs_ctx("Document element with ID %d doesn't exist","objects"),iEleId); return true; } element.appendOutside(szCode); @@ -688,7 +681,7 @@ KVSO_CLASS_FUNCTION(webView,nextSibling) QWebElement element=getElement(iEleId); if (element.isNull()) { - c->warning(__tr2qs_ctx("Document element with id %d does not exist","objects"),iEleId); + c->warning(__tr2qs_ctx("Document element with ID %d doesn't exist","objects"),iEleId); return true; } QWebElement tempElement=element.nextSibling(); @@ -725,7 +718,7 @@ KVSO_CLASS_FUNCTION(webView,elementTagName) if (element.isNull()) { // qDebug("isnull ad index %i",iEleId); - c->warning(__tr2qs_ctx("Document element with id %d does not exist","objects"),iEleId); + c->warning(__tr2qs_ctx("Document element with ID %d doesn't exist","objects"),iEleId); return true; } c->returnValue()->setString(element.tagName()); @@ -745,7 +738,7 @@ KVSO_CLASS_FUNCTION(webView,setElementAttribute) QWebElement element=getElement(iEleId); if (element.isNull()) { - c->warning(__tr2qs_ctx("Document element with id %d does not exist","objects"),iEleId); + c->warning(__tr2qs_ctx("Document element with ID %d doesn't exist","objects"),iEleId); return true; } element.setAttribute(szName,szValue); @@ -764,7 +757,7 @@ KVSO_CLASS_FUNCTION(webView,removeClass) QWebElement element=getElement(iEleId); if (element.isNull()) { - c->warning(__tr2qs_ctx("Document element with id %d does not exist","objects"),iEleId); + c->warning(__tr2qs_ctx("Document element with ID %d doesn't exist","objects"),iEleId); return true; } element.removeClass(szClassName); @@ -782,7 +775,7 @@ KVSO_CLASS_FUNCTION(webView,addClass) QWebElement element=getElement(iEleId); if (element.isNull()) { - c->warning(__tr2qs_ctx("Document element with id %d does not exist","objects"),iEleId); + c->warning(__tr2qs_ctx("Document element with ID %d doesn't exist","objects"),iEleId); return true; } element.addClass(szClassName); @@ -856,7 +849,7 @@ KVSO_CLASS_FUNCTION(webView,elementAttribute) QWebElement element=getElement(iEleId); if (element.isNull()) { - c->warning(__tr2qs_ctx("Document element with id %d does not exist","objects"),iEleId); + c->warning(__tr2qs_ctx("Document element with ID %d doesn't exist","objects"),iEleId); return true; } @@ -882,7 +875,7 @@ KVSO_CLASS_FUNCTION(webView,elementAttributeNames) QWebElement element=getElement(iEleId); if (element.isNull()) { - c->warning(__tr2qs_ctx("Document element with id %d does not exist","objects"),iEleId); + c->warning(__tr2qs_ctx("Document element with ID %d doesn't exist","objects"),iEleId); return true; } szAttributeNames=element.attributeNames().join(","); @@ -899,7 +892,7 @@ KVSO_CLASS_FUNCTION(webView,classes) QWebElement element=getElement(iEleId); if (element.isNull()) { - c->warning(__tr2qs_ctx("Document element with id %d does not exist","objects"),iEleId); + c->warning(__tr2qs_ctx("Document element with ID %d doesn't exist","objects"),iEleId); return true; } QString szClasses; @@ -918,7 +911,7 @@ KVSO_CLASS_FUNCTION(webView,toPlainText) QWebElement element=getElement(iEleId); if (element.isNull()) { - c->warning(__tr2qs_ctx("Document element with id %d does not exist","objects"),iEleId); + c->warning(__tr2qs_ctx("Document element with ID %d doesn't exist","objects"),iEleId); return true; } c->returnValue()->setString(element.toPlainText()); @@ -936,7 +929,7 @@ KVSO_CLASS_FUNCTION(webView,setPlainText) QWebElement element=getElement(iEleId); if (element.isNull()) { - c->warning(__tr2qs_ctx("Document element with id %d does not exist","objects"),iEleId); + c->warning(__tr2qs_ctx("Document element with ID %d doesn't exist","objects"),iEleId); return true; } element.setPlainText(szText); @@ -954,7 +947,7 @@ KVSO_CLASS_FUNCTION(webView,firstChild) QWebElement element=getElement(iEleId); if (element.isNull()) { - c->warning(__tr2qs_ctx("Document element with id %d does not exist","objects"),iEleId); + c->warning(__tr2qs_ctx("Document element with ID %d doesn't exist","objects"),iEleId); return true; } @@ -978,7 +971,7 @@ KVSO_CLASS_FUNCTION(webView,lastChild) QWebElement element=getElement(iEleId); if (element.isNull()) { - c->warning(__tr2qs_ctx("Document element with id %d does not exist","objects"),iEleId); + c->warning(__tr2qs_ctx("Document element with ID %d doesn't exist","objects"),iEleId); return true; } @@ -1002,7 +995,7 @@ KVSO_CLASS_FUNCTION(webView,parentElement) QWebElement element=getElement(iEleId); if (element.isNull()) { - c->warning(__tr2qs_ctx("Document element with id %d does not exist","objects"),iEleId); + c->warning(__tr2qs_ctx("Document element with ID %d doesn't exist","objects"),iEleId); return true; } @@ -1031,7 +1024,7 @@ KVSO_CLASS_FUNCTION(webView,styleProperty) QWebElement element=getElement(iEleId); if (element.isNull()) { - c->warning(__tr2qs_ctx("Document element with id %d does not exist","objects"),iEleId); + c->warning(__tr2qs_ctx("Document element with ID %d doesn't exist","objects"),iEleId); return true; } QWebElement::StyleResolveStrategy styleStrategy=QWebElement::CascadedStyle; @@ -1061,7 +1054,7 @@ KVSO_CLASS_FUNCTION(webView,setStyleProperty) QWebElement element=getElement(iEleId); if (element.isNull()) { - c->warning(__tr2qs_ctx("Document element with id %d does not exist","objects"),iEleId); + c->warning(__tr2qs_ctx("Document element with ID %d doesn't exist","objects"),iEleId); return true; } element.setStyleProperty(szProperty,szValue); diff --git a/src/modules/objects/KvsObject_widget.cpp b/src/modules/objects/KvsObject_widget.cpp index c4d7e2004..9eb2fb00b 100644 --- a/src/modules/objects/KvsObject_widget.cpp +++ b/src/modules/objects/KvsObject_widget.cpp @@ -201,14 +201,14 @@ const char * const widgettypes_tbl[] = { !fn: $repaint() Repaints the widget directly by calling [classfnc]$paintEvent[/classfnc]() immediately. !fn: $update([<x:ingeter>,<y:integer>,<width:integer>,<height:integer>]) - Updates enterily the widget or a rectangle. + Updates entirely the widget or a rectangle. This function does not cause an immediate [classfnc]$paintEvent[/classfnc](); instead it schedules a paint event for processing when KVIrc returns to the main event loop. !fn: $x() Returns the x coordinate of the upper-left corner of this widget relative to the parent widget, or to the desktop if this widget is a toplevel one. !fn: $y() - Returns the y coordinate of the uspper-left corner + Returns the y coordinate of the upper-left corner of this widget relative to the parent widget, or to the desktop if this widget is a toplevel one. !fn: $width() @@ -218,7 +218,7 @@ const char * const widgettypes_tbl[] = { !fn: $geometry() Returns the widget geometry in this form:[br] x, y, width, height. - !fn: $setGeometry(<x_or_array>,[<y>,<width>,<heigth>]) + !fn: $setGeometry(<x_or_array>,[<y>,<width>,<height>]) Sets the geometry of this widget. <x> and <y> are relative to the parent widget or to the desktop (if this widget is a toplevel one). All the parameters are in pixels. @@ -281,17 +281,17 @@ const char * const widgettypes_tbl[] = { Sets this widget to be the one that receives keyboard events. See also [classfnc]$hasFocus[/classfnc] !fn: $parentWidget() - Returns the object id of the parent widget, or '0' if this + Returns the object ID of the parent widget, or '0' if this widget is a toplevel one. !fn: $backgroundColor() Returns the background color of this widget in hexadecimal - html-like format. For example, for a black bacground you will get + HTML-like format. For example, for a black background you will get the string "000000", for a red one, "FF0000", for a white one "FFFFFF". See also [classfnc]$setBackgroundColor[/classfnc]() - !fn: $setBackgroundColor(<rgb(hex string)_array(red:integer,green:integer,blue_integer)_or_red>,[geen:integer],[blue:integer]) + !fn: $setBackgroundColor(<rgb(hex string)_array(red:integer,green:integer,blue_integer)_or_red>,[green:integer],[blue:integer]) Sets the background color of this widget to <rgb_value>:valid values are: - hex string: must be a string with 6 hexadecimal digits (like the ones used to - specify colors in html pages). The first two digits specify + specify colors in HTML pages). The first two digits specify the RED component, the third and fourth digit specify the GREEN component and the last two specify the BLUE component. For example "FFFF00" means full red, full green and no blue that gives @@ -300,10 +300,10 @@ const char * const widgettypes_tbl[] = { - array(red:integer,green:integer,blue:integer) - red:integer,green:integer,blue:integer. See also [classfnc]$foregroundColor[/classfnc]. - !fn: $setForegroundColor(<rgb(hex string)_array(red:integer,green:integer,blue_integer)_or_red>,[geen:integer],[blue:integer]) + !fn: $setForegroundColor(<rgb(hex string)_array(red:integer,green:integer,blue_integer)_or_red>,[green:integer],[blue:integer]) Sets the foreground color of this widget to <rgb_value>:valid values are: - hex string: must be a string with 6 hexadecimal digits (like the ones used to - specify colors in html pages). The first two digits specify + specify colors in HTML pages). The first two digits specify the RED component, the third and fourth digit specify the GREEN component and the last two specify the BLUE component. For example "FFFF00" means full red, full green and no blue that gives @@ -314,7 +314,7 @@ const char * const widgettypes_tbl[] = { See also [classfnc]$foregroundColor[/classfnc]. !fn: $foregroundColor() Returns the foreground color of this widget in hexadecimal - html-like format. + HTML-like format. See also [classfnc]$setForegroundColor[/classfnc]. !fn: $setMouseTracking(<bool>) Enables or disables the mouse tracking if <bool> is '1' or '0' respectively. @@ -399,11 +399,11 @@ const char * const widgettypes_tbl[] = { Sets the parent of the widget to parent !fn: $setWindowIcon(<image_id>) Sets the icon for this widget. This is meaningful only for toplevel widgets. - See the [doc:image_id]image identifier[/doc] documentation for the explaination + See the [doc:image_id]image identifier[/doc] documentation for the explanation of the <image_id> parameter. !fn: $setBackgroundImage(<image_id>) Sets the background image for this widget. - See the [doc:image_id]image identifier[/doc] documentation for the explaination + See the [doc:image_id]image identifier[/doc] documentation for the explanation of the <image_id> parameter. For some kind of widgets, setting a background pixmap may have no effect or have strange results. Experiment with it. @@ -474,8 +474,6 @@ const char * const widgettypes_tbl[] = { - = [br] - . [br] - ^ [br] - - [/pre] !fn: $mapFromGlobal(<x>,<y>) Translates the global screen coordinate pos to widget coordinates. @@ -486,11 +484,10 @@ const char * const widgettypes_tbl[] = { !fn: integer $globalCursorY() Return the y coordinate of the mo>use pointer global position. !fn: <tip:string> $maybeTipEvent(<x_tip_pos:integer>,<y_tip_pos:integer>) - This event handler is called when a eventualy tip is going to be show. + This event handler is called when an eventual tip is going to be show. You can be reimplement this event and set a dynamic tool tip by using "[cmd]return[/cmd] <tooltip_string>". If a tooltip has setted with [classfnc]$setTooltip[/classfnc] the dynamic tooltip will be ignored. The default implementation does nothing. - !fn: integer $setAttribute(<string>,<bool_flag>) Sets the attribute attribute on this widget if on is true; otherwise clears the attribute. Valid attributes are: @@ -573,7 +570,6 @@ const char * const widgettypes_tbl[] = { %widget->$show() [/example] - */ diff --git a/src/modules/objects/KvsObject_workspace.cpp b/src/modules/objects/KvsObject_workspace.cpp index d715a05c6..52ece77fb 100644 --- a/src/modules/objects/KvsObject_workspace.cpp +++ b/src/modules/objects/KvsObject_workspace.cpp @@ -72,14 +72,15 @@ !fn: $activateNextWindow() Activates the next window in the child window chain. !fn: $activatePrevWindow() - Activates the prev window in the child window chain.[br] - - |----CLASS EXAMPLE----|[br] - |-Start:[br] - #Let's start.[br] - #We start the main class creation, in the constructor we do the[br] - #widget's showing, to give a particular pop-up[br] - #creation appearance.[br] + Activates the previous window in the child window chain.[br] + @examples: + [example] + [comment] + //Let's start. + //We start the main class creation, in the constructor we do the + //widget's showing, to give a particular pop-up + //creation appearance. + [/comment] class (ws,widget)[br] {[br] constructor[br] @@ -91,13 +92,14 @@ $$->$show()[br] }[br] }[br] - #We create the new workspace, and we set a 640x480 size with widget $resize[br] - #command.[br] + [comment]//We create the new workspace, and we set a 640x480 size with widget $resize command[/comment][br] %Workspace=$new(workspace)[br] %Workspace->$resize(640,480)[br] - #Now we make a cycling costruction of the widgets(look at the class),[br] - #and give to the widgets a random X and Y coordinates.[br] - #It takes few seconds to show the effects, be patient.[br] + [comment] + //Now we make a cycling construction of the widgets(look at the class), + //and give to the widgets a random X and Y coordinates. + //It takes few seconds to show the effects, be patient. + [/comment] %I=0[br] while (%I<100)[br] {[br] @@ -106,20 +108,21 @@ %Widget=$new(ws,%Workspace)[br] %I++[br] }[br] - #Let's show the fireworks! EnJoY![br] + [comment]//Let's show the fireworks! EnJoY![/comment] %Workspace->$show()[br] - |-Start:[br] - |-|EXAMPLE n2:[br] - #This is like the first example but it has a particular animation effect.[br] + [/example] + [example] + [b]Example 2:[/b] + [comment]//This is like the first example but it has a particular animation effect.[/comment] %Hex[]=$array(0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F)[br] class (ws,widget)[br] {[br] constructor[br] {[br] - $$->$setGeometry(%X,%Y,100,100)[br] - $$->%lay=$new(layout,$$)[br] - %i=0[br] - while (%i<10)[br] + $$->$setGeometry(%X,%Y,100,100)[br] + $$->%lay=$new(layout,$$)[br] + %i=0[br] + while (%i<10)[br] {[br] $$->%label=$new(label,$$)[br] $$->%label->$settext("Another class by N\&G")[br] @@ -138,9 +141,9 @@ }[br] %Workspace=$new(workspace)[br] %Workspace->$resize(640,480)[br] - %Workspace->$setWindowTitle("Hit the mouse to stop cycling windows....")[br] + %Workspace->$setWindowTitle("Hit the mouse to stop cycling windows...")[br] %I=0[br] - %Cicle=1[br] + %Cycle=1[br] while (%I<20)[br] {[br] %X=$rand(500)[br] @@ -151,21 +154,20 @@ %Workspace->$show[br] timer (cycle,3000)[br] {[br] - if (%Cicle==1) %Workspace->$tile()[br] - if (%Cicle==2)[br] + if (%Cycle==1) %Workspace->$tile()[br] + if (%Cycle==2)[br] {[br] %Workspace->$cascade()[br] - %Cicle=1[br] + %Cycle=1[br] return[br] }[br] - %Cicle++[br] + %Cycle++[br] }[br] privateimpl(%Workspace,mousepressevent)[br] {[br] if ($istimer(cycle) == 1) killtimer cycle[br] }[br] - #-|End.[br] - + [/example] */ KVSO_BEGIN_REGISTERCLASS(KvsObject_workspace,"workspace","widget") diff --git a/src/modules/objects/KvsObject_xmlreader.cpp b/src/modules/objects/KvsObject_xmlreader.cpp index 8cf692938..bda1f651f 100644 --- a/src/modules/objects/KvsObject_xmlreader.cpp +++ b/src/modules/objects/KvsObject_xmlreader.cpp @@ -38,11 +38,11 @@ @type: class @short: - A simple xml document parser + A simple XML document parser @inherits: [class]object[/class] @description: - This class implements a really simple xml document parser. + This class implements a really simple XML document parser. You will usually derive your own class from this one and reimplement some of the events that it triggers. You will typically reimplement [classfnc:xmlreader]$onElementStart[/classfnc]() @@ -64,59 +64,51 @@ in the document, user abort etc...). If this function return $false then you can call $lastError() to obtain a descriptive error message. - !fn: <string> $lastError() Returns the last error occurred inside the parser. You will typically call this function when $parse() above returns $false. - !fn: <boolean> $onDocumentStart() This function is called when the document parsing starts. You can reimplement it in order to handle this notification. You should return $true if you want document parsing to continue and $false if you want it to be aborted. The default implementation does nothing besides returning $true. - !fn: <boolean> $onDocumentEnd() This function is called when the document parsing terminates successfully. You can reimplement it in order to handle this notification. You should return $true if you want document parsing to continue and $false if you want it to be aborted. The default implementation does nothing besides returning $true. - !fn: <boolean> $onElementStart(<qualified_name:string>,<attributes:hash>,<namespace:string>,<local_name:string>) This function is called when an element opening tag is encountered. The <qualified_name> of the tag is passed as the first parameter. The <attributes> are passed in the form of a hash with attribute values indexed by their names. When the <qualified_name> contains a namespace then it is also reported - in the splitted <namespace> <local_name> pair. + in the split <namespace> <local_name> pair. You should return $true if you want document parsing to continue and $false if you want it to be aborted. The default implementation does nothing besides returning $true. - !fn: <boolean> $onElementEnd(<qualified_name:string>,<namespace:string>,<local_name:string>) This function is called when an element closing tag is encountered. The <qualified_name> of the tag is passed as the first parameter. When the <qualified_name> contains a namespace then it is also reported - in the splitted <namespace> <local_name> pair. + in the split <namespace> <local_name> pair. You should return $true if you want document parsing to continue and $false if you want it to be aborted. The default implementation does nothing besides returning $true. - !fn: <boolean> $onText($0 = <text:string>) This function is called when a chunk of text is encountered inside the document. The parsed <text> chunk is passed as the first parameter. You should return $true if you want document parsing to continue and $false if you want it to be aborted. The default implementation does nothing besides returning $true. - !fn: <boolean> $onWarning(<message:string>) This function is called when the parser generates a recoverable error. The error <message> is passed as the first parameter. You should return $true if you want document parsing to continue and $false if you want it to be aborted. The default implementation does nothing besides returning $true. - !fn: <boolean> $onError(<message:string>) This function is called when the parser generates an unrecoverable error. The error <message> is passed as the first parameter. diff --git a/src/modules/objects/libkviobjects.cpp b/src/modules/objects/libkviobjects.cpp index 8eb15a6d1..c862eed37 100644 --- a/src/modules/objects/libkviobjects.cpp +++ b/src/modules/objects/libkviobjects.cpp @@ -629,7 +629,7 @@ static bool objects_kvs_fnc_listObjects(KviKvsModuleFunctionCall * cmd) @type: function @title: - $objects.dump + $objects.dump @keyterms: dump objects @short: |
