summaryrefslogtreecommitdiffstats
path: root/src/modules/objects/class_tabwidget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/objects/class_tabwidget.cpp')
-rw-r--r--src/modules/objects/class_tabwidget.cpp104
1 files changed, 52 insertions, 52 deletions
diff --git a/src/modules/objects/class_tabwidget.cpp b/src/modules/objects/class_tabwidget.cpp
index c5e97b60..57e30a18 100644
--- a/src/modules/objects/class_tabwidget.cpp
+++ b/src/modules/objects/class_tabwidget.cpp
@@ -94,7 +94,7 @@
%secondtab=$new(widget,%Tabwidget)
# Now we'll create the item to put in to tab's pages.
- %layoutfirsttab=$new(layout,%firsttab)
+ %tqlayoutfirsttab=$new(tqlayout,%firsttab)
%labelbt=$new(label,%firsttab)
%labelbt->$settext(Botton Tab)
%labeltt=$new(label,%firsttab)
@@ -104,12 +104,12 @@
%buttontt=$new(button,%firsttab)
%buttontt->$settext("To &Top")
- # Now we'll give a layout to all items.
+ # Now we'll give a tqlayout to all items.
# This also allows to use privateimpl without making buttons global variables
- %layoutfirsttab->$addwidget(%labelbt,0,0)
- %layoutfirsttab->$addwidget(%labeltt,0,1)
- %layoutfirsttab->$addwidget(%buttontb,1,0)
- %layoutfirsttab->$addwidget(%buttontt,1,1)
+ %tqlayoutfirsttab->$addwidget(%labelbt,0,0)
+ %tqlayoutfirsttab->$addwidget(%labeltt,0,1)
+ %tqlayoutfirsttab->$addwidget(%buttontb,1,0)
+ %tqlayoutfirsttab->$addwidget(%buttontt,1,1)
# Add the page to the main tab.
%Tabwidget->$addTab(%firsttab,Top&Button,33)
@@ -125,15 +125,15 @@
}
# We do the same work with the second tab's page.
- %layoutsecondtab=$new(layout,%secondtab)
+ %tqlayoutsecondtab=$new(tqlayout,%secondtab)
%labelwp=$new(label,%secondtab)
%labelwp->$settext("Enjoy the new Class provided by")
- %layoutsecondtab->$addwidget(%labelwp,0,0)
- %labelwp->$setalignment("Center")
+ %tqlayoutsecondtab->$addwidget(%labelwp,0,0)
+ %labelwp->$settqalignment("Center")
%labelgen=$new(label,%secondtab)
%labelgen->$settext(Grifisx \& Noldor)
- %labelgen->$setalignment("Center")
- %layoutsecondtab->$addwidget(%labelgen,1,0)
+ %labelgen->$settqalignment("Center")
+ %tqlayoutsecondtab->$addwidget(%labelgen,1,0)
%Tabwidget->$addTab(%secondtab,&About,50)
# Let's show our example.
@@ -182,14 +182,14 @@ KVSO_END_CONSTRUCTOR(KviKvsObject_tabwidget)
bool KviKvsObject_tabwidget::init(KviKvsRunTimeContext * pContext,KviKvsVariantList *pParams)
{
- setObject(new QTabWidget(parentScriptWidget(), name()), true);
- connect(widget(),SIGNAL(currentChanged(int)),this,SLOT(slotcurrentChanged(int)));
+ setObject(TQT_TQOBJECT(new TQTabWidget(tqparentScriptWidget(), name())), true);
+ connect(widget(),TQT_SIGNAL(currentChanged(int)),this,TQT_SLOT(slotcurrentChanged(int)));
return true;
}
bool KviKvsObject_tabwidget::functionaddTab(KviKvsObjectFunctionCall *c)
{
KviKvsObject *ob;
- QString szLabel,szIcon;
+ TQString szLabel,szIcon;
kvs_hobject_t hObject;
KVSO_PARAMETERS_BEGIN(c)
KVSO_PARAMETER("widget",KVS_PT_HOBJECT,0,hObject)
@@ -213,23 +213,23 @@ bool KviKvsObject_tabwidget::functionaddTab(KviKvsObjectFunctionCall *c)
c->warning(__tr2qs("Can't add a non-widget object"));
return true;
}
- QPixmap * pix = g_pIconManager->getImage(szIcon);
+ TQPixmap * pix = g_pIconManager->getImage(szIcon);
if(pix){
#ifdef COMPILE_USE_QT4
- ((QTabWidget *)widget())->addTab(((QWidget *)(ob->object())),QIconSet(*pix),szLabel);
+ ((TQTabWidget *)widget())->addTab(((TQWidget *)(ob->object())),TQIconSet(*pix),szLabel);
#else
- ((QTabWidget *)widget())->addTab(((QWidget *)(ob->object())),QIconSet(*pix,QIconSet::Small),szLabel);
+ ((TQTabWidget *)widget())->addTab(((TQWidget *)(ob->object())),TQIconSet(*pix,TQIconSet::Small),szLabel);
#endif
}
- else((QTabWidget *)widget())->addTab(((QWidget *)(ob->object())),szLabel);
+ else((TQTabWidget *)widget())->addTab(((TQWidget *)(ob->object())),szLabel);
return true;
}
bool KviKvsObject_tabwidget::functioninsertTab(KviKvsObjectFunctionCall *c)
{
KviKvsObject *ob;
- QString szLabel,szIcon;
+ TQString szLabel,szIcon;
kvs_uint_t uIndex;
kvs_hobject_t hObject;
KVSO_PARAMETERS_BEGIN(c)
@@ -255,15 +255,15 @@ bool KviKvsObject_tabwidget::functioninsertTab(KviKvsObjectFunctionCall *c)
c->warning(__tr2qs("Can't add a non-widget object"));
return true;
}
- QPixmap * pix = g_pIconManager->getImage(szIcon);
+ TQPixmap * pix = g_pIconManager->getImage(szIcon);
if(pix){
#ifdef COMPILE_USE_QT4
- ((QTabWidget *)widget())->insertTab( ((QWidget *)(ob->object())),QIconSet(*pix),szLabel,uIndex);
+ ((TQTabWidget *)widget())->insertTab( ((TQWidget *)(ob->object())),TQIconSet(*pix),szLabel,uIndex);
#else
- ((QTabWidget *)widget())->insertTab(((QWidget *)(ob->object())),QIconSet(*pix,QIconSet::Small),szLabel,uIndex);
+ ((TQTabWidget *)widget())->insertTab(((TQWidget *)(ob->object())),TQIconSet(*pix,TQIconSet::Small),szLabel,uIndex);
#endif
}
- else ((QTabWidget *)widget())->insertTab(((QWidget *)(ob->object())),szLabel,uIndex);
+ else ((TQTabWidget *)widget())->insertTab(((TQWidget *)(ob->object())),szLabel,uIndex);
return true;
}
@@ -273,13 +273,13 @@ bool KviKvsObject_tabwidget::functionsetCurrentPage(KviKvsObjectFunctionCall *c)
KVSO_PARAMETERS_BEGIN(c)
KVSO_PARAMETER("index",KVS_PT_UNSIGNEDINTEGER,0,uIndex)
KVSO_PARAMETERS_END(c)
- if (widget()) ((QTabWidget *)widget())->setCurrentPage(uIndex);
+ if (widget()) ((TQTabWidget *)widget())->setCurrentPage(uIndex);
return true;
}
bool KviKvsObject_tabwidget::functionsetTabToolTip(KviKvsObjectFunctionCall *c)
{
KviKvsObject *ob;
- QString szTooltip;
+ TQString szTooltip;
kvs_hobject_t hObject;
KVSO_PARAMETERS_BEGIN(c)
KVSO_PARAMETER("tab_widget",KVS_PT_HOBJECT,0,hObject)
@@ -302,13 +302,13 @@ bool KviKvsObject_tabwidget::functionsetTabToolTip(KviKvsObjectFunctionCall *c)
c->warning(__tr2qs("Not a widget object"));
return true;
}
- int ctrl = ((QTabWidget *)widget())->indexOf (((QWidget *)(ob->object())));
+ int ctrl = ((TQTabWidget *)widget())->indexOf (((TQWidget *)(ob->object())));
if (ctrl == -1)
{
c->warning(__tr2qs("Can't find the tab "));
return true;
}
- ((QTabWidget *)widget())->setTabToolTip(((QWidget *)(ob->object())),szTooltip);
+ ((TQTabWidget *)widget())->setTabToolTip(((TQWidget *)(ob->object())),szTooltip);
return true;
}
bool KviKvsObject_tabwidget::functionremoveTabToolTip(KviKvsObjectFunctionCall *c)
@@ -335,19 +335,19 @@ bool KviKvsObject_tabwidget::functionremoveTabToolTip(KviKvsObjectFunctionCall *
c->warning(__tr2qs("Not a widget object"));
return true;
}
- if (((QTabWidget *)widget())->indexOf (((QWidget *)(ob->object()))) == -1)
+ if (((TQTabWidget *)widget())->indexOf (((TQWidget *)(ob->object()))) == -1)
{
c->warning(__tr2qs("Can't find the tab "));
return true;
}
- ((QTabWidget *)widget())->removeTabToolTip(((QWidget *)(ob->object())));
+ ((TQTabWidget *)widget())->removeTabToolTip(((TQWidget *)(ob->object())));
return true;
}
bool KviKvsObject_tabwidget::functionsetTabLabel(KviKvsObjectFunctionCall *c)
{
KviKvsObject *ob;
- QString szLabel;
+ TQString szLabel;
kvs_hobject_t hObject;
KVSO_PARAMETERS_BEGIN(c)
KVSO_PARAMETER("tab_widget",KVS_PT_HOBJECT,0, hObject)
@@ -370,18 +370,18 @@ bool KviKvsObject_tabwidget::functionsetTabLabel(KviKvsObjectFunctionCall *c)
c->warning(__tr2qs("Not a widget object"));
return true;
}
- int ctrl = ((QTabWidget *)widget())->indexOf (((QWidget *)(ob->object())));
+ int ctrl = ((TQTabWidget *)widget())->indexOf (((TQWidget *)(ob->object())));
if (ctrl == -1)
{
c->warning(__tr2qs("Can't find the tab "));
return true;
}
- ((QTabWidget *)widget())->setTabLabel(((QWidget *)(ob->object())),szLabel);
+ ((TQTabWidget *)widget())->setTabLabel(((TQWidget *)(ob->object())),szLabel);
return true;
}
bool KviKvsObject_tabwidget::functioncurrentPageIndex(KviKvsObjectFunctionCall *c)
{
- int index=((QTabWidget *)widget())->currentPageIndex();
+ int index=((TQTabWidget *)widget())->currentPageIndex();
if (widget()) c->returnValue()->setInteger(index);
return true;
}
@@ -392,7 +392,7 @@ bool KviKvsObject_tabwidget::functiontabLabel(KviKvsObjectFunctionCall *c)
KVSO_PARAMETER("index",KVS_PT_INT,0,uIndex)
KVSO_PARAMETERS_END(c)
if (!widget()) return true;
- QString label=((QTabWidget *)widget())->label(uIndex);
+ TQString label=((TQTabWidget *)widget())->label(uIndex);
c->returnValue()->setString(label);
return true;
}
@@ -402,20 +402,20 @@ bool KviKvsObject_tabwidget::functionsetMargin(KviKvsObjectFunctionCall *c)
KVSO_PARAMETERS_BEGIN(c)
KVSO_PARAMETER("margin",KVS_PT_INT,0,iMargin)
KVSO_PARAMETERS_END(c)
- if (widget()) ((QTabWidget *)widget())->setMargin(iMargin);
+ if (widget()) ((TQTabWidget *)widget())->setMargin(iMargin);
return true;
}
bool KviKvsObject_tabwidget::functionmargin(KviKvsObjectFunctionCall *c)
{
- if (widget()) c->returnValue()->setInteger(((QTabWidget *)widget())->margin());
+ if (widget()) c->returnValue()->setInteger(((TQTabWidget *)widget())->margin());
return true;
}
bool KviKvsObject_tabwidget::functioncount(KviKvsObjectFunctionCall *c)
{
if (!widget()) return true;
- int count = ((QTabWidget *)widget())->count();
+ int count = ((TQTabWidget *)widget())->count();
c->returnValue()->setInteger(count);
return true;
}
@@ -424,8 +424,8 @@ bool KviKvsObject_tabwidget::functioncurrentTabLabel(KviKvsObjectFunctionCall *c
{
if (widget())
{
- int i= ((QTabWidget *)widget())->currentPageIndex();
- QString label=((QTabWidget *)widget())->label(i);
+ int i= ((TQTabWidget *)widget())->currentPageIndex();
+ TQString label=((TQTabWidget *)widget())->label(i);
c->returnValue()->setString(label);
}
return true;
@@ -454,20 +454,20 @@ bool KviKvsObject_tabwidget::functionremovePage(KviKvsObjectFunctionCall *c)
c->warning(__tr2qs("Not a widget object"));
return true;
}
- int ctrl = ((QTabWidget *)widget())->indexOf (((QWidget *)(ob->object())));
+ int ctrl = ((TQTabWidget *)widget())->indexOf (((TQWidget *)(ob->object())));
if (ctrl == -1)
{
c->warning(__tr2qs("Can't find the tab "));
return true;
}
- ((QTabWidget *)widget())->removePage(((QWidget *)(ob->object())));
+ ((TQTabWidget *)widget())->removePage(((TQWidget *)(ob->object())));
return true;
}
bool KviKvsObject_tabwidget::functionchangeTab(KviKvsObjectFunctionCall *c)
{
KviKvsObject *ob;
- QString szLabel,szIcon;
+ TQString szLabel,szIcon;
kvs_hobject_t hObject;
KVSO_PARAMETERS_BEGIN(c)
KVSO_PARAMETER("tab_widget",KVS_PT_HOBJECT,0,hObject)
@@ -491,34 +491,34 @@ bool KviKvsObject_tabwidget::functionchangeTab(KviKvsObjectFunctionCall *c)
c->warning(__tr2qs("Not a widget object"));
return true;
}
- int ctrl = ((QTabWidget *)widget())->indexOf (((QWidget *)(ob->object())));
+ int ctrl = ((TQTabWidget *)widget())->indexOf (((TQWidget *)(ob->object())));
if (ctrl == -1)
{
c->warning(__tr2qs("Can't find the tab "));
return true;
}
- QPixmap * pix = g_pIconManager->getImage(szIcon);
+ TQPixmap * pix = g_pIconManager->getImage(szIcon);
if(pix){
#ifdef COMPILE_USE_QT4
- ((QTabWidget *)widget())->changeTab(((QWidget *)(ob->object())),QIconSet(*pix),szLabel);
+ ((TQTabWidget *)widget())->changeTab(((TQWidget *)(ob->object())),TQIconSet(*pix),szLabel);
#else
- ((QTabWidget *)widget())->changeTab(((QWidget *)(ob->object())),QIconSet(*pix,QIconSet::Small),szLabel);
+ ((TQTabWidget *)widget())->changeTab(((TQWidget *)(ob->object())),TQIconSet(*pix,TQIconSet::Small),szLabel);
#endif
}
- else ((QTabWidget *)widget())->changeTab(((QWidget *)(ob->object())),szLabel);
+ else ((TQTabWidget *)widget())->changeTab(((TQWidget *)(ob->object())),szLabel);
return true;
}
bool KviKvsObject_tabwidget::functionsetTabPosition(KviKvsObjectFunctionCall *c)
{
- QString szPos;
+ TQString szPos;
KVSO_PARAMETERS_BEGIN(c)
KVSO_PARAMETER("tab_position",KVS_PT_STRING,0,szPos)
KVSO_PARAMETERS_END(c)
if(!widget())return true;
- if(KviQString::equalCI(szPos,"Top"))
- ((QTabWidget *)widget())->setTabPosition(QTabWidget::Top);
- else if(KviQString::equalCI(szPos,"Bottom"))
- ((QTabWidget *)widget())->setTabPosition(QTabWidget::Bottom);
+ if(KviTQString::equalCI(szPos,"Top"))
+ ((TQTabWidget *)widget())->setTabPosition(TQTabWidget::Top);
+ else if(KviTQString::equalCI(szPos,"Bottom"))
+ ((TQTabWidget *)widget())->setTabPosition(TQTabWidget::Bottom);
else c->warning( __tr2qs("Unknown position 'Q%'"),&szPos);
return true;
}