summaryrefslogtreecommitdiffstats
path: root/src/modules/objects/class_combobox.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/objects/class_combobox.cpp')
-rw-r--r--src/modules/objects/class_combobox.cpp90
1 files changed, 45 insertions, 45 deletions
diff --git a/src/modules/objects/class_combobox.cpp b/src/modules/objects/class_combobox.cpp
index 9c8ffadf..38f4472a 100644
--- a/src/modules/objects/class_combobox.cpp
+++ b/src/modules/objects/class_combobox.cpp
@@ -28,8 +28,8 @@
#include "class_list.h"
#include "class_combobox.h"
-#include <qlineedit.h>
-#include <qstring.h>
+#include <tqlineedit.h>
+#include <tqstring.h>
/*
@doc: combobox
@@ -132,50 +132,50 @@ KVSO_END_CONSTRUCTOR(KviKvsObject_combobox)
bool KviKvsObject_combobox::init(KviKvsRunTimeContext * pContext,KviKvsVariantList *pParams)
{
- setObject(new QComboBox(parentScriptWidget(), name()), true);
- connect (((QComboBox *)widget()),SIGNAL(activated( int )),this,SLOT(slotActivated( int )));
+ setObject(TQT_TQOBJECT(new TQComboBox(tqparentScriptWidget(), name())), true);
+ connect (((TQComboBox *)widget()),TQT_SIGNAL(activated( int )),this,TQT_SLOT(slotActivated( int )));
return true;
}
bool KviKvsObject_combobox::functioninsertItem(KviKvsObjectFunctionCall *c)
{
kvs_int_t iIndex;
- QString szItem;
+ TQString szItem;
KVSO_PARAMETERS_BEGIN(c)
KVSO_PARAMETER("item",KVS_PT_STRING,0,szItem)
KVSO_PARAMETER("index",KVS_PT_INT,KVS_PF_OPTIONAL,iIndex)
KVSO_PARAMETERS_END(c)
if(widget())
if(c->paramCount()==1)
- ((QComboBox *)widget())->insertItem(szItem);
+ ((TQComboBox *)widget())->insertItem(szItem);
else
- ((QComboBox *)widget())->insertItem(szItem, iIndex);
+ ((TQComboBox *)widget())->insertItem(szItem, iIndex);
return true;
}
bool KviKvsObject_combobox::functionclear(KviKvsObjectFunctionCall *c)
{
- if (widget()) ((QComboBox *)widget())->clear();
+ if (widget()) ((TQComboBox *)widget())->clear();
return true;
}
bool KviKvsObject_combobox::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)
KVSO_PARAMETERS_END(c)
if(!widget()) return true;
if (szText.isEmpty()) c->warning(__tr2qs("No string parameter given - using empty string"));
- if(uIndex >= (cnt = ((QComboBox *)widget())->count()))
+ if(uIndex >= (cnt = ((TQComboBox *)widget())->count()))
{
c->warning(__tr2qs("Item index [%d] is too big - defaulting to " \
"$count() - 1 [%d]"), uIndex, cnt);
uIndex = cnt - 1;
}
- ((QComboBox *)widget())->changeItem(szText, uIndex);
+ ((TQComboBox *)widget())->changeItem(szText, uIndex);
return true;
@@ -188,14 +188,14 @@ bool KviKvsObject_combobox::functionremoveItem(KviKvsObjectFunctionCall *c)
KVSO_PARAMETER("index",KVS_PT_UNSIGNEDINTEGER,0,uIndex)
KVSO_PARAMETERS_END(c)
if(!widget()) return true;
- if(uIndex >= (cnt = ((QComboBox *)widget())->count()))
+ if(uIndex >= (cnt = ((TQComboBox *)widget())->count()))
{
c->warning(__tr2qs("Item index [%d] is too big - defaulting to " \
"$count() - 1 [%d]"), uIndex, cnt);
uIndex = cnt - 1;
}
- ((QComboBox *)widget())->removeItem(uIndex);
+ ((TQComboBox *)widget())->removeItem(uIndex);
return true;
@@ -204,37 +204,37 @@ bool KviKvsObject_combobox::functionsetMaxCount(KviKvsObjectFunctionCall *c)
{
kvs_uint_t iMax;
- QString szText;
+ TQString szText;
KVSO_PARAMETERS_BEGIN(c)
KVSO_PARAMETER("count",KVS_PT_UNSIGNEDINTEGER,0,iMax)
KVSO_PARAMETERS_END(c)
if(widget())
- ((QComboBox *)widget())->setMaxCount(iMax);
+ ((TQComboBox *)widget())->setMaxCount(iMax);
return true;
}
bool KviKvsObject_combobox::functionmaxCount(KviKvsObjectFunctionCall *c)
{
- if (widget()) c->returnValue()->setInteger(((QComboBox *)widget())->maxCount());
+ if (widget()) c->returnValue()->setInteger(((TQComboBox *)widget())->maxCount());
return true;
}
bool KviKvsObject_combobox::functioncount(KviKvsObjectFunctionCall *c)
{
- if (widget()) c->returnValue()->setInteger(((QComboBox *)widget())->count());
+ if (widget()) c->returnValue()->setInteger(((TQComboBox *)widget())->count());
return true;
}
bool KviKvsObject_combobox::functioncurrent(KviKvsObjectFunctionCall *c)
{
- if (widget()) c->returnValue()->setString(((QComboBox *)widget())->currentText().local8Bit().data());
+ if (widget()) c->returnValue()->setString(((TQComboBox *)widget())->currentText().local8Bit().data());
return true;
}
bool KviKvsObject_combobox::functioncurrentItem(KviKvsObjectFunctionCall *c)
{
- if (widget()) c->returnValue()->setInteger(((QComboBox *)widget())->currentItem());
+ if (widget()) c->returnValue()->setInteger(((TQComboBox *)widget())->currentItem());
return true;
}
bool KviKvsObject_combobox::functiontextLineEdit(KviKvsObjectFunctionCall *c)
{
- if (widget()) c->returnValue()->setString(((QComboBox *)widget())->lineEdit()->text());
+ if (widget()) c->returnValue()->setString(((TQComboBox *)widget())->lineEdit()->text());
return true;
}
@@ -246,34 +246,34 @@ bool KviKvsObject_combobox::functionsetEditable(KviKvsObjectFunctionCall *c)
KVSO_PARAMETERS_END(c)
if(widget())
{
- ((QComboBox *)widget())->setEditable(bFlag);
- if (bFlag) connect (((QComboBox *)widget())->lineEdit(),SIGNAL(textChanged(const QString & )),this,SLOT(slottextChanged(const QString & )));
+ ((TQComboBox *)widget())->setEditable(bFlag);
+ if (bFlag) connect (((TQComboBox *)widget())->lineEdit(),TQT_SIGNAL(textChanged(const TQString & )),this,TQT_SLOT(slottextChanged(const TQString & )));
else
- disconnect (((QComboBox *)widget())->lineEdit(),SIGNAL(textChanged(const QString & )),this,SLOT(slottextChanged(const QString & )));
+ disconnect (((TQComboBox *)widget())->lineEdit(),TQT_SIGNAL(textChanged(const TQString & )),this,TQT_SLOT(slottextChanged(const TQString & )));
}
return true;
}
bool KviKvsObject_combobox::functionsetTextLineEdit(KviKvsObjectFunctionCall *c)
{
- QString szText;
+ TQString szText;
KVSO_PARAMETERS_BEGIN(c)
KVSO_PARAMETER("text",KVS_PT_STRING,0,szText)
KVSO_PARAMETERS_END(c)
if(widget())
- ((QComboBox *)widget())->lineEdit()->setText(szText);
+ ((TQComboBox *)widget())->lineEdit()->setText(szText);
return true;
}
bool KviKvsObject_combobox::functioneditable(KviKvsObjectFunctionCall *c)
{
if(widget())
- c->returnValue()->setBoolean(((QComboBox *)widget())->editable());
+ c->returnValue()->setBoolean(((TQComboBox *)widget())->editable());
return true;
}
bool KviKvsObject_combobox::functionsetEditText(KviKvsObjectFunctionCall *c)
{
- QString szText;
+ TQString szText;
bool bQuiet=false;
KVSO_PARAMETERS_BEGIN(c)
KVSO_PARAMETER("text",KVS_PT_STRING,0,szText)
@@ -281,7 +281,7 @@ bool KviKvsObject_combobox::functionsetEditText(KviKvsObjectFunctionCall *c)
KVSO_PARAMETERS_END(c)
if(!widget()) return true;
if (szText.isEmpty() && !bQuiet) c->warning("No string parameter given - using empty string");
- ((QComboBox *)widget())->setEditText(szText);
+ ((TQComboBox *)widget())->setEditText(szText);
return true;
}
bool KviKvsObject_combobox::functiontextAt(KviKvsObjectFunctionCall *c)
@@ -292,7 +292,7 @@ bool KviKvsObject_combobox::functiontextAt(KviKvsObjectFunctionCall *c)
KVSO_PARAMETER("index",KVS_PT_UNSIGNEDINTEGER,0,uIndex)
KVSO_PARAMETERS_END(c)
if(widget())
- c->returnValue()->setString(((QComboBox *)widget())->text(uIndex));
+ c->returnValue()->setString(((TQComboBox *)widget())->text(uIndex));
return true;
}
bool KviKvsObject_combobox::functionsetCurrentItem(KviKvsObjectFunctionCall *c)
@@ -302,34 +302,34 @@ bool KviKvsObject_combobox::functionsetCurrentItem(KviKvsObjectFunctionCall *c)
KVSO_PARAMETER("index",KVS_PT_UNSIGNEDINTEGER,0,uIndex)
KVSO_PARAMETERS_END(c)
if(widget())
- ((QComboBox *)widget())->setCurrentItem(uIndex);
+ ((TQComboBox *)widget())->setCurrentItem(uIndex);
return true;
}
bool KviKvsObject_combobox::functionpopup(KviKvsObjectFunctionCall *c)
{
if(widget())
- ((QComboBox *)widget())->popup();
+ ((TQComboBox *)widget())->popup();
return true;
}
bool KviKvsObject_combobox::functionsetInsertionPolicy(KviKvsObjectFunctionCall *c)
{
- QString szPolicy;
+ TQString szPolicy;
KVSO_PARAMETERS_BEGIN(c)
KVSO_PARAMETER("policy",KVS_PT_STRING,0,szPolicy)
KVSO_PARAMETERS_END(c)
if(!widget()) return true;
- if(KviQString::equalCI(szPolicy,"NoInsertion"))
- ((QComboBox *)widget())->setInsertionPolicy(QComboBox::NoInsertion);
- else if(KviQString::equalCI(szPolicy,"AtTop"))
- ((QComboBox *)widget())->setInsertionPolicy(QComboBox::AtTop);
- else if(KviQString::equalCI(szPolicy,"AtBotton"))
- ((QComboBox *)widget())->setInsertionPolicy(QComboBox::AtBottom);
- else if(KviQString::equalCI(szPolicy,"AtCurrent"))
- ((QComboBox *)widget())->setInsertionPolicy(QComboBox::AtCurrent);
- else if(KviQString::equalCI(szPolicy,"AfterCurrent"))
- ((QComboBox *)widget())->setInsertionPolicy(QComboBox::AfterCurrent);
- else if(KviQString::equalCI(szPolicy,"BeforeCurrent"))
- ((QComboBox *)widget())->setInsertionPolicy(QComboBox::BeforeCurrent);
+ if(KviTQString::equalCI(szPolicy,"NoInsertion"))
+ ((TQComboBox *)widget())->setInsertionPolicy(TQComboBox::NoInsertion);
+ else if(KviTQString::equalCI(szPolicy,"AtTop"))
+ ((TQComboBox *)widget())->setInsertionPolicy(TQComboBox::AtTop);
+ else if(KviTQString::equalCI(szPolicy,"AtBotton"))
+ ((TQComboBox *)widget())->setInsertionPolicy(TQComboBox::AtBottom);
+ else if(KviTQString::equalCI(szPolicy,"AtCurrent"))
+ ((TQComboBox *)widget())->setInsertionPolicy(TQComboBox::AtCurrent);
+ else if(KviTQString::equalCI(szPolicy,"AfterCurrent"))
+ ((TQComboBox *)widget())->setInsertionPolicy(TQComboBox::AfterCurrent);
+ else if(KviTQString::equalCI(szPolicy,"BeforeCurrent"))
+ ((TQComboBox *)widget())->setInsertionPolicy(TQComboBox::BeforeCurrent);
else c->warning(__tr2qs("Invalid insertion Policy %Q"),&szPolicy);
return true;
}
@@ -344,7 +344,7 @@ bool KviKvsObject_combobox::functiontextChangedEvent(KviKvsObjectFunctionCall *c
}
-void KviKvsObject_combobox::slottextChanged(const QString &text)
+void KviKvsObject_combobox::slottextChanged(const TQString &text)
{
KviKvsVariantList params(new KviKvsVariant(text));
callFunction(this,"textChangedEvent",&params);