diff options
| author | 2012-12-22 01:53:14 +0000 | |
|---|---|---|
| committer | 2012-12-22 01:53:14 +0000 | |
| commit | a7572583e8a7f0ed963da2238870170bc3bf12ed (patch) | |
| tree | 3e82d3b87f446fedd7a01924d8d4f281bdf5b140 /src/modules/objects | |
| parent | Fixed compilation with qt5rc1 (diff) | |
| download | KVIrc-a7572583e8a7f0ed963da2238870170bc3bf12ed.tar.gz KVIrc-a7572583e8a7f0ed963da2238870170bc3bf12ed.tar.bz2 KVIrc-a7572583e8a7f0ed963da2238870170bc3bf12ed.zip | |
Compile and run with Qt5.0. Also add a couple of KVS functions for byte order conversion.
git-svn-id: https://svn.kvirc.de/svn/trunk/kvirc@6297 17fca916-40b9-46aa-a4ea-0a15b648b75c
Diffstat (limited to 'src/modules/objects')
| -rw-r--r-- | src/modules/objects/KvsObject_groupBox.cpp | 4 | ||||
| -rw-r--r-- | src/modules/objects/KvsObject_lcd.cpp | 6 | ||||
| -rw-r--r-- | src/modules/objects/KvsObject_listWidget.cpp | 12 | ||||
| -rw-r--r-- | src/modules/objects/KvsObject_mainWindow.cpp | 2 | ||||
| -rw-r--r-- | src/modules/objects/KvsObject_multiLineEdit.cpp | 18 | ||||
| -rw-r--r-- | src/modules/objects/KvsObject_painter.cpp | 12 | ||||
| -rw-r--r-- | src/modules/objects/KvsObject_process.cpp | 2 | ||||
| -rw-r--r-- | src/modules/objects/KvsObject_radioButton.cpp | 2 | ||||
| -rw-r--r-- | src/modules/objects/KvsObject_tableWidget.cpp | 2 | ||||
| -rw-r--r-- | src/modules/objects/KvsObject_toolButton.cpp | 2 | ||||
| -rw-r--r-- | src/modules/objects/KvsObject_treeWidgeteItem.cpp | 2 | ||||
| -rw-r--r-- | src/modules/objects/KvsObject_widget.cpp | 12 | ||||
| -rw-r--r-- | src/modules/objects/KvsObject_workspace.cpp | 2 | ||||
| -rw-r--r-- | src/modules/objects/KvsObject_xmlreader.cpp | 14 | ||||
| -rw-r--r-- | src/modules/objects/object_macros.h | 4 |
15 files changed, 48 insertions, 48 deletions
diff --git a/src/modules/objects/KvsObject_groupBox.cpp b/src/modules/objects/KvsObject_groupBox.cpp index ccc8a2d41..a6677d105 100644 --- a/src/modules/objects/KvsObject_groupBox.cpp +++ b/src/modules/objects/KvsObject_groupBox.cpp @@ -75,9 +75,9 @@ const int align_cod[] = { !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 group box 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). + 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. !fn: $setInsideMargin(<margin:uint>) diff --git a/src/modules/objects/KvsObject_lcd.cpp b/src/modules/objects/KvsObject_lcd.cpp index 3bc333bf1..3038a4b87 100644 --- a/src/modules/objects/KvsObject_lcd.cpp +++ b/src/modules/objects/KvsObject_lcd.cpp @@ -60,12 +60,12 @@ !fn: $setNumDigits(<number:integer>) Sets the lcd number value. !fn: <boolean> $checkOverflow() - Returns TRUE if num is too big to be displayed in its entirety; - otherwise returns FALSE. + 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. !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 num is too big to be displayed in its entirety; otherwise returns 0 (false). */ KVSO_BEGIN_REGISTERCLASS(KvsObject_lcd,"lcdnumber","widget") diff --git a/src/modules/objects/KvsObject_listWidget.cpp b/src/modules/objects/KvsObject_listWidget.cpp index db5896e43..972f563a2 100644 --- a/src/modules/objects/KvsObject_listWidget.cpp +++ b/src/modules/objects/KvsObject_listWidget.cpp @@ -309,12 +309,12 @@ KVSO_CLASS_FUNCTION(listWidget,setFont) for(int i=0;i<szListStyle.length();i++) { szStyle=szListStyle.at(i); - if(KviQString::equalCI(szStyle,"italic")) font.setItalic(TRUE); - else if(KviQString::equalCI(szStyle,"bold")) font.setBold(TRUE); - else if(KviQString::equalCI(szStyle,"underline"))font.setUnderline(TRUE); - else if(KviQString::equalCI(szStyle,"overline")) font.setOverline(TRUE); - else if(KviQString::equalCI(szStyle,"strikeout"))font.setStrikeOut(TRUE); - else if(KviQString::equalCI(szStyle,"fixedpitch")) font.setFixedPitch(TRUE); + if(KviQString::equalCI(szStyle,"italic")) font.setItalic(true); + else if(KviQString::equalCI(szStyle,"bold")) font.setBold(true); + else if(KviQString::equalCI(szStyle,"underline"))font.setUnderline(true); + else if(KviQString::equalCI(szStyle,"overline")) font.setOverline(true); + else if(KviQString::equalCI(szStyle,"strikeout"))font.setStrikeOut(true); + else if(KviQString::equalCI(szStyle,"fixedpitch")) font.setFixedPitch(true); else c->warning(__tr2qs_ctx("Unknown style '%Q'","objects"),&szStyle); } pItem->setFont(font); diff --git a/src/modules/objects/KvsObject_mainWindow.cpp b/src/modules/objects/KvsObject_mainWindow.cpp index 2c4a557ec..8f9d62a45 100644 --- a/src/modules/objects/KvsObject_mainWindow.cpp +++ b/src/modules/objects/KvsObject_mainWindow.cpp @@ -93,7 +93,7 @@ KVSO_CLASS_FUNCTION(mainWindow,setCentralWidget) if(!pObject->inheritsClass("widget")) { c->warning(__tr2qs_ctx("Widget object required","objects")); - return TRUE; + return true; } ((KviTalMainWindow *)widget())->setCentralWidget(((QWidget *)(pObject->object()))); return true; diff --git a/src/modules/objects/KvsObject_multiLineEdit.cpp b/src/modules/objects/KvsObject_multiLineEdit.cpp index 61837ab23..48dedf4fc 100644 --- a/src/modules/objects/KvsObject_multiLineEdit.cpp +++ b/src/modules/objects/KvsObject_multiLineEdit.cpp @@ -64,9 +64,9 @@ Sets the editor to be read-only if bReadOnly is 1 or removes the read-only status is ReadOnly 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] - NoWrap - Do not wrap the text.[br] @@ -102,11 +102,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>) @@ -120,7 +120,7 @@ !fn: $setUndoRedoEnabled(<bUndoRedo:boolean>) Sets whether undo/redo is enabled to the bool value. !fn: <boolean> $isUndoRedoEnabled() - Returns 1 (TRUE) if undo/redo is enabled; otherwise returns 0 (FALSE). + Returns 1 (true) if undo/redo is enabled; otherwise returns 0 (false). !fn: <integer> $undoDepth() Returns the depth of the undo history. !fn: $setText(<txt:string>) @@ -144,16 +144,16 @@ !fn: $loadFile(<path:string>) 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 diff --git a/src/modules/objects/KvsObject_painter.cpp b/src/modules/objects/KvsObject_painter.cpp index 968e9434c..72124d318 100644 --- a/src/modules/objects/KvsObject_painter.cpp +++ b/src/modules/objects/KvsObject_painter.cpp @@ -772,12 +772,12 @@ KVSO_CLASS_FUNCTION(painter,setFont) for(int i=0;i<szListStyle.length();i++) { szStyle=szListStyle.at(i); - if(KviQString::equalCI(szStyle,"italic")) font.setItalic(TRUE); - else if(KviQString::equalCI(szStyle,"bold")) font.setBold(TRUE); - else if(KviQString::equalCI(szStyle,"underline"))font.setUnderline(TRUE); - else if(KviQString::equalCI(szStyle,"overline")) font.setOverline(TRUE); - else if(KviQString::equalCI(szStyle,"strikeout"))font.setStrikeOut(TRUE); - else if(KviQString::equalCI(szStyle,"fixedpitch")) font.setFixedPitch(TRUE); + if(KviQString::equalCI(szStyle,"italic")) font.setItalic(true); + else if(KviQString::equalCI(szStyle,"bold")) font.setBold(true); + else if(KviQString::equalCI(szStyle,"underline"))font.setUnderline(true); + else if(KviQString::equalCI(szStyle,"overline")) font.setOverline(true); + else if(KviQString::equalCI(szStyle,"strikeout"))font.setStrikeOut(true); + else if(KviQString::equalCI(szStyle,"fixedpitch")) font.setFixedPitch(true); else c->warning(__tr2qs_ctx("Unknown style '%Q'","objects"),&szStyle); } m_pPainter->setFont(font); diff --git a/src/modules/objects/KvsObject_process.cpp b/src/modules/objects/KvsObject_process.cpp index 369d197bb..4fd235ee7 100644 --- a/src/modules/objects/KvsObject_process.cpp +++ b/src/modules/objects/KvsObject_process.cpp @@ -143,7 +143,7 @@ !fn: <boolean> $isRunning() Return 1 if the process is running, else return 0. !fn: <boolean> $normalExit() - Returns TRUE if the process has exited normally; otherwise returns FALSE. + Returns true if the process has exited normally; otherwise returns false. !fn: $readyReadStdoutEvent() This function is invoched by the process when there are new datas.[br] The default implementation emits the [classfnc]$readyReadStdout[/classfnc]() signal. diff --git a/src/modules/objects/KvsObject_radioButton.cpp b/src/modules/objects/KvsObject_radioButton.cpp index 2a847866c..7d614fa96 100644 --- a/src/modules/objects/KvsObject_radioButton.cpp +++ b/src/modules/objects/KvsObject_radioButton.cpp @@ -48,7 +48,7 @@ !fn: $settext(<text:string>) Sets the text that will appear in the radiobutton. !fn: <boolean> $isChecked() - Returns 1 (TRUE) if the radio button is checked; otherwise returns 0 (FALSE). + Returns 1 (true) if the radio button is checked; otherwise returns 0 (false). !fn: $setChecked(<bChecked:boolean>) Sets whether the radio button is checked to check. !fn: $setPixmap(<image_id>) diff --git a/src/modules/objects/KvsObject_tableWidget.cpp b/src/modules/objects/KvsObject_tableWidget.cpp index 8b127e936..ddb7a6771 100644 --- a/src/modules/objects/KvsObject_tableWidget.cpp +++ b/src/modules/objects/KvsObject_tableWidget.cpp @@ -230,7 +230,7 @@ KVSO_BEGIN_REGISTERCLASS(KvsObject_tableWidget,"tablewidget","widget") KVSO_REGISTER_HANDLER(KvsObject_tableWidget,"itemEnteredEvent",itemEnteredEvent); KVSO_REGISTER_HANDLER(KvsObject_tableWidget,"cellActivatedEvent",cellActivatedEvent); KVSO_REGISTER_HANDLER(KvsObject_tableWidget,"cellDoubleClickedEvent",cellDoubleClickedEvent); - KVSO_REGISTER_STANDARD_TRUERETURN_HANDLER(KvsObject_tableWidget,"paintCellEvent") + KVSO_REGISTER_STANDARD_trueRETURN_HANDLER(KvsObject_tableWidget,"paintCellEvent") KVSO_REGISTER_STANDARD_NOTHINGRETURN_HANDLER(KvsObject_tableWidget,"sizeHintCellRequestEvent") diff --git a/src/modules/objects/KvsObject_toolButton.cpp b/src/modules/objects/KvsObject_toolButton.cpp index c2da8b6a6..eba314778 100644 --- a/src/modules/objects/KvsObject_toolButton.cpp +++ b/src/modules/objects/KvsObject_toolButton.cpp @@ -58,7 +58,7 @@ !fn:$usesTextLabel() Return 1 if the setUsesTextLabel is enabled, otherwise return 0. !fn:$setTextLabel(<text:String>,[tooltip:string]) - Sets the label of this button to <text> and automatically sets it as a tool tip if <tip> is TRUE. + Sets the label of this button to <text> and automatically sets it as a tool tip if <tip> is true. !fn:<string> $textLabel() Returns the label of tthe button. !fn:$setAutoRaise(<bAutoraise:boolean>) diff --git a/src/modules/objects/KvsObject_treeWidgeteItem.cpp b/src/modules/objects/KvsObject_treeWidgeteItem.cpp index 0220c8810..7da3a2920 100644 --- a/src/modules/objects/KvsObject_treeWidgeteItem.cpp +++ b/src/modules/objects/KvsObject_treeWidgeteItem.cpp @@ -90,7 +90,7 @@ const char * const itemflags_tbl[] = { 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. + 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. diff --git a/src/modules/objects/KvsObject_widget.cpp b/src/modules/objects/KvsObject_widget.cpp index 0052ae0a2..5a07150d1 100644 --- a/src/modules/objects/KvsObject_widget.cpp +++ b/src/modules/objects/KvsObject_widget.cpp @@ -1752,12 +1752,12 @@ KVSO_CLASS_FUNCTION(widget,setFont) for(int i=0;i<szListStyle.length();i++) { szStyle=szListStyle.at(i); - if(KviQString::equalCI(szStyle,"italic")) font.setItalic(TRUE); - else if(KviQString::equalCI(szStyle,"bold")) font.setBold(TRUE); - else if(KviQString::equalCI(szStyle,"underline"))font.setUnderline(TRUE); - else if(KviQString::equalCI(szStyle,"overline")) font.setOverline(TRUE); - else if(KviQString::equalCI(szStyle,"strikeout"))font.setStrikeOut(TRUE); - else if(KviQString::equalCI(szStyle,"fixedpitch")) font.setFixedPitch(TRUE); + if(KviQString::equalCI(szStyle,"italic")) font.setItalic(true); + else if(KviQString::equalCI(szStyle,"bold")) font.setBold(true); + else if(KviQString::equalCI(szStyle,"underline"))font.setUnderline(true); + else if(KviQString::equalCI(szStyle,"overline")) font.setOverline(true); + else if(KviQString::equalCI(szStyle,"strikeout"))font.setStrikeOut(true); + else if(KviQString::equalCI(szStyle,"fixedpitch")) font.setFixedPitch(true); else c->warning(__tr2qs_ctx("Unknown style '%Q'","objects"),&szStyle); } widget()->setFont(font); diff --git a/src/modules/objects/KvsObject_workspace.cpp b/src/modules/objects/KvsObject_workspace.cpp index 377dce6c9..f46559936 100644 --- a/src/modules/objects/KvsObject_workspace.cpp +++ b/src/modules/objects/KvsObject_workspace.cpp @@ -58,7 +58,7 @@ !fn: <object> $activeWindow() Returns the active window, or 0 if no window is active. !fn: <boolean> $scrollBarsEnabled() - Returns TRUE if the workspace provides scrollbars; otherwise returns FALSE. + Returns true if the workspace provides scrollbars; otherwise returns false. !fn: $setscrollBarsEnabled(<bEnabled:boolean>) Sets whether the workspace provides scrollbars to enable. (bEnabled 1 or 0) !fn: $cascade() diff --git a/src/modules/objects/KvsObject_xmlreader.cpp b/src/modules/objects/KvsObject_xmlreader.cpp index 0038f1c01..a52b3abdf 100644 --- a/src/modules/objects/KvsObject_xmlreader.cpp +++ b/src/modules/objects/KvsObject_xmlreader.cpp @@ -278,13 +278,13 @@ KVSO_BEGIN_REGISTERCLASS(KvsObject_xmlReader,"xmlreader","object") KVSO_REGISTER_HANDLER_BY_NAME(KvsObject_xmlReader,lastError) KVSO_REGISTER_HANDLER_BY_NAME(KvsObject_xmlReader,parse) - KVSO_REGISTER_STANDARD_TRUERETURN_HANDLER(KvsObject_xmlReader,"onDocumentStart") - KVSO_REGISTER_STANDARD_TRUERETURN_HANDLER(KvsObject_xmlReader,"onDocumentEnd") - KVSO_REGISTER_STANDARD_TRUERETURN_HANDLER(KvsObject_xmlReader,"onElementStart") - KVSO_REGISTER_STANDARD_TRUERETURN_HANDLER(KvsObject_xmlReader,"onElementEnd") - KVSO_REGISTER_STANDARD_TRUERETURN_HANDLER(KvsObject_xmlReader,"onText") - KVSO_REGISTER_STANDARD_TRUERETURN_HANDLER(KvsObject_xmlReader,"onWarning") - KVSO_REGISTER_STANDARD_TRUERETURN_HANDLER(KvsObject_xmlReader,"onError") + KVSO_REGISTER_STANDARD_trueRETURN_HANDLER(KvsObject_xmlReader,"onDocumentStart") + KVSO_REGISTER_STANDARD_trueRETURN_HANDLER(KvsObject_xmlReader,"onDocumentEnd") + KVSO_REGISTER_STANDARD_trueRETURN_HANDLER(KvsObject_xmlReader,"onElementStart") + KVSO_REGISTER_STANDARD_trueRETURN_HANDLER(KvsObject_xmlReader,"onElementEnd") + KVSO_REGISTER_STANDARD_trueRETURN_HANDLER(KvsObject_xmlReader,"onText") + KVSO_REGISTER_STANDARD_trueRETURN_HANDLER(KvsObject_xmlReader,"onWarning") + KVSO_REGISTER_STANDARD_trueRETURN_HANDLER(KvsObject_xmlReader,"onError") KVSO_END_REGISTERCLASS(KvsObject_xmlReader) KVSO_BEGIN_CONSTRUCTOR(KvsObject_xmlReader,KviKvsObject) diff --git a/src/modules/objects/object_macros.h b/src/modules/objects/object_macros.h index b12ed3f3a..fe78b23e2 100644 --- a/src/modules/objects/object_macros.h +++ b/src/modules/objects/object_macros.h @@ -51,10 +51,10 @@ g_pKvs##__className##Class->registerFunctionHandler(#__szName,(KviKvsObjectFunct #define KVSO_REGISTER_STANDARD_NOTHINGRETURN_HANDLER(__className,__szName) \ g_pKvs##__className##Class->registerStandardNothingReturnFunctionHandler(__szName); -#define KVSO_REGISTER_STANDARD_TRUERETURN_HANDLER(__className,__szName) \ +#define KVSO_REGISTER_STANDARD_trueRETURN_HANDLER(__className,__szName) \ g_pKvs##__className##Class->registerStandardTrueReturnFunctionHandler(__szName); -#define KVSO_REGISTER_STANDARD_FALSERETURN_HANDLER(__className,__szName) \ +#define KVSO_REGISTER_STANDARD_falseRETURN_HANDLER(__className,__szName) \ g_pKvs##__className##Class->registerStandardFalseReturnFunctionHandler(__szName); #define KVSO_BEGIN_REGISTERCLASS(__className,__stringName,__baseClass) \ |
