summaryrefslogtreecommitdiffstats
path: root/src/modules/objects/class_listbox.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/objects/class_listbox.cpp')
-rw-r--r--src/modules/objects/class_listbox.cpp34
1 files changed, 17 insertions, 17 deletions
diff --git a/src/modules/objects/class_listbox.cpp b/src/modules/objects/class_listbox.cpp
index 111f7952..db3920f1 100644
--- a/src/modules/objects/class_listbox.cpp
+++ b/src/modules/objects/class_listbox.cpp
@@ -100,7 +100,7 @@
This function is called by KVIrc when the current item changes.
!fn: <index:integer> $onItemEvent()
This function is called by KVIrc when the current item pointed by the mouse changes and gives in $0 the item index.
- !fn: <array:x,y,width,height> $itemRect(<item:index>)
+ !fn: <array:x,y,width,height> $tqitemRect(<item:index>)
Returns the rectangle on the screen that item occupies, or an invalid rectangle if item is 0 or is not currently visible.
@signals:
@@ -122,7 +122,7 @@ KVSO_BEGIN_REGISTERCLASS(KviKvsObject_listbox,"listbox","widget")
KVSO_REGISTER_HANDLER(KviKvsObject_listbox,"currentItem", functioncurrentItem)
KVSO_REGISTER_HANDLER(KviKvsObject_listbox,"textAt", functiontextAt);
KVSO_REGISTER_HANDLER(KviKvsObject_listbox,"itemAt", functionitemAt);
- KVSO_REGISTER_HANDLER(KviKvsObject_listbox,"itemRect", functionitemRect);
+ KVSO_REGISTER_HANDLER(KviKvsObject_listbox,"tqitemRect", functiontqitemRect);
KVSO_REGISTER_HANDLER(KviKvsObject_listbox,"setCurrentItem", functionsetCurrentItem);
@@ -150,21 +150,21 @@ KVSO_END_CONSTRUCTOR(KviKvsObject_listbox)
bool KviKvsObject_listbox::init(KviKvsRunTimeContext * pContext,KviKvsVariantList *pParams)
{
- KviTalListBox * b = new KviTalListBox(parentScriptWidget());
+ KviTalListBox * b = new KviTalListBox(tqparentScriptWidget());
b->setSelectionMode(KviTalListBox::Single);
- connect(b,SIGNAL(selectionChanged()),this,SLOT(selectionChanged()));
- connect(b,SIGNAL(currentChanged(KviTalListBoxItem *)),this,SLOT(currentItemChanged(KviTalListBoxItem *)));
+ connect(b,TQT_SIGNAL(selectionChanged()),this,TQT_SLOT(selectionChanged()));
+ connect(b,TQT_SIGNAL(currentChanged(KviTalListBoxItem *)),this,TQT_SLOT(currentItemChanged(KviTalListBoxItem *)));
- connect(b,SIGNAL(onItem(KviTalListBoxItem *)),this,SLOT(onItem(KviTalListBoxItem *)));
+ connect(b,TQT_SIGNAL(onItem(KviTalListBoxItem *)),this,TQT_SLOT(onItem(KviTalListBoxItem *)));
- setObject(b,true);;
+ setObject(TQT_TQOBJECT(b),true);;
return true;
}
bool KviKvsObject_listbox::functioninsertItem(KviKvsObjectFunctionCall *c)
{
kvs_int_t iIndex;
- QString szItem;
+ TQString szItem;
KVSO_PARAMETERS_BEGIN(c)
KVSO_PARAMETER("text",KVS_PT_STRING,0,szItem)
KVSO_PARAMETER("index",KVS_PT_INT,KVS_PF_OPTIONAL,iIndex)
@@ -182,7 +182,7 @@ bool KviKvsObject_listbox::functionchangeItem(KviKvsObjectFunctionCall *c)
{
kvs_uint_t uIndex,cnt;
- QString szText;
+ TQString szText;
KVSO_PARAMETERS_BEGIN(c)
KVSO_PARAMETER("text",KVS_PT_STRING,0,szText)
KVSO_PARAMETER("index",KVS_PT_UNSIGNEDINTEGER,0,uIndex)
@@ -261,20 +261,20 @@ bool KviKvsObject_listbox::functionsetCurrentItem(KviKvsObjectFunctionCall *c)
}
bool KviKvsObject_listbox::functionsetSelectionMode(KviKvsObjectFunctionCall *c)
{
- QString szMode;
+ TQString szMode;
KVSO_PARAMETERS_BEGIN(c)
KVSO_PARAMETER("selection_mode",KVS_PT_STRING,0,szMode)
KVSO_PARAMETERS_END(c)
if(!widget()) return true;
KviTalListBox::SelectionMode iMode = KviTalListBox::Single;
- if(KviQString::equalCI(szMode,"single")) iMode = KviTalListBox::Single;
+ if(KviTQString::equalCI(szMode,"single")) iMode = KviTalListBox::Single;
- else if(KviQString::equalCI(szMode,"multi")) iMode = KviTalListBox::Multi;
+ else if(KviTQString::equalCI(szMode,"multi")) iMode = KviTalListBox::Multi;
- else if(KviQString::equalCI(szMode,"extended")) iMode = KviTalListBox::Extended;
+ else if(KviTQString::equalCI(szMode,"extended")) iMode = KviTalListBox::Extended;
- else if(KviQString::equalCI(szMode,"none")) iMode = KviTalListBox::NoSelection;
+ else if(KviTQString::equalCI(szMode,"none")) iMode = KviTalListBox::NoSelection;
else c->warning(__tr2qs("Invalid selection mode '%Q' assuming single"),&szMode);
((KviTalListBox *)widget())->setSelectionMode(iMode);
@@ -325,7 +325,7 @@ bool KviKvsObject_listbox::functionitemAt(KviKvsObjectFunctionCall *c)
KVSO_PARAMETER("uY",KVS_PT_UNSIGNEDINTEGER,0,uY)
KVSO_PARAMETERS_END(c)
if(widget())
- c->returnValue()->setInteger(((KviTalListBox *)widget())->index(((KviTalListBox *)widget())->itemAt(QPoint(uX,uY))));
+ c->returnValue()->setInteger(((KviTalListBox *)widget())->index(((KviTalListBox *)widget())->itemAt(TQPoint(uX,uY))));
return true;
}
@@ -367,7 +367,7 @@ void KviKvsObject_listbox::onItem(KviTalListBoxItem *item)
}
-bool KviKvsObject_listbox::functionitemRect(KviKvsObjectFunctionCall *c)
+bool KviKvsObject_listbox::functiontqitemRect(KviKvsObjectFunctionCall *c)
{
kvs_uint_t uIndex;
KVSO_PARAMETERS_BEGIN(c)
@@ -375,7 +375,7 @@ kvs_uint_t uIndex;
KVSO_PARAMETERS_END(c)
if(widget())
{
- QRect rect=((KviTalListBox *)widget())->itemRect(((KviTalListBox *)widget())->item(uIndex));
+ TQRect rect=((KviTalListBox *)widget())->tqitemRect(((KviTalListBox *)widget())->item(uIndex));
KviKvsArray * a = new KviKvsArray();
a->set(0,new KviKvsVariant((kvs_int_t)rect.left()));
a->set(1,new KviKvsVariant((kvs_int_t)rect.top()));