diff options
Diffstat (limited to 'src/modules/objects/class_widget.cpp')
-rw-r--r-- | src/modules/objects/class_widget.cpp | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/src/modules/objects/class_widget.cpp b/src/modules/objects/class_widget.cpp index 4461f366..4ff98d6e 100644 --- a/src/modules/objects/class_widget.cpp +++ b/src/modules/objects/class_widget.cpp @@ -36,7 +36,7 @@ #include <tqcursor.h> #include <tqiconset.h> #include <tqcolor.h> -#include <layout.h> +#include <tqlayout.h> #include <tqbitmap.h> #include <tqmetaobject.h> #include "class_widget.h" @@ -137,12 +137,12 @@ const int widgettypes_cod[] = { All the other widget-type classes inherit from this one. @functions: !fn: $show() - Shows this widget and the children. + Shows this widget and the tqchildren. See also [classfnc]$hide[/classfnc]() and [classfnc]$isVisible[/classfnc]. !fn: $hide() - Hides this widget (and conseguently all the children). + Hides this widget (and conseguently all the tqchildren). See also [classfnc]$show[/classfnc]() and [classfnc]$isVisible[/classfnc]. - !fn: $repaint(<bool erase>) + !fn: $tqrepaint(<bool erase>) Repaints the widget directly by calling [classfnc]$paintEvent[/classfnc]() immediately.[br] If erase is TRUE, erases the widget before the $paintEvent() call. !fn: $x() @@ -157,29 +157,29 @@ const int widgettypes_cod[] = { Returns the width of this widget in pixels. !fn: $height() Returns the height of this widget in pixels. - !fn: $geometry() - Returns the widget geometry in this form:[br] + !fn: $tqgeometry() + Returns the widget tqgeometry in this form:[br] x, y, width, height. !fn: $setGeometry(<x_or_array>,[<y>,<width>,<heigth>]) - Sets the geometry of this widget. <x> and <y> are relative + Sets the tqgeometry 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. !fn: $setMinimumWidth(<value>) Sets the minimum width of this widget to <value>. The user will not be able to resize the widget to a smaller - value. This value is also used by the [class:layout]layout class[/class]. + value. This value is also used by the [class:tqlayout]tqlayout class[/class]. !fn: $setMinimumHeight(<value>) Sets the minimum height of this widget to <value>. The user will not be able to resize the widget to a smaller - value. This value is also used by the [class:layout]layout class[/class]. + value. This value is also used by the [class:tqlayout]tqlayout class[/class]. !fn: $setMaximumWidth(<value>) Sets the maximum width of this widget to <value>. The user will not be able to resize the widget to a bigger - value. This value is also used by the [class:layout]layout class[/class]. + value. This value is also used by the [class:tqlayout]tqlayout class[/class]. !fn: $setMaximumHeight(<value>) Sets the maximum height of this widget to <value>. The user will not be able to resize the widget to a bigger - value. This value is also used by the [class:layout]layout class[/class]. + value. This value is also used by the [class:tqlayout]tqlayout class[/class]. !fn: $move(<x_or_array>[,<y>]) Moves this widget to the coordinate <x> and <y> relative to its parent widget (or the desktop if this widget is a toplevel one). @@ -341,7 +341,7 @@ const int widgettypes_cod[] = { If a tooltip has setted with [classfnc]$setTooltip[/classfnc] the dynamic tooltip will be ignored. The default implementation does nothing. !fn: $paintEvent() - This event handler can be reimplemented to repaint all or part of the widget. + This event handler can be reimplemented to tqrepaint all or part of the widget. It's needed by the Painter class. It's very useful for drawing flicker free animations or low level special graphic effects. If you call "[cmd]return[/cmd] $true" you will stop the internal processing @@ -522,7 +522,7 @@ const int widgettypes_cod[] = { // ... now that I think about it , it // may happen that widget() will be zero here too: // If the TQt "physical" widget gets destroyed - // by some external factor (for example when children + // by some external factor (for example when tqchildren // of a wrapper widget destroyed by KVIrc). // // as a convention: @@ -546,7 +546,7 @@ KVSO_BEGIN_REGISTERCLASS(KviKvsObject_widget,"widget","object") // apparence KVSO_REGISTER_HANDLER(KviKvsObject_widget,"show",function_show) KVSO_REGISTER_HANDLER(KviKvsObject_widget,"hide",function_hide) - KVSO_REGISTER_HANDLER(KviKvsObject_widget,"repaint",function_repaint) + KVSO_REGISTER_HANDLER(KviKvsObject_widget,"tqrepaint",function_tqrepaint) KVSO_REGISTER_HANDLER(KviKvsObject_widget,"isTopLevel",function_isTopLevel) KVSO_REGISTER_HANDLER(KviKvsObject_widget,"isVisible",function_isVisible) KVSO_REGISTER_HANDLER(KviKvsObject_widget,"raise",function_raise) @@ -567,10 +567,10 @@ KVSO_BEGIN_REGISTERCLASS(KviKvsObject_widget,"widget","object") KVSO_REGISTER_HANDLER(KviKvsObject_widget,"fontMetricsWidth",function_fontMetricsWidth) KVSO_REGISTER_HANDLER(KviKvsObject_widget,"fontMetricsHeight",function_fontMetricsHeight) KVSO_REGISTER_HANDLER(KviKvsObject_widget,"setFont",function_setFont) - // geometry + // tqgeometry KVSO_REGISTER_HANDLER(KviKvsObject_widget,"screenResolution",function_screenResolution) KVSO_REGISTER_HANDLER(KviKvsObject_widget,"centerToScreen",function_centerToScreen) - KVSO_REGISTER_HANDLER(KviKvsObject_widget,"geometry",function_geometry) + KVSO_REGISTER_HANDLER(KviKvsObject_widget,"geometry",function_tqgeometry) KVSO_REGISTER_HANDLER(KviKvsObject_widget,"setGeometry",function_setGeometry) KVSO_REGISTER_HANDLER(KviKvsObject_widget,"mapToGlobal",function_mapToGlobal) KVSO_REGISTER_HANDLER(KviKvsObject_widget,"mapFromGlobal",function_mapFromGlobal) @@ -587,7 +587,7 @@ KVSO_BEGIN_REGISTERCLASS(KviKvsObject_widget,"widget","object") KVSO_REGISTER_HANDLER(KviKvsObject_widget,"setMaximumWidth",function_setMaximumWidth) KVSO_REGISTER_HANDLER(KviKvsObject_widget,"setMaximumHeight",function_setMaximumHeight) KVSO_REGISTER_HANDLER(KviKvsObject_widget,"move",function_move) - KVSO_REGISTER_HANDLER(KviKvsObject_widget,"sizeHint",function_sizeHint) + KVSO_REGISTER_HANDLER(KviKvsObject_widget,"tqsizeHint",function_tqsizeHint) KVSO_REGISTER_HANDLER(KviKvsObject_widget,"resize",function_resize) KVSO_REGISTER_HANDLER(KviKvsObject_widget,"setFocusPolicy",function_setFocusPolicy) @@ -916,14 +916,14 @@ bool KviKvsObject_widget::function_fontAscent(KviKvsObjectFunctionCall * c) } -bool KviKvsObject_widget::function_repaint(KviKvsObjectFunctionCall * c) +bool KviKvsObject_widget::function_tqrepaint(KviKvsObjectFunctionCall * c) { bool bEnabled; KVSO_PARAMETERS_BEGIN(c) KVSO_PARAMETER("bEnabled",KVS_PT_BOOL,0,bEnabled) KVSO_PARAMETERS_END(c) if(!widget()) return true; - widget()->repaint(bEnabled); + widget()->tqrepaint(bEnabled); return true; } @@ -955,9 +955,9 @@ bool KviKvsObject_widget::function_screenResolution(KviKvsObjectFunctionCall * c return true; } -bool KviKvsObject_widget::function_geometry(KviKvsObjectFunctionCall *c) +bool KviKvsObject_widget::function_tqgeometry(KviKvsObjectFunctionCall *c) { - TQRect r = widget() ? widget()->geometry() : TQRect(0,0,0,0); + TQRect r = widget() ? widget()->tqgeometry() : TQRect(0,0,0,0); KviKvsArray * a = new KviKvsArray(); a->set(0,new KviKvsVariant((kvs_int_t)r.x())); a->set(1,new KviKvsVariant((kvs_int_t)r.y())); @@ -992,7 +992,7 @@ bool KviKvsObject_widget::function_setGeometry(KviKvsObjectFunctionCall *c) if(pXOrArray->isArray()) { - // the user has passed a complete geometry array as first parameter + // the user has passed a complete tqgeometry array as first parameter // make sure it has at least 4 elements if(pXOrArray->array()->size() < 4) { @@ -1009,12 +1009,12 @@ bool KviKvsObject_widget::function_setGeometry(KviKvsObjectFunctionCall *c) // no parameter was set in that place if(!(pX && pY && pW && pH)) { - c->error(__tr2qs("One of the geometry array parameters is empty")); + c->error(__tr2qs("One of the tqgeometry array parameters is empty")); return false; } if(!(pX->asInteger(iX) && pY->asInteger(iY) && pW->asInteger(iW) && pH->asInteger(iH))) { - c->error(__tr2qs("One of the geometry array parameters didn't evaluate to an integer")); + c->error(__tr2qs("One of the tqgeometry array parameters didn't evaluate to an integer")); return false; } // ok: the params are correct @@ -1450,10 +1450,10 @@ bool KviKvsObject_widget::function_move(KviKvsObjectFunctionCall *c) widget()->move(TQPoint(iX,iY)); return true; } -bool KviKvsObject_widget::function_sizeHint(KviKvsObjectFunctionCall *c) +bool KviKvsObject_widget::function_tqsizeHint(KviKvsObjectFunctionCall *c) { if(!widget())return true; - TQSize sizehint = widget()->sizeHint(); + TQSize sizehint = widget()->tqsizeHint(); KviKvsArray * a = new KviKvsArray(); a->set(0,new KviKvsVariant((kvs_int_t)sizehint.width())); a->set(1,new KviKvsVariant((kvs_int_t)sizehint.height())); @@ -1616,7 +1616,7 @@ bool KviKvsObject_widget::function_addWidgetToWrappedLayout(KviKvsObjectFunction c->warning(__tr2qs("Widget parameter is not a valid object")); return true; } - TQLayout *lay=widget()->layout(); + TQLayout *lay=widget()->tqlayout(); if (!lay) { c->warning(__tr2qs("No Layout associated to the widget ")); |