summaryrefslogtreecommitdiffstats
path: root/src/modules/objects
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/objects')
-rw-r--r--src/modules/objects/class_button.cpp38
-rw-r--r--src/modules/objects/class_button.h5
-rw-r--r--src/modules/objects/class_buttongroup.cpp14
-rw-r--r--src/modules/objects/class_buttongroup.h4
-rw-r--r--src/modules/objects/class_checkbox.cpp10
-rw-r--r--src/modules/objects/class_checkbox.h5
-rw-r--r--src/modules/objects/class_combobox.cpp90
-rw-r--r--src/modules/objects/class_combobox.h7
-rw-r--r--src/modules/objects/class_dialog.cpp16
-rw-r--r--src/modules/objects/class_dialog.h4
-rw-r--r--src/modules/objects/class_dockwindow.cpp98
-rw-r--r--src/modules/objects/class_dockwindow.h1
-rw-r--r--src/modules/objects/class_file.cpp52
-rw-r--r--src/modules/objects/class_file.h17
-rw-r--r--src/modules/objects/class_groupbox.cpp98
-rw-r--r--src/modules/objects/class_groupbox.h2
-rw-r--r--src/modules/objects/class_hbox.cpp12
-rw-r--r--src/modules/objects/class_hbox.h2
-rw-r--r--src/modules/objects/class_label.cpp152
-rw-r--r--src/modules/objects/class_label.h4
-rw-r--r--src/modules/objects/class_layout.cpp94
-rw-r--r--src/modules/objects/class_layout.h4
-rw-r--r--src/modules/objects/class_lcd.cpp34
-rw-r--r--src/modules/objects/class_lcd.h4
-rw-r--r--src/modules/objects/class_lineedit.cpp76
-rw-r--r--src/modules/objects/class_lineedit.h7
-rw-r--r--src/modules/objects/class_listbox.cpp34
-rw-r--r--src/modules/objects/class_listbox.h5
-rw-r--r--src/modules/objects/class_listview.cpp74
-rw-r--r--src/modules/objects/class_listview.h16
-rw-r--r--src/modules/objects/class_listviewitem.cpp42
-rw-r--r--src/modules/objects/class_listviewitem.h1
-rw-r--r--src/modules/objects/class_mainwindow.cpp50
-rw-r--r--src/modules/objects/class_mainwindow.h4
-rw-r--r--src/modules/objects/class_menubar.cpp6
-rw-r--r--src/modules/objects/class_menubar.h4
-rw-r--r--src/modules/objects/class_multilineedit.cpp194
-rw-r--r--src/modules/objects/class_multilineedit.h5
-rw-r--r--src/modules/objects/class_painter.cpp128
-rw-r--r--src/modules/objects/class_painter.h11
-rw-r--r--src/modules/objects/class_pixmap.cpp40
-rw-r--r--src/modules/objects/class_pixmap.h21
-rw-r--r--src/modules/objects/class_popupmenu.cpp24
-rw-r--r--src/modules/objects/class_popupmenu.h5
-rw-r--r--src/modules/objects/class_process.cpp34
-rw-r--r--src/modules/objects/class_process.h9
-rw-r--r--src/modules/objects/class_progressbar.cpp10
-rw-r--r--src/modules/objects/class_progressbar.h4
-rw-r--r--src/modules/objects/class_radiobutton.cpp16
-rw-r--r--src/modules/objects/class_radiobutton.h5
-rw-r--r--src/modules/objects/class_slider.cpp66
-rw-r--r--src/modules/objects/class_slider.h5
-rw-r--r--src/modules/objects/class_socket.cpp102
-rw-r--r--src/modules/objects/class_socket.h32
-rw-r--r--src/modules/objects/class_spinbox.cpp38
-rw-r--r--src/modules/objects/class_spinbox.h5
-rw-r--r--src/modules/objects/class_tabwidget.cpp104
-rw-r--r--src/modules/objects/class_tabwidget.h5
-rw-r--r--src/modules/objects/class_tbrowser.cpp24
-rw-r--r--src/modules/objects/class_tbrowser.h9
-rw-r--r--src/modules/objects/class_toolbar.cpp16
-rw-r--r--src/modules/objects/class_toolbar.h3
-rw-r--r--src/modules/objects/class_toolbutton.cpp66
-rw-r--r--src/modules/objects/class_toolbutton.h5
-rw-r--r--src/modules/objects/class_urllabel.cpp108
-rw-r--r--src/modules/objects/class_urllabel.h14
-rw-r--r--src/modules/objects/class_vbox.cpp12
-rw-r--r--src/modules/objects/class_vbox.h2
-rw-r--r--src/modules/objects/class_widget.cpp412
-rw-r--r--src/modules/objects/class_widget.h13
-rw-r--r--src/modules/objects/class_window.cpp20
-rw-r--r--src/modules/objects/class_window.h13
-rw-r--r--src/modules/objects/class_wizard.cpp40
-rw-r--r--src/modules/objects/class_wizard.h5
-rw-r--r--src/modules/objects/class_workspace.cpp26
-rw-r--r--src/modules/objects/class_workspace.h4
-rw-r--r--src/modules/objects/class_wrapper.cpp72
-rw-r--r--src/modules/objects/class_wrapper.h9
-rw-r--r--src/modules/objects/class_xmlreader.cpp52
-rw-r--r--src/modules/objects/class_xmlreader.h5
-rw-r--r--src/modules/objects/libkviobjects.cpp161
-rw-r--r--src/modules/objects/object_macros.h6
82 files changed, 1535 insertions, 1511 deletions
diff --git a/src/modules/objects/class_button.cpp b/src/modules/objects/class_button.cpp
index 54d1525a..c3710cc1 100644
--- a/src/modules/objects/class_button.cpp
+++ b/src/modules/objects/class_button.cpp
@@ -24,7 +24,7 @@
#include "kvi_error.h"
-#include <qiconset.h>
+#include <tqiconset.h>
#include "kvi_iconmanager.h"
#include "class_button.h"
@@ -57,25 +57,25 @@ KVSO_END_CONSTRUCTOR(KviKvsObject_button)
bool KviKvsObject_button::init(KviKvsRunTimeContext * pContext,KviKvsVariantList *pParams)
{
- setObject(new QPushButton(parentScriptWidget(),name()),true);
- connect(widget(),SIGNAL(clicked()),this,SLOT(slotClicked()));
+ setObject(TQT_TQOBJECT(new TQPushButton(tqparentScriptWidget(),name())),true);
+ connect(widget(),TQT_SIGNAL(clicked()),this,TQT_SLOT(slotClicked()));
return true;
}
bool KviKvsObject_button::functionText(KviKvsObjectFunctionCall *c)
{
- if(widget()) c->returnValue()->setString(((QPushButton *)widget())->text());
+ if(widget()) c->returnValue()->setString(((TQPushButton *)widget())->text());
return true;
}
bool KviKvsObject_button::functionSetText(KviKvsObjectFunctionCall *c)
{
- QString szText;
+ TQString szText;
KVSO_PARAMETERS_BEGIN(c)
KVSO_PARAMETER("text",KVS_PT_STRING,0,szText)
KVSO_PARAMETERS_END(c)
if (widget())
- ((QPushButton *)widget())->setText(szText);
+ ((TQPushButton *)widget())->setText(szText);
return true;
}
bool KviKvsObject_button::functionSetAutoDefault(KviKvsObjectFunctionCall *c)
@@ -85,7 +85,7 @@ bool KviKvsObject_button::functionSetAutoDefault(KviKvsObjectFunctionCall *c)
KVSO_PARAMETER("bEnabled",KVS_PT_BOOL,0,bEnabled)
KVSO_PARAMETERS_END(c)
if(widget())
- ((QPushButton *)widget())->setAutoDefault(bEnabled);
+ ((TQPushButton *)widget())->setAutoDefault(bEnabled);
return true;
}
bool KviKvsObject_button::functionSetToggleButton(KviKvsObjectFunctionCall *c)
@@ -95,7 +95,7 @@ bool KviKvsObject_button::functionSetToggleButton(KviKvsObjectFunctionCall *c)
KVSO_PARAMETER("bEnabled",KVS_PT_BOOL,0,bEnabled)
KVSO_PARAMETERS_END(c)
if(widget())
- ((QPushButton *)widget())->setToggleButton(bEnabled);
+ ((TQPushButton *)widget())->setToggleButton(bEnabled);
return true;
}
bool KviKvsObject_button::functionSetOn(KviKvsObjectFunctionCall *c)
@@ -105,7 +105,7 @@ bool KviKvsObject_button::functionSetOn(KviKvsObjectFunctionCall *c)
KVSO_PARAMETER("bEnabled",KVS_PT_BOOL,0,bEnabled)
KVSO_PARAMETERS_END(c)
if(widget())
- ((QPushButton *)widget())->setOn(bEnabled);
+ ((TQPushButton *)widget())->setOn(bEnabled);
return true;
}
// FIX ME
@@ -116,48 +116,48 @@ bool KviKvsObject_button::functionSetIsMenuButton(KviKvsObjectFunctionCall *c)
KVSO_PARAMETER("bEnabled",KVS_PT_BOOL,0,bEnabled)
KVSO_PARAMETERS_END(c)
/*if(widget())
- ((QPushButton *)widget())->setIsMenuButton(bEnabled);
+ ((TQPushButton *)widget())->setIsMenuButton(bEnabled);
*/
return true;
}
bool KviKvsObject_button::functionIsMenuButton(KviKvsObjectFunctionCall *c)
{
- if (widget()) c->returnValue()->setBoolean(((QPushButton *)widget())->isMenuButton());
+ if (widget()) c->returnValue()->setBoolean(((TQPushButton *)widget())->isMenuButton());
return true;
}
//
bool KviKvsObject_button::functionIsOn(KviKvsObjectFunctionCall *c)
{
- if (widget()) c->returnValue()->setBoolean(((QPushButton *)widget())->isOn());
+ if (widget()) c->returnValue()->setBoolean(((TQPushButton *)widget())->isOn());
return true;
}
bool KviKvsObject_button::functionToggle(KviKvsObjectFunctionCall *c)
{
- if(widget()) ((QPushButton *)widget())->toggle();
+ if(widget()) ((TQPushButton *)widget())->toggle();
return true;
}
// FIX ME
bool KviKvsObject_button::functionSetImage(KviKvsObjectFunctionCall *c)
{
- QString icon;
+ TQString icon;
KVSO_PARAMETERS_BEGIN(c)
KVSO_PARAMETER("icon",KVS_PT_STRING,0,icon)
KVSO_PARAMETERS_END(c)
if (!widget()) return true;
- QPixmap * pix = g_pIconManager->getImage(icon);
+ TQPixmap * pix = g_pIconManager->getImage(icon);
if(pix){
#ifdef COMPILE_USE_QT4
- ((QPushButton *)widget())->setIconSet(*pix);
+ ((TQPushButton *)widget())->setIconSet(*pix);
#else
- ((QPushButton *)widget())->setIconSet(QIconSet(*pix,QIconSet::Small));
+ ((TQPushButton *)widget())->setIconSet(TQIconSet(*pix,TQIconSet::Small));
#endif
}
else{
#ifdef COMPILE_USE_QT4
- ((QPushButton *)widget())->setIcon(QIconSet());
+ ((TQPushButton *)widget())->setIcon(TQIconSet());
#else
- ((QPushButton *)widget())->setIconSet(QIconSet());
+ ((TQPushButton *)widget())->setIconSet(TQIconSet());
#endif
}
return true;
diff --git a/src/modules/objects/class_button.h b/src/modules/objects/class_button.h
index 5c752e48..f2077624 100644
--- a/src/modules/objects/class_button.h
+++ b/src/modules/objects/class_button.h
@@ -24,17 +24,18 @@
-#include <qpushbutton.h>
+#include <tqpushbutton.h>
#include "class_widget.h"
#include "object_macros.h"
class KviKvsObject_button : public KviKvsObject_widget
{
Q_OBJECT
+ TQ_OBJECT
public:
KVSO_DECLARE_OBJECT(KviKvsObject_button)
public:
- QWidget * widget() { return (QWidget *)object(); };
+ TQWidget * widget() { return (TQWidget *)object(); };
protected:
virtual bool init(KviKvsRunTimeContext * pContext,KviKvsVariantList *pParams);
diff --git a/src/modules/objects/class_buttongroup.cpp b/src/modules/objects/class_buttongroup.cpp
index 5f9f1756..611341ae 100644
--- a/src/modules/objects/class_buttongroup.cpp
+++ b/src/modules/objects/class_buttongroup.cpp
@@ -21,9 +21,9 @@
// Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
//
-#include <qbuttongroup.h>
+#include <tqbuttongroup.h>
#include "class_buttongroup.h"
-#include <qradiobutton.h>
+#include <tqradiobutton.h>
#include "kvi_error.h"
#include "kvi_debug.h"
@@ -47,9 +47,9 @@
[class]widget[/class]
@description:
This widget organizes buttons in a group.
- It will be usually a parent for other child controls.
- You can either use a child layout to manage the children geometries
- or use $setColumnLayout function to manage the layout automatically.
+ It will be usually a tqparent for other child controls.
+ You can either use a child tqlayout to manage the tqchildren geometries
+ or use $setColumnLayout function to manage the tqlayout automatically.
The class ineriths groupbox.
@functions:
@@ -73,11 +73,11 @@ KVSO_END_CONSTRUCTOR(KviKvsObject_buttongroup)
bool KviKvsObject_buttongroup::init(KviKvsRunTimeContext * pContext,KviKvsVariantList *pParams)
{
#ifdef COMPILE_USE_QT4
- QButtonGroup *group=new QButtonGroup(parentScriptWidget());
+ TQButtonGroup *group=new TQButtonGroup(tqparentScriptWidget());
group->setObjectName(name());
setObject(group,true);
#else
- setObject(new QButtonGroup(name(),parentScriptWidget()), true);
+ setObject(TQT_TQOBJECT(new TQButtonGroup(name(),tqparentScriptWidget())), true);
#endif
diff --git a/src/modules/objects/class_buttongroup.h b/src/modules/objects/class_buttongroup.h
index 472051ec..440b1e95 100644
--- a/src/modules/objects/class_buttongroup.h
+++ b/src/modules/objects/class_buttongroup.h
@@ -25,7 +25,7 @@
-#include <qbuttongroup.h>
+#include <tqbuttongroup.h>
#include "class_groupbox.h"
#include "object_macros.h"
@@ -34,7 +34,7 @@ class KviKvsObject_buttongroup : public KviKvsObject_groupbox
public:
KVSO_DECLARE_OBJECT(KviKvsObject_buttongroup)
public:
- QWidget * widget() { return (QWidget *)object(); };
+ TQWidget * widget() { return (TQWidget *)object(); };
protected:
virtual bool init(KviKvsRunTimeContext * pContext,KviKvsVariantList *pParams);
diff --git a/src/modules/objects/class_checkbox.cpp b/src/modules/objects/class_checkbox.cpp
index a651adb8..27a0fc1d 100644
--- a/src/modules/objects/class_checkbox.cpp
+++ b/src/modules/objects/class_checkbox.cpp
@@ -79,10 +79,10 @@ KVSO_END_CONSTRUCTOR(KviKvsObject_checkbox)
bool KviKvsObject_checkbox::init(KviKvsRunTimeContext * pContext,KviKvsVariantList *pParams)
{
- KviStyledCheckBox * cb = new KviStyledCheckBox(parentScriptWidget(), name());
- setObject(cb, true);
- connect(cb,SIGNAL(toggled(bool)),this,SLOT(toggled(bool)));
- connect(widget(),SIGNAL(clicked()),this,SLOT(slotClicked()));
+ KviStyledCheckBox * cb = new KviStyledCheckBox(tqparentScriptWidget(), name());
+ setObject(TQT_TQOBJECT(cb), true);
+ connect(cb,TQT_SIGNAL(toggled(bool)),this,TQT_SLOT(toggled(bool)));
+ connect(widget(),TQT_SIGNAL(clicked()),this,TQT_SLOT(slotClicked()));
return true;
}
@@ -104,7 +104,7 @@ bool KviKvsObject_checkbox::function_setChecked(KviKvsObjectFunctionCall *c)
bool KviKvsObject_checkbox::function_setText(KviKvsObjectFunctionCall *c)
{
- QString szText;
+ TQString szText;
KVSO_PARAMETERS_BEGIN(c)
KVSO_PARAMETER("text",KVS_PT_STRING,0,szText)
KVSO_PARAMETERS_END(c)
diff --git a/src/modules/objects/class_checkbox.h b/src/modules/objects/class_checkbox.h
index 1d19a432..150cac04 100644
--- a/src/modules/objects/class_checkbox.h
+++ b/src/modules/objects/class_checkbox.h
@@ -25,17 +25,18 @@
-#include <qcheckbox.h>
+#include <tqcheckbox.h>
#include "class_button.h"
#include "object_macros.h"
class KviKvsObject_checkbox : public KviKvsObject_button
{
Q_OBJECT
+ TQ_OBJECT
public:
KVSO_DECLARE_OBJECT(KviKvsObject_checkbox)
public:
- QWidget * widget() { return (QWidget *)object(); };
+ TQWidget * widget() { return (TQWidget *)object(); };
protected:
virtual bool init(KviKvsRunTimeContext * pContext,KviKvsVariantList *pParams);
bool function_setChecked(KviKvsObjectFunctionCall *c);
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);
diff --git a/src/modules/objects/class_combobox.h b/src/modules/objects/class_combobox.h
index d4da7c6b..906dee75 100644
--- a/src/modules/objects/class_combobox.h
+++ b/src/modules/objects/class_combobox.h
@@ -24,17 +24,18 @@
//
-#include <qcombobox.h>
+#include <tqcombobox.h>
#include "class_widget.h"
#include "object_macros.h"
class KviKvsObject_combobox : public KviKvsObject_widget
{
Q_OBJECT
+ TQ_OBJECT
public:
KVSO_DECLARE_OBJECT(KviKvsObject_combobox)
public:
- QWidget * widget() { return (QWidget *)object(); };
+ TQWidget * widget() { return (TQWidget *)object(); };
protected:
virtual bool init(KviKvsRunTimeContext * pContext,KviKvsVariantList *pParams);
@@ -64,7 +65,7 @@ protected:
bool functiontextChangedEvent(KviKvsObjectFunctionCall *c);
bool functionactivatedEvent(KviKvsObjectFunctionCall *c);
protected slots:
- void slottextChanged(const QString &);
+ void slottextChanged(const TQString &);
void slotActivated(int);
};
diff --git a/src/modules/objects/class_dialog.cpp b/src/modules/objects/class_dialog.cpp
index f062f004..b5515a7c 100644
--- a/src/modules/objects/class_dialog.cpp
+++ b/src/modules/objects/class_dialog.cpp
@@ -29,7 +29,7 @@
#include "kvi_frame.h"
#include "kvi_app.h"
-#include <qdialog.h>
+#include <tqdialog.h>
/*
@@ -46,10 +46,10 @@
@description:
Rappresents a dialog object. The class is really
similar to the widget class, it has only a couple of minor differences.
- A dialog is always a top-level widget, but if it has a parent, its default
- location is centered on top of the parent. It will also share the parent's taskbar entry.
+ A dialog is always a top-level widget, but if it has a tqparent, its default
+ location is centered on top of the tqparent. It will also share the tqparent's taskbar entry.
If you call $setModal(1) then the dialog will have non-blocking modal behaviour:
- it will appear above its parent widget and block its input until it's closed.
+ it will appear above its tqparent widget and block its input until it's closed.
@functions:
*/
@@ -68,11 +68,11 @@ KVSO_END_CONSTRUCTOR(KviKvsObject_dialog)
bool KviKvsObject_dialog::init(KviKvsRunTimeContext * pContext,KviKvsVariantList *pParams)
{
- QWidget * w = g_pApp->activeModalWidget();
+ TQWidget * w = TQT_TQWIDGET(g_pApp->activeModalWidget());
if(!w)w = g_pFrame;
- QDialog * d = new QDialog(parentScriptWidget() ? parentScriptWidget() : w,name());
+ TQDialog * d = new TQDialog(tqparentScriptWidget() ? tqparentScriptWidget() : w,name());
//d->setModal(true);
- setObject(d);
+ setObject(TQT_TQOBJECT(d));
return true;
}
bool KviKvsObject_dialog::functionSetModal(KviKvsObjectFunctionCall *c)
@@ -82,7 +82,7 @@ bool KviKvsObject_dialog::functionSetModal(KviKvsObjectFunctionCall *c)
KVSO_PARAMETER("bEnabled",KVS_PT_BOOL,0,bEnabled)
KVSO_PARAMETERS_END(c)
if(widget())
- ((QDialog *)widget())->setModal(bEnabled);
+ ((TQDialog *)widget())->setModal(bEnabled);
return true;
}
diff --git a/src/modules/objects/class_dialog.h b/src/modules/objects/class_dialog.h
index b284baf3..53a2bc77 100644
--- a/src/modules/objects/class_dialog.h
+++ b/src/modules/objects/class_dialog.h
@@ -24,7 +24,7 @@
#include "class_widget.h"
-class QDialog;
+class TQDialog;
#include "object_macros.h"
@@ -34,7 +34,7 @@ class KviKvsObject_dialog : public KviKvsObject_widget
public:
KVSO_DECLARE_OBJECT(KviKvsObject_dialog)
public:
- QWidget * widget() { return (QWidget *)object(); };
+ TQWidget * widget() { return (TQWidget *)object(); };
protected:
virtual bool init(KviKvsRunTimeContext * pContext,KviKvsVariantList *pParams);
bool functionSetModal(KviKvsObjectFunctionCall *c);
diff --git a/src/modules/objects/class_dockwindow.cpp b/src/modules/objects/class_dockwindow.cpp
index fc439b23..35d9c070 100644
--- a/src/modules/objects/class_dockwindow.cpp
+++ b/src/modules/objects/class_dockwindow.cpp
@@ -28,13 +28,13 @@
#include "kvi_locale.h"
#include "kvi_qstring.h"
#ifdef COMPILE_USE_QT4
- #include <QDockWidget>
- #define QT_DOCK_WINDOW QDockWidget
+ #include <TQDockWidget>
+ #define TQT_DOCK_WINDOW TQDockWidget
#else
- #include <qdockwindow.h>
- #define QT_DOCK_WINDOW QDockWindow
+ #include <tqdockwindow.h>
+ #define TQT_DOCK_WINDOW TQDockWindow
#endif
-#include <qlayout.h>
+#include <tqlayout.h>
/*
@doc: dockwindow
@@ -49,11 +49,11 @@
[class]widget[/class]
@description:
A window dockable to the KVIrc main frame borders (like a toolbar).
- The window has an implicit layout that will automatically manage
- the children depending on the dock window's orientation.
+ The window has an implicit tqlayout that will automatically manage
+ the tqchildren depending on the dock window's orientation.
@functions:
!fn: $addWidget(<widget:hobject>)
- Adds <widget> to the internal layout of this dock window.[br]
+ Adds <widget> to the internal tqlayout of this dock window.[br]
The widget must be a child of this dock window (otherwise strange things may happen).
!fn: <string> $orientation()
Returns the string "vertical" or "horizontal" depending on the orientation of this dock window.
@@ -92,16 +92,16 @@ KVSO_END_CONSTRUCTOR(KviKvsObject_dockwindow)
KVSO_BEGIN_DESTRUCTOR(KviKvsObject_dockwindow)
KVSO_END_DESTRUCTOR(KviKvsObject_dockwindow)
-#define _pDockWindow ((QT_DOCK_WINDOW *)widget())
+#define _pDockWindow ((TQT_DOCK_WINDOW *)widget())
bool KviKvsObject_dockwindow::init(KviKvsRunTimeContext * pContext,KviKvsVariantList * pParams)
{
#ifdef COMPILE_USE_QT4
- QDockWidget * pWidget = new QDockWidget(g_pFrame);
+ TQDockWidget * pWidget = new TQDockWidget(g_pFrame);
pWidget->setObjectName(getName());
setObject(pWidget);
#else //!COMPILE_USE_QT4
- setObject(new QT_DOCK_WINDOW(g_pFrame,getName()),true);
+ setObject(TQT_TQOBJECT(new TQT_DOCK_WINDOW(g_pFrame,getName())),true);
#endif //!COMPILE_USE_QT4
return true;
}
@@ -141,16 +141,16 @@ bool KviKvsObject_dockwindow::function_addWidget(KviKvsObjectFunctionCall *c)
return true;
}
- if(((QWidget *)(pWidget->object()))->parent() != (QObject *)_pDockWindow)
+ if(((TQWidget *)(pWidget->object()))->tqparent() != (TQObject *)_pDockWindow)
{
c->warning(__tr2qs("The added widget is not a child of this dock window"));
}
#ifdef COMPILE_USE_QT4
- _pDockWindow->setWidget((QWidget *)(pWidget->object()));
+ _pDockWindow->setWidget((TQWidget *)(pWidget->object()));
#else //!COMPILE_USE_QT4
- _pDockWindow->boxLayout()->addWidget((QWidget *)(pWidget->object()));
- ((QWidget *)(pWidget->object()))->show();
+ _pDockWindow->boxLayout()->addWidget((TQWidget *)(pWidget->object()));
+ ((TQWidget *)(pWidget->object()))->show();
#endif //!COMPILE_USE_QT4
return true;
}
@@ -159,23 +159,23 @@ bool KviKvsObject_dockwindow::function_orientation(KviKvsObjectFunctionCall * c)
{
if(!widget())return true; // hum ? dead ?
#ifdef COMPILE_USE_QT4
- c->returnValue()->setString(QString("horizontal"));
+ c->returnValue()->setString(TQString("horizontal"));
#else //!COMPILE_USE_QT4
- c->returnValue()->setString(_pDockWindow->orientation() == Qt::Horizontal ? QString("horizontal") : QString("vertical"));
+ c->returnValue()->setString(_pDockWindow->orientation() == Qt::Horizontal ? TQString("horizontal") : TQString("vertical"));
#endif //!COMPILE_USE_QT4
return true;
}
bool KviKvsObject_dockwindow::function_setOrientation(KviKvsObjectFunctionCall * c)
{
- QString szOrientation;
+ TQString szOrientation;
KVSO_PARAMETERS_BEGIN(c)
KVSO_PARAMETER("orientation",KVS_PT_NONEMPTYSTRING,0,szOrientation)
KVSO_PARAMETERS_END(c)
if(!widget())return true; // hum ? dead ?
#ifndef COMPILE_USE_QT4
- _pDockWindow->setOrientation(KviQString::equalCI(szOrientation,"vertical") ? Qt::Vertical : Qt::Horizontal);
+ _pDockWindow->setOrientation(KviTQString::equalCI(szOrientation,"vertical") ? Qt::Vertical : Qt::Horizontal);
#endif //!COMPILE_USE_QT4
return true;
}
@@ -208,7 +208,7 @@ bool KviKvsObject_dockwindow::function_setResizeEnabled(KviKvsObjectFunctionCall
bool KviKvsObject_dockwindow::function_setAllowedDockAreas(KviKvsObjectFunctionCall * c)
{
- QString szFlags;
+ TQString szFlags;
KVSO_PARAMETERS_BEGIN(c)
KVSO_PARAMETER("docks",KVS_PT_STRING,0,szFlags)
KVSO_PARAMETERS_END(c)
@@ -216,26 +216,26 @@ bool KviKvsObject_dockwindow::function_setAllowedDockAreas(KviKvsObjectFunctionC
if(!widget())return true; // hum ? dead ?
#ifdef COMPILE_USE_QT4
- Qt::DockWidgetAreas fAreas = Qt::NoDockWidgetArea;
- if(szFlags.find('t',false))fAreas |= Qt::TopDockWidgetArea;
- if(szFlags.find('l',false))fAreas |= Qt::LeftDockWidgetArea;
- if(szFlags.find('r',false))fAreas |= Qt::RightDockWidgetArea;
- if(szFlags.find('b',false))fAreas |= Qt::BottomDockWidgetArea;
+ TQt::DockWidgetAreas fAreas = TQt::NoDockWidgetArea;
+ if(szFlags.tqfind('t',false))fAreas |= TQt::TopDockWidgetArea;
+ if(szFlags.tqfind('l',false))fAreas |= TQt::LeftDockWidgetArea;
+ if(szFlags.tqfind('r',false))fAreas |= TQt::RightDockWidgetArea;
+ if(szFlags.tqfind('b',false))fAreas |= TQt::BottomDockWidgetArea;
_pDockWindow->setAllowedAreas(fAreas);
- QDockWidget::DockWidgetFeatures fFeatures = _pDockWindow->features();
- if(szFlags.find('f',false))
- fFeatures |= QDockWidget::DockWidgetFloatable;
+ TQDockWidget::DockWidgetFeatures fFeatures = _pDockWindow->features();
+ if(szFlags.tqfind('f',false))
+ fFeatures |= TQDockWidget::DockWidgetFloatable;
else
- fFeatures &= ~QDockWidget::DockWidgetFloatable;
+ fFeatures &= ~TQDockWidget::DockWidgetFloatable;
// no support for minimized dock widgets
_pDockWindow->setFeatures(fFeatures);
#else //!COMPILE_USE_QT4
- g_pFrame->setDockEnabled(_pDockWindow,Qt::DockTop,szFlags.find('t',false) != -1);
- g_pFrame->setDockEnabled(_pDockWindow,Qt::DockLeft,szFlags.find('l',false) != -1);
- g_pFrame->setDockEnabled(_pDockWindow,Qt::DockRight,szFlags.find('r',false) != -1);
- g_pFrame->setDockEnabled(_pDockWindow,Qt::DockBottom,szFlags.find('b',false) != -1);
- g_pFrame->setDockEnabled(_pDockWindow,Qt::DockTornOff,szFlags.find('f',false) != -1);
- g_pFrame->setDockEnabled(_pDockWindow,Qt::DockMinimized,szFlags.find('m',false) != -1);
+ g_pFrame->setDockEnabled(_pDockWindow,TQt::DockTop,szFlags.tqfind('t',false) != -1);
+ g_pFrame->setDockEnabled(_pDockWindow,TQt::DockLeft,szFlags.tqfind('l',false) != -1);
+ g_pFrame->setDockEnabled(_pDockWindow,TQt::DockRight,szFlags.tqfind('r',false) != -1);
+ g_pFrame->setDockEnabled(_pDockWindow,TQt::DockBottom,szFlags.tqfind('b',false) != -1);
+ g_pFrame->setDockEnabled(_pDockWindow,TQt::DockTornOff,szFlags.tqfind('f',false) != -1);
+ g_pFrame->setDockEnabled(_pDockWindow,TQt::DockMinimized,szFlags.tqfind('m',false) != -1);
#endif //!COMPILE_USE_QT4
return true;
@@ -244,7 +244,7 @@ bool KviKvsObject_dockwindow::function_setAllowedDockAreas(KviKvsObjectFunctionC
bool KviKvsObject_dockwindow::function_dock(KviKvsObjectFunctionCall * c)
{
- QString szDock;
+ TQString szDock;
KVSO_PARAMETERS_BEGIN(c)
KVSO_PARAMETER("dock",KVS_PT_STRING,0,szDock)
KVSO_PARAMETERS_END(c)
@@ -252,22 +252,22 @@ bool KviKvsObject_dockwindow::function_dock(KviKvsObjectFunctionCall * c)
if(!widget())return true; // hum ? dead ?
#ifdef COMPILE_USE_QT4
g_pFrame->removeDockWidget(_pDockWindow);
- if(szDock.find('m',false) == -1)_pDockWindow->setFloating(false);
- if(szDock.find('t',false) != -1)g_pFrame->addDockWidget(Qt::TopDockWidgetArea,_pDockWindow);
- else if(szDock.find('l',false) != -1)g_pFrame->addDockWidget(Qt::LeftDockWidgetArea,_pDockWindow);
- else if(szDock.find('r',false) != -1)g_pFrame->addDockWidget(Qt::RightDockWidgetArea,_pDockWindow);
- else if(szDock.find('b',false) != -1)g_pFrame->addDockWidget(Qt::BottomDockWidgetArea,_pDockWindow);
- else if(szDock.find('f',false) != -1)_pDockWindow->setFloating(true);
- else if(szDock.find('m',false) != -1)qDebug("Sorry: no support for minimized dock widgets in Qt4");
+ if(szDock.tqfind('m',false) == -1)_pDockWindow->setFloating(false);
+ if(szDock.tqfind('t',false) != -1)g_pFrame->addDockWidget(TQt::TopDockWidgetArea,_pDockWindow);
+ else if(szDock.tqfind('l',false) != -1)g_pFrame->addDockWidget(TQt::LeftDockWidgetArea,_pDockWindow);
+ else if(szDock.tqfind('r',false) != -1)g_pFrame->addDockWidget(TQt::RightDockWidgetArea,_pDockWindow);
+ else if(szDock.tqfind('b',false) != -1)g_pFrame->addDockWidget(TQt::BottomDockWidgetArea,_pDockWindow);
+ else if(szDock.tqfind('f',false) != -1)_pDockWindow->setFloating(true);
+ else if(szDock.tqfind('m',false) != -1)qDebug("Sorry: no support for minimized dock widgets in TQt4");
else c->warning(__tr2qs("Invalid dock area specified"));
#else //!COMPILE_USE_QT4
- if(szDock.find('t',false) != -1)g_pFrame->moveDockWindow(_pDockWindow,Qt::DockTop,false,100);
- else if(szDock.find('l',false) != -1)g_pFrame->moveDockWindow(_pDockWindow,Qt::DockLeft,false,100);
- else if(szDock.find('r',false) != -1)g_pFrame->moveDockWindow(_pDockWindow,Qt::DockRight,false,100);
- else if(szDock.find('b',false) != -1)g_pFrame->moveDockWindow(_pDockWindow,Qt::DockBottom,false,100);
- else if(szDock.find('f',false) != -1)g_pFrame->moveDockWindow(_pDockWindow,Qt::DockTornOff,false,100);
- else if(szDock.find('m',false) != -1)g_pFrame->moveDockWindow(_pDockWindow,Qt::DockMinimized,false,100);
+ if(szDock.tqfind('t',false) != -1)g_pFrame->moveDockWindow(_pDockWindow,TQt::DockTop,false,100);
+ else if(szDock.tqfind('l',false) != -1)g_pFrame->moveDockWindow(_pDockWindow,TQt::DockLeft,false,100);
+ else if(szDock.tqfind('r',false) != -1)g_pFrame->moveDockWindow(_pDockWindow,TQt::DockRight,false,100);
+ else if(szDock.tqfind('b',false) != -1)g_pFrame->moveDockWindow(_pDockWindow,TQt::DockBottom,false,100);
+ else if(szDock.tqfind('f',false) != -1)g_pFrame->moveDockWindow(_pDockWindow,TQt::DockTornOff,false,100);
+ else if(szDock.tqfind('m',false) != -1)g_pFrame->moveDockWindow(_pDockWindow,TQt::DockMinimized,false,100);
else c->warning(__tr2qs("Invalid dock area specified"));
#endif //!COMPILE_USE_QT4
return true;
diff --git a/src/modules/objects/class_dockwindow.h b/src/modules/objects/class_dockwindow.h
index 4576a43d..9ed8f60c 100644
--- a/src/modules/objects/class_dockwindow.h
+++ b/src/modules/objects/class_dockwindow.h
@@ -32,6 +32,7 @@
class KviKvsObject_dockwindow : public KviKvsObject_widget
{
Q_OBJECT
+ TQ_OBJECT
public:
KVSO_DECLARE_OBJECT(KviKvsObject_dockwindow)
protected:
diff --git a/src/modules/objects/class_file.cpp b/src/modules/objects/class_file.cpp
index 3429278e..9e966a6e 100644
--- a/src/modules/objects/class_file.cpp
+++ b/src/modules/objects/class_file.cpp
@@ -20,7 +20,7 @@
// Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
//
-//#warning "Add QFILEINFO to this stuff ?"
+//#warning "Add TQFILEINFO to this stuff ?"
#include "class_file.h"
#include "kvi_debug.h"
@@ -28,7 +28,7 @@
#include "kvi_locale.h"
#include "kvi_error.h"
#include "kvi_fileutils.h"
-#include <qstringlist.h>
+#include <tqstringlist.h>
// needed for $open()
@@ -41,13 +41,13 @@ const char * const mod_tbl[] = {
"Truncate"
};
#ifdef COMPILE_USE_QT4
-#define IO_RAW QIODevice::Unbuffered
-#define IO_READONLY QIODevice::ReadOnly
-#define IO_WRITEONLY QIODevice::WriteOnly
-#define IO_READWRITE QIODevice::ReadWrite
-#define IO_APPEND QIODevice::Append
-#define IO_TRUNCATE QIODevice::Truncate
-//#define IO_TRANSLATE QIODevice::Text
+#define IO_RAW TQIODevice::Unbuffered
+#define IO_READONLY TQIODevice::ReadOnly
+#define IO_WRITEONLY TQIODevice::WriteOnly
+#define IO_READWRITE TQIODevice::ReadWrite
+#define IO_APPEND TQIODevice::Append
+#define IO_TRUNCATE TQIODevice::Truncate
+//#define IO_TRANSLATE TQIODevice::Text
#else
#define IO_RAW IO_Raw
#define IO_READONLY IO_ReadOnly
@@ -57,7 +57,7 @@ const char * const mod_tbl[] = {
#define IO_TRUNCATE IO_Truncate
#endif
#ifdef COMPILE_USE_QT4
-const QIODevice::OpenMode mod_cod[] = {
+const TQIODevice::OpenMode mod_cod[] = {
#else
const int mod_cod[] = {
#endif
@@ -189,7 +189,7 @@ KVSO_BEGIN_REGISTERCLASS(KviKvsObject_file,"file","object")
KVSO_END_REGISTERCLASS(KviKvsObject_file)
KVSO_BEGIN_CONSTRUCTOR(KviKvsObject_file,KviKvsObject)
- m_pFile = new QFile();
+ m_pFile = new TQFile();
KVSO_END_CONSTRUCTOR(KviKvsObject_file)
KVSO_BEGIN_DESTRUCTOR(KviKvsObject_file)
@@ -201,7 +201,7 @@ KVSO_END_CONSTRUCTOR(KviKvsObject_file)
bool KviKvsObject_file::functionsetName(KviKvsObjectFunctionCall *c)
{
- QString szName;
+ TQString szName;
KVSO_PARAMETERS_BEGIN(c)
KVSO_PARAMETER("file_name",KVS_PT_STRING,0,szName)
KVSO_PARAMETERS_END(c)
@@ -216,7 +216,7 @@ bool KviKvsObject_file::functionname(KviKvsObjectFunctionCall *c)
bool KviKvsObject_file::functionopen(KviKvsObjectFunctionCall *c)
{
- QStringList modes;
+ TQStringList modes;
KVSO_PARAMETERS_BEGIN(c)
KVSO_PARAMETER("file_mode",KVS_PT_STRINGLIST,KVS_PF_OPTIONAL,modes)
KVSO_PARAMETERS_END(c)
@@ -227,7 +227,7 @@ bool KviKvsObject_file::functionopen(KviKvsObjectFunctionCall *c)
return true;
}
#ifdef COMPILE_USE_QT4
- QIODevice::OpenMode mod,sum;
+ TQIODevice::OpenMode mod,sum;
if (modes.empty()) sum = IO_READONLY; // if no parameters given, default to ReadWrite | Append
else
{
@@ -236,7 +236,7 @@ bool KviKvsObject_file::functionopen(KviKvsObjectFunctionCall *c)
mod = IO_ReadOnly;
for(unsigned int j = 0; j < mod_num; j++)
{
- if(KviQString::equalCI(modes.at(idx), mod_tbl[j]))
+ if(KviTQString::equalCI(modes.at(idx), mod_tbl[j]))
{
mod=mod_cod[j];
break;
@@ -253,13 +253,13 @@ bool KviKvsObject_file::functionopen(KviKvsObjectFunctionCall *c)
if (!modes.first()) sum = IO_READONLY; // if no parameters given, default to ReadWrite | Append
else
{
- for ( QStringList::Iterator it = modes.begin(); it != modes.end(); ++it )
+ for ( TQStringList::Iterator it = modes.begin(); it != modes.end(); ++it )
{
mod = 0;
for(unsigned int j = 0; j < mod_num; j++)
{
- if(KviQString::equalCI((*it), mod_tbl[j]))
+ if(KviTQString::equalCI((*it), mod_tbl[j]))
{
mod=mod_cod[j];
break;
@@ -328,7 +328,7 @@ bool KviKvsObject_file::functionseek(KviKvsObjectFunctionCall *c)
bool KviKvsObject_file::functionputch(KviKvsObjectFunctionCall *c)
{
- QString szChar;
+ TQString szChar;
KVSO_PARAMETERS_BEGIN(c)
KVSO_PARAMETER("char",KVS_PT_STRING,KVS_PF_OPTIONAL,szChar)
KVSO_PARAMETERS_END(c)
@@ -350,14 +350,14 @@ bool KviKvsObject_file::functiongetch(KviKvsObjectFunctionCall *c)
{
int chInt=m_pFile->getch();
if (chInt<0) c->warning(__tr("Read error occured !")); // c->error ?
- QString szChar = QChar(chInt);
+ TQString szChar = TQChar(chInt);
c->returnValue()->setString(szChar);
}
return true;
}
bool KviKvsObject_file::functionunGetch(KviKvsObjectFunctionCall *c)
{
- QString szChar;
+ TQString szChar;
KVSO_PARAMETERS_BEGIN(c)
KVSO_PARAMETER("char",KVS_PT_STRING,0,szChar)
KVSO_PARAMETERS_END(c)
@@ -384,10 +384,10 @@ bool KviKvsObject_file::functionreadBlock(KviKvsObjectFunctionCall *c)
else
{
char * buff = new char[uLen + 1];
- m_pFile->flush(); // advice from QFile man page (to avoid trash)
+ m_pFile->flush(); // advice from TQFile man page (to avoid trash)
int rlen = m_pFile->readBlock(buff, uLen);
buff[rlen] = '\0';
- QString szBlock(buff);
+ TQString szBlock(buff);
c->returnValue()->setString(szBlock);
}
return true;
@@ -395,7 +395,7 @@ bool KviKvsObject_file::functionreadBlock(KviKvsObjectFunctionCall *c)
bool KviKvsObject_file::functionwriteBlock(KviKvsObjectFunctionCall *c)
{
- QString szBlock;
+ TQString szBlock;
kvs_uint_t uLen;
KVSO_PARAMETERS_BEGIN(c)
KVSO_PARAMETER("lenght",KVS_PT_UNSIGNEDINTEGER,0,uLen)
@@ -417,7 +417,7 @@ bool KviKvsObject_file::functionreadLine(KviKvsObjectFunctionCall *c)
c->warning(__tr("File is not open !"));
else
{
- QString buffer;
+ TQString buffer;
KviFileUtils::readLine(m_pFile,buffer);
c->returnValue()->setString(buffer);
}
@@ -425,7 +425,7 @@ bool KviKvsObject_file::functionreadLine(KviKvsObjectFunctionCall *c)
}
bool KviKvsObject_file::functionwriteLine(KviKvsObjectFunctionCall *c)
{
- QString szLine;
+ TQString szLine;
KVSO_PARAMETERS_BEGIN(c)
KVSO_PARAMETER("text_line",KVS_PT_STRING,0,szLine)
KVSO_PARAMETERS_END(c)
@@ -434,7 +434,7 @@ bool KviKvsObject_file::functionwriteLine(KviKvsObjectFunctionCall *c)
c->warning(__tr("File is not open !"));
else
{
- QTextStream ts(m_pFile);
+ TQTextStream ts(m_pFile);
ts << szLine;
}
return true;
diff --git a/src/modules/objects/class_file.h b/src/modules/objects/class_file.h
index 01a54d19..aa99bb69 100644
--- a/src/modules/objects/class_file.h
+++ b/src/modules/objects/class_file.h
@@ -24,8 +24,8 @@
-#include <qfile.h>
-#include <qtextstream.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
#include "kvi_string.h"
@@ -36,6 +36,7 @@ class KviParameterList;
class KviScriptFileObject : public KviScriptObject
{
Q_OBJECT
+ TQ_OBJECT
public:
KviScriptFileObject(KviScriptObjectClass *, KviScriptObject *, const char *);
virtual ~KviScriptFileObject();
@@ -53,9 +54,9 @@ protected:
bool functionSize(KviCommand *, KviParameterList *, KviStr &);
bool functionAtEnd(KviCommand *, KviParameterList *, KviStr &);
- // int QFile at() const
+ // int TQFile at() const
bool functionWhere(KviCommand *, KviParameterList *, KviStr &);
- // void QFile at(int)
+ // void TQFile at(int)
bool functionSeek(KviCommand *, KviParameterList *, KviStr &);
bool functionPutch(KviCommand *, KviParameterList *, KviStr &);
bool functionGetch(KviCommand *, KviParameterList *, KviStr &);
@@ -70,7 +71,7 @@ protected:
bool functionHexRead(KviCommand *, KviParameterList *, KviStr &);
protected:
- QFile * m_pFile;
+ TQFile * m_pFile;
};
*/
@@ -91,9 +92,9 @@ protected:
bool functionsize(KviKvsObjectFunctionCall *c);
bool functionatEnd(KviKvsObjectFunctionCall *c);
- // int QFile at() const
+ // int TQFile at() const
bool functionwhere(KviKvsObjectFunctionCall *c);
- // void QFile at(int)
+ // void TQFile at(int)
bool functionseek(KviKvsObjectFunctionCall *c);
bool functionputch(KviKvsObjectFunctionCall *c);
bool functiongetch(KviKvsObjectFunctionCall *c);
@@ -108,6 +109,6 @@ protected:
bool functionHexRead(KviKvsObjectFunctionCall *c);
*/
protected:
- QFile * m_pFile;
+ TQFile * m_pFile;
};
#endif // !_CLASS_FILE_H_
diff --git a/src/modules/objects/class_groupbox.cpp b/src/modules/objects/class_groupbox.cpp
index 14e640d1..023d1e25 100644
--- a/src/modules/objects/class_groupbox.cpp
+++ b/src/modules/objects/class_groupbox.cpp
@@ -29,7 +29,7 @@
#include "kvi_locale.h"
#include "kvi_iconmanager.h"
-// Tables used in $setAlignment , $alignment and in $setOrientation & $orientation
+// Tables used in $tqsetAlignment , $tqalignment and in $setOrientation & $orientation
const char * const align_tbl[] = {
"Left",
@@ -37,9 +37,9 @@ const char * const align_tbl[] = {
"HCenter"
};
const int align_cod[] = {
- Qt::AlignLeft,
- Qt::AlignRight,
- Qt::AlignHCenter
+ TQt::AlignLeft,
+ TQt::AlignRight,
+ TQt::AlignHCenter
};
#define align_num (sizeof(align_tbl) / sizeof(align_tbl[0]))
@@ -59,9 +59,9 @@ const int align_cod[] = {
[class]widget[/class]
@description:
This widget can be used to display a groupbox.
- It will be usually a parent for other child controls.
- You can either use a child layout to manage the children geometries
- or use $setColumnLayout to manage the layout automatically.
+ It will be usually a tqparent for other child controls.
+ You can either use a child tqlayout to manage the tqchildren geometries
+ or use $setColumnLayout to manage the tqlayout automatically.
@functions:
!fn: $setTitle(<text:String>)
Sets the group box title to <text>.
@@ -89,15 +89,15 @@ const int align_cod[] = {
Returns the number of columns or rows in the groupbox.
!fn: $addSpace()
Adds an empty cell at the next free position.
- !fn: <string> $alignment()
- Returns the alignment of the group box title.
- !fn: $setAlignment(<alignment:string>)
- Set the alignment of the groupbox; Valid values are Left,Right,HCenter.
+ !fn: <string> $tqalignment()
+ Returns the tqalignment of the group box title.
+ !fn: $tqsetAlignment(<tqalignment:string>)
+ Set the tqalignment of the groupbox; Valid values are Left,Right,HCenter.
!fn: $setOrientation<orientation:string>
- Sets the group box's orientation. Valid values are: Horizontal, Vertical.
+ Sets the group box's orientation. Valid values are:Qt::Horizontal,Qt::Vertical.
!fn: $setColumnLayout(<columns:integer>,<orientation:string>)
- Enables the automatic layout management. The children are arranged in n columns with the specified orientation.[br]
- Valid values for <orientation> are: Horizontal, Vertical.
+ Enables the automatic tqlayout management. The tqchildren are arranged in n columns with the specified orientation.[br]
+ Valid values for <orientation> are:Qt::Horizontal,Qt::Vertical.
@examples:
[example]
|-Start:[br]
@@ -108,7 +108,7 @@ const int align_cod[] = {
#then the groupbox [br]
%gb=$new(groupbox,%widget)[br]
%gb->$setTitle(Login)[br]
- %gb->$setAlignment("Left")[br]
+ %gb->$tqsetAlignment("Left")[br]
[br]
#now we create the labels and lineedits.[br]
%labeluser=$new(label,%gb)[br]
@@ -119,31 +119,31 @@ const int align_cod[] = {
%inputpass=$new(lineedit,%gb)[br]
%inputpass->$setechomode("password")[br]
[br]
- #now lets' layouting the groupbox's element's.[br]
- %layoutgb=$new(layout,%gb)[br]
- %layoutgb->$setmargin(20)[br]
- %layoutgb->$addwidget(%labeluser,0,0)[br]
- %layoutgb->$addwidget(%labelpass,1,0)[br]
- %layoutgb->$addwidget(%inputuser,0,1)[br]
- %layoutgb->$addwidget(%inputpass,1,1)[br]
+ #now lets' tqlayouting the groupbox's element's.[br]
+ %tqlayoutgb=$new(tqlayout,%gb)[br]
+ %tqlayoutgb->$setmargin(20)[br]
+ %tqlayoutgb->$addwidget(%labeluser,0,0)[br]
+ %tqlayoutgb->$addwidget(%labelpass,1,0)[br]
+ %tqlayoutgb->$addwidget(%inputuser,0,1)[br]
+ %tqlayoutgb->$addwidget(%inputpass,1,1)[br]
[br]
- # now we create a fake widget and managing the two buttons layout.[br]
+ # now we create a fake widget and managing the two buttons tqlayout.[br]
%fakewidget=$new(widget,%widget)[br]
- %layoutbtn=$new(layout,%fakewidget)[br]
+ %tqlayoutbtn=$new(tqlayout,%fakewidget)[br]
%btnok=$new(button,%fakewidget)[br]
%btnok->$settext("OK")[br]
%btncancel=$new(button,%fakewidget)[br]
%btncancel->$settext("Cancel")[br]
- %layoutbtn->$addwidget(%btnok,0,0)[br]
- %layoutbtn->$addwidget(%btncancel,0,1)[br]
+ %tqlayoutbtn->$addwidget(%btnok,0,0)[br]
+ %tqlayoutbtn->$addwidget(%btncancel,0,1)[br]
[br]
- #And finally we create a main layout with the groupbox (and its "children")[br]
- #and fakewiget (with its buttons children).
- %mainlayout=$new(layout,%widget)[br]
- %mainlayout->$setspacing(10)[br]
- %mainlayout->$setmargin(10)[br]
- %mainlayout->$addwidget(%gb,0,0)[br]
- %mainlayout->$addwidget(%fakewidget,1,0)[br]
+ #And finally we create a main tqlayout with the groupbox (and its "tqchildren")[br]
+ #and fakewiget (with its buttons tqchildren).
+ %maintqlayout=$new(tqlayout,%widget)[br]
+ %maintqlayout->$setspacing(10)[br]
+ %maintqlayout->$setmargin(10)[br]
+ %maintqlayout->$addwidget(%gb,0,0)[br]
+ %maintqlayout->$addwidget(%fakewidget,1,0)[br]
[br]
#Let's show our nice login request =D ! [br]
%widget->$show()[br]
@@ -165,8 +165,8 @@ KVSO_BEGIN_REGISTERCLASS(KviKvsObject_groupbox,"groupbox","widget")
KVSO_REGISTER_HANDLER(KviKvsObject_groupbox,"setColumns", functionSetColumns)
KVSO_REGISTER_HANDLER(KviKvsObject_groupbox,"columns", functionColumns)
KVSO_REGISTER_HANDLER(KviKvsObject_groupbox,"addSpace", functionAddSpace)
- KVSO_REGISTER_HANDLER(KviKvsObject_groupbox,"alignment", functionAlignment)
- KVSO_REGISTER_HANDLER(KviKvsObject_groupbox,"setAlignment", functionSetAlignment)
+ KVSO_REGISTER_HANDLER(KviKvsObject_groupbox,"tqalignment", functionAlignment)
+ KVSO_REGISTER_HANDLER(KviKvsObject_groupbox,"tqsetAlignment", functionSetAlignment)
KVSO_REGISTER_HANDLER(KviKvsObject_groupbox,"setOrientation", functionSetOrientation)
KVSO_REGISTER_HANDLER(KviKvsObject_groupbox,"isChecked", functionIsChecked)
KVSO_REGISTER_HANDLER(KviKvsObject_groupbox,"setChecked", functionSetChecked)
@@ -185,18 +185,18 @@ KVSO_END_CONSTRUCTOR(KviKvsObject_groupbox)
bool KviKvsObject_groupbox::init(KviKvsRunTimeContext * pContext,KviKvsVariantList *pParams)
{
#ifdef COMPILE_USE_QT4
- KviTalGroupBox *groupbox=new KviTalGroupBox(name(),parentScriptWidget());
+ KviTalGroupBox *groupbox=new KviTalGroupBox(name(),tqparentScriptWidget());
groupbox->setObjectName(name());
setObject(groupbox,true);
#else
- setObject(new KviTalGroupBox(name(),parentScriptWidget()), true);
+ setObject(TQT_TQOBJECT(new KviTalGroupBox(name(),tqparentScriptWidget())), true);
#endif
return true;
}
bool KviKvsObject_groupbox::functionSetTitle(KviKvsObjectFunctionCall *c)
{
- QString szTitle;
+ TQString szTitle;
KVSO_PARAMETERS_BEGIN(c)
KVSO_PARAMETER("title",KVS_PT_STRING,0,szTitle)
KVSO_PARAMETERS_END(c)
@@ -308,26 +308,26 @@ bool KviKvsObject_groupbox::functionAddSpace(KviKvsObjectFunctionCall *c)
bool KviKvsObject_groupbox::functionSetAlignment(KviKvsObjectFunctionCall *c)
{
- QString szAlign;
+ TQString szAlign;
KVSO_PARAMETERS_BEGIN(c)
- KVSO_PARAMETER("alignment",KVS_PT_STRING,0,szAlign)
+ KVSO_PARAMETER("tqalignment",KVS_PT_STRING,0,szAlign)
KVSO_PARAMETERS_END(c)
if (!widget()) return true;
for(unsigned int i = 0; i < align_num; i++)
{
- if(KviQString::equalCI(szAlign, align_tbl[i]))
+ if(KviTQString::equalCI(szAlign, align_tbl[i]))
{
- ((KviTalGroupBox *)widget())->setAlignment(align_cod[i]);
+ ((KviTalGroupBox *)widget())->tqsetAlignment(align_cod[i]);
return true;
}
}
- c->warning(__tr2qs("Unknown alignment"));
+ c->warning(__tr2qs("Unknown tqalignment"));
return true;
}
bool KviKvsObject_groupbox::functionAlignment(KviKvsObjectFunctionCall *c)
{
- int mode = ((KviTalGroupBox *)widget())->alignment();
- QString szAlignment="";
+ int mode = ((KviTalGroupBox *)widget())->tqalignment();
+ TQString szAlignment="";
for(unsigned int i = 0; i < align_num; i++)
{
if(mode == align_cod[i])
@@ -342,15 +342,15 @@ bool KviKvsObject_groupbox::functionAlignment(KviKvsObjectFunctionCall *c)
bool KviKvsObject_groupbox::functionSetOrientation(KviKvsObjectFunctionCall *c)
{
- QString szMode;
+ TQString szMode;
KVSO_PARAMETERS_BEGIN(c)
KVSO_PARAMETER("orientation",KVS_PT_STRING,0,szMode)
KVSO_PARAMETERS_END(c)
if(!widget())return true;
- if(KviQString::equalCI(szMode, "Horizontal"))
+ if(KviTQString::equalCI(szMode, "Horizontal"))
((KviTalGroupBox *)widget())->setOrientation(Qt::Horizontal);
else
- if(KviQString::equalCI(szMode, "Vertical"))
+ if(KviTQString::equalCI(szMode, "Vertical"))
((KviTalGroupBox *)widget())->setOrientation(Qt::Vertical);
else c->warning( __tr2qs("Unknown orientation: "));
return true;
@@ -358,7 +358,7 @@ bool KviKvsObject_groupbox::functionSetOrientation(KviKvsObjectFunctionCall *c)
bool KviKvsObject_groupbox::functionSetColumnLayout(KviKvsObjectFunctionCall *c)
{
- QString szMode;
+ TQString szMode;
kvs_uint_t uCol;
KVSO_PARAMETERS_BEGIN(c)
KVSO_PARAMETER("columns",KVS_PT_UNSIGNEDINTEGER,0,uCol)
diff --git a/src/modules/objects/class_groupbox.h b/src/modules/objects/class_groupbox.h
index c63bb46b..25ff2d90 100644
--- a/src/modules/objects/class_groupbox.h
+++ b/src/modules/objects/class_groupbox.h
@@ -34,7 +34,7 @@ class KviKvsObject_groupbox : public KviKvsObject_widget
public:
KVSO_DECLARE_OBJECT(KviKvsObject_groupbox)
public:
- QWidget * widget() { return (QWidget *)object(); };
+ TQWidget * widget() { return (TQWidget *)object(); };
protected:
virtual bool init(KviKvsRunTimeContext * pContext,KviKvsVariantList *pParams);
diff --git a/src/modules/objects/class_hbox.cpp b/src/modules/objects/class_hbox.cpp
index 48174312..cf855640 100644
--- a/src/modules/objects/class_hbox.cpp
+++ b/src/modules/objects/class_hbox.cpp
@@ -35,16 +35,16 @@
@type:
class
@short:
- Manages child widget horizontal geometry
+ Manages child widget horizontal tqgeometry
@inherits:
[class]object[/class]
@description:
- The hbox class widget provides horizontal geometry management for its child widgets.
+ The hbox class widget provides horizontal tqgeometry management for its child widgets.
@functions:
!fn: $setSpacing(<spacing:uint>)
Sets the default spacing of the widgets in pixels
!fn: $setMargin(<margin:uint>)
- Sets the dimension of the layout margin : the distance from the border to the outermost child widget edges.
+ Sets the dimension of the tqlayout margin : the distance from the border to the outermost child widget edges.
!fn: $setStretchFactor(<widget:hobject>,<stretch:uint>)
Sets the stretch factor of widget to stretch.
*/
@@ -68,7 +68,7 @@ KVSO_END_CONSTRUCTOR(KviKvsObject_hbox)
bool KviKvsObject_hbox::init(KviKvsRunTimeContext * pContext,KviKvsVariantList *pParams)
{
- setObject(new KviTalHBox(parentScriptWidget()), true);
+ setObject(TQT_TQOBJECT(new KviTalHBox(tqparentScriptWidget())), true);
return true;
}
bool KviKvsObject_hbox::functionsetMargin(KviKvsObjectFunctionCall *c)
@@ -116,12 +116,12 @@ bool KviKvsObject_hbox::functionsetStretchFactor(KviKvsObjectFunctionCall *c)
c->warning(__tr2qs("Can't add a non-widget object"));
return true;
}
- if(((KviKvsObject_widget *)pObject)->widget()->parentWidget() != widget())
+ if(((KviKvsObject_widget *)pObject)->widget()->tqparentWidget() != widget())
{
c->warning(__tr2qs("The widget must be a child of this hbox"));
return true;
}
- ((KviTalHBox *)widget())->setStretchFactor(((QWidget *)(pObject->object())),uStretch);
+ ((KviTalHBox *)widget())->setStretchFactor(((TQWidget *)(pObject->object())),uStretch);
return true;
}
diff --git a/src/modules/objects/class_hbox.h b/src/modules/objects/class_hbox.h
index c0489f28..194ed355 100644
--- a/src/modules/objects/class_hbox.h
+++ b/src/modules/objects/class_hbox.h
@@ -32,7 +32,7 @@ class KviKvsObject_hbox : public KviKvsObject_widget
public:
KVSO_DECLARE_OBJECT(KviKvsObject_hbox)
public:
- QWidget * widget() { return (QWidget *)object(); };
+ TQWidget * widget() { return (TQWidget *)object(); };
protected:
virtual bool init(KviKvsRunTimeContext * pContext,KviKvsVariantList *pParams);
diff --git a/src/modules/objects/class_label.cpp b/src/modules/objects/class_label.cpp
index 9c629818..fcde9a18 100644
--- a/src/modules/objects/class_label.cpp
+++ b/src/modules/objects/class_label.cpp
@@ -21,9 +21,9 @@
// Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
//
-#include <qfont.h>
-#include <qpixmap.h>
-#include <qmessagebox.h>
+#include <tqfont.h>
+#include <tqpixmap.h>
+#include <tqmessagebox.h>
#include "class_label.h"
//#include "kvi_fileutils.h"
#include "kvi_error.h"
@@ -34,7 +34,7 @@
-// Tables used in $setAlignment & $alignment
+// Tables used in $tqsetAlignment & $tqalignment
const char * const align_tbl[] = {
"Left",
"Right",
@@ -46,34 +46,34 @@ const char * const align_tbl[] = {
"WordBreak"
};
#ifdef COMPILE_USE_QT4
- #define QT_LABEL_ALIGNLEFT Qt::AlignLeft
- #define QT_LABEL_ALIGNRIGHT Qt::AlignRight
- #define QT_LABEL_ALIGNHCENTER Qt::AlignHCenter
- #define QT_LABEL_ALIGNVCENTER Qt::AlignVCenter
- #define QT_LABEL_ALIGNCENTER Qt::AlignCenter
- #define QT_LABEL_ALIGNTOP Qt::AlignTop
- #define QT_LABEL_ALIGNBOTTOM Qt::AlignBottom
- #define QT_LABEL_JUSTIFY Qt::AlignJustify
+ #define TQT_LABEL_ALIGNLEFT TQt::AlignLeft
+ #define TQT_LABEL_ALIGNRIGHT TQt::AlignRight
+ #define TQT_LABEL_ALIGNHCENTER TQt::AlignHCenter
+ #define TQT_LABEL_ALIGNVCENTER TQt::AlignVCenter
+ #define TQT_LABEL_ALIGNCENTER TQt::AlignCenter
+ #define TQT_LABEL_ALIGNTOP TQt::AlignTop
+ #define TQT_LABEL_ALIGNBOTTOM TQt::AlignBottom
+ #define TQT_LABEL_JUSTIFY TQt::AlignJustify
#else
- #define QT_LABEL_ALIGNLEFT QLabel::AlignLeft
- #define QT_LABEL_ALIGNRIGHT QLabel::AlignRight
- #define QT_LABEL_ALIGNHCENTER QLabel::AlignHCenter
- #define QT_LABEL_ALIGNVCENTER QLabel::AlignVCenter
- #define QT_LABEL_ALIGNCENTER QLabel::AlignCenter
- #define QT_LABEL_ALIGNTOP QLabel::AlignTop
- #define QT_LABEL_ALIGNBOTTOM QLabel::AlignBottom
- #define QT_LABEL_JUSTIFY QLabel::WordBreak
+ #define TQT_LABEL_ALIGNLEFT TQLabel::AlignLeft
+ #define TQT_LABEL_ALIGNRIGHT TQLabel::AlignRight
+ #define TQT_LABEL_ALIGNHCENTER TQLabel::AlignHCenter
+ #define TQT_LABEL_ALIGNVCENTER TQLabel::AlignVCenter
+ #define TQT_LABEL_ALIGNCENTER TQLabel::AlignCenter
+ #define TQT_LABEL_ALIGNTOP TQLabel::AlignTop
+ #define TQT_LABEL_ALIGNBOTTOM TQLabel::AlignBottom
+ #define TQT_LABEL_JUSTIFY TQLabel::WordBreak
#endif
const int align_cod[] = {
- QT_LABEL_ALIGNLEFT,
- QT_LABEL_ALIGNRIGHT,
- QT_LABEL_ALIGNHCENTER,
- QT_LABEL_ALIGNVCENTER,
- QT_LABEL_ALIGNCENTER,
- QT_LABEL_ALIGNTOP,
- QT_LABEL_ALIGNBOTTOM,
- QT_LABEL_JUSTIFY,
+ TQT_LABEL_ALIGNLEFT,
+ TQT_LABEL_ALIGNRIGHT,
+ TQT_LABEL_ALIGNHCENTER,
+ TQT_LABEL_ALIGNVCENTER,
+ TQT_LABEL_ALIGNCENTER,
+ TQT_LABEL_ALIGNTOP,
+ TQT_LABEL_ALIGNBOTTOM,
+ TQT_LABEL_JUSTIFY,
};
#define align_num (sizeof(align_tbl) / sizeof(align_tbl[0]))
@@ -92,14 +92,14 @@ const char * const frame_tbl[] = {
};
const int frame_cod[] = {
- QFrame::NoFrame,
- QFrame::Box,
- QFrame::Panel,
- QFrame::WinPanel,
- QFrame::HLine,
- QFrame::Plain,
- QFrame::Raised,
- QFrame::Sunken
+ TQFrame::NoFrame,
+ TQFrame::Box,
+ TQFrame::Panel,
+ TQFrame::WinPanel,
+ TQFrame::HLine,
+ TQFrame::Plain,
+ TQFrame::Raised,
+ TQFrame::Sunken
};
#define frame_num (sizeof(frame_tbl) / sizeof(frame_tbl[0]))
@@ -120,7 +120,7 @@ const int frame_cod[] = {
[class]widget[/class]
@description:
This widget can be used to display a text or an image. It can
- have different frame styles and text/image alignment.
+ have different frame styles and text/image tqalignment.
@functions:
!fn: $setText(<text:string>)
Sets the text to be displayed by the label.
@@ -142,17 +142,17 @@ const int frame_cod[] = {
Sets auto-resize ability to enabled (if <benabled> is 1) or disabled
(if <benabled> is 0). If auto-resize is enabled, the label will
automagically resize itself accordingly to the 'size' of the
- text it contains.
+ text it tqcontains.
See also [classfnc]$autoResize[/classfnc]().
- !fn: <string> $alignment()
- Returns a string containing alignment flags that are set for
+ !fn: <string> $tqalignment()
+ Returns a string containing tqalignment flags that are set for
this label. The flags are separated by commas. An example output
could look like this:[br]
[pre]Bottom, Right[/pre][br]
- See [classfnc]$setAlignment[/classfnc]() for explanation of all
- alignment flags.
- !fn: $setAlignment(<flag1:string>, <flag2:string>, ...)
- This function sets alignment flags, given as parameters, for
+ See [classfnc]$tqsetAlignment[/classfnc]() for explanation of all
+ tqalignment flags.
+ !fn: $tqsetAlignment(<flag1:string>, <flag2:string>, ...)
+ This function sets tqalignment flags, given as parameters, for
this label. Valid flags are:
[pre]
Right - Text is aligned to right border[br]
@@ -179,8 +179,8 @@ const int frame_cod[] = {
frame-style flags and their explenation.
!fn: $setFrameStyle(<flag1>, <flag2>, ...)
Sets the frame-style flags to the ones passed as arguments.
- The flags can either decide of the shape or shadow of the
- label's frame. Valid shape flags are:[br]
+ The flags can either decide of the tqshape or shadow of the
+ label's frame. Valid tqshape flags are:[br]
[pre]
NoFrame - draw no frame. You shouldn't specify a shadow when
using this.[br]
@@ -196,9 +196,9 @@ const int frame_cod[] = {
[pre]
Plain - no 3D effect (draws using foreground color)[br]
Raised - makes the label look like it was raised above the
- parent widget[br]
+ tqparent widget[br]
Sunken - makes the label look like it was "pushed" inside
- the parent widget[br]
+ the tqparent widget[br]
[/pre]
!fn: $setImage(<image_id>)
Sets the image to be displayed on this label.
@@ -216,8 +216,8 @@ KVSO_BEGIN_REGISTERCLASS(KviKvsObject_label,"label","widget")
KVSO_REGISTER_HANDLER(KviKvsObject_label,"setMargin", functionSetMargin)
KVSO_REGISTER_HANDLER(KviKvsObject_label,"autoResize", functionAutoResize)
KVSO_REGISTER_HANDLER(KviKvsObject_label,"setAutoResize", functionSetAutoResize)
- KVSO_REGISTER_HANDLER(KviKvsObject_label,"alignment", functionAlignment)
- KVSO_REGISTER_HANDLER(KviKvsObject_label,"setAlignment", functionSetAlignment)
+ KVSO_REGISTER_HANDLER(KviKvsObject_label,"tqalignment", functionAlignment)
+ KVSO_REGISTER_HANDLER(KviKvsObject_label,"tqsetAlignment", functionSetAlignment)
KVSO_REGISTER_HANDLER(KviKvsObject_label,"clear", functionClear)
KVSO_REGISTER_HANDLER(KviKvsObject_label,"frameStyle", functionFrameStyle)
KVSO_REGISTER_HANDLER(KviKvsObject_label,"setFrameStyle", functionSetFrameStyle)
@@ -235,23 +235,23 @@ KVSO_END_CONSTRUCTOR(KviKvsObject_label)
bool KviKvsObject_label::init(KviKvsRunTimeContext * pContext,KviKvsVariantList *pParams)
{
- setObject(new QLabel(parentScriptWidget(), name()), true);
+ setObject(TQT_TQOBJECT(new TQLabel(tqparentScriptWidget(), name())), true);
return true;
}
bool KviKvsObject_label::functionSetText(KviKvsObjectFunctionCall *c)
{
- QString szText;
+ TQString szText;
KVSO_PARAMETERS_BEGIN(c)
KVSO_PARAMETER("text",KVS_PT_STRING,0,szText)
KVSO_PARAMETERS_END(c)
if (widget())
- ((QLabel *)widget())->setText(szText);
+ ((TQLabel *)widget())->setText(szText);
return true;
}
bool KviKvsObject_label::functionText(KviKvsObjectFunctionCall *c)
{
- if (widget()) c->returnValue()->setString(((QLabel *)widget())->text());
+ if (widget()) c->returnValue()->setString(((TQLabel *)widget())->text());
return true;
}
@@ -261,12 +261,12 @@ bool KviKvsObject_label::functionSetMargin(KviKvsObjectFunctionCall *c)
KVSO_PARAMETERS_BEGIN(c)
KVSO_PARAMETER("margin",KVS_PT_UNSIGNEDINTEGER,0,iMargin)
KVSO_PARAMETERS_END(c)
- if (widget()) ((QLabel *)widget())->setMargin(iMargin);
+ if (widget()) ((TQLabel *)widget())->setMargin(iMargin);
return true;
}
bool KviKvsObject_label::functionMargin(KviKvsObjectFunctionCall *c)
{
- if (widget()) c->returnValue()->setInteger(((QLabel *)widget())->margin());
+ if (widget()) c->returnValue()->setInteger(((TQLabel *)widget())->margin());
return true;
}
@@ -281,7 +281,7 @@ bool KviKvsObject_label::functionSetAutoResize(KviKvsObjectFunctionCall *c)
return true;
#else
if(widget())
- ((QLabel *)widget())->setAutoResize(bEnabled);
+ ((TQLabel *)widget())->setAutoResize(bEnabled);
return true;
#endif
}
@@ -290,26 +290,26 @@ bool KviKvsObject_label::functionAutoResize(KviKvsObjectFunctionCall *c)
#ifdef COMPILE_USE_QT4
if (widget()) c->returnValue()->setBoolean(true);
#else
- if (widget()) c->returnValue()->setBoolean(((QLabel *)widget())->autoResize());
+ if (widget()) c->returnValue()->setBoolean(((TQLabel *)widget())->autoResize());
#endif
return true;
}
//
bool KviKvsObject_label::functionSetAlignment(KviKvsObjectFunctionCall *c)
{
- QStringList alignment;
+ TQStringList tqalignment;
KVSO_PARAMETERS_BEGIN(c)
- KVSO_PARAMETER("alignment",KVS_PT_STRINGLIST,KVS_PF_OPTIONAL,alignment)
+ KVSO_PARAMETER("tqalignment",KVS_PT_STRINGLIST,KVS_PF_OPTIONAL,tqalignment)
KVSO_PARAMETERS_END(c)
if (!widget()) return true;
int align,sum=0;
- for ( QStringList::Iterator it = alignment.begin(); it != alignment.end(); ++it )
+ for ( TQStringList::Iterator it = tqalignment.begin(); it != tqalignment.end(); ++it )
{
align = 0;
for(unsigned int j = 0; j < align_num; j++)
{
- if(KviQString::equalCI((*it), align_tbl[j]))
+ if(KviTQString::equalCI((*it), align_tbl[j]))
{
align=align_cod[j];
break;
@@ -318,16 +318,16 @@ bool KviKvsObject_label::functionSetAlignment(KviKvsObjectFunctionCall *c)
if(align)
sum = sum | align;
else
- c->warning(__tr2qs("Unknown alignment: '%Q'"),&(*it));
+ c->warning(__tr2qs("Unknown tqalignment: '%Q'"),&(*it));
}
- ((QLabel *)widget())->setAlignment(sum);
+ ((TQLabel *)widget())->tqsetAlignment(sum);
return true;
}
bool KviKvsObject_label::functionAlignment(KviKvsObjectFunctionCall *c)
{
- int mode = ((QLabel *)widget())->alignment();
- QString szAlignment="";
+ int mode = ((TQLabel *)widget())->tqalignment();
+ TQString szAlignment="";
for(unsigned int i = 0; i < align_num; i++)
{
if(mode == align_cod[i])
@@ -342,7 +342,7 @@ bool KviKvsObject_label::functionAlignment(KviKvsObjectFunctionCall *c)
bool KviKvsObject_label::functionClear(KviKvsObjectFunctionCall *c)
{
if(widget())
- ((QLabel *)widget())->clear();
+ ((TQLabel *)widget())->clear();
return true;
}
@@ -350,18 +350,18 @@ bool KviKvsObject_label::functionClear(KviKvsObjectFunctionCall *c)
bool KviKvsObject_label::functionSetFrameStyle(KviKvsObjectFunctionCall *c)
{
- QStringList style;
+ TQStringList style;
KVSO_PARAMETERS_BEGIN(c)
KVSO_PARAMETER("style",KVS_PT_STRINGLIST,KVS_PF_OPTIONAL,style)
KVSO_PARAMETERS_END(c)
if (!widget()) return true;
int framestyle,sum=0;
- for ( QStringList::Iterator it = style.begin(); it != style.end(); ++it )
+ for ( TQStringList::Iterator it = style.begin(); it != style.end(); ++it )
{
framestyle = 0;
for(unsigned int j = 0; j < align_num; j++)
{
- if(KviQString::equalCI((*it), frame_tbl[j]))
+ if(KviTQString::equalCI((*it), frame_tbl[j]))
{
framestyle=frame_cod[j];
break;
@@ -373,7 +373,7 @@ bool KviKvsObject_label::functionSetFrameStyle(KviKvsObjectFunctionCall *c)
c->warning(__tr2qs("Unknown style: '%Q'"),&(*it));
}
- ((QLabel *)widget())->setFrameStyle(sum);
+ ((TQLabel *)widget())->setFrameStyle(sum);
return true;
@@ -382,8 +382,8 @@ bool KviKvsObject_label::functionSetFrameStyle(KviKvsObjectFunctionCall *c)
}
bool KviKvsObject_label::functionFrameStyle(KviKvsObjectFunctionCall *c)
{
- int mode = ((QLabel *)widget())->frameStyle();
- QString szStyle="";
+ int mode = ((TQLabel *)widget())->frameStyle();
+ TQString szStyle="";
for(unsigned int i = 0; i < frame_num; i++)
{
if(mode == frame_cod[i])
@@ -398,12 +398,12 @@ bool KviKvsObject_label::functionFrameStyle(KviKvsObjectFunctionCall *c)
bool KviKvsObject_label::functionSetImage(KviKvsObjectFunctionCall *c)
{
- QString icon;
+ TQString icon;
KVSO_PARAMETERS_BEGIN(c)
KVSO_PARAMETER("icon",KVS_PT_STRING,0,icon)
KVSO_PARAMETERS_END(c)
if(!widget())return true;
- QPixmap * pix = g_pIconManager->getImage(icon);
- if(pix) ((QLabel *)widget())->setPixmap(*pix);
+ TQPixmap * pix = g_pIconManager->getImage(icon);
+ if(pix) ((TQLabel *)widget())->setPixmap(*pix);
return true;
}
diff --git a/src/modules/objects/class_label.h b/src/modules/objects/class_label.h
index 38fa58a3..70db28b2 100644
--- a/src/modules/objects/class_label.h
+++ b/src/modules/objects/class_label.h
@@ -24,7 +24,7 @@
-#include <qlabel.h>
+#include <tqlabel.h>
#include "class_widget.h"
#include "object_macros.h"
@@ -33,7 +33,7 @@ class KviKvsObject_label : public KviKvsObject_widget
public:
KVSO_DECLARE_OBJECT(KviKvsObject_label)
public:
- QWidget * widget() { return (QWidget *)object(); };
+ TQWidget * widget() { return (TQWidget *)object(); };
protected:
virtual bool init(KviKvsRunTimeContext * pContext,KviKvsVariantList *pParams);
diff --git a/src/modules/objects/class_layout.cpp b/src/modules/objects/class_layout.cpp
index 900b9856..cac963b1 100644
--- a/src/modules/objects/class_layout.cpp
+++ b/src/modules/objects/class_layout.cpp
@@ -27,50 +27,50 @@
#include "class_layout.h"
#ifdef COMPILE_USE_QT4
-#define QLAYOUT_AUTO_CONSTRAINT QLayout::SetDefaultConstraint
-#define QLAYOUT_FIXED QLayout::SetFixedSize
-#define QLAYOUT_FREE_RESIZE QLayout::SetNoConstraint
-#define QLAYOUT_MINIMUM QLayout::SetMinimumSize
+#define TQLAYOUT_AUTO_CONSTRAINT TQLayout::SetDefaultConstraint
+#define TQLAYOUT_FIXED TQLayout::SetFixedSize
+#define TQLAYOUT_FREE_RESIZE TQLayout::SetNoConstraint
+#define TQLAYOUT_MINIMUM TQLayout::SetMinimumSize
#else
-#define QLAYOUT_AUTO_CONSTRAINT QLayout::Auto
-#define QLAYOUT_FIXED QLayout::Fixed
-#define QLAYOUT_FREE_RESIZE QLayout::FreeResize
-#define QLAYOUT_MINIMUM QLayout::Minimum
+#define TQLAYOUT_AUTO_CONSTRAINT TQLayout::Auto
+#define TQLAYOUT_FIXED TQLayout::Fixed
+#define TQLAYOUT_FREE_RESIZE TQLayout::FreeResize
+#define TQLAYOUT_MINIMUM TQLayout::Minimum
#endif
/*
- @doc: layout
+ @doc: tqlayout
@keyterms:
- layout object class, child widgets
+ tqlayout object class, child widgets
@title:
- layout class
+ tqlayout class
@type:
class
@short:
- Manages child widget geometry
+ Manages child widget tqgeometry
@inherits:
[class]object[/class]
@description:
- The layout is a geometry management tool for child widgets.
- You create a layout , give it some widgets to manage and it will layout them
+ The tqlayout is a tqgeometry management tool for child widgets.
+ You create a tqlayout , give it some widgets to manage and it will tqlayout them
automatically.[br]
- The parent of the layout must be the widget for which child widget geometries have to be managed.
- A layout is a grid of NxM cells in which you insert child widgets with [classfnc:layout]$addWidget[/classfnc]().[br]
- Widgets that must span multiple cells can be added to the layout with [classfnc:layout]$addMultiCellWidget[/classfnc]().[br]
+ The tqparent of the tqlayout must be the widget for which child widget geometries have to be managed.
+ A tqlayout is a grid of NxM cells in which you insert child widgets with [classfnc:tqlayout]$addWidget[/classfnc]().[br]
+ Widgets that must span multiple cells can be added to the tqlayout with [classfnc:tqlayout]$addMultiCellWidget[/classfnc]().[br]
@functions:
!fn: $addWidget(<widget:object widget>,<row:uint>,<column:uint>)
- Adds a widget to this layout placing it at position <row>,<column> in the grid
+ Adds a widget to this tqlayout placing it at position <row>,<column> in the grid
!fn: $addMultiCellWidget(<widget:object widget>,<start_row:uint>,<end_row:uint>,<start_col:uint>,<end_col:uint>)
- Adds a widget to this layout spanning multiple grid cells
+ Adds a widget to this tqlayout spanning multiple grid cells
!fn: $setRowStretch(<row:uint>,<stretch:uint>)
- Sets the stretch value for a particular row of this layout. The <stretch_value>
+ Sets the stretch value for a particular row of this tqlayout. The <stretch_value>
must be a positive integer. The rows with bigger stretch values will take more space
- in the layout.
+ in the tqlayout.
!fn: $setColStretch(<column:uint>,<stretch:uint>)
- Sets the stretch value for a particular column in this layout. The <stretch_value>
+ Sets the stretch value for a particular column in this tqlayout. The <stretch_value>
must be a positive integer. The rows with bigger stretch values will take more space
- in the layout.
+ in the tqlayout.
!fn: $addRowSpacing(<row:uint>,<spacing:uint>)
Sets the minimum height of the specified <row> to <spacing> which must be a positive integer
!fn: $addColSpacing(<column:uint>,<spacing:uint>)
@@ -78,18 +78,18 @@
!fn: $setSpacing(<spacing:uint>)
Sets the default spacing of the widgets in pixels
!fn: $setMargin(<margin:uint>)
- Sets the dimension of the layout margin : the distance from the border to the outermost child widget edges.
+ Sets the dimension of the tqlayout margin : the distance from the border to the outermost child widget edges.
!fn: $setResizeMode(<resize_mode:string>)
- Sets the resize mode of the parent widget in relation to this layout.
+ Sets the resize mode of the tqparent widget in relation to this tqlayout.
<mode> can be one of:[br]
-Auto: this is the default[br]
- -Fixed: the parent widget of this layout is resized to the "sizeHint" value and it cannot be resized by the user.[br]
- -Minimum: the minimum size of the parent widget of this layout is set to minimumSize() and it cannot be smaller[br]
- -FreeResize: the parent widget of this layout is not constrained at all[br]
+ -Fixed: the tqparent widget of this tqlayout is resized to the "tqsizeHint" value and it cannot be resized by the user.[br]
+ -Minimum: the minimum size of the tqparent widget of this tqlayout is set to tqminimumSize() and it cannot be smaller[br]
+ -FreeResize: the tqparent widget of this tqlayout is not constrained at all[br]
*/
-KVSO_BEGIN_REGISTERCLASS(KviKvsObject_layout,"layout","object")
+KVSO_BEGIN_REGISTERCLASS(KviKvsObject_layout,"tqlayout","object")
KVSO_REGISTER_HANDLER(KviKvsObject_layout,"addWidget", functionAddWidget)
KVSO_REGISTER_HANDLER(KviKvsObject_layout,"addMultiCellWidget", functionAddMultiCellWidget)
KVSO_REGISTER_HANDLER(KviKvsObject_layout,"setRowStretch", functionSetRowStretch)
@@ -112,14 +112,14 @@ KVSO_END_CONSTRUCTOR(KviKvsObject_layout)
bool KviKvsObject_layout::init(KviKvsRunTimeContext * pContext,KviKvsVariantList *pParams)
{
- QWidget * w = parentScriptWidget();
+ TQWidget * w = tqparentScriptWidget();
if(!w)
{
- pContext->warning(__tr2qs("The parent of a layout must be a widget!"));
+ pContext->warning(__tr2qs("The tqparent of a tqlayout must be a widget!"));
return false;
}
- setObject(new QGridLayout(w));
+ setObject(TQT_TQOBJECT(new TQGridLayout(w)));
return true;
}
@@ -150,7 +150,7 @@ bool KviKvsObject_layout::functionAddWidget(KviKvsObjectFunctionCall *c)
c->warning(__tr2qs("Can't add a non-widget object"));
return true;
}
- ((QGridLayout *)object())->addWidget(((QWidget *)(pObject->object())),uRow,uCol);
+ ((TQGridLayout *)object())->addWidget(((TQWidget *)(pObject->object())),uRow,uCol);
return true;
}
bool KviKvsObject_layout::functionAddMultiCellWidget(KviKvsObjectFunctionCall *c)
@@ -182,7 +182,7 @@ bool KviKvsObject_layout::functionAddMultiCellWidget(KviKvsObjectFunctionCall *c
c->warning(__tr2qs("Can't add a non-widget object"));
return true;
}
- ((QGridLayout *)object())->addMultiCellWidget(((QWidget *)(pObject->object())),uStartRow,uEndRow,uStartCol,uEndCol);
+ ((TQGridLayout *)object())->addMultiCellWidget(((TQWidget *)(pObject->object())),uStartRow,uEndRow,uStartCol,uEndCol);
return true;
}
bool KviKvsObject_layout::functionSetRowStretch(KviKvsObjectFunctionCall *c)
@@ -193,7 +193,7 @@ bool KviKvsObject_layout::functionSetRowStretch(KviKvsObjectFunctionCall *c)
KVSO_PARAMETER("stretch",KVS_PT_UNSIGNEDINTEGER,0,uStretch)
KVSO_PARAMETERS_END(c)
if(!widget())return true;
- ((QGridLayout *)object())->setRowStretch(uRow,uStretch);
+ ((TQGridLayout *)object())->setRowStretch(uRow,uStretch);
return true;
}
bool KviKvsObject_layout::functionSetColStretch(KviKvsObjectFunctionCall *c)
@@ -204,7 +204,7 @@ bool KviKvsObject_layout::functionSetColStretch(KviKvsObjectFunctionCall *c)
KVSO_PARAMETER("stretch",KVS_PT_UNSIGNEDINTEGER,0,uStretch)
KVSO_PARAMETERS_END(c)
if(!widget())return true;
- ((QGridLayout *)object())->setColStretch(uCol,uStretch);
+ ((TQGridLayout *)object())->setColStretch(uCol,uStretch);
return true;
}
@@ -214,7 +214,7 @@ bool KviKvsObject_layout::functionSetMargin(KviKvsObjectFunctionCall *c)
KVSO_PARAMETERS_BEGIN(c)
KVSO_PARAMETER("margin",KVS_PT_UNSIGNEDINTEGER,0,uMargin)
KVSO_PARAMETERS_END(c)
- if (widget()) ((QGridLayout *)object())->setMargin(uMargin);
+ if (widget()) ((TQGridLayout *)object())->setMargin(uMargin);
return true;
}
@@ -224,7 +224,7 @@ bool KviKvsObject_layout::functionSetSpacing(KviKvsObjectFunctionCall *c)
KVSO_PARAMETERS_BEGIN(c)
KVSO_PARAMETER("spacing",KVS_PT_UNSIGNEDINTEGER,0,uSpacing)
KVSO_PARAMETERS_END(c)
- if (widget()) ((QGridLayout *)object())->setSpacing(uSpacing);
+ if (widget()) ((TQGridLayout *)object())->setSpacing(uSpacing);
return true;
}
@@ -236,7 +236,7 @@ bool KviKvsObject_layout::functionAddRowSpacing(KviKvsObjectFunctionCall *c)
KVSO_PARAMETER("row",KVS_PT_UNSIGNEDINTEGER,0,uRow)
KVSO_PARAMETER("spacing",KVS_PT_UNSIGNEDINTEGER,0,uSpacing)
KVSO_PARAMETERS_END(c)
- if (widget()) ((QGridLayout *)object())->addRowSpacing(uRow,uSpacing);
+ if (widget()) ((TQGridLayout *)object())->addRowSpacing(uRow,uSpacing);
return true;
}
@@ -247,27 +247,27 @@ bool KviKvsObject_layout::functionAddColSpacing(KviKvsObjectFunctionCall *c)
KVSO_PARAMETER("column",KVS_PT_UNSIGNEDINTEGER,0,uCol)
KVSO_PARAMETER("spacing",KVS_PT_UNSIGNEDINTEGER,0,uSpacing)
KVSO_PARAMETERS_END(c)
- if (widget()) ((QGridLayout *)object())->addColSpacing(uCol,uSpacing);
+ if (widget()) ((TQGridLayout *)object())->addColSpacing(uCol,uSpacing);
return true;
}
bool KviKvsObject_layout::functionSetResizeMode(KviKvsObjectFunctionCall *c)
{
- QString szMode;
+ TQString szMode;
KVSO_PARAMETERS_BEGIN(c)
KVSO_PARAMETER("resize_mode",KVS_PT_STRING,0,szMode)
KVSO_PARAMETERS_END(c)
if(!widget())return true;
#ifdef COMPILE_USE_QT4
- QLayout::SizeConstraint r = QLAYOUT_AUTO_CONSTRAINT;
+ TQLayout::SizeConstraint r = TQLAYOUT_AUTO_CONSTRAINT;
#else
- QLayout::ResizeMode r = QLAYOUT_AUTO_CONSTRAINT;
+ TQLayout::ResizeMode r = TQLAYOUT_AUTO_CONSTRAINT;
#endif
- if(KviQString::equalCI(szMode,"FreeResize")) r = QLAYOUT_FREE_RESIZE;
- else if(KviQString::equalCI(szMode,"Minimum")) r = QLAYOUT_MINIMUM;
- else if(KviQString::equalCI(szMode,"Fixed"))r = QLAYOUT_FIXED;
+ if(KviTQString::equalCI(szMode,"FreeResize")) r = TQLAYOUT_FREE_RESIZE;
+ else if(KviTQString::equalCI(szMode,"Minimum")) r = TQLAYOUT_MINIMUM;
+ else if(KviTQString::equalCI(szMode,"Fixed"))r = TQLAYOUT_FIXED;
else c->warning(__tr2qs("Invalid resize mode defaulting to Auto"));
- ((QGridLayout *)object())->setResizeMode(r);
+ ((TQGridLayout *)object())->setResizeMode(r);
return true;
}
diff --git a/src/modules/objects/class_layout.h b/src/modules/objects/class_layout.h
index e821316a..596c7ae8 100644
--- a/src/modules/objects/class_layout.h
+++ b/src/modules/objects/class_layout.h
@@ -23,7 +23,7 @@
//
#include "kvi_string.h"
-#include <qlayout.h>
+#include <tqlayout.h>
#include "object_macros.h"
class KviKvsObject_layout : public KviKvsObject
@@ -31,7 +31,7 @@ class KviKvsObject_layout : public KviKvsObject
public:
KVSO_DECLARE_OBJECT(KviKvsObject_layout)
public:
- QWidget * widget() { return (QWidget *)object(); };
+ TQWidget * widget() { return (TQWidget *)object(); };
protected:
virtual bool init(KviKvsRunTimeContext * pContext,KviKvsVariantList *pParams);
diff --git a/src/modules/objects/class_lcd.cpp b/src/modules/objects/class_lcd.cpp
index 0f0ba49a..539457be 100644
--- a/src/modules/objects/class_lcd.cpp
+++ b/src/modules/objects/class_lcd.cpp
@@ -89,7 +89,7 @@ KVSO_END_CONSTRUCTOR(KviKvsObject_lcd)
bool KviKvsObject_lcd::init(KviKvsRunTimeContext * pContext,KviKvsVariantList *pParams)
{
- setObject(new QLCDNumber(parentScriptWidget(), name()), true);
+ setObject(TQT_TQOBJECT(new TQLCDNumber(tqparentScriptWidget(), name())), true);
return true;
}
@@ -99,17 +99,17 @@ bool KviKvsObject_lcd::functiondisplayInt(KviKvsObjectFunctionCall *c)
KVSO_PARAMETERS_BEGIN(c)
KVSO_PARAMETER("number",KVS_PT_INT,0,iDigit)
KVSO_PARAMETERS_END(c)
- if(widget())((QLCDNumber *)widget())->display((int)iDigit);
+ if(widget())((TQLCDNumber *)widget())->display((int)iDigit);
return true;
}
bool KviKvsObject_lcd::functiondisplayStr(KviKvsObjectFunctionCall *c)
{
- QString szText;
+ TQString szText;
KVSO_PARAMETERS_BEGIN(c)
KVSO_PARAMETER("number",KVS_PT_STRING,0,szText)
KVSO_PARAMETERS_END(c)
- if(widget()) ((QLCDNumber *)widget())->display(szText);
+ if(widget()) ((TQLCDNumber *)widget())->display(szText);
return true;
}
@@ -119,33 +119,33 @@ bool KviKvsObject_lcd::functiondisplayDouble(KviKvsObjectFunctionCall *c)
KVSO_PARAMETERS_BEGIN(c)
KVSO_PARAMETER("number",KVS_PT_DOUBLE,0,dDigit)
KVSO_PARAMETERS_END(c)
- if(widget()) ((QLCDNumber *)widget())->display(dDigit);
+ if(widget()) ((TQLCDNumber *)widget())->display(dDigit);
return true;
}
bool KviKvsObject_lcd::functionsetMode(KviKvsObjectFunctionCall *c)
{
- QString szMode;
+ TQString szMode;
KVSO_PARAMETERS_BEGIN(c)
KVSO_PARAMETER("mode",KVS_PT_STRING,0,szMode)
KVSO_PARAMETERS_END(c)
if(!widget())return true;
- if(KviQString::equalCI(szMode, "HEX")) ((QLCDNumber *)widget())->setHexMode();
- else if(KviQString::equalCI(szMode, "DEC")) ((QLCDNumber *)widget())->setDecMode();
- else if(KviQString::equalCI(szMode, "BIN")) ((QLCDNumber *)widget())->setBinMode();
- else if(KviQString::equalCI(szMode, "OCT")) ((QLCDNumber *)widget())->setOctMode();
+ if(KviTQString::equalCI(szMode, "HEX")) ((TQLCDNumber *)widget())->setHexMode();
+ else if(KviTQString::equalCI(szMode, "DEC")) ((TQLCDNumber *)widget())->setDecMode();
+ else if(KviTQString::equalCI(szMode, "BIN")) ((TQLCDNumber *)widget())->setBinMode();
+ else if(KviTQString::equalCI(szMode, "OCT")) ((TQLCDNumber *)widget())->setOctMode();
else c->warning( __tr2qs("Unknown mode "));
return true;
}
bool KviKvsObject_lcd::functionsetSegmentStyle(KviKvsObjectFunctionCall *c)
{
- QString szStyle;
+ TQString szStyle;
KVSO_PARAMETERS_BEGIN(c)
KVSO_PARAMETER("style",KVS_PT_STRING,0,szStyle)
KVSO_PARAMETERS_END(c)
if(!widget())return true;
- if(KviQString::equalCI(szStyle, "Outline")) ((QLCDNumber *)widget())->setSegmentStyle(QLCDNumber::Outline);
- else if(KviQString::equalCI(szStyle, "Filled")) ((QLCDNumber *)widget())->setSegmentStyle(QLCDNumber::Filled);
- else if(KviQString::equalCI(szStyle, "Flat")) ((QLCDNumber *)widget())->setSegmentStyle(QLCDNumber::Flat);
+ if(KviTQString::equalCI(szStyle, "Outline")) ((TQLCDNumber *)widget())->setSegmentStyle(TQLCDNumber::Outline);
+ else if(KviTQString::equalCI(szStyle, "Filled")) ((TQLCDNumber *)widget())->setSegmentStyle(TQLCDNumber::Filled);
+ else if(KviTQString::equalCI(szStyle, "Flat")) ((TQLCDNumber *)widget())->setSegmentStyle(TQLCDNumber::Flat);
else c->warning( __tr2qs("Unknown segment style "));
return true;
}
@@ -155,7 +155,7 @@ bool KviKvsObject_lcd::functionsetNumDigits(KviKvsObjectFunctionCall *c)
KVSO_PARAMETERS_BEGIN(c)
KVSO_PARAMETER("digit",KVS_PT_DOUBLE,0,digit)
KVSO_PARAMETERS_END(c)
- if(widget()) ((QLCDNumber *)widget())->setNumDigits(digit);
+ if(widget()) ((TQLCDNumber *)widget())->setNumDigits(digit);
return true;
}
bool KviKvsObject_lcd::functionsetSmallDecimalPoint(KviKvsObjectFunctionCall *c)
@@ -164,7 +164,7 @@ bool KviKvsObject_lcd::functionsetSmallDecimalPoint(KviKvsObjectFunctionCall *c)
KVSO_PARAMETERS_BEGIN(c)
KVSO_PARAMETER("bflag",KVS_PT_BOOLEAN,0,bFlag)
KVSO_PARAMETERS_END(c)
- if(widget()) ((QLCDNumber *)widget())->setSmallDecimalPoint(bFlag);
+ if(widget()) ((TQLCDNumber *)widget())->setSmallDecimalPoint(bFlag);
return true;
}
bool KviKvsObject_lcd::functioncheckOverflow(KviKvsObjectFunctionCall *c)
@@ -173,7 +173,7 @@ bool KviKvsObject_lcd::functioncheckOverflow(KviKvsObjectFunctionCall *c)
KVSO_PARAMETERS_BEGIN(c)
KVSO_PARAMETER("digit",KVS_PT_DOUBLE,0,iDigit)
KVSO_PARAMETERS_END(c)
- if(widget())c->returnValue()->setBoolean(((QLCDNumber *)widget())->checkOverflow(iDigit));
+ if(widget())c->returnValue()->setBoolean(((TQLCDNumber *)widget())->checkOverflow(iDigit));
return true;
}
diff --git a/src/modules/objects/class_lcd.h b/src/modules/objects/class_lcd.h
index 4976850a..6b1094fa 100644
--- a/src/modules/objects/class_lcd.h
+++ b/src/modules/objects/class_lcd.h
@@ -25,7 +25,7 @@
-#include <qlcdnumber.h>
+#include <tqlcdnumber.h>
#include "class_widget.h"
@@ -34,7 +34,7 @@ class KviKvsObject_lcd : public KviKvsObject_widget
public:
KVSO_DECLARE_OBJECT(KviKvsObject_lcd)
public:
- QWidget * widget() { return (QWidget *)object(); };
+ TQWidget * widget() { return (TQWidget *)object(); };
protected:
virtual bool init(KviKvsRunTimeContext * pContext,KviKvsVariantList *pParams);
diff --git a/src/modules/objects/class_lineedit.cpp b/src/modules/objects/class_lineedit.cpp
index c8ba58ff..e429adfa 100644
--- a/src/modules/objects/class_lineedit.cpp
+++ b/src/modules/objects/class_lineedit.cpp
@@ -35,9 +35,9 @@ static const char * mode_tbl[] = {
};
static const int mode_cod[] = {
- QLineEdit::Normal,
- QLineEdit::NoEcho,
- QLineEdit::Password
+ TQLineEdit::Normal,
+ TQLineEdit::NoEcho,
+ TQLineEdit::Password
};
#define mode_num (sizeof(mode_tbl) / sizeof(mode_tbl[0]))
@@ -128,8 +128,8 @@ static const int mode_cod[] = {
With this property user can drag text in the lineedit.
!fn: $setReadOnly(<bReadonly:boolean>)
Sets the lineedit to read only mode.
- !fn: $setInputMask(<mask:string>)
- Sets the validation input mask to inputMask.[br]
+ !fn: $setInputMask(<tqmask:string>)
+ Sets the validation input tqmask to inputMask.[br]
Example:[br]
[br]
%esempio->$setInputMask( "+99 99 99 99 99;_" );[br]
@@ -137,7 +137,7 @@ static const int mode_cod[] = {
%esempio->Ip Number Mask.[br]
%esempio->setInputMask( ">AAAAA-AAAAA-AAAAA-AAAAA-AAAAA;#" );[br]
[br]
- The mask format understands these mask characters:[br]
+ The tqmask format understands these tqmask characters:[br]
Character Meaning[br]
A ASCII alphabetic character required. A-Z, a-z.[br]
a ASCII alphabetic character permitted but not required.[br]
@@ -155,7 +155,7 @@ static const int mode_cod[] = {
! Switch off case conversion.[br]
\ Use \ to escape the special characters listed above to use them as separators.[br]
[br]
- The mask consists of a string of mask characters and separators, optionally[br]
+ The tqmask consists of a string of tqmask characters and separators, optionally[br]
followed by a semi-colon and the character used for blanks: the blank characters [br]
are always removed from the text after editing. The default blank character is space. [br]
!fn: $returnPressedEvent()
@@ -218,35 +218,35 @@ KVSO_END_CONSTRUCTOR(KviKvsObject_lineedit)
bool KviKvsObject_lineedit::init(KviKvsRunTimeContext * pContext,KviKvsVariantList * pParams)
{
- setObject(new QLineEdit(parentScriptWidget(),getName()),true);
- connect(widget(),SIGNAL(returnPressed()),this,SLOT(slotreturnPressed()));
- connect(widget(),SIGNAL(lostFocus()),this,SLOT(slotlostFocus()));
- connect(widget(),SIGNAL(textChanged(const QString & )),this,SLOT(slottextChanged(const QString & )));
+ setObject(TQT_TQOBJECT(new TQLineEdit(tqparentScriptWidget(),getName())),true);
+ connect(widget(),TQT_SIGNAL(returnPressed()),this,TQT_SLOT(slotreturnPressed()));
+ connect(widget(),TQT_SIGNAL(lostFocus()),this,TQT_SLOT(slotlostFocus()));
+ connect(widget(),TQT_SIGNAL(textChanged(const TQString & )),this,TQT_SLOT(slottextChanged(const TQString & )));
return true;
}
bool KviKvsObject_lineedit::functionText(KviKvsObjectFunctionCall *c)
{
if(widget())
- c->returnValue()->setString(((QLineEdit *)widget())->text());
+ c->returnValue()->setString(((TQLineEdit *)widget())->text());
return true;
}
bool KviKvsObject_lineedit::functionSetText(KviKvsObjectFunctionCall *c)
{
- QString szText;
+ TQString szText;
KVSO_PARAMETERS_BEGIN(c)
KVSO_PARAMETER("text",KVS_PT_STRING,0,szText)
KVSO_PARAMETERS_END(c)
if (widget())
- ((QLineEdit *)widget())->setText(szText);
+ ((TQLineEdit *)widget())->setText(szText);
return true;
}
bool KviKvsObject_lineedit::functionMaxLength(KviKvsObjectFunctionCall *c)
{
if(widget())
- c->returnValue()->setInteger(((QLineEdit *)widget())->maxLength());
+ c->returnValue()->setInteger(((TQLineEdit *)widget())->maxLength());
return true;
}
@@ -257,14 +257,14 @@ bool KviKvsObject_lineedit::functionSetMaxLength(KviKvsObjectFunctionCall *c)
KVSO_PARAMETER("maxlen",KVS_PT_UNSIGNEDINTEGER,0,iMaxlen)
KVSO_PARAMETERS_END(c)
if (widget())
- ((QLineEdit *)widget())->setMaxLength(iMaxlen);
+ ((TQLineEdit *)widget())->setMaxLength(iMaxlen);
return true;
}
bool KviKvsObject_lineedit::functionFrame(KviKvsObjectFunctionCall *c)
{
if(widget())
- c->returnValue()->setBoolean(((QLineEdit *)widget())->frame());
+ c->returnValue()->setBoolean(((TQLineEdit *)widget())->frame());
return true;
}
@@ -275,14 +275,14 @@ bool KviKvsObject_lineedit::functionSetFrame(KviKvsObjectFunctionCall *c)
KVSO_PARAMETER("bframe",KVS_PT_BOOL,0,bFrame)
KVSO_PARAMETERS_END(c)
if(widget())
- ((QLineEdit *)widget())->setFrame(bFrame);
+ ((TQLineEdit *)widget())->setFrame(bFrame);
return true;
}
bool KviKvsObject_lineedit::functionCursorPosition(KviKvsObjectFunctionCall *c)
{
if(widget())
- c->returnValue()->setInteger(((QLineEdit *)widget())->cursorPosition());
+ c->returnValue()->setInteger(((TQLineEdit *)widget())->cursorPosition());
return true;
}
@@ -293,14 +293,14 @@ bool KviKvsObject_lineedit::functionSetCursorPosition(KviKvsObjectFunctionCall *
KVSO_PARAMETER("position",KVS_PT_UNSIGNEDINTEGER,0,iPos)
KVSO_PARAMETERS_END(c)
if (widget())
- ((QLineEdit *)widget())->setCursorPosition(iPos);
+ ((TQLineEdit *)widget())->setCursorPosition(iPos);
return true;
}
bool KviKvsObject_lineedit::functionSelectAll(KviKvsObjectFunctionCall *c)
{
if(widget())
- ((QLineEdit *)widget())->selectAll();
+ ((TQLineEdit *)widget())->selectAll();
return true;
}
@@ -312,35 +312,35 @@ bool KviKvsObject_lineedit::functionSetSelection(KviKvsObjectFunctionCall *c)
KVSO_PARAMETER("len",KVS_PT_UNSIGNEDINTEGER,0,uLen)
KVSO_PARAMETERS_END(c)
if (widget())
- ((QLineEdit *)widget())->setSelection(uStart, uLen);
+ ((TQLineEdit *)widget())->setSelection(uStart, uLen);
return true;
}
bool KviKvsObject_lineedit::functionCopy(KviKvsObjectFunctionCall *c)
{
if(widget())
- ((QLineEdit *)widget())->copy();
+ ((TQLineEdit *)widget())->copy();
return true;
}
bool KviKvsObject_lineedit::functionCut(KviKvsObjectFunctionCall *c)
{
if(widget())
- ((QLineEdit *)widget())->cut();
+ ((TQLineEdit *)widget())->cut();
return true;
}
bool KviKvsObject_lineedit::functionPaste(KviKvsObjectFunctionCall *c)
{
if(widget())
- ((QLineEdit *)widget())->paste();
+ ((TQLineEdit *)widget())->paste();
return true;
}
bool KviKvsObject_lineedit::functionEchoMode(KviKvsObjectFunctionCall *c)
{
- int mode = ((QLineEdit *)widget())->echoMode();
- QString szEchomode="";
+ int mode = ((TQLineEdit *)widget())->echoMode();
+ TQString szEchomode="";
for(unsigned int i = 0; i < mode_num; i++)
{
if(mode == mode_cod[i])
@@ -355,17 +355,17 @@ bool KviKvsObject_lineedit::functionEchoMode(KviKvsObjectFunctionCall *c)
bool KviKvsObject_lineedit::functionSetEchoMode(KviKvsObjectFunctionCall *c)
{
- QString szMode;
+ TQString szMode;
KVSO_PARAMETERS_BEGIN(c)
KVSO_PARAMETER("mode",KVS_PT_STRING,0,szMode)
KVSO_PARAMETERS_END(c)
if (!widget()) return true;
for(unsigned int i = 0; i < mode_num; i++)
{
- if(KviQString::equalCI(szMode, mode_tbl[i]))
+ if(KviTQString::equalCI(szMode, mode_tbl[i]))
{
- ((QLineEdit *)widget())->setEchoMode( \
- ((QLineEdit::EchoMode)mode_cod[i]));
+ ((TQLineEdit *)widget())->setEchoMode( \
+ ((TQLineEdit::EchoMode)mode_cod[i]));
return true;
}
}
@@ -376,7 +376,7 @@ bool KviKvsObject_lineedit::functionSetEchoMode(KviKvsObjectFunctionCall *c)
bool KviKvsObject_lineedit::functionClear(KviKvsObjectFunctionCall *c)
{
if(widget())
- ((QLineEdit *)widget())->clear();
+ ((TQLineEdit *)widget())->clear();
return true;
}
@@ -388,7 +388,7 @@ bool KviKvsObject_lineedit::functionDragAndDrop(KviKvsObjectFunctionCall *c)
KVSO_PARAMETER("bEnabled",KVS_PT_BOOL,0,bEnabled)
KVSO_PARAMETERS_END(c)
if(widget())
- ((QLineEdit *)widget())->setDragEnabled(bEnabled);
+ ((TQLineEdit *)widget())->setDragEnabled(bEnabled);
return true;
}
@@ -399,18 +399,18 @@ bool KviKvsObject_lineedit::functionSetReadOnly(KviKvsObjectFunctionCall *c)
KVSO_PARAMETER("bReadonly",KVS_PT_BOOL,0,bEnabled)
KVSO_PARAMETERS_END(c)
if(widget())
- ((QLineEdit *)widget())->setReadOnly(bEnabled);
+ ((TQLineEdit *)widget())->setReadOnly(bEnabled);
return true;
}
bool KviKvsObject_lineedit::functionSetInputMask(KviKvsObjectFunctionCall *c)
{
- QString szMask;
+ TQString szMask;
KVSO_PARAMETERS_BEGIN(c)
- KVSO_PARAMETER("mask",KVS_PT_STRING,0,szMask)
+ KVSO_PARAMETER("tqmask",KVS_PT_STRING,0,szMask)
KVSO_PARAMETERS_END(c)
if (widget())
- ((QLineEdit *)widget())->setInputMask(szMask);
+ ((TQLineEdit *)widget())->setInputMask(szMask);
return true;
}
@@ -451,7 +451,7 @@ bool KviKvsObject_lineedit::functiontextChangedEvent(KviKvsObjectFunctionCall *c
}
-void KviKvsObject_lineedit::slottextChanged(const QString &text)
+void KviKvsObject_lineedit::slottextChanged(const TQString &text)
{
KviKvsVariantList params(new KviKvsVariant(text));
callFunction(this,"textChangedEvent",&params);
diff --git a/src/modules/objects/class_lineedit.h b/src/modules/objects/class_lineedit.h
index d7036824..079eefc3 100644
--- a/src/modules/objects/class_lineedit.h
+++ b/src/modules/objects/class_lineedit.h
@@ -24,7 +24,7 @@
-#include <qlineedit.h>
+#include <tqlineedit.h>
#include "class_widget.h"
//#warning "Signals !"
@@ -34,10 +34,11 @@
class KviKvsObject_lineedit : public KviKvsObject_widget
{
Q_OBJECT
+ TQ_OBJECT
public:
KVSO_DECLARE_OBJECT(KviKvsObject_lineedit)
public:
- QWidget * widget() { return (QWidget *)object(); };
+ TQWidget * widget() { return (TQWidget *)object(); };
protected:
virtual bool init(KviKvsRunTimeContext * pContext,KviKvsVariantList *pParams);
@@ -73,7 +74,7 @@ protected:
protected slots:
void slotreturnPressed();
void slotlostFocus();
- void slottextChanged(const QString &);
+ void slottextChanged(const TQString &);
};
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()));
diff --git a/src/modules/objects/class_listbox.h b/src/modules/objects/class_listbox.h
index 471337fd..b7d00cb4 100644
--- a/src/modules/objects/class_listbox.h
+++ b/src/modules/objects/class_listbox.h
@@ -34,10 +34,11 @@ class KviTalListBoxItem;
class KviKvsObject_listbox: public KviKvsObject_widget
{
Q_OBJECT
+ TQ_OBJECT
public:
KVSO_DECLARE_OBJECT(KviKvsObject_listbox)
public:
- QWidget * widget() { return (QWidget *)object(); };
+ TQWidget * widget() { return (TQWidget *)object(); };
protected:
virtual bool init(KviKvsRunTimeContext * pContext,KviKvsVariantList *pParams);
@@ -59,7 +60,7 @@ protected:
bool functiononItemEvent(KviKvsObjectFunctionCall *c);
bool functionitemAt(KviKvsObjectFunctionCall *c);
- bool functionitemRect(KviKvsObjectFunctionCall *c);
+ bool functiontqitemRect(KviKvsObjectFunctionCall *c);
protected slots:
void selectionChanged();
void currentItemChanged(KviTalListBoxItem *);
diff --git a/src/modules/objects/class_listview.cpp b/src/modules/objects/class_listview.cpp
index f571788c..036e758e 100644
--- a/src/modules/objects/class_listview.cpp
+++ b/src/modules/objects/class_listview.cpp
@@ -27,10 +27,10 @@
#include "kvi_tal_listview.h"
#ifdef COMPILE_USE_QT4
-#include <q3header.h>
-#include <qevent.h>
+#include <tq3header.h>
+#include <tqevent.h>
#else
-#include <qheader.h>
+#include <tqheader.h>
#endif
#include "class_listview.h"
#include "kvi_error.h"
@@ -55,11 +55,11 @@
[class]widget[/class]
@description:
It can display and control a hierarchy of multi-column items, and provides the ability to add new items at any time.
- The items are added by creating children [class]listviewitem[/class] objects: simply allocating them with $new
+ The items are added by creating tqchildren [class]listviewitem[/class] objects: simply allocating them with $new
will add the items to the listview and simply deleting them will remove them.
Allocating a [class]listviewitem[/class] item2 as a child of item1 will insert it to the same listview creating
a subtree of items spannig from item1. The subtree can be opened or closed by a simple click either
- on the parent item or on the little plus sign on the side of it (when [classfnc:listview]$setRootIsDecorated[/classfnc]
+ on the tqparent item or on the little plus sign on the side of it (when [classfnc:listview]$setRootIsDecorated[/classfnc]
is set to $true. The listview can be in Single, Multi, Extended or NoSelection selection mode.
In single selection mode there can be only one selected item at a time and the selected item is also
the current item (this mode is the default). In Multi and Extended selection mode there can be multiple selected items
@@ -132,11 +132,11 @@
The default implementation emits the [classfnc]$onItem[/classfnc]() signal.
!fn: $itemExpandedEvent(<item:object>)
- This event is called when an item has been expanded, i.e. when the children of item are shown.
+ This event is called when an item has been expanded, i.e. when the tqchildren of item are shown.
The default implementation emits the [classfnc]$expanded[/classfnc]() signal.
!fn: $itemCollapsedEvent(<item:object>)
- This event is called when an item has been collapsed, i.e. when the children of item are hidden.
+ This event is called when an item has been collapsed, i.e. when the tqchildren of item are hidden.
The default implementation emits the [classfnc]$collapsed[/classfnc]() signal.
!fn: $itemRenamedEvent(<item:object>,<col:integer>,<text:string>)
@@ -217,24 +217,24 @@ KVSO_END_CONSTRUCTOR(KviKvsObject_listview)
bool KviKvsObject_listview::init(KviKvsRunTimeContext * pContext,KviKvsVariantList *pParams)
{
- setObject(new KviKvsMdmListView(parentScriptWidget(),name(),this),true);
- connect(widget(),SIGNAL(clicked(KviTalListViewItem *)),this,SLOT(slotClicked(KviTalListViewItem *)));
- connect(widget(),SIGNAL(selectionChanged(KviTalListViewItem *)),this,SLOT(slotSelectionChanged(KviTalListViewItem *)));
- connect(widget(),SIGNAL(selectionChanged()),this,SLOT(slotMultipleSelectionChanged()));
- connect(widget(),SIGNAL(currentChanged(KviTalListViewItem *)),this,SLOT(slotCurrentChanged(KviTalListViewItem *)));
- connect(widget(),SIGNAL(returnPressed(KviTalListViewItem *)),this,SLOT(slotReturnPressed(KviTalListViewItem *)));
- connect(widget(),SIGNAL(spacePressed(KviTalListViewItem *)),this,SLOT(slotSpacePressed(KviTalListViewItem *)));
- connect(widget(),SIGNAL(onItem(KviTalListViewItem *)),this,SLOT(slotOnItem(KviTalListViewItem *)));
- connect(widget(),SIGNAL(expanded(KviTalListViewItem *)),this,SLOT(slotItemExpanded(KviTalListViewItem *)));
- connect(widget(),SIGNAL(collapsed(KviTalListViewItem *)),this,SLOT(slotItemCollapsed(KviTalListViewItem *)));
- connect(widget(),SIGNAL(rightButtonClicked(KviTalListViewItem *,const QPoint &,int)),this,SLOT(slotRightButtonClicked(KviTalListViewItem *,const QPoint &,int)));
- connect(widget(),SIGNAL(itemRenamed(KviTalListViewItem *,int,const QString &)),this,SLOT(slotItemRenamed(KviTalListViewItem *,int,const QString &)));
+ setObject(TQT_TQOBJECT(new KviKvsMdmListView(tqparentScriptWidget(),name(),this)),true);
+ connect(widget(),TQT_SIGNAL(clicked(KviTalListViewItem *)),this,TQT_SLOT(slotClicked(KviTalListViewItem *)));
+ connect(widget(),TQT_SIGNAL(selectionChanged(KviTalListViewItem *)),this,TQT_SLOT(slotSelectionChanged(KviTalListViewItem *)));
+ connect(widget(),TQT_SIGNAL(selectionChanged()),this,TQT_SLOT(slotMultipleSelectionChanged()));
+ connect(widget(),TQT_SIGNAL(currentChanged(KviTalListViewItem *)),this,TQT_SLOT(slotCurrentChanged(KviTalListViewItem *)));
+ connect(widget(),TQT_SIGNAL(returnPressed(KviTalListViewItem *)),this,TQT_SLOT(slotReturnPressed(KviTalListViewItem *)));
+ connect(widget(),TQT_SIGNAL(spacePressed(KviTalListViewItem *)),this,TQT_SLOT(slotSpacePressed(KviTalListViewItem *)));
+ connect(widget(),TQT_SIGNAL(onItem(KviTalListViewItem *)),this,TQT_SLOT(slotOnItem(KviTalListViewItem *)));
+ connect(widget(),TQT_SIGNAL(expanded(KviTalListViewItem *)),this,TQT_SLOT(slotItemExpanded(KviTalListViewItem *)));
+ connect(widget(),TQT_SIGNAL(collapsed(KviTalListViewItem *)),this,TQT_SLOT(slotItemCollapsed(KviTalListViewItem *)));
+ connect(widget(),TQT_SIGNAL(rightButtonClicked(KviTalListViewItem *,const TQPoint &,int)),this,TQT_SLOT(slotRightButtonClicked(KviTalListViewItem *,const TQPoint &,int)));
+ connect(widget(),TQT_SIGNAL(itemRenamed(KviTalListViewItem *,int,const TQString &)),this,TQT_SLOT(slotItemRenamed(KviTalListViewItem *,int,const TQString &)));
return true;
}
bool KviKvsObject_listview::function_addColumn(KviKvsObjectFunctionCall *c)
{
- QString szLabel;
+ TQString szLabel;
kvs_int_t iW;
KVSO_PARAMETERS_BEGIN(c)
KVSO_PARAMETER("label",KVS_PT_STRING,0,szLabel)
@@ -293,7 +293,7 @@ bool KviKvsObject_listview::function_currentItem(KviKvsObjectFunctionCall *c)
bool KviKvsObject_listview::function_setColumnText(KviKvsObjectFunctionCall *c)
{
kvs_int_t uCol;
- QString szText;
+ TQString szText;
KVSO_PARAMETERS_BEGIN(c)
KVSO_PARAMETER("column",KVS_PT_UNSIGNEDINTEGER,0,uCol)
KVSO_PARAMETER("text",KVS_PT_STRING,0,szText)
@@ -304,18 +304,18 @@ bool KviKvsObject_listview::function_setColumnText(KviKvsObjectFunctionCall *c)
bool KviKvsObject_listview::function_setSelectionMode(KviKvsObjectFunctionCall *c)
{
- QString szMode;
+ TQString szMode;
KVSO_PARAMETERS_BEGIN(c)
KVSO_PARAMETER("mode",KVS_PT_NONEMPTYSTRING,0,szMode)
KVSO_PARAMETERS_END(c)
if(!widget())return true;
- if(KviQString::equalCI(szMode,"NoSelection"))
+ if(KviTQString::equalCI(szMode,"NoSelection"))
((KviTalListView *)widget())->setSelectionMode(KviTalListView::NoSelection);
- else if(KviQString::equalCI(szMode,"Multi"))
+ else if(KviTQString::equalCI(szMode,"Multi"))
((KviTalListView *)widget())->setSelectionMode(KviTalListView::Multi);
- else if(KviQString::equalCI(szMode,"Extended"))
+ else if(KviTQString::equalCI(szMode,"Extended"))
((KviTalListView *)widget())->setSelectionMode(KviTalListView::Extended);
- else if(KviQString::equalCI(szMode,"Single"))
+ else if(KviTQString::equalCI(szMode,"Single"))
((KviTalListView *)widget())->setSelectionMode(KviTalListView::Single);
else c->warning(__tr2qs("Invalid selection mode '%Q'"),&szMode);
return true;
@@ -481,7 +481,7 @@ bool KviKvsObject_listview::function_rightButtonClickedEvent(KviKvsObjectFunctio
return true;
}
-void KviKvsObject_listview::slotRightButtonClicked(KviTalListViewItem * i,const QPoint &coor, int col)
+void KviKvsObject_listview::slotRightButtonClicked(KviTalListViewItem * i,const TQPoint &coor, int col)
{
KviKvsVariant *xpos=new KviKvsVariant((kvs_int_t)coor.x());
KviKvsVariant *ypos=new KviKvsVariant((kvs_int_t)coor.y());
@@ -496,24 +496,24 @@ bool KviKvsObject_listview::function_itemRenamedEvent(KviKvsObjectFunctionCall *
return true;
}
-void KviKvsObject_listview::slotItemRenamed(KviTalListViewItem *item,int col,const QString & szText)
+void KviKvsObject_listview::slotItemRenamed(KviTalListViewItem *item,int col,const TQString & szText)
{
KviKvsVariant *column=new KviKvsVariant((kvs_int_t)col);
KviKvsVariant *txt=new KviKvsVariant(szText);
KviKvsVariantList params(new KviKvsVariant(KviKvsObject_listviewitem::itemToHandle(item)),column,txt);
callFunction(this,"itemRenamedEvent",0,&params);
}
-void KviKvsObject_listview::fileDropped(QString &szFile,KviTalListViewItem *item)
+void KviKvsObject_listview::fileDropped(TQString &szFile,KviTalListViewItem *item)
{
KviKvsVariant *file=new KviKvsVariant(szFile);
KviKvsVariantList params(new KviKvsVariant(KviKvsObject_listviewitem::itemToHandle(item)),file);
callFunction(this,"fileDroppedEvent",0,&params);
}
-KviKvsMdmListView::KviKvsMdmListView(QWidget * par,const char * name,KviKvsObject_listview *parent)
+KviKvsMdmListView::KviKvsMdmListView(TQWidget * par,const char * name,KviKvsObject_listview *tqparent)
:KviTalListView(par)
{
- m_pParentScript=parent;
+ m_pParentScript=tqparent;
setAcceptDrops(true);
viewport()->setAcceptDrops( TRUE );
@@ -522,7 +522,7 @@ KviKvsMdmListView::~KviKvsMdmListView()
{
}
-void KviKvsMdmListView::contentsDragEnterEvent( QDragEnterEvent *e )
+void KviKvsMdmListView::contentsDragEnterEvent( TQDragEnterEvent *e )
{
if ( !KviUriDrag::canDecode(e))
{
@@ -533,19 +533,19 @@ void KviKvsMdmListView::contentsDragEnterEvent( QDragEnterEvent *e )
}
-void KviKvsMdmListView::contentsDropEvent(QDropEvent *e)
+void KviKvsMdmListView::contentsDropEvent(TQDropEvent *e)
{
- QStringList list;
+ TQStringList list;
if(KviUriDrag::decodeLocalFiles(e,list))
{
if(!list.isEmpty())
{
- QStringList::ConstIterator it = list.begin(); //kewl ! :)
+ TQStringList::ConstIterator it = list.begin(); //kewl ! :)
for( ; it != list.end(); ++it )
{
- QString tmp = *it; //wow :)
+ TQString tmp = *it; //wow :)
#ifndef COMPILE_ON_WINDOWS
- if(tmp[0] != '/')tmp.prepend("/"); //HACK HACK HACK for Qt bug (?!?)
+ if(tmp[0] != '/')tmp.prepend("/"); //HACK HACK HACK for TQt bug (?!?)
#endif
KviTalListViewItem *i = itemAt( contentsToViewport(e->pos()) );
m_pParentScript->fileDropped(tmp,i);
diff --git a/src/modules/objects/class_listview.h b/src/modules/objects/class_listview.h
index 7849f36c..2d419fe0 100644
--- a/src/modules/objects/class_listview.h
+++ b/src/modules/objects/class_listview.h
@@ -36,12 +36,13 @@
class KviKvsObject_listview : public KviKvsObject_widget
{
Q_OBJECT
+ TQ_OBJECT
public:
KVSO_DECLARE_OBJECT(KviKvsObject_listview)
public:
- QWidget * widget() { return (QWidget *)object(); };
- void fileDropped(QString &,KviTalListViewItem *);
+ TQWidget * widget() { return (TQWidget *)object(); };
+ void fileDropped(TQString &,KviTalListViewItem *);
protected:
virtual bool init(KviKvsRunTimeContext * pContext,KviKvsVariantList *pParams);
@@ -82,21 +83,22 @@ protected slots:
void slotOnItem(KviTalListViewItem *);
void slotItemExpanded(KviTalListViewItem *);
void slotItemCollapsed(KviTalListViewItem *);
- void slotItemRenamed(KviTalListViewItem *,int,const QString &);
- void slotRightButtonClicked(KviTalListViewItem * i,const QPoint &coor, int col);
+ void slotItemRenamed(KviTalListViewItem *,int,const TQString &);
+ void slotRightButtonClicked(KviTalListViewItem * i,const TQPoint &coor, int col);
};
class KviKvsMdmListView : public KviTalListView
{
Q_OBJECT
+ TQ_OBJECT
public:
- KviKvsMdmListView(QWidget * par,const char * name,KviKvsObject_listview *);
+ KviKvsMdmListView(TQWidget * par,const char * name,KviKvsObject_listview *);
virtual ~KviKvsMdmListView();
protected:
KviKvsObject_listview *m_pParentScript;
- void contentsDropEvent(QDropEvent *e);
- void contentsDragEnterEvent( QDragEnterEvent *e );
+ void contentsDropEvent(TQDropEvent *e);
+ void contentsDragEnterEvent( TQDragEnterEvent *e );
};
#endif //!_CLASS_LISTVIEW_H_
diff --git a/src/modules/objects/class_listviewitem.cpp b/src/modules/objects/class_listviewitem.cpp
index 31df9020..0834796c 100644
--- a/src/modules/objects/class_listviewitem.cpp
+++ b/src/modules/objects/class_listviewitem.cpp
@@ -46,7 +46,7 @@
The listviewitem class implements a list view item.
A list view item is a multi-column object capable of displaying itself in a [class]listview[/class].
To use this class you must instantiate it with another listviewitem or a [class]listview[/class]
- as parent. The item will be automatically displayed.
+ as tqparent. The item will be automatically displayed.
You can set the text and a pixmap in each column and you can make it checkable
with [classfnc:listviewitem]$setCheckable[/classfnc]().
A checkable listviewitem will display a small check mark in the first column.
@@ -71,7 +71,7 @@
Returns $true if this item is enabled and $false otherwise
!fn: $setOpen(<bOpen:boolean>)
- Opens or closes the item to show its children items
+ Opens or closes the item to show its tqchildren items
!fn: $isOpen()
Returns the open state of this item
@@ -80,7 +80,7 @@
Makes this item checkable or not. This function should be called immediately
after the item creation: changing this property later at runtime may have
strange results (like the item being moved inside the list, text disappearing,
- hidden children etc... don't do it :D ).
+ hidden tqchildren etc... don't do it :D ).
!fn: $isCheckable()
Returns $true if this item is checkable and $false otherwise
@@ -94,7 +94,7 @@
have been previously called.
!fn: <listviewitem> $firstChild()
- Returns the first child item of this listviewitem or $null if this item has no children.
+ Returns the first child item of this listviewitem or $null if this item has no tqchildren.
!fn: <listviewitem> $nextSibling()
Returns the next sibling item of this listviewitem or $null if there are no sibling items.
@@ -137,19 +137,19 @@ KVSO_END_CONSTRUCTOR(KviKvsObject_listviewitem)
bool KviKvsObject_listviewitem::init(KviKvsRunTimeContext * pContext,KviKvsVariantList *pParams)
{
- if (!parentObject())
+ if (!tqparentObject())
{
- pContext->error(__tr2qs("The listviewitem cannot be parentless"));
+ pContext->error(__tr2qs("The listviewitem cannot be tqparentless"));
return false;
}
- if(parentObject()->inherits("KviKvsObject_listviewitem"))
+ if(tqparentObject()->inherits("KviKvsObject_listviewitem"))
{
- m_pListViewItem = new KviKvsMdmStandardListViewItem(this,((KviKvsObject_listviewitem *)parentObject())->m_pListViewItem);
+ m_pListViewItem = new KviKvsMdmStandardListViewItem(this,((KviKvsObject_listviewitem *)tqparentObject())->m_pListViewItem);
} else {
- if(parentObject()->inherits("KviKvsObject_listview"))
- m_pListViewItem = new KviKvsMdmStandardListViewItem(this,((KviTalListView *)parentScriptWidget()));
+ if(tqparentObject()->inherits("KviKvsObject_listview"))
+ m_pListViewItem = new KviKvsMdmStandardListViewItem(this,((KviTalListView *)tqparentScriptWidget()));
else {
- pContext->error(__tr2qs("The parent of the listviewitem must be either another listviewitem or a listview"));
+ pContext->error(__tr2qs("The tqparent of the listviewitem must be either another listviewitem or a listview"));
return false;
}
}
@@ -181,12 +181,12 @@ KviKvsMdmStandardListViewItem::~KviKvsMdmStandardListViewItem()
KviKvsMdmCheckListViewItem::KviKvsMdmCheckListViewItem(KviKvsObject_listviewitem * ob,KviTalListView * par)
-:KviTalCheckListItem(par,QString::null,KviTalCheckListItem::CheckBox), m_pMasterObject(ob)
+:KviTalCheckListItem(par,TQString(),KviTalCheckListItem::CheckBox), m_pMasterObject(ob)
{
}
KviKvsMdmCheckListViewItem::KviKvsMdmCheckListViewItem(KviKvsObject_listviewitem * ob,KviTalListViewItem * par)
-:KviTalCheckListItem(par,QString::null,KviTalCheckListItem::CheckBox), m_pMasterObject(ob)
+:KviTalCheckListItem(par,TQString(),KviTalCheckListItem::CheckBox), m_pMasterObject(ob)
{
}
@@ -210,7 +210,7 @@ kvs_hobject_t KviKvsObject_listviewitem::itemToHandle(KviTalListViewItem * it)
bool KviKvsObject_listviewitem::function_setText(KviKvsObjectFunctionCall *c)
{
kvs_uint_t uCol;
- QString szText;
+ TQString szText;
KVSO_PARAMETERS_BEGIN(c)
KVSO_PARAMETER("column",KVS_PT_UNSIGNEDINTEGER,0,uCol)
KVSO_PARAMETER("text",KVS_PT_STRING,0,szText)
@@ -304,7 +304,7 @@ bool KviKvsObject_listviewitem::function_setChecked(KviKvsObjectFunctionCall *c)
KVSO_PARAMETER("bChecked",KVS_PT_BOOL,0,bChecked)
KVSO_PARAMETERS_END(c)
if(!m_pListViewItem)return true;
- if(m_pListViewItem->rtti() != 1)return true; // not a QCheckListItem
+ if(m_pListViewItem->rtti() != 1)return true; // not a TQCheckListItem
((KviKvsMdmCheckListViewItem *)m_pListViewItem)->setOn(bChecked);
return true;
}
@@ -334,8 +334,8 @@ bool KviKvsObject_listviewitem::function_setCheckable(KviKvsObjectFunctionCall *
if(!m_pListViewItem)return true;
if(bCheckable)
{
- if(m_pListViewItem->rtti() == 1)return true; // a QCheckListItem already
- KviTalListViewItem * pParent = m_pListViewItem->parent();
+ if(m_pListViewItem->rtti() == 1)return true; // a TQCheckListItem already
+ KviTalListViewItem * pParent = m_pListViewItem->tqparent();
KviTalListView * pLV = (KviTalListView *)m_pListViewItem->listView();
// swap the items, so we don't die now
KviTalListViewItem * pThis = m_pListViewItem;
@@ -346,8 +346,8 @@ bool KviKvsObject_listviewitem::function_setCheckable(KviKvsObjectFunctionCall *
else
m_pListViewItem = new KviKvsMdmCheckListViewItem(this,pLV);
} else {
- if(m_pListViewItem->rtti() != 1)return true; // not a QCheckListItem yet
- KviTalListViewItem * pParent = m_pListViewItem->parent();
+ if(m_pListViewItem->rtti() != 1)return true; // not a TQCheckListItem yet
+ KviTalListViewItem * pParent = m_pListViewItem->tqparent();
KviTalListView * pLV = (KviTalListView *)m_pListViewItem->listView();
// swap the items, so we don't die now
KviTalListViewItem * pThis = m_pListViewItem;
@@ -393,7 +393,7 @@ bool KviKvsObject_listviewitem::function_setPixmap(KviKvsObjectFunctionCall *c)
KVSO_PARAMETER("column",KVS_PT_UNSIGNEDINTEGER,0,uCol)
KVSO_PARAMETER("pixmap",KVS_PT_VARIANT,0,vPixmap)
KVSO_PARAMETERS_END(c)
- QPixmap *pix = 0;
+ TQPixmap *pix = 0;
if(vPixmap->isHObject())
{
vPixmap->asHObject(obHpixmap);
@@ -405,7 +405,7 @@ bool KviKvsObject_listviewitem::function_setPixmap(KviKvsObjectFunctionCall *c)
}
pix=((KviKvsObject_pixmap *)obPixmap)->getPixmap();
} else {
- QString szPix;
+ TQString szPix;
vPixmap->asString(szPix);
pix=g_pIconManager->getImage(szPix);
if(!pix)
diff --git a/src/modules/objects/class_listviewitem.h b/src/modules/objects/class_listviewitem.h
index eb806324..f2cacc3f 100644
--- a/src/modules/objects/class_listviewitem.h
+++ b/src/modules/objects/class_listviewitem.h
@@ -32,6 +32,7 @@
class KviKvsObject_listviewitem : public KviKvsObject
{
Q_OBJECT
+ TQ_OBJECT
public:
KVSO_DECLARE_OBJECT(KviKvsObject_listviewitem)
void childDestroyed();
diff --git a/src/modules/objects/class_mainwindow.cpp b/src/modules/objects/class_mainwindow.cpp
index e30f480b..8b04053e 100644
--- a/src/modules/objects/class_mainwindow.cpp
+++ b/src/modules/objects/class_mainwindow.cpp
@@ -68,7 +68,7 @@ KVSO_END_CONSTRUCTOR(KviKvsObject_mainwindow)
bool KviKvsObject_mainwindow::init(KviKvsRunTimeContext * pContext,KviKvsVariantList *pParams)
{
- setObject(new KviTalMainWindow(parentScriptWidget(), name()), true);
+ setObject(TQT_TQOBJECT(new KviTalMainWindow(tqparentScriptWidget(), name())), true);
return true;
}
@@ -95,12 +95,12 @@ bool KviKvsObject_mainwindow::functionsetCentralWidget(KviKvsObjectFunctionCall
c->warning(__tr2qs("Widget object required"));
return TRUE;
}
- if(widget()) ((KviTalMainWindow *)widget())->setCentralWidget(((QWidget *)(pObject->object())));
+ if(widget()) ((KviTalMainWindow *)widget())->setCentralWidget(((TQWidget *)(pObject->object())));
return true;
}
bool KviKvsObject_mainwindow::functionsetDockEnabled(KviKvsObjectFunctionCall *c)
{
- QString szDockarea;
+ TQString szDockarea;
bool bFlag;
KVSO_PARAMETERS_BEGIN(c)
KVSO_PARAMETER("dock area",KVS_PT_STRING,0,szDockarea)
@@ -109,20 +109,20 @@ bool KviKvsObject_mainwindow::functionsetDockEnabled(KviKvsObjectFunctionCall *c
if(widget())
{
#ifndef COMPILE_USE_QT4
- if(KviQString::equalCI(szDockarea,"Top"))
- ((KviTalMainWindow *)widget())->setDockEnabled(Qt::DockTop,bFlag);
- else if(KviQString::equalCI(szDockarea,"Left"))
- ((KviTalMainWindow *)widget())->setDockEnabled(Qt::DockLeft,bFlag);
- else if(KviQString::equalCI(szDockarea,"Right"))
- ((KviTalMainWindow *)widget())->setDockEnabled(Qt::DockRight,bFlag);
- else if(KviQString::equalCI(szDockarea,"Bottom"))
- ((KviTalMainWindow *)widget())->setDockEnabled(Qt::DockBottom,bFlag);
- else if(KviQString::equalCI(szDockarea,"Minimized"))
- ((KviTalMainWindow *)widget())->setDockEnabled(Qt::DockMinimized,bFlag);
- else if(KviQString::equalCI(szDockarea,"TornOff"))
- ((KviTalMainWindow *)widget())->setDockEnabled(Qt::DockTornOff,bFlag);
- else if(KviQString::equalCI(szDockarea,"Unmanaged"))
- ((KviTalMainWindow *)widget())->setDockEnabled(Qt::DockUnmanaged,bFlag);
+ if(KviTQString::equalCI(szDockarea,"Top"))
+ ((KviTalMainWindow *)widget())->setDockEnabled(TQt::DockTop,bFlag);
+ else if(KviTQString::equalCI(szDockarea,"Left"))
+ ((KviTalMainWindow *)widget())->setDockEnabled(TQt::DockLeft,bFlag);
+ else if(KviTQString::equalCI(szDockarea,"Right"))
+ ((KviTalMainWindow *)widget())->setDockEnabled(TQt::DockRight,bFlag);
+ else if(KviTQString::equalCI(szDockarea,"Bottom"))
+ ((KviTalMainWindow *)widget())->setDockEnabled(TQt::DockBottom,bFlag);
+ else if(KviTQString::equalCI(szDockarea,"Minimized"))
+ ((KviTalMainWindow *)widget())->setDockEnabled(TQt::DockMinimized,bFlag);
+ else if(KviTQString::equalCI(szDockarea,"TornOff"))
+ ((KviTalMainWindow *)widget())->setDockEnabled(TQt::DockTornOff,bFlag);
+ else if(KviTQString::equalCI(szDockarea,"Unmanaged"))
+ ((KviTalMainWindow *)widget())->setDockEnabled(TQt::DockUnmanaged,bFlag);
else c->warning(__tr2qs("Unknown dock area '%Q'"),&szDockarea);
#endif
}
@@ -132,20 +132,20 @@ bool KviKvsObject_mainwindow::functionsetDockEnabled(KviKvsObjectFunctionCall *c
bool KviKvsObject_mainwindow::functionisDockEnabled(KviKvsObjectFunctionCall *c)
{
- QString szDockarea;
+ TQString szDockarea;
bool bFlag = false;
KVSO_PARAMETERS_BEGIN(c)
KVSO_PARAMETER("dock_area",KVS_PT_STRING,0,szDockarea)
KVSO_PARAMETERS_END(c)
if(!widget()) return true;
#ifndef COMPILE_USE_QT4
- if(KviQString::equalCI(szDockarea,"Top")) bFlag=((KviTalMainWindow *)widget())->isDockEnabled(Qt::DockTop);
- else if(KviQString::equalCI(szDockarea,"Left")) bFlag=((KviTalMainWindow *)widget())->isDockEnabled(Qt::DockLeft);
- else if(KviQString::equalCI(szDockarea,"Right")) bFlag=((KviTalMainWindow *)widget())->isDockEnabled(Qt::DockRight);
- else if(KviQString::equalCI(szDockarea,"Bottom"))bFlag=((KviTalMainWindow *)widget())->isDockEnabled(Qt::DockBottom);
- else if(KviQString::equalCI(szDockarea,"Minimized")) bFlag=((KviTalMainWindow *)widget())->isDockEnabled(Qt::DockMinimized);
- else if(KviQString::equalCI(szDockarea,"TornOff")) bFlag=((KviTalMainWindow *)widget())->isDockEnabled(Qt::DockTornOff);
- else if(KviQString::equalCI(szDockarea,"Unmanaged")) bFlag=((KviTalMainWindow *)widget())->isDockEnabled(Qt::DockUnmanaged);
+ if(KviTQString::equalCI(szDockarea,"Top")) bFlag=((KviTalMainWindow *)widget())->isDockEnabled(TQt::DockTop);
+ else if(KviTQString::equalCI(szDockarea,"Left")) bFlag=((KviTalMainWindow *)widget())->isDockEnabled(TQt::DockLeft);
+ else if(KviTQString::equalCI(szDockarea,"Right")) bFlag=((KviTalMainWindow *)widget())->isDockEnabled(TQt::DockRight);
+ else if(KviTQString::equalCI(szDockarea,"Bottom"))bFlag=((KviTalMainWindow *)widget())->isDockEnabled(TQt::DockBottom);
+ else if(KviTQString::equalCI(szDockarea,"Minimized")) bFlag=((KviTalMainWindow *)widget())->isDockEnabled(TQt::DockMinimized);
+ else if(KviTQString::equalCI(szDockarea,"TornOff")) bFlag=((KviTalMainWindow *)widget())->isDockEnabled(TQt::DockTornOff);
+ else if(KviTQString::equalCI(szDockarea,"Unmanaged")) bFlag=((KviTalMainWindow *)widget())->isDockEnabled(TQt::DockUnmanaged);
else
{
c->warning(__tr2qs("Unknown dock area '%Q'"),&szDockarea);
diff --git a/src/modules/objects/class_mainwindow.h b/src/modules/objects/class_mainwindow.h
index 7afddf8c..40abd769 100644
--- a/src/modules/objects/class_mainwindow.h
+++ b/src/modules/objects/class_mainwindow.h
@@ -23,7 +23,7 @@
// Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
//
-//#include <qmainwindow.h>
+//#include <tqmainwindow.h>
#include "class_widget.h"
#include "object_macros.h"
@@ -32,7 +32,7 @@ class KviKvsObject_mainwindow : public KviKvsObject_widget
public:
KVSO_DECLARE_OBJECT(KviKvsObject_mainwindow)
public:
- QWidget * widget() { return (QWidget *)object(); };
+ TQWidget * widget() { return (TQWidget *)object(); };
protected:
virtual bool init(KviKvsRunTimeContext * pContext,KviKvsVariantList *pParams);
diff --git a/src/modules/objects/class_menubar.cpp b/src/modules/objects/class_menubar.cpp
index 90ad0e7d..860ffafc 100644
--- a/src/modules/objects/class_menubar.cpp
+++ b/src/modules/objects/class_menubar.cpp
@@ -61,16 +61,16 @@ KVSO_END_CONSTRUCTOR(KviKvsObject_menubar)
bool KviKvsObject_menubar::init(KviKvsRunTimeContext * pContext,KviKvsVariantList *pParams)
{
- setObject(new QMenuBar(parentScriptWidget(), name()));
+ setObject(TQT_TQOBJECT(new TQMenuBar(tqparentScriptWidget(), name())));
return true;
}
bool KviKvsObject_menubar::functionInsertItem(KviKvsObjectFunctionCall *c)
{
- QString szItem;
+ TQString szItem;
KVSO_PARAMETERS_BEGIN(c)
KVSO_PARAMETER("item",KVS_PT_STRING,0,szItem)
KVSO_PARAMETERS_END(c)
- if (widget()) ((QMenuBar *)widget())->insertItem(szItem);
+ if (widget()) ((TQMenuBar *)widget())->insertItem(szItem);
return true;
}
diff --git a/src/modules/objects/class_menubar.h b/src/modules/objects/class_menubar.h
index c959d272..21346c4c 100644
--- a/src/modules/objects/class_menubar.h
+++ b/src/modules/objects/class_menubar.h
@@ -22,7 +22,7 @@
// Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
//
-#include <qmenubar.h>
+#include <tqmenubar.h>
#include "class_widget.h"
#include "object_macros.h"
@@ -31,7 +31,7 @@ class KviKvsObject_menubar : public KviKvsObject_widget
public:
KVSO_DECLARE_OBJECT(KviKvsObject_menubar)
public:
- QWidget * widget() { return (QWidget *)object(); };
+ TQWidget * widget() { return (TQWidget *)object(); };
protected:
virtual bool init(KviKvsRunTimeContext * pContext,KviKvsVariantList *pParams);
diff --git a/src/modules/objects/class_multilineedit.cpp b/src/modules/objects/class_multilineedit.cpp
index 6b2f8af9..fa9181e5 100644
--- a/src/modules/objects/class_multilineedit.cpp
+++ b/src/modules/objects/class_multilineedit.cpp
@@ -28,25 +28,25 @@
#include "kvi_debug.h"
#include "kvi_locale.h"
#include "kvi_malloc.h"
-#include <qfile.h>
+#include <tqfile.h>
#ifdef COMPILE_USE_QT4
- #include <q3multilineedit.h>
-#include <QTextStream>
+ #include <tq3multilineedit.h>
+#include <TQTextStream>
-#include <q3stylesheet.h>
+#include <tq3stylesheet.h>
#define KviTalMultiLineEdit Q3MultiLineEdit
-#define QTEXTEDIT_AUTO_ALL Q3TextEdit::AutoAll
-#define QTEXTEDIT_AUTO_NONE Q3TextEdit::AutoNone
-#define QTEXTEDIT_AUTO_BULLET_LIST Q3TextEdit::AutoBulletList
+#define TQTEXTEDIT_AUTO_ALL Q3TextEdit::AutoAll
+#define TQTEXTEDIT_AUTO_NONE Q3TextEdit::AutoNone
+#define TQTEXTEDIT_AUTO_BULLET_LIST Q3TextEdit::AutoBulletList
#else
- #include <qtextstream.h>
+ #include <tqtextstream.h>
- #include <qmultilineedit.h>
- #define KviTalMultiLineEdit QMultiLineEdit
- #define QTEXTEDIT_AUTO_ALL QTextEdit::AutoAll
- #define QTEXTEDIT_AUTO_NONE QTextEdit::AutoNone
- #define QTEXTEDIT_AUTO_BULLET_LIST QTextEdit::AutoBulletList
+ #include <tqmultilineedit.h>
+ #define KviTalMultiLineEdit TQMultiLineEdit
+ #define TQTEXTEDIT_AUTO_ALL TQTextEdit::AutoAll
+ #define TQTEXTEDIT_AUTO_NONE TQTextEdit::AutoNone
+ #define TQTEXTEDIT_AUTO_BULLET_LIST TQTextEdit::AutoBulletList
#endif
@@ -63,10 +63,10 @@ static char * const mod_tbl[] = {
};
static int mod_cod[] = {
- Qt::PlainText,
- Qt::RichText,
- Qt::AutoText,
- Qt::LogText
+ TQt::PlainText,
+ TQt::RichText,
+ TQt::AutoText,
+ TQt::LogText
};
#define mod_num (sizeof(mod_tbl) / sizeof(mod_tbl[0]))
@@ -226,15 +226,15 @@ static int mod_cod[] = {
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).
- !fn: $setAlignment(<alignment:string>)
- Sets the alignment of the current paragraph to <alignment>. Valid values are:[br]
+ !fn: $tqsetAlignment(<tqalignment:string>)
+ Sets the tqalignment of the current paragraph to <tqalignment>. Valid values are:[br]
- AlignAuto - Aligns according to the language.[br]
- - Qt::AlignLeft - Aligns with the left edge.[br]
- - Qt::AlignRight - Aligns with the right edge.[br]
- - Qt::AlignCenter - Centers in both dimensions.
- !fn: $setVerticalAlignment(<vertical_alignment:string>)
- Sets the vertical alignment of the current format to <Valignemnt>. Valid Values are:[br]
- - AlignNormal - Normal alignment.[br]
+ - TQt::AlignLeft - Aligns with the left edge.[br]
+ - TQt::AlignRight - Aligns with the right edge.[br]
+ - TQt::AlignCenter - Centers in both dimensions.
+ !fn: $setVerticalAlignment(<vertical_tqalignment:string>)
+ Sets the vertical tqalignment of the current format to <Valignemnt>. Valid Values are:[br]
+ - AlignNormal - Normal tqalignment.[br]
- AlignSuperScript - Superscript.[br]
- AlignSubScript - Subscript.
!fn: $setAutoFormatting(<afvalue:string>)
@@ -323,7 +323,7 @@ KVSO_BEGIN_REGISTERCLASS(KviKvsObject_mledit,"multilineedit","widget")
KVSO_REGISTER_HANDLER(KviKvsObject_mledit,"setParagraphBackgroundColor", functionsetParagraphBackgroundColor)
KVSO_REGISTER_HANDLER(KviKvsObject_mledit,"clearParagraphBackgroundColor", functionsetParagraphBackgroundColor)
KVSO_REGISTER_HANDLER(KviKvsObject_mledit,"loadFile" , functionloadFile); // let's fantasy
- KVSO_REGISTER_HANDLER(KviKvsObject_mledit,"setAlignment" , functionsetAlignment)
+ KVSO_REGISTER_HANDLER(KviKvsObject_mledit,"tqsetAlignment" , functiontqsetAlignment)
KVSO_REGISTER_HANDLER(KviKvsObject_mledit,"setAutoFormatting" , functionsetAutoFormatting)
KVSO_REGISTER_HANDLER(KviKvsObject_mledit,"setVerticalAlignment" , functionsetVerticalAlignment)
KVSO_REGISTER_HANDLER(KviKvsObject_mledit,"setWrapPolicy" , functionsetWrapPolicy)
@@ -353,7 +353,7 @@ KVSO_END_CONSTRUCTOR(KviKvsObject_mledit)
bool KviKvsObject_mledit::init(KviKvsRunTimeContext * pContext,KviKvsVariantList * pParams)
{
- setObject(new KviTalMultiLineEdit(parentScriptWidget(),getName()),true);
+ setObject(TQT_TQOBJECT(new KviTalMultiLineEdit(tqparentScriptWidget(),getName())),true);
return true;
}
@@ -389,7 +389,7 @@ bool KviKvsObject_mledit::functionInsertLine(KviKvsObjectFunctionCall *c)
{
kvs_int_t iLine;
- QString szInsert;
+ TQString szInsert;
KVSO_PARAMETERS_BEGIN(c)
KVSO_PARAMETER("text",KVS_PT_STRING,0,szInsert)
KVSO_PARAMETER("line",KVS_PT_INT,KVS_PF_OPTIONAL,iLine)
@@ -416,7 +416,7 @@ bool KviKvsObject_mledit::functionInsertAt(KviKvsObjectFunctionCall *c)
{
kvs_uint_t iLine,iCol;
- QString szInsert;
+ TQString szInsert;
KVSO_PARAMETERS_BEGIN(c)
KVSO_PARAMETER("text",KVS_PT_STRING,0,szInsert)
KVSO_PARAMETER("line",KVS_PT_UNSIGNEDINTEGER,0,iLine)
@@ -456,11 +456,7 @@ bool KviKvsObject_mledit::functionCursorPosition(KviKvsObjectFunctionCall *c)
{
if(!widget()) return true;
int line, col;
- #if QT_VERSION >= 300
- ((KviTalMultiLineEdit *)widget())->getCursorPosition(&line, &col);
- #else
- ((KviTalMultiLineEdit *)widget())->cursorPosition(&line, &col);
- #endif
+ ((KviTalMultiLineEdit *)widget())->getCursorPosition(&line, &col);
KviKvsArray * a = new KviKvsArray();
a->set(0,new KviKvsVariant((kvs_int_t)line));
a->set(1,new KviKvsVariant((kvs_int_t)col));
@@ -485,17 +481,17 @@ bool KviKvsObject_mledit::functionAtEnd(KviKvsObjectFunctionCall *c)
bool KviKvsObject_mledit::functionSetWordWrap(KviKvsObjectFunctionCall *c)
{
if(!widget())return true;
- QString szWrap;
+ TQString szWrap;
KVSO_PARAMETERS_BEGIN(c)
KVSO_PARAMETER("word_wrap",KVS_PT_STRING,0,szWrap)
KVSO_PARAMETERS_END(c)
- if(KviQString::equalCI(szWrap,"NoWrap"))
+ if(KviTQString::equalCI(szWrap,"NoWrap"))
((KviTalMultiLineEdit *)widget())->setWordWrap(KviTalMultiLineEdit::NoWrap);
- else if(KviQString::equalCI(szWrap,"WidgetWidth"))
+ else if(KviTQString::equalCI(szWrap,"WidgetWidth"))
((KviTalMultiLineEdit *)widget())->setWordWrap(KviTalMultiLineEdit::WidgetWidth);
- else if(KviQString::equalCI(szWrap,"FixedPixelWidth"))
+ else if(KviTQString::equalCI(szWrap,"FixedPixelWidth"))
((KviTalMultiLineEdit *)widget())->setWordWrap(KviTalMultiLineEdit::FixedPixelWidth);
- else if(KviQString::equalCI(szWrap,"FixedColumnWidth"))
+ else if(KviTQString::equalCI(szWrap,"FixedColumnWidth"))
((KviTalMultiLineEdit *)widget())->setWordWrap(KviTalMultiLineEdit::FixedColumnWidth);
else c->warning(__tr2qs("Unknown word wrap '%Q'"),&szWrap);
return true;
@@ -504,17 +500,17 @@ bool KviKvsObject_mledit::functionSetWordWrap(KviKvsObjectFunctionCall *c)
bool KviKvsObject_mledit::functionsetWrapPolicy(KviKvsObjectFunctionCall *c)
{
if(!widget())return true;
- QString szPolicy;
+ TQString szPolicy;
KVSO_PARAMETERS_BEGIN(c)
KVSO_PARAMETER("wrap_policy",KVS_PT_STRING,0,szPolicy)
KVSO_PARAMETERS_END(c)
- if(KviQString::equalCI(szPolicy,"AtWhiteSpace)"))
+ if(KviTQString::equalCI(szPolicy,"AtWhiteSpace)"))
((KviTalMultiLineEdit *)widget())->setWrapPolicy(KviTalMultiLineEdit::AtWhiteSpace);
- else if(KviQString::equalCI(szPolicy,"Anywhere"))
+ else if(KviTQString::equalCI(szPolicy,"Anywhere"))
((KviTalMultiLineEdit *)widget())->setWrapPolicy(KviTalMultiLineEdit::Anywhere);
- else if(KviQString::equalCI(szPolicy,"AtWordBoundary"))
+ else if(KviTQString::equalCI(szPolicy,"AtWordBoundary"))
((KviTalMultiLineEdit *)widget())->setWrapPolicy(KviTalMultiLineEdit::AtWordBoundary);
- else if(KviQString::equalCI(szPolicy,"AtWordOrDocumentBoundary"))
+ else if(KviTQString::equalCI(szPolicy,"AtWordOrDocumentBoundary"))
((KviTalMultiLineEdit *)widget())->setWrapPolicy(KviTalMultiLineEdit::AtWordOrDocumentBoundary);
else c->warning(__tr2qs("Unknown wrap policy'%Q'"),&szPolicy);
return true;
@@ -564,7 +560,7 @@ bool KviKvsObject_mledit::functionMaxLines(KviKvsObjectFunctionCall *c)
bool KviKvsObject_mledit::functionInsert(KviKvsObjectFunctionCall *c)
{
- QString szInsert;
+ TQString szInsert;
KVSO_PARAMETERS_BEGIN(c)
KVSO_PARAMETER("text",KVS_PT_STRING,0,szInsert)
KVSO_PARAMETERS_END(c)
@@ -576,7 +572,7 @@ bool KviKvsObject_mledit::functionInsert(KviKvsObjectFunctionCall *c)
bool KviKvsObject_mledit::functionAppend(KviKvsObjectFunctionCall *c)
{
- QString szAppend;
+ TQString szAppend;
KVSO_PARAMETERS_BEGIN(c)
KVSO_PARAMETER("text",KVS_PT_STRING,0,szAppend)
KVSO_PARAMETERS_END(c)
@@ -780,7 +776,7 @@ bool KviKvsObject_mledit::functionundoDepth(KviKvsObjectFunctionCall *c)
// Findme
bool KviKvsObject_mledit::functionsetText(KviKvsObjectFunctionCall *c)
{
- QString szText;
+ TQString szText;
KVSO_PARAMETERS_BEGIN(c)
KVSO_PARAMETER("text",KVS_PT_STRING,0,szText)
KVSO_PARAMETERS_END(c)
@@ -823,7 +819,7 @@ bool KviKvsObject_mledit::functionsetColor(KviKvsObjectFunctionCall *c)
if (c->params()->count()==1)
{
bool bOk,bOk1,bOk2;
- QString value;
+ TQString value;
pColArray->asString(value);
int i=0;
if (value.length()!=6)
@@ -831,7 +827,7 @@ bool KviKvsObject_mledit::functionsetColor(KviKvsObjectFunctionCall *c)
c->warning(__tr2qs("A string of 6 digits hex is required"));
return true;
}
- QString buffer(value.mid(0,2));
+ TQString buffer(value.mid(0,2));
iColR=buffer.toInt(&bOk,16);
buffer=value.mid(2,2);
iColG=buffer.toInt(&bOk1,16);
@@ -842,7 +838,7 @@ bool KviKvsObject_mledit::functionsetColor(KviKvsObjectFunctionCall *c)
c->warning(__tr2qs("Not an hex digits"));
return true;
}
- if (widget()) ((KviTalMultiLineEdit *)widget())->setColor(QColor(iColR,iColG,iColB));
+ if (widget()) ((KviTalMultiLineEdit *)widget())->setColor(TQColor(iColR,iColG,iColB));
return true;
}
if(c->params()->count() < 3)
@@ -856,7 +852,7 @@ bool KviKvsObject_mledit::functionsetColor(KviKvsObjectFunctionCall *c)
return false;
}
}
- if (widget()) ((KviTalMultiLineEdit *)widget())->setColor(QColor(iColR,iColG,iColB));
+ if (widget()) ((KviTalMultiLineEdit *)widget())->setColor(TQColor(iColR,iColG,iColB));
return true;
}
@@ -884,7 +880,7 @@ bool KviKvsObject_mledit::functionsetLinkUnderline(KviKvsObjectFunctionCall *c)
bool KviKvsObject_mledit::functionsetFamily(KviKvsObjectFunctionCall *c)
{
- QString szFamily;
+ TQString szFamily;
KVSO_PARAMETERS_BEGIN(c)
KVSO_PARAMETER("family",KVS_PT_STRING,0,szFamily)
KVSO_PARAMETERS_END(c)
@@ -907,7 +903,7 @@ bool KviKvsObject_mledit::functionsetModified(KviKvsObjectFunctionCall *c)
bool KviKvsObject_mledit::functioninsertParagraph(KviKvsObjectFunctionCall *c)
{
kvs_int_t iParagraph;
- QString szText;
+ TQString szText;
KVSO_PARAMETERS_BEGIN(c)
KVSO_PARAMETER("text",KVS_PT_STRING,0,szText)
KVSO_PARAMETER("paragraph",KVS_PT_INT,0,iParagraph)
@@ -944,7 +940,7 @@ bool KviKvsObject_mledit::functiontextFormat(KviKvsObjectFunctionCall *c)
{
if(!widget())return true;
int fstyle = ((KviTalMultiLineEdit *)widget())->textFormat();
- QString format="";
+ TQString format="";
for(unsigned int i = 0; i < mod_num; i++)
{
if(fstyle & mod_cod[i])
@@ -959,19 +955,19 @@ bool KviKvsObject_mledit::functiontextFormat(KviKvsObjectFunctionCall *c)
bool KviKvsObject_mledit::functionsetTextFormat(KviKvsObjectFunctionCall *c)
{
- QString szFormat;
+ TQString szFormat;
KVSO_PARAMETERS_BEGIN(c)
KVSO_PARAMETER("textformat",KVS_PT_STRING,0,szFormat)
KVSO_PARAMETERS_END(c)
if(!widget()) return true;
- if(KviQString::equalCI(szFormat,"PlainText"))
- ((KviTalMultiLineEdit *)widget())->setTextFormat(Qt::PlainText);
- else if(KviQString::equalCI(szFormat,"RichText"))
- ((KviTalMultiLineEdit *)widget())->setTextFormat(Qt::RichText);
- else if(KviQString::equalCI(szFormat,"LogText"))
- ((KviTalMultiLineEdit *)widget())->setTextFormat(Qt::LogText);
- else if(KviQString::equalCI(szFormat,"AutoText"))
- ((KviTalMultiLineEdit *)widget())->setTextFormat(Qt::AutoText);
+ if(KviTQString::equalCI(szFormat,"PlainText"))
+ ((KviTalMultiLineEdit *)widget())->setTextFormat(TQt::PlainText);
+ else if(KviTQString::equalCI(szFormat,"RichText"))
+ ((KviTalMultiLineEdit *)widget())->setTextFormat(TQt::RichText);
+ else if(KviTQString::equalCI(szFormat,"LogText"))
+ ((KviTalMultiLineEdit *)widget())->setTextFormat(TQt::LogText);
+ else if(KviTQString::equalCI(szFormat,"AutoText"))
+ ((KviTalMultiLineEdit *)widget())->setTextFormat(TQt::AutoText);
else c->warning(__tr2qs("Unknown text format '%Q'"),&szFormat);
return true;
}
@@ -1012,7 +1008,7 @@ bool KviKvsObject_mledit::functionsetParagraphBackgroundColor(KviKvsObjectFuncti
if (c->params()->count()==1)
{
bool bOk,bOk1,bOk2;
- QString value;
+ TQString value;
pColArray->asString(value);
int i=0;
if (value.length()!=6)
@@ -1020,7 +1016,7 @@ bool KviKvsObject_mledit::functionsetParagraphBackgroundColor(KviKvsObjectFuncti
c->warning(__tr2qs("A string of 6 digits hex is required"));
return true;
}
- QString buffer(value.mid(0,2));
+ TQString buffer(value.mid(0,2));
iColR=buffer.toInt(&bOk,16);
buffer=value.mid(2,2);
iColG=buffer.toInt(&bOk1,16);
@@ -1031,7 +1027,7 @@ bool KviKvsObject_mledit::functionsetParagraphBackgroundColor(KviKvsObjectFuncti
c->warning(__tr2qs("Not an hex digits"));
return true;
}
- if (widget()) ((KviTalMultiLineEdit *)widget())->setParagraphBackgroundColor(iParagraph,QColor(iColR,iColG,iColB));
+ if (widget()) ((KviTalMultiLineEdit *)widget())->setParagraphBackgroundColor(iParagraph,TQColor(iColR,iColG,iColB));
return true;
}
if(c->params()->count() < 3)
@@ -1045,7 +1041,7 @@ bool KviKvsObject_mledit::functionsetParagraphBackgroundColor(KviKvsObjectFuncti
return false;
}
}
- if (widget()) ((KviTalMultiLineEdit *)widget())->setParagraphBackgroundColor(iParagraph,QColor(iColR,iColG,iColB));
+ if (widget()) ((KviTalMultiLineEdit *)widget())->setParagraphBackgroundColor(iParagraph,TQColor(iColR,iColG,iColB));
return true;
}
@@ -1062,31 +1058,31 @@ bool KviKvsObject_mledit::functionclearParagraphBackground(KviKvsObjectFunctionC
bool KviKvsObject_mledit::functionloadFile(KviKvsObjectFunctionCall *c)
{
- QString szFile;
+ TQString szFile;
KVSO_PARAMETERS_BEGIN(c)
KVSO_PARAMETER("file_name",KVS_PT_STRING,0,szFile)
KVSO_PARAMETERS_END(c)
- if ( !QFile::exists(szFile))
+ if ( !TQFile::exists(szFile))
{
c->warning(__tr2qs(" I can't find the specified file '%Q'."),&szFile);
return true;
}
- QFile file( szFile );
+ TQFile file( szFile );
if ( !file.open( IO_ReadOnly ) )
{
c->warning(__tr2qs(" I cannot read the file %Q'."),&szFile);
return true;
}
- QTextStream ts( &file );
- QString txt = ts.read();
+ TQTextStream ts( &file );
+ TQString txt = ts.read();
#ifdef COMPILE_USE_QT4
if ( !Q3StyleSheet::mightBeRichText( txt ) )
txt = Q3StyleSheet::convertFromPlainText( txt, Q3StyleSheetItem::WhiteSpacePre );
#else
- if ( !QStyleSheet::mightBeRichText( txt ) )
- txt = QStyleSheet::convertFromPlainText( txt, QStyleSheetItem::WhiteSpacePre );
+ if ( !TQStyleSheet::mightBeRichText( txt ) )
+ txt = TQStyleSheet::convertFromPlainText( txt, TQStyleSheetItem::WhiteSpacePre );
#endif
((KviTalMultiLineEdit *)widget())->setText( txt );
@@ -1094,40 +1090,40 @@ bool KviKvsObject_mledit::functionloadFile(KviKvsObjectFunctionCall *c)
return true;
}
-bool KviKvsObject_mledit::functionsetAlignment(KviKvsObjectFunctionCall *c)
+bool KviKvsObject_mledit::functiontqsetAlignment(KviKvsObjectFunctionCall *c)
{
- QString szAlignment;
+ TQString szAlignment;
KVSO_PARAMETERS_BEGIN(c)
- KVSO_PARAMETER("alignment",KVS_PT_STRING,0,szAlignment)
+ KVSO_PARAMETER("tqalignment",KVS_PT_STRING,0,szAlignment)
KVSO_PARAMETERS_END(c)
if(!widget()) return true;
- if(KviQString::equalCI(szAlignment,"Left"))
- ((KviTalMultiLineEdit *)widget())->setAlignment(Qt::AlignLeft);
- else if(KviQString::equalCI(szAlignment,"Right"))
- ((KviTalMultiLineEdit *)widget())->setAlignment(Qt::AlignRight);
- else if(KviQString::equalCI(szAlignment,"Center"))
- ((KviTalMultiLineEdit *)widget())->setAlignment(Qt::AlignCenter);
- else if(KviQString::equalCI(szAlignment,"Justify"))
- ((KviTalMultiLineEdit *)widget())->setAlignment(Qt::AlignJustify);
- else c->warning(__tr2qs("Unknown alignment '%Q'"),&szAlignment);
+ if(KviTQString::equalCI(szAlignment,"Left"))
+ ((KviTalMultiLineEdit *)widget())->tqsetAlignment(TQt::AlignLeft);
+ else if(KviTQString::equalCI(szAlignment,"Right"))
+ ((KviTalMultiLineEdit *)widget())->tqsetAlignment(TQt::AlignRight);
+ else if(KviTQString::equalCI(szAlignment,"Center"))
+ ((KviTalMultiLineEdit *)widget())->tqsetAlignment(TQt::AlignCenter);
+ else if(KviTQString::equalCI(szAlignment,"Justify"))
+ ((KviTalMultiLineEdit *)widget())->tqsetAlignment(TQt::AlignJustify);
+ else c->warning(__tr2qs("Unknown tqalignment '%Q'"),&szAlignment);
return true;
}
bool KviKvsObject_mledit::functionsetAutoFormatting(KviKvsObjectFunctionCall *c)
{
- QString szAutoformatting;
+ TQString szAutoformatting;
KVSO_PARAMETERS_BEGIN(c)
KVSO_PARAMETER("autoformatting",KVS_PT_STRING,0,szAutoformatting)
KVSO_PARAMETERS_END(c)
if(!widget()) return true;
- if(KviQString::equalCI(szAutoformatting,"AutoNone"))
- ((KviTalMultiLineEdit *)widget())->setAutoFormatting(QTEXTEDIT_AUTO_NONE);
- else if(KviQString::equalCI(szAutoformatting,"BulletList"))
- ((KviTalMultiLineEdit *)widget())->setAutoFormatting(QTEXTEDIT_AUTO_BULLET_LIST);
- else if(KviQString::equalCI(szAutoformatting,"AutoAll"))
- ((KviTalMultiLineEdit *)widget())->setAutoFormatting(QTEXTEDIT_AUTO_ALL);
+ if(KviTQString::equalCI(szAutoformatting,"AutoNone"))
+ ((KviTalMultiLineEdit *)widget())->setAutoFormatting(TQTEXTEDIT_AUTO_NONE);
+ else if(KviTQString::equalCI(szAutoformatting,"BulletList"))
+ ((KviTalMultiLineEdit *)widget())->setAutoFormatting(TQTEXTEDIT_AUTO_BULLET_LIST);
+ else if(KviTQString::equalCI(szAutoformatting,"AutoAll"))
+ ((KviTalMultiLineEdit *)widget())->setAutoFormatting(TQTEXTEDIT_AUTO_ALL);
else c->warning(__tr2qs("Unknown auto formatting mode '%Q'"),&szAutoformatting);
return true;
}
@@ -1135,18 +1131,18 @@ bool KviKvsObject_mledit::functionsetAutoFormatting(KviKvsObjectFunctionCall *c)
bool KviKvsObject_mledit::functionsetVerticalAlignment(KviKvsObjectFunctionCall *c)
{
- QString szValignment;
+ TQString szVtqalignment;
KVSO_PARAMETERS_BEGIN(c)
- KVSO_PARAMETER("alignment",KVS_PT_STRING,0,szValignment)
+ KVSO_PARAMETER("tqalignment",KVS_PT_STRING,0,szVtqalignment)
KVSO_PARAMETERS_END(c)
if(!widget()) return true;
- if(KviQString::equalCI(szValignment,"Normal"))
+ if(KviTQString::equalCI(szVtqalignment,"Normal"))
((KviTalMultiLineEdit *)widget())->setVerticalAlignment(KviTalMultiLineEdit::AlignNormal);
- else if(KviQString::equalCI(szValignment,"SuperScript"))
+ else if(KviTQString::equalCI(szVtqalignment,"SuperScript"))
((KviTalMultiLineEdit *)widget())->setVerticalAlignment(KviTalMultiLineEdit::AlignSuperScript);
- else if(KviQString::equalCI(szValignment,"SubScript"))
+ else if(KviTQString::equalCI(szVtqalignment,"SubScript"))
((KviTalMultiLineEdit *)widget())->setVerticalAlignment(KviTalMultiLineEdit::AlignSubScript);
- else c->warning(__tr2qs("Unknown vertical alignment '%Q'"),&szValignment);
+ else c->warning(__tr2qs("Unknown vertical tqalignment '%Q'"),&szVtqalignment);
return true;
}
diff --git a/src/modules/objects/class_multilineedit.h b/src/modules/objects/class_multilineedit.h
index 8639266e..5f531ed8 100644
--- a/src/modules/objects/class_multilineedit.h
+++ b/src/modules/objects/class_multilineedit.h
@@ -32,10 +32,11 @@
class KviKvsObject_mledit : public KviKvsObject_widget
{
Q_OBJECT
+ TQ_OBJECT
public:
KVSO_DECLARE_OBJECT(KviKvsObject_mledit)
public:
- QWidget * widget() { return (QWidget *)object(); };
+ TQWidget * widget() { return (TQWidget *)object(); };
protected:
virtual bool init(KviKvsRunTimeContext * pContext,KviKvsVariantList *pParams);
bool functionTextLine(KviKvsObjectFunctionCall *c);
@@ -94,7 +95,7 @@ protected:
bool functionsetParagraphBackgroundColor(KviKvsObjectFunctionCall *c);
bool functionclearParagraphBackground(KviKvsObjectFunctionCall *c);
bool functionloadFile(KviKvsObjectFunctionCall *c);
- bool functionsetAlignment(KviKvsObjectFunctionCall *c);
+ bool functiontqsetAlignment(KviKvsObjectFunctionCall *c);
bool functionsetAutoFormatting(KviKvsObjectFunctionCall *c);
bool functionsetVerticalAlignment(KviKvsObjectFunctionCall *c);
bool functionsetWrapPolicy(KviKvsObjectFunctionCall *c);
diff --git a/src/modules/objects/class_painter.cpp b/src/modules/objects/class_painter.cpp
index b27a24a3..a9adda33 100644
--- a/src/modules/objects/class_painter.cpp
+++ b/src/modules/objects/class_painter.cpp
@@ -41,12 +41,12 @@
@type:
class
@short:
- This class provide a painter to paint line and shapes.
+ This class provide a painter to paint line and tqshapes.
@inherits:
[class]object[/class]
[class]widget[/class]
@description:
- With this class you can draw many graphics objects from simple lines to complex shapes like pies and chords.[br]
+ With this class you can draw many graphics objects from simple lines to complex tqshapes like pies and chords.[br]
It can also draw aligned text and pixmaps. Normally, it draws in a "natural" coordinate system, but it can also do view and world transformation.[br]
The class need to be implemented into a [classfnc]$paintEvent[/classfnc]();
@functions:
@@ -196,8 +196,8 @@
timerevent()[br]
{[br]
$$->%b = $(($$->%b + 1) & 15);[br]
- if ($$->%nextanim == 1) $$->$repaint(1);[br]
- $$->$repaint(0);[br]
+ if ($$->%nextanim == 1) $$->$tqrepaint(1);[br]
+ $$->$tqrepaint(0);[br]
}[br]
drawAnim()[br]
{[br]
@@ -311,19 +311,19 @@
[br]
privateimpl(%Btn,mousepressevent)[br]
{[br]
- if ($$->$parent->%nextanim==0) [br]
+ if ($$->$tqparent->%nextanim==0) [br]
{[br]
- $$->$parent->%nextanim=1[br]
+ $$->$tqparent->%nextanim=1[br]
$$->$settext(Prev)[br]
} [br]
else[br]
{[br]
- $$->$parent->%nextanim=0[br]
+ $$->$tqparent->%nextanim=0[br]
$$->$settext(Next)[br]
}[br]
}[br]
[br]
- %lay=$new(layout,%Hello)[br]
+ %lay=$new(tqlayout,%Hello)[br]
%lay->$addwidget(%Btn,4,0)[br]
%Hello->$setBackgroundColor("000000");[br]
%Hello->$setmaximumwidth(800)[br]
@@ -387,7 +387,7 @@ KVSO_END_REGISTERCLASS(KviKvsObject_painter)
KVSO_BEGIN_CONSTRUCTOR(KviKvsObject_painter,KviKvsObject)
- m_pPainter = new QPainter();
+ m_pPainter = new TQPainter();
m_pDeviceObject=0;
@@ -414,18 +414,18 @@ if(__pXOrArray->isArray())\
KviKvsVariant * pH = __pXOrArray->array()->at(3);\
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;\
}\
} else {\
if(c->params()->count() < 4)\
{\
- QString error=function+" requires either an array as first parameter or four integers";\
+ TQString error=function+" requires either an array as first parameter or four integers";\
c->error(__tr2qs(error));\
return false;\
}\
@@ -459,7 +459,7 @@ if(__pXOrArray->isArray())\
} else {\
if(c->params()->count() < 2)\
{\
- QString error=function+" requires either an array as first parameter or two integers";\
+ TQString error=function+" requires either an array as first parameter or two integers";\
c->error(__tr2qs(error));\
return false;\
}\
@@ -494,7 +494,7 @@ if(__pCol1OrArray->isArray())\
} else {\
if(c->params()->count() < 3)\
{\
- QString error=function+" requires either an array as first parameter or 3 integers";\
+ TQString error=function+" requires either an array as first parameter or 3 integers";\
c->error(__tr2qs(error));\
return false;\
}\
@@ -507,7 +507,7 @@ if(__pCol1OrArray->isArray())\
bool KviKvsObject_painter::functionSetFont(KviKvsObjectFunctionCall *c)
{
- QString szFamily,szStyle;
+ TQString szFamily,szStyle;
kvs_int_t uSize;
KVSO_PARAMETERS_BEGIN(c)
KVSO_PARAMETER("size",KVS_PT_UNSIGNEDINTEGER,0,uSize)
@@ -515,15 +515,15 @@ bool KviKvsObject_painter::functionSetFont(KviKvsObjectFunctionCall *c)
KVSO_PARAMETER("style",KVS_PT_STRING,0,szStyle)
KVSO_PARAMETERS_END(c)
if(!m_pPainter)return true;
- QFont font=m_pPainter->font();
+ TQFont font=m_pPainter->font();
font.setFamily(szFamily);
font.setPointSize(uSize);
- if(KviQString::equalCI(szStyle,"italic")) font.setItalic(TRUE);
- if(KviQString::equalCI(szStyle,"bold")) font.setBold(TRUE);
- if(KviQString::equalCI(szStyle,"underline"))font.setUnderline(TRUE);
- if(KviQString::equalCI(szStyle,"overline")) font.setOverline(TRUE);
- if(KviQString::equalCI(szStyle,"strikeout"))font.setStrikeOut(TRUE);
- if(KviQString::equalCI(szStyle,"fixedpitch")) font.setFixedPitch(TRUE);
+ if(KviTQString::equalCI(szStyle,"italic")) font.setItalic(TRUE);
+ if(KviTQString::equalCI(szStyle,"bold")) font.setBold(TRUE);
+ if(KviTQString::equalCI(szStyle,"underline"))font.setUnderline(TRUE);
+ if(KviTQString::equalCI(szStyle,"overline")) font.setOverline(TRUE);
+ if(KviTQString::equalCI(szStyle,"strikeout"))font.setStrikeOut(TRUE);
+ if(KviTQString::equalCI(szStyle,"fixedpitch")) font.setFixedPitch(TRUE);
m_pPainter->setFont(font);
return true;
}
@@ -534,20 +534,20 @@ bool KviKvsObject_painter::functionSetFontSize(KviKvsObjectFunctionCall *c)
KVSO_PARAMETER("size",KVS_PT_UNSIGNEDINTEGER,0,uSize)
KVSO_PARAMETERS_END(c)
if(!m_pPainter)return true;
- QFont font=m_pPainter->font();
+ TQFont font=m_pPainter->font();
font.setPointSize(uSize);
m_pPainter->setFont(font);
return true;
}
bool KviKvsObject_painter::functionsetBackGroundMode(KviKvsObjectFunctionCall *c)
{
- QString szMode;
+ TQString szMode;
KVSO_PARAMETERS_BEGIN(c)
KVSO_PARAMETER("background mode",KVS_PT_STRING,0,szMode)
KVSO_PARAMETERS_END(c)
if(!m_pPainter)return true;
- if(KviQString::equalCI(szMode,"Transparent")) m_pPainter->setBackgroundMode(Qt::TransparentMode);
- else if(KviQString::equalCI(szMode,"Opaque")) m_pPainter->setBackgroundMode(Qt::OpaqueMode);
+ if(KviTQString::equalCI(szMode,"Transparent")) m_pPainter->setBackgroundMode(Qt::TransparentMode);
+ else if(KviTQString::equalCI(szMode,"Opaque")) m_pPainter->setBackgroundMode(Qt::OpaqueMode);
else c->warning( __tr2qs("Unknown orientation"));
return true;
@@ -563,7 +563,7 @@ bool KviKvsObject_painter::functiondrawLine(KviKvsObjectFunctionCall *c)
KVSO_PARAMETER("w",KVS_PT_INT,KVS_PF_OPTIONAL,iW)
KVSO_PARAMETER("h",KVS_PT_INT,KVS_PF_OPTIONAL,iH)
KVSO_PARAMETERS_END(c)
- QString function="$drawLine";
+ TQString function="$drawLine";
KVSO_PARAMETERS_PAINTER(pXOrArray,iY,iW,iH)
if(m_pPainter) m_pPainter->drawLine(iX,iY,iW,iH);
return true;
@@ -578,7 +578,7 @@ bool KviKvsObject_painter::functiondrawRect(KviKvsObjectFunctionCall *c)
KVSO_PARAMETER("w",KVS_PT_INT,KVS_PF_OPTIONAL,iW)
KVSO_PARAMETER("h",KVS_PT_INT,KVS_PF_OPTIONAL,iH)
KVSO_PARAMETERS_END(c)
- QString function="$drawRect";
+ TQString function="$drawRect";
KVSO_PARAMETERS_PAINTER(pXOrArray,iY,iW,iH)
if(m_pPainter) m_pPainter->drawRect(iX,iY,iW,iH);
return true;
@@ -594,7 +594,7 @@ bool KviKvsObject_painter::functiondrawWinFocusRect(KviKvsObjectFunctionCall *c)
KVSO_PARAMETER("w",KVS_PT_INT,KVS_PF_OPTIONAL,iW)
KVSO_PARAMETER("h",KVS_PT_INT,KVS_PF_OPTIONAL,iH)
KVSO_PARAMETERS_END(c)
- QString function="$drawWinFocusRect";
+ TQString function="$drawWinFocusRect";
KVSO_PARAMETERS_PAINTER(pXOrArray,iY,iW,iH)
#ifndef COMPILE_USE_QT4
if(m_pPainter) m_pPainter->drawWinFocusRect(iX,iY,iW,iH);
@@ -611,7 +611,7 @@ bool KviKvsObject_painter::functiondrawEllipse(KviKvsObjectFunctionCall *c)
KVSO_PARAMETER("w",KVS_PT_INT,KVS_PF_OPTIONAL,iW)
KVSO_PARAMETER("h",KVS_PT_INT,KVS_PF_OPTIONAL,iH)
KVSO_PARAMETERS_END(c)
- QString function="$drawEllipse";
+ TQString function="$drawEllipse";
KVSO_PARAMETERS_PAINTER(pXOrArray,iY,iW,iH)
if(m_pPainter) m_pPainter->drawEllipse(iX,iY,iW,iH);
return true;
@@ -628,7 +628,7 @@ bool KviKvsObject_painter::functiondrawRoundRect(KviKvsObjectFunctionCall *c)
KVSO_PARAMETER("w",KVS_PT_INT,KVS_PF_OPTIONAL,iW)
KVSO_PARAMETER("h",KVS_PT_INT,KVS_PF_OPTIONAL,iH)
KVSO_PARAMETERS_END(c)
- QString function="$drawRoundRect";
+ TQString function="$drawRoundRect";
KVSO_PARAMETERS_PAINTER(pXOrArray,iY,iW,iH)
if(m_pPainter)
m_pPainter->drawRoundRect(iX,iY,iW,iH,iXrnd,iYrnd);
@@ -646,7 +646,7 @@ bool KviKvsObject_painter::functiondrawArc(KviKvsObjectFunctionCall *c)
KVSO_PARAMETER("w",KVS_PT_INT,KVS_PF_OPTIONAL,iW)
KVSO_PARAMETER("h",KVS_PT_INT,KVS_PF_OPTIONAL,iH)
KVSO_PARAMETERS_END(c)
- QString function="$drawArc";
+ TQString function="$drawArc";
KVSO_PARAMETERS_PAINTER(pXOrArray,iY,iW,iH)
if(m_pPainter)
m_pPainter->drawArc(iX,iY,iW,iH,iSangle,iLena);
@@ -664,7 +664,7 @@ bool KviKvsObject_painter::functiondrawChord(KviKvsObjectFunctionCall *c)
KVSO_PARAMETER("w",KVS_PT_INT,KVS_PF_OPTIONAL,iW)
KVSO_PARAMETER("h",KVS_PT_INT,KVS_PF_OPTIONAL,iH)
KVSO_PARAMETERS_END(c)
- QString function="$drawChord";
+ TQString function="$drawChord";
KVSO_PARAMETERS_PAINTER(pXOrArray,iY,iW,iH)
if(m_pPainter)
m_pPainter->drawChord(iX,iY,iW,iH,iSangle,iLena);
@@ -674,40 +674,40 @@ bool KviKvsObject_painter::functionsetBrush(KviKvsObjectFunctionCall *c)
{
KviKvsVariant * pCol1OrArray;
kvs_int_t iCol1,iCol2,iCol3;
- QString szColorMode;
+ TQString szColorMode;
KVSO_PARAMETERS_BEGIN(c)
KVSO_PARAMETER("Col1_or_array",KVS_PT_VARIANT,0,pCol1OrArray)
KVSO_PARAMETER("Color_2",KVS_PT_INT,KVS_PF_OPTIONAL,iCol2)
KVSO_PARAMETER("Colo3_3",KVS_PT_INT,KVS_PF_OPTIONAL,iCol3)
KVSO_PARAMETER("color_mode",KVS_PT_STRING,KVS_PF_OPTIONAL,szColorMode)
KVSO_PARAMETERS_END(c)
- QString function="$drawChord";
+ TQString function="$drawChord";
KVSO_3ARRAYPARAMETERS(pCol1OrArray,iCol2,iCol3)
if(!m_pPainter) return true;
- if(KviQString::equalCI(szColorMode, "HSV"))
- m_pPainter->setBrush(QColor(iCol1,iCol2,iCol3,QColor::Hsv));
+ if(KviTQString::equalCI(szColorMode, "HSV"))
+ m_pPainter->setBrush(TQColor(iCol1,iCol2,iCol3,TQColor::Hsv));
else
- m_pPainter->setBrush(QColor(iCol1,iCol2,iCol3,QColor::Rgb));
+ m_pPainter->setBrush(TQColor(iCol1,iCol2,iCol3,TQColor::Rgb));
return true;
}
bool KviKvsObject_painter::functionsetPen(KviKvsObjectFunctionCall *c)
{
KviKvsVariant * pCol1OrArray;
kvs_int_t iCol1,iCol2,iCol3;
- QString szColorMode;
+ TQString szColorMode;
KVSO_PARAMETERS_BEGIN(c)
KVSO_PARAMETER("Col1_or_array",KVS_PT_VARIANT,0,pCol1OrArray)
KVSO_PARAMETER("Color_2",KVS_PT_INT,KVS_PF_OPTIONAL,iCol2)
KVSO_PARAMETER("Colo3_3",KVS_PT_INT,KVS_PF_OPTIONAL,iCol3)
KVSO_PARAMETER("color_mode",KVS_PT_STRING,KVS_PF_OPTIONAL,szColorMode)
KVSO_PARAMETERS_END(c)
- QString function="$setPen";
+ TQString function="$setPen";
KVSO_3ARRAYPARAMETERS(pCol1OrArray,iCol2,iCol3)
if(!m_pPainter) return true;
- if(KviQString::equalCI(szColorMode, "HSV"))
- m_pPainter->setPen(QColor(iCol1,iCol2,iCol3,QColor::Hsv));
+ if(KviTQString::equalCI(szColorMode, "HSV"))
+ m_pPainter->setPen(TQColor(iCol1,iCol2,iCol3,TQColor::Hsv));
else
- m_pPainter->setPen(QColor(iCol1,iCol2,iCol3,QColor::Rgb));
+ m_pPainter->setPen(TQColor(iCol1,iCol2,iCol3,TQColor::Rgb));
return true;
}
@@ -723,7 +723,7 @@ bool KviKvsObject_painter::functiondrawPie(KviKvsObjectFunctionCall *c)
KVSO_PARAMETER("w",KVS_PT_INT,KVS_PF_OPTIONAL,iW)
KVSO_PARAMETER("h",KVS_PT_INT,KVS_PF_OPTIONAL,iH)
KVSO_PARAMETERS_END(c)
- QString function="$drawPie";
+ TQString function="$drawPie";
KVSO_PARAMETERS_PAINTER(pXOrArray,iY,iW,iH)
if(m_pPainter)
m_pPainter->drawPie(iX,iY,iW,iH,iSangle,iLena);
@@ -737,7 +737,7 @@ bool KviKvsObject_painter::functiondrawPoint(KviKvsObjectFunctionCall *c)
KVSO_PARAMETER("x_or_array",KVS_PT_VARIANT,0,pXOrArray)
KVSO_PARAMETER("y",KVS_PT_INT,KVS_PF_OPTIONAL,iY)
KVSO_PARAMETERS_END(c)
- QString function="$drawPoint";
+ TQString function="$drawPoint";
KVSO_2ARRAYPARAMETERS(pXOrArray,iY)
if(m_pPainter)
m_pPainter->drawPoint(iX,iY);
@@ -760,7 +760,7 @@ bool KviKvsObject_painter::functionfontAscent(KviKvsObjectFunctionCall * c)
bool KviKvsObject_painter::functionfontMetricsWidth(KviKvsObjectFunctionCall * c)
{
- QString szText;
+ TQString szText;
KVSO_PARAMETERS_BEGIN(c)
KVSO_PARAMETER("text",KVS_PT_STRING,0,szText)
KVSO_PARAMETERS_END(c)
@@ -790,9 +790,9 @@ bool KviKvsObject_painter::functionbegin(KviKvsObjectFunctionCall *c)
return true;
}
- QPaintDevice * pd = 0;
- if(pObject->inherits("KviKvsObject_pixmap"))pd =((KviKvsObject_pixmap *)pObject)->getPixmap();
- else if (pObject->inherits("KviKvsObject_widget")) pd=((KviKvsObject_widget *)pObject)->widget();
+ TQPaintDevice * pd = 0;
+ if(pObject->inherits("KviKvsObject_pixmap"))pd =TQT_TQPAINTDEVICE(((KviKvsObject_pixmap *)pObject)->getPixmap());
+ else if (pObject->inherits("KviKvsObject_widget")) pd=TQT_TQPAINTDEVICE(((KviKvsObject_widget *)pObject)->widget());
if (!pd)
c->warning(__tr2qs("Widget or Pixmap required "));
@@ -803,16 +803,16 @@ bool KviKvsObject_painter::functionbegin(KviKvsObjectFunctionCall *c)
}
return true;
}
-void KviKvsObject_painter::attachDevice(KviKvsObject * o,QPaintDevice * p)
+void KviKvsObject_painter::attachDevice(KviKvsObject * o,TQPaintDevice * p)
{
if(!m_pPainter)return;
if(m_pDeviceObject)detachDevice();
m_pDeviceObject = o;
// KviKvsObject_pixmap and KviKvsObject_widget object have this signal
- // it is emitted BEFORE the real QPaintDevice is deleted, so we can eventually
+ // it is emitted BEFORE the real TQPaintDevice is deleted, so we can eventually
// call m_pPainter->end() in time
- QObject::connect(m_pDeviceObject,SIGNAL(aboutToDie()),this,SLOT(detachDevice()));
+ TQObject::connect(m_pDeviceObject,TQT_SIGNAL(aboutToDie()),this,TQT_SLOT(detachDevice()));
m_pPainter->begin(p);
}
@@ -820,7 +820,7 @@ void KviKvsObject_painter::detachDevice()
{
if(!m_pDeviceObject)return;
if(!m_pPainter)return;
- disconnect(m_pDeviceObject,SIGNAL(aboutToDie()),this,SLOT(detachDevice()));
+ disconnect(m_pDeviceObject,TQT_SIGNAL(aboutToDie()),this,TQT_SLOT(detachDevice()));
m_pPainter->end();
m_pDeviceObject = 0;
}
@@ -833,7 +833,7 @@ bool KviKvsObject_painter::functionend(KviKvsObjectFunctionCall *c)
bool KviKvsObject_painter::functiondrawText(KviKvsObjectFunctionCall *c)
{
- QString szText,szMode;
+ TQString szText,szMode;
kvs_int_t iX,iY,iLen;
KVSO_PARAMETERS_BEGIN(c)
KVSO_PARAMETER("x",KVS_PT_INT,0,iX)
@@ -845,8 +845,8 @@ bool KviKvsObject_painter::functiondrawText(KviKvsObjectFunctionCall *c)
if(!m_pPainter)return true;
#ifdef COMPILE_USE_QT4
if (!szMode.isEmpty()){
- if(KviQString::equalCI(szMode,"RTL"))m_pPainter->setLayoutDirection(Qt::RightToLeft);
- else if(KviQString::equalCI(szMode,"LTR"))m_pPainter->setLayoutDirection(Qt::LeftToRight);
+ if(KviTQString::equalCI(szMode,"RTL"))m_pPainter->setLayoutDirection(TQt::RightToLeft);
+ else if(KviTQString::equalCI(szMode,"LTR"))m_pPainter->setLayoutDirection(TQt::LeftToRight);
else
{
c->warning(__tr2qs("Invalid mode '%Q'"),&szMode);
@@ -856,9 +856,9 @@ bool KviKvsObject_painter::functiondrawText(KviKvsObjectFunctionCall *c)
m_pPainter->drawText(iX,iY,szText);
#else
- if(KviQString::equalCI(szMode,"Auto")) m_pPainter->drawText(iX,iY,szText,iLen,QPainter::Auto);
- else if(KviQString::equalCI(szMode,"RTL")) m_pPainter->drawText(iX,iY,szText,iLen,QPainter::RTL);
- else if(KviQString::equalCI(szMode,"LTR"))m_pPainter->drawText(iX,iY,szText,iLen,QPainter::LTR);
+ if(KviTQString::equalCI(szMode,"Auto")) m_pPainter->drawText(iX,iY,szText,iLen,TQPainter::Auto);
+ else if(KviTQString::equalCI(szMode,"RTL")) m_pPainter->drawText(iX,iY,szText,iLen,TQPainter::RTL);
+ else if(KviTQString::equalCI(szMode,"LTR"))m_pPainter->drawText(iX,iY,szText,iLen,TQPainter::LTR);
else c->warning(__tr2qs("Invalid mode '%Q'"),&szMode);
#endif
@@ -891,7 +891,7 @@ bool KviKvsObject_painter::functiondrawPixmap(KviKvsObjectFunctionCall *c)
c->warning(__tr2qs("Pixmap object required"));
return true;
}
- QPixmap * pm=((KviKvsObject_pixmap *)obj)->getPixmap();
+ TQPixmap * pm=((KviKvsObject_pixmap *)obj)->getPixmap();
m_pPainter->drawPixmap(iX,iY,*((KviKvsObject_pixmap *)obj)->getPixmap(),iStartx,iStarty,iEndx,iEndy);
return true;
}
@@ -915,7 +915,7 @@ bool KviKvsObject_painter::functiontranslateMatrix(KviKvsObjectFunctionCall *c)
KVSO_PARAMETER("trasl_y",KVS_PT_DOUBLE,0,dYtrasl)
KVSO_PARAMETERS_END(c)
if(!m_pPainter)return true;
- QWMatrix tmpMatrix;
+ TQWMatrix tmpMatrix;
tmpMatrix.translate(dXtrasl,dYtrasl);
tmpMatrix = m_pMatrix * tmpMatrix;
m_pPainter->setWorldMatrix( tmpMatrix );
@@ -975,7 +975,7 @@ bool KviKvsObject_painter::functionsetTextAntialiasing(KviKvsObjectFunctionCall
KVSO_PARAMETERS_BEGIN(c)
KVSO_PARAMETER("bEnabled",KVS_PT_BOOL,0,bEnabled)
KVSO_PARAMETERS_END(c)
- m_pPainter->setRenderHint(QPainter::TextAntialiasing,bEnabled);
+ m_pPainter->setRenderHint(TQPainter::TextAntialiasing,bEnabled);
return true;
}
bool KviKvsObject_painter::functionsetAntialiasing(KviKvsObjectFunctionCall *c)
@@ -986,7 +986,7 @@ bool KviKvsObject_painter::functionsetAntialiasing(KviKvsObjectFunctionCall *c)
KVSO_PARAMETERS_BEGIN(c)
KVSO_PARAMETER("bEnabled",KVS_PT_BOOL,0,bEnabled)
KVSO_PARAMETERS_END(c)
- m_pPainter->setRenderHint(QPainter::Antialiasing,bEnabled);
+ m_pPainter->setRenderHint(TQPainter::Antialiasing,bEnabled);
return true;
}
bool KviKvsObject_painter::functionsetSmoothPixmapTransform(KviKvsObjectFunctionCall *c)
@@ -997,7 +997,7 @@ bool KviKvsObject_painter::functionsetSmoothPixmapTransform(KviKvsObjectFunction
KVSO_PARAMETERS_BEGIN(c)
KVSO_PARAMETER("bEnabled",KVS_PT_BOOL,0,bEnabled)
KVSO_PARAMETERS_END(c)
- m_pPainter->setRenderHint(QPainter::SmoothPixmapTransform,bEnabled);
+ m_pPainter->setRenderHint(TQPainter::SmoothPixmapTransform,bEnabled);
return true;
}
#endif
diff --git a/src/modules/objects/class_painter.h b/src/modules/objects/class_painter.h
index 2ee8a5bb..fd32f9c5 100644
--- a/src/modules/objects/class_painter.h
+++ b/src/modules/objects/class_painter.h
@@ -23,8 +23,8 @@
//
-#include <qpainter.h>
-#include <qpaintdevice.h>
+#include <tqpainter.h>
+#include <tqpaintdevice.h>
#include "kvi_string.h"
@@ -34,11 +34,12 @@
class KviKvsObject_painter : public KviKvsObject
{
Q_OBJECT
+ TQ_OBJECT
public:
KVSO_DECLARE_OBJECT(KviKvsObject_painter)
protected:
- QPainter * m_pPainter;
- QWMatrix m_pMatrix;
+ TQPainter * m_pPainter;
+ TQWMatrix m_pMatrix;
public:
bool functionSetFont(KviKvsObjectFunctionCall *c);
bool functionSetFontSize(KviKvsObjectFunctionCall *c);
@@ -84,7 +85,7 @@ public:
protected:
- void attachDevice(KviKvsObject * o,QPaintDevice * p);
+ void attachDevice(KviKvsObject * o,TQPaintDevice * p);
protected slots:
void detachDevice();
private:
diff --git a/src/modules/objects/class_pixmap.cpp b/src/modules/objects/class_pixmap.cpp
index 48aeb1e8..30018f8a 100644
--- a/src/modules/objects/class_pixmap.cpp
+++ b/src/modules/objects/class_pixmap.cpp
@@ -25,7 +25,7 @@
#include "kvi_debug.h"
#include "kvi_locale.h"
-#include <qfile.h>
+#include <tqfile.h>
/*
@doc: pixmap
@@ -77,8 +77,8 @@ KVSO_END_REGISTERCLASS(KviKvsObject_pixmap)
KVSO_BEGIN_CONSTRUCTOR(KviKvsObject_pixmap,KviKvsObject)
- m_pPixmap=new QPixmap();
- m_pImage=new QImage();
+ m_pPixmap=new TQPixmap();
+ m_pImage=new TQImage();
bPixmapModified=false;
bImageModified=false;
KVSO_END_CONSTRUCTOR(KviKvsObject_pixmap)
@@ -116,7 +116,7 @@ bool KviKvsObject_pixmap::functionfill(KviKvsObjectFunctionCall *c)
return true;
}
bPixmapModified=true;
- m_pPixmap->fill(((QWidget *)(ob->object())),iXoffset,iYoffset);
+ m_pPixmap->fill(((TQWidget *)(ob->object())),iXoffset,iYoffset);
return true;
}
@@ -130,7 +130,7 @@ bool KviKvsObject_pixmap::functionscale(KviKvsObjectFunctionCall *c)
#ifdef COMPILE_USE_QT4
*m_pPixmap = m_pPixmap->scaled((m_pPixmap->width() * uScaleX), (m_pPixmap->height() * uScaleX));
#else
- QWMatrix wm;
+ TQWMatrix wm;
wm.scale(uScaleX, uScaleY);
*m_pPixmap = m_pPixmap->xForm(wm);
#endif
@@ -145,11 +145,11 @@ bool KviKvsObject_pixmap::functionrotate(KviKvsObjectFunctionCall *c)
KVSO_PARAMETER("a",KVS_PT_REAL,0,uDegrees)
KVSO_PARAMETERS_END(c)
#ifdef COMPILE_USE_QT4
- QMatrix m;
+ TQMatrix m;
m.rotate(uDegrees);
*m_pPixmap = m_pPixmap->transformed(m);
#else
- QWMatrix wm;
+ TQWMatrix wm;
wm.rotate(uDegrees);
*m_pPixmap = m_pPixmap->xForm(wm);
#endif
@@ -172,12 +172,12 @@ bool KviKvsObject_pixmap::functionresize(KviKvsObjectFunctionCall *c)
bool KviKvsObject_pixmap::functionload(KviKvsObjectFunctionCall *c)
{
- QString szFile;
+ TQString szFile;
KVSO_PARAMETERS_BEGIN(c)
KVSO_PARAMETER("file",KVS_PT_STRING,0,szFile)
KVSO_PARAMETERS_END(c)
- if(!QFile::exists(szFile))
+ if(!TQFile::exists(szFile))
{
c->warning(__tr2qs("I can't find the specified file %Q."),&szFile);
return true;
@@ -228,7 +228,7 @@ bool KviKvsObject_pixmap::functionsetOpacity(KviKvsObjectFunctionCall *c)
c->warning(__tr2qs("Destination must be a pixmap object"));
return true;
}
- QImage *buffer=((KviKvsObject_pixmap *)pObDest)->getImage();
+ TQImage *buffer=((KviKvsObject_pixmap *)pObDest)->getImage();
((KviKvsObject_pixmap *)pObDest)->imageChanged();
if (bPixmapModified) {
*m_pImage=m_pPixmap->convertToImage();
@@ -273,18 +273,18 @@ if(uXoffset+uWidth>m_pImage->width())
for(int y = uYoffset;y<iHedge;y++)
{
- QRgb * dst = (QRgb *)buffer->scanLine(y);
- QRgb * src = (QRgb *)m_pImage->scanLine(y);
+ TQRgb * dst = (TQRgb *)buffer->scanLine(y);
+ TQRgb * src = (TQRgb *)m_pImage->scanLine(y);
src += uXoffset;
- QRgb * end;
+ TQRgb * end;
end = src + iWedge;
while(src < end)
{
- *dst = qRgba(
- (int)(qRed(*src)),
- (int)(qGreen(*src)),
- (int)(qBlue(*src)),
- (int)(qAlpha(*src)*dOpacity)
+ *dst = tqRgba(
+ (int)(tqRed(*src)),
+ (int)(tqGreen(*src)),
+ (int)(tqBlue(*src)),
+ (int)(tqAlpha(*src)*dOpacity)
);
src++;
dst++;
@@ -294,7 +294,7 @@ if(uXoffset+uWidth>m_pImage->width())
}
-QPixmap * KviKvsObject_pixmap::getPixmap()
+TQPixmap * KviKvsObject_pixmap::getPixmap()
{
if (bImageModified) {
m_pPixmap->convertFromImage(*m_pImage);
@@ -302,7 +302,7 @@ QPixmap * KviKvsObject_pixmap::getPixmap()
}
return m_pPixmap;
}
-QImage * KviKvsObject_pixmap::getImage()
+TQImage * KviKvsObject_pixmap::getImage()
{
if (bPixmapModified) {
*m_pImage=m_pPixmap->convertToImage();
diff --git a/src/modules/objects/class_pixmap.h b/src/modules/objects/class_pixmap.h
index 22d1b95d..8b6ba37d 100644
--- a/src/modules/objects/class_pixmap.h
+++ b/src/modules/objects/class_pixmap.h
@@ -24,12 +24,12 @@
-#include <qpixmap.h>
-#include <qimage.h>
+#include <tqpixmap.h>
+#include <tqimage.h>
#ifdef COMPILE_USE_QT4
- #include <QMatrix>
+ #include <TQMatrix>
#else
- #include <qwmatrix.h>
+ #include <tqwmatrix.h>
#endif
#include "kvi_string.h"
@@ -40,18 +40,19 @@
class KviKvsObject_pixmap : public KviKvsObject
{
Q_OBJECT
-// Q_PROPERTY(QPixmap pixmap READ getPixmap)
+ TQ_OBJECT
+// TQ_PROPERTY(TQPixmap pixmap READ getPixmap)
public:
KVSO_DECLARE_OBJECT(KviKvsObject_pixmap);
- QPixmap * getPixmap();
- QImage * getImage();
+ TQPixmap * getPixmap();
+ TQImage * getImage();
void pixmapChanged(){bPixmapModified=true;}
void imageChanged(){bImageModified=true;}
- QPixmap * pixmap(){ return m_pPixmap; }
+ TQPixmap * pixmap(){ return m_pPixmap; }
protected:
- QPixmap * m_pPixmap;
- QImage * m_pImage;
+ TQPixmap * m_pPixmap;
+ TQImage * m_pImage;
bool bImageModified;
bool bPixmapModified;
signals:
diff --git a/src/modules/objects/class_popupmenu.cpp b/src/modules/objects/class_popupmenu.cpp
index a3db5339..17bf5c0c 100644
--- a/src/modules/objects/class_popupmenu.cpp
+++ b/src/modules/objects/class_popupmenu.cpp
@@ -89,7 +89,7 @@
{[br]
#Geometry of the widget and setting-up of popupmenu [br]
$$->$setGeometry(%X,%Y,100,100)[br]
- $$->%lay=$new(layout,$$)[br]
+ $$->%lay=$new(tqlayout,$$)[br]
#Here we generate a cicle to create our labels inside the widget.[br]
%i=0[br]
while (%i<10)[br]
@@ -110,7 +110,7 @@
#we create the label widget wich will be used as popup's title[br]
$$->%Popuptitle=$new(label)[br]
$$->%Popuptitle->$settext(<B><U>"Windows Options"</B></U>)[br]
- $$->%Popuptitle->$setAlignment(Center)[br]
+ $$->%Popuptitle->$tqsetAlignment(Center)[br]
#and we add it.[br]
%A=$$->%Popuptitle[br]
$$->%Popupmenu->$insertwidget(%A)[br]
@@ -184,21 +184,21 @@ KVSO_END_CONSTRUCTOR(KviKvsObject_popupmenu)
bool KviKvsObject_popupmenu::init(KviKvsRunTimeContext * pContext,KviKvsVariantList *pParams)
{
- setObject(new KviTalPopupMenu(parentScriptWidget(), name()), true);
- connect(widget(),SIGNAL(activated(int)),this,SLOT(slotactivated(int)));
- connect(widget(),SIGNAL(highlighted(int)),this,SLOT(slothighlighted(int)));
+ setObject(TQT_TQOBJECT(new KviTalPopupMenu(tqparentScriptWidget(), name())), true);
+ connect(widget(),TQT_SIGNAL(activated(int)),this,TQT_SLOT(slotactivated(int)));
+ connect(widget(),TQT_SIGNAL(highlighted(int)),this,TQT_SLOT(slothighlighted(int)));
return true;
}
bool KviKvsObject_popupmenu::functioninsertItem(KviKvsObjectFunctionCall *c)
{
- QString szItem,szIcon;
+ TQString szItem,szIcon;
KVSO_PARAMETERS_BEGIN(c)
KVSO_PARAMETER("text",KVS_PT_STRING,0,szItem)
KVSO_PARAMETER("icon_id",KVS_PT_STRING,KVS_PF_OPTIONAL,szIcon)
KVSO_PARAMETERS_END(c)
if(!widget())return true;
- QPixmap *pix = 0;
+ TQPixmap *pix = 0;
int id=0;
if(!szIcon.isEmpty())
{
@@ -241,7 +241,7 @@ bool KviKvsObject_popupmenu::functioninsertWidget(KviKvsObjectFunctionCall *c)
bool KviKvsObject_popupmenu::functioninsertHandle(KviKvsObjectFunctionCall *c)
{
KviKvsObject *ob;
- QString szLabel,szIcon;
+ TQString szLabel,szIcon;
kvs_hobject_t hObject;
KVSO_PARAMETERS_BEGIN(c)
KVSO_PARAMETER("text_label",KVS_PT_STRING,0,szLabel)
@@ -255,7 +255,7 @@ bool KviKvsObject_popupmenu::functioninsertHandle(KviKvsObjectFunctionCall *c)
return TRUE;
}
if(!widget())return true;
- QPixmap *pix = 0;
+ TQPixmap *pix = 0;
int id=0;
if(!szIcon.isEmpty())
{
@@ -273,13 +273,13 @@ bool KviKvsObject_popupmenu::functionexec(KviKvsObjectFunctionCall *c)
{
if(!c->params()->count())
{
- ((KviTalPopupMenu *)widget())->exec(QCursor::pos());
+ ((KviTalPopupMenu *)widget())->exec(TQCursor::pos());
return true;
}
KviKvsObject *pObject;
kvs_uint_t iX,iY;
- QString szLabel,szIcon;
+ TQString szLabel,szIcon;
kvs_hobject_t hObject;
KVSO_PARAMETERS_BEGIN(c)
KVSO_PARAMETER("widget",KVS_PT_HOBJECT,0,hObject)
@@ -303,7 +303,7 @@ bool KviKvsObject_popupmenu::functionexec(KviKvsObjectFunctionCall *c)
return true;
}
- ((KviTalPopupMenu *)widget())->exec(((QWidget *)(pObject->object()))->mapToGlobal(QPoint(iX,iY)) );
+ ((KviTalPopupMenu *)widget())->exec(((TQWidget *)(pObject->object()))->mapToGlobal(TQPoint(iX,iY)) );
return true;
}
diff --git a/src/modules/objects/class_popupmenu.h b/src/modules/objects/class_popupmenu.h
index e5960119..f106b4de 100644
--- a/src/modules/objects/class_popupmenu.h
+++ b/src/modules/objects/class_popupmenu.h
@@ -25,17 +25,18 @@
#include "kvi_tal_popupmenu.h"
-#include <qcursor.h>
+#include <tqcursor.h>
#include "class_widget.h"
#include "object_macros.h"
class KviKvsObject_popupmenu : public KviKvsObject_widget
{
Q_OBJECT
+ TQ_OBJECT
public:
KVSO_DECLARE_OBJECT(KviKvsObject_popupmenu)
public:
- QWidget * widget() { return (QWidget *)object(); };
+ TQWidget * widget() { return (TQWidget *)object(); };
protected:
virtual bool init(KviKvsRunTimeContext * pContext,KviKvsVariantList *pParams);
diff --git a/src/modules/objects/class_process.cpp b/src/modules/objects/class_process.cpp
index 81efaae4..16ed7a42 100644
--- a/src/modules/objects/class_process.cpp
+++ b/src/modules/objects/class_process.cpp
@@ -25,11 +25,11 @@
#include "kvi_debug.h"
#include "kvi_settings.h"
#include "kvi_locale.h"
-#include <qtimer.h>
+#include <tqtimer.h>
#ifdef COMPILE_USE_QT4
-#include <q3process.h>
+#include <tq3process.h>
#else
-#include <qprocess.h>
+#include <tqprocess.h>
#endif
/*
@@ -82,7 +82,7 @@
%tt=$new(test)[br]
%A=$new(widget)[br]
%A->$setGeometry(100,100,400,300)[br]
- %layoutA=$new(layout,%A)[br]
+ %tqlayoutA=$new(tqlayout,%A)[br]
%Ainput=$new(lineedit,%A)[br]
#%Aoutput=$new(textedit,%A)// coming soon in the new texteditor class[br]
%Aoutput=$new(label,%A)[br]
@@ -92,11 +92,11 @@
%bkill->$settext("&Kill ")[br]
%bterminate=$new(button,%A)[br]
%bterminate->$settext("&Ask to Terminate ")[br]
- %layoutA->$addwidget(%Ainput,0,0)[br]
- %layoutA->$addwidget(%Aoutput,1,0)[br]
- %layoutA->$addwidget(%bclosekill,3,0)[br]
- %layoutA->$addwidget(%bkill,4,0,)[br]
- %layoutA->$addwidget(%bterminate,5,0)[br]
+ %tqlayoutA->$addwidget(%Ainput,0,0)[br]
+ %tqlayoutA->$addwidget(%Aoutput,1,0)[br]
+ %tqlayoutA->$addwidget(%bclosekill,3,0)[br]
+ %tqlayoutA->$addwidget(%bkill,4,0,)[br]
+ %tqlayoutA->$addwidget(%bterminate,5,0)[br]
%Process=$new(process)[br]
%Process->$addArg("cmd.exe")[br]
@@ -187,10 +187,10 @@ KVSO_BEGIN_CONSTRUCTOR(KviKvsObject_process,KviKvsObject)
#ifdef COMPILE_USE_QT4
m_pProcess = new Q3Process();
#else
- m_pProcess = new QProcess();
+ m_pProcess = new TQProcess();
#endif
- connect(m_pProcess,SIGNAL(readyReadStdout()),this,SLOT(slotReadStdout()));
- connect(m_pProcess,SIGNAL(readyReadStderr()),this,SLOT(slotReadStderr()));
+ connect(m_pProcess,TQT_SIGNAL(readyReadStdout()),this,TQT_SLOT(slotReadStdout()));
+ connect(m_pProcess,TQT_SIGNAL(readyReadStderr()),this,TQT_SLOT(slotReadStderr()));
KVSO_END_CONSTRUCTOR(KviKvsObject_process)
@@ -205,7 +205,7 @@ KVSO_END_CONSTRUCTOR(KviKvsObject_process)
bool KviKvsObject_process::functionaddArgument(KviKvsObjectFunctionCall *c)
{
- QString szArgument;
+ TQString szArgument;
KVSO_PARAMETERS_BEGIN(c)
KVSO_PARAMETER("argument",KVS_PT_NONEMPTYSTRING,0,szArgument)
KVSO_PARAMETERS_END(c)
@@ -224,7 +224,7 @@ bool KviKvsObject_process::functionstartProcess(KviKvsObjectFunctionCall *c)
//-->Read the standard output.
bool KviKvsObject_process::functionreadStderr(KviKvsObjectFunctionCall *c)
{
- QString ng_Process =m_pProcess->readStderr();
+ TQString ng_Process =m_pProcess->readStderr();
c->returnValue()->setString(ng_Process);
return true;
}
@@ -232,7 +232,7 @@ bool KviKvsObject_process::functionreadStderr(KviKvsObjectFunctionCall *c)
//-->Read the standard error.
bool KviKvsObject_process::functionreadStdout(KviKvsObjectFunctionCall *c)
{
- QString ng_Process =m_pProcess->readStdout();
+ TQString ng_Process =m_pProcess->readStdout();
c->returnValue()->setString(ng_Process);
return true;
}
@@ -255,7 +255,7 @@ bool KviKvsObject_process::functionreadyReadStderrEvent(KviKvsObjectFunctionCall
bool KviKvsObject_process::functionwriteToStdin(KviKvsObjectFunctionCall *c)
{
- QString szCommand;
+ TQString szCommand;
KVSO_PARAMETERS_BEGIN(c)
KVSO_PARAMETER("command",KVS_PT_STRING,0,szCommand)
KVSO_PARAMETERS_END(c)
@@ -269,7 +269,7 @@ bool KviKvsObject_process::functionclosekill(KviKvsObjectFunctionCall *c)
//I try to to terminate the process the nice way....
m_pProcess->tryTerminate();
//If the process is still running after 5 seconds, I'll terminate the process in the hard way.
- QTimer::singleShot( 5000, m_pProcess, SLOT( kill() ) );
+ TQTimer::singleShot( 5000, m_pProcess, TQT_SLOT( kill() ) );
return true;
}
bool KviKvsObject_process::functionkill(KviKvsObjectFunctionCall *c)
diff --git a/src/modules/objects/class_process.h b/src/modules/objects/class_process.h
index 70842950..bbe81e98 100644
--- a/src/modules/objects/class_process.h
+++ b/src/modules/objects/class_process.h
@@ -23,21 +23,22 @@
// Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#include <qtimer.h>
+#include <tqtimer.h>
#include "class_widget.h"
#include "object_macros.h"
#ifdef COMPILE_USE_QT4
-#include <q3process.h>
+#include <tq3process.h>
#else
-#include <qprocess.h>
+#include <tqprocess.h>
#endif
class KviKvsObject_process : public KviKvsObject
{
Q_OBJECT
+ TQ_OBJECT
public:
KVSO_DECLARE_OBJECT(KviKvsObject_process)
protected:
@@ -45,7 +46,7 @@ protected:
#ifdef COMPILE_USE_QT4
Q3Process * m_pProcess;
#else
- QProcess * m_pProcess;
+ TQProcess * m_pProcess;
#endif
public:
diff --git a/src/modules/objects/class_progressbar.cpp b/src/modules/objects/class_progressbar.cpp
index 12fc5b39..b75c144d 100644
--- a/src/modules/objects/class_progressbar.cpp
+++ b/src/modules/objects/class_progressbar.cpp
@@ -28,11 +28,11 @@
#include "kvi_locale.h"
#include "kvi_iconmanager.h"
#ifdef COMPILE_USE_QT4
-#include <q3progressbar.h>
+#include <tq3progressbar.h>
#define KVI_PROGRESS_BAR Q3ProgressBar
#else
-#include <qprogressbar.h>
-#define KVI_PROGRESS_BAR QProgressBar
+#include <tqprogressbar.h>
+#define KVI_PROGRESS_BAR TQProgressBar
#endif
/*
@@ -96,11 +96,11 @@ KVSO_END_CONSTRUCTOR(KviKvsObject_progressbar)
bool KviKvsObject_progressbar::init(KviKvsRunTimeContext * pContext,KviKvsVariantList *pParams)
{
#ifdef COMPILE_USE_QT4
- Q3ProgressBar *pbar=new Q3ProgressBar(parentScriptWidget());
+ Q3ProgressBar *pbar=new Q3ProgressBar(tqparentScriptWidget());
pbar->setObjectName(name());
setObject(pbar,true);
#else
- setObject(new QProgressBar(parentScriptWidget(), name()), true);
+ setObject(TQT_TQOBJECT(new TQProgressBar(tqparentScriptWidget(), name())), true);
#endif
return true;
}
diff --git a/src/modules/objects/class_progressbar.h b/src/modules/objects/class_progressbar.h
index 44c4eac8..09c5a116 100644
--- a/src/modules/objects/class_progressbar.h
+++ b/src/modules/objects/class_progressbar.h
@@ -24,7 +24,7 @@
// Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
//
-//#include <qprogressbar.h>
+//#include <tqprogressbar.h>
#include "class_widget.h"
#include "object_macros.h"
@@ -33,7 +33,7 @@ class KviKvsObject_progressbar : public KviKvsObject_widget
public:
KVSO_DECLARE_OBJECT(KviKvsObject_progressbar)
public:
- QWidget * widget() { return (QWidget *)object(); };
+ TQWidget * widget() { return (TQWidget *)object(); };
protected:
virtual bool init(KviKvsRunTimeContext * pContext,KviKvsVariantList *pParams);
diff --git a/src/modules/objects/class_radiobutton.cpp b/src/modules/objects/class_radiobutton.cpp
index 08211e12..75a20f52 100644
--- a/src/modules/objects/class_radiobutton.cpp
+++ b/src/modules/objects/class_radiobutton.cpp
@@ -82,23 +82,23 @@ KVSO_END_CONSTRUCTOR(KviKvsObject_radiobutton)
bool KviKvsObject_radiobutton::init(KviKvsRunTimeContext * pContext,KviKvsVariantList *pParams)
{
- setObject(new QRadioButton(parentScriptWidget(),name()),true);
- connect(widget(),SIGNAL(toggled(bool)),this,SLOT(toggled(bool)));
+ setObject(TQT_TQOBJECT(new TQRadioButton(tqparentScriptWidget(),name())),true);
+ connect(widget(),TQT_SIGNAL(toggled(bool)),this,TQT_SLOT(toggled(bool)));
return true;
}
bool KviKvsObject_radiobutton::functionSetText(KviKvsObjectFunctionCall *c)
{
- QString szText;
+ TQString szText;
KVSO_PARAMETERS_BEGIN(c)
KVSO_PARAMETER("text",KVS_PT_STRING,0,szText)
KVSO_PARAMETERS_END(c)
if (widget())
- ((QRadioButton *)widget())->setText(szText);
+ ((TQRadioButton *)widget())->setText(szText);
return true;
}
bool KviKvsObject_radiobutton::functionIsChecked(KviKvsObjectFunctionCall *c)
{
- if(widget()) c->returnValue()->setBoolean(((QRadioButton *)widget())->isChecked());
+ if(widget()) c->returnValue()->setBoolean(((TQRadioButton *)widget())->isChecked());
return true;
}
@@ -108,17 +108,17 @@ bool KviKvsObject_radiobutton::functionSetChecked(KviKvsObjectFunctionCall *c)
KVSO_PARAMETERS_BEGIN(c)
KVSO_PARAMETER("bChecked",KVS_PT_BOOL,0,bChecked)
KVSO_PARAMETERS_END(c)
- if(widget()) ((QRadioButton *)widget())->setChecked(bChecked);
+ if(widget()) ((TQRadioButton *)widget())->setChecked(bChecked);
return true;
}
bool KviKvsObject_radiobutton::functionSetImage(KviKvsObjectFunctionCall *c)
{
- QString icon;
+ TQString icon;
KVSO_PARAMETERS_BEGIN(c)
KVSO_PARAMETER("icon_id",KVS_PT_STRING,0,icon)
KVSO_PARAMETERS_END(c)
if (!widget()) return true;
- QPixmap * pix = g_pIconManager->getImage(icon);
+ TQPixmap * pix = g_pIconManager->getImage(icon);
if(pix)widget()->setIcon(*pix);
return true;
}
diff --git a/src/modules/objects/class_radiobutton.h b/src/modules/objects/class_radiobutton.h
index 127af8cd..35cedb72 100644
--- a/src/modules/objects/class_radiobutton.h
+++ b/src/modules/objects/class_radiobutton.h
@@ -22,7 +22,7 @@
// along with this program. If not, write to the Free Software Foundation,
// Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
//
-#include <qradiobutton.h>
+#include <tqradiobutton.h>
#include "class_widget.h"
@@ -31,10 +31,11 @@
class KviKvsObject_radiobutton : public KviKvsObject_widget
{
Q_OBJECT
+ TQ_OBJECT
public:
KVSO_DECLARE_OBJECT(KviKvsObject_radiobutton)
public:
- QWidget * widget() { return (QWidget *)object(); };
+ TQWidget * widget() { return (TQWidget *)object(); };
protected:
virtual bool init(KviKvsRunTimeContext * pContext,KviKvsVariantList *pParams);
diff --git a/src/modules/objects/class_slider.cpp b/src/modules/objects/class_slider.cpp
index 603e4c9a..2357da5f 100644
--- a/src/modules/objects/class_slider.cpp
+++ b/src/modules/objects/class_slider.cpp
@@ -49,7 +49,7 @@
@functions:
!fn: $setOrientation(<orientation:string>)
Sets the slider's orientation.[br]
- Orientation value can be "Horizontal" or "Vertical".
+ Qt::Orientation value can be "Horizontal" or "Vertical".
!fn: $setTracking(<bTracking:boolean>)
Sets whether slider tracking is enabled to enable.[br]
Value can be 1 or 0.
@@ -130,8 +130,8 @@ KVSO_END_CONSTRUCTOR(KviKvsObject_slider)
bool KviKvsObject_slider::init(KviKvsRunTimeContext * pContext,KviKvsVariantList *pParams)
{
- setObject(new QSlider(parentScriptWidget(), name()), true);
- connect(widget(),SIGNAL(valueChanged(int)),this,SLOT(valueChanged(int)));
+ setObject(TQT_TQOBJECT(new TQSlider(tqparentScriptWidget(), name())), true);
+ connect(widget(),TQT_SIGNAL(valueChanged(int)),this,TQT_SLOT(valueChanged(int)));
return true;
}
@@ -142,7 +142,7 @@ bool KviKvsObject_slider::functionsetTracking(KviKvsObjectFunctionCall *c)
KVSO_PARAMETER("bEnabled",KVS_PT_BOOL,0,bEnabled)
KVSO_PARAMETERS_END(c)
if(widget())
- ((QSlider *)widget())->setTracking(bEnabled);
+ ((TQSlider *)widget())->setTracking(bEnabled);
return true;
}
@@ -153,7 +153,7 @@ bool KviKvsObject_slider::functionsetValue(KviKvsObjectFunctionCall *c)
KVSO_PARAMETERS_BEGIN(c)
KVSO_PARAMETER("value",KVS_PT_INT,0,iValue)
KVSO_PARAMETERS_END(c)
- if (widget()) ((QSlider *)widget())->setValue(iValue);
+ if (widget()) ((TQSlider *)widget())->setValue(iValue);
return true;
}
bool KviKvsObject_slider::functionsetMinValue(KviKvsObjectFunctionCall *c)
@@ -162,7 +162,7 @@ bool KviKvsObject_slider::functionsetMinValue(KviKvsObjectFunctionCall *c)
KVSO_PARAMETERS_BEGIN(c)
KVSO_PARAMETER("minimum_value",KVS_PT_INT,0,iMinvalue)
KVSO_PARAMETERS_END(c)
- if (widget()) ((QSlider *)widget())->setMinValue(iMinvalue);
+ if (widget()) ((TQSlider *)widget())->setMinValue(iMinvalue);
return true;
}
bool KviKvsObject_slider::functionsetMaxValue(KviKvsObjectFunctionCall *c)
@@ -171,7 +171,7 @@ bool KviKvsObject_slider::functionsetMaxValue(KviKvsObjectFunctionCall *c)
KVSO_PARAMETERS_BEGIN(c)
KVSO_PARAMETER("max_value",KVS_PT_INT,0,iMaxvalue)
KVSO_PARAMETERS_END(c)
- if (widget()) ((QSlider *)widget())->setMaxValue(iMaxvalue);
+ if (widget()) ((TQSlider *)widget())->setMaxValue(iMaxvalue);
return true;
}
@@ -181,7 +181,7 @@ bool KviKvsObject_slider::functionsetLineStep(KviKvsObjectFunctionCall *c)
KVSO_PARAMETERS_BEGIN(c)
KVSO_PARAMETER("line_step",KVS_PT_INT,0,iLinestep)
KVSO_PARAMETERS_END(c)
- if (widget()) ((QSlider *)widget())->setLineStep(iLinestep);
+ if (widget()) ((TQSlider *)widget())->setLineStep(iLinestep);
return true;
}
bool KviKvsObject_slider::functionsetPageStep(KviKvsObjectFunctionCall *c)
@@ -190,7 +190,7 @@ bool KviKvsObject_slider::functionsetPageStep(KviKvsObjectFunctionCall *c)
KVSO_PARAMETERS_BEGIN(c)
KVSO_PARAMETER("page_step",KVS_PT_INT,0,iPagestep)
KVSO_PARAMETERS_END(c)
- if (widget()) ((QSlider *)widget())->setPageStep(iPagestep);
+ if (widget()) ((TQSlider *)widget())->setPageStep(iPagestep);
return true;
}
@@ -200,35 +200,35 @@ bool KviKvsObject_slider::functionsetTickInterval(KviKvsObjectFunctionCall *c)
KVSO_PARAMETERS_BEGIN(c)
KVSO_PARAMETER("tick_interval",KVS_PT_INT,0,iInterval)
KVSO_PARAMETERS_END(c)
- if (widget()) ((QSlider *)widget())->setTickInterval(iInterval);
+ if (widget()) ((TQSlider *)widget())->setTickInterval(iInterval);
return true;
}
bool KviKvsObject_slider::functionvalue(KviKvsObjectFunctionCall *c)
{
- if (widget()) c->returnValue()->setInteger(((QSlider *)widget())->value());
+ if (widget()) c->returnValue()->setInteger(((TQSlider *)widget())->value());
return true;
}
bool KviKvsObject_slider::functionminValue(KviKvsObjectFunctionCall *c)
{
- if (widget()) c->returnValue()->setInteger(((QSlider *)widget())->minValue());
+ if (widget()) c->returnValue()->setInteger(((TQSlider *)widget())->minValue());
return true;
}
bool KviKvsObject_slider::functionmaxValue(KviKvsObjectFunctionCall *c)
{
- if (widget()) c->returnValue()->setInteger(((QSlider *)widget())->maxValue());
+ if (widget()) c->returnValue()->setInteger(((TQSlider *)widget())->maxValue());
return true;
}
bool KviKvsObject_slider::functionlineStep(KviKvsObjectFunctionCall *c)
{
- if (widget()) c->returnValue()->setInteger(((QSlider *)widget())->lineStep());
+ if (widget()) c->returnValue()->setInteger(((TQSlider *)widget())->lineStep());
return true;
}
bool KviKvsObject_slider::functionpageStep(KviKvsObjectFunctionCall *c)
{
- if (widget()) c->returnValue()->setInteger(((QSlider *)widget())->pageStep());
+ if (widget()) c->returnValue()->setInteger(((TQSlider *)widget())->pageStep());
return true;
}
@@ -236,38 +236,38 @@ bool KviKvsObject_slider::functionpageStep(KviKvsObjectFunctionCall *c)
bool KviKvsObject_slider::functionsetTickmarks(KviKvsObjectFunctionCall *c)
{
- QString szTick;
+ TQString szTick;
KVSO_PARAMETERS_BEGIN(c)
KVSO_PARAMETER("tick_marks",KVS_PT_STRING,0,szTick)
KVSO_PARAMETERS_END(c)
if(!widget())return true;
- if(KviQString::equalCI(szTick,"NoMarks"))
- ((QSlider *)widget())->setTickmarks(QSlider::NoMarks);
- else if(KviQString::equalCI(szTick,"Both"))
- ((QSlider *)widget())->setTickmarks(QSlider::Both);
- else if(KviQString::equalCI(szTick,"Above"))
- ((QSlider *)widget())->setTickmarks(QSlider::Above);
- else if(KviQString::equalCI(szTick,"Below"))
- ((QSlider *)widget())->setTickmarks(QSlider::Below);
- else if(KviQString::equalCI(szTick,"Left"))
- ((QSlider *)widget())->setTickmarks(QSlider::Left);
- else if(KviQString::equalCI(szTick,"Right"))
- ((QSlider *)widget())->setTickmarks(QSlider::Right);
+ if(KviTQString::equalCI(szTick,"NoMarks"))
+ ((TQSlider *)widget())->setTickmarks(TQSlider::NoMarks);
+ else if(KviTQString::equalCI(szTick,"Both"))
+ ((TQSlider *)widget())->setTickmarks(TQSlider::Both);
+ else if(KviTQString::equalCI(szTick,"Above"))
+ ((TQSlider *)widget())->setTickmarks(TQSlider::Above);
+ else if(KviTQString::equalCI(szTick,"Below"))
+ ((TQSlider *)widget())->setTickmarks(TQSlider::Below);
+ else if(KviTQString::equalCI(szTick,"Left"))
+ ((TQSlider *)widget())->setTickmarks(TQSlider::Left);
+ else if(KviTQString::equalCI(szTick,"Right"))
+ ((TQSlider *)widget())->setTickmarks(TQSlider::Right);
else c->warning( __tr2qs("Unknown tickmark '%Q'"),&szTick);
return true;
}
bool KviKvsObject_slider::functionsetOrientation(KviKvsObjectFunctionCall *c)
{
- QString szOrientation;
+ TQString szOrientation;
KVSO_PARAMETERS_BEGIN(c)
KVSO_PARAMETER("orientation",KVS_PT_STRING,0,szOrientation)
KVSO_PARAMETERS_END(c)
if(!widget())return true;
- if(KviQString::equalCI(szOrientation,"Horizontal"))
- ((QSlider *)widget())->setOrientation(Qt::Horizontal);
- else if(KviQString::equalCI(szOrientation,"Vertical"))
- ((QSlider *)widget())->setOrientation(Qt::Vertical);
+ if(KviTQString::equalCI(szOrientation,"Horizontal"))
+ ((TQSlider *)widget())->setOrientation(Qt::Horizontal);
+ else if(KviTQString::equalCI(szOrientation,"Vertical"))
+ ((TQSlider *)widget())->setOrientation(Qt::Vertical);
else c->warning( __tr2qs("Unknown orientation '%Q'"),&szOrientation);
return true;
}
diff --git a/src/modules/objects/class_slider.h b/src/modules/objects/class_slider.h
index e2c8c397..bf5e55ad 100644
--- a/src/modules/objects/class_slider.h
+++ b/src/modules/objects/class_slider.h
@@ -22,7 +22,7 @@
// along with this program. If not, write to the Free Software Foundation,
// Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
//
-#include <qslider.h>
+#include <tqslider.h>
#include "class_widget.h"
@@ -31,10 +31,11 @@
class KviKvsObject_slider : public KviKvsObject_widget
{
Q_OBJECT
+ TQ_OBJECT
public:
KVSO_DECLARE_OBJECT(KviKvsObject_slider)
public:
- QWidget * widget() { return (QWidget *)object(); };
+ TQWidget * widget() { return (TQWidget *)object(); };
protected:
virtual bool init(KviKvsRunTimeContext * pContext,KviKvsVariantList *pParams);
diff --git a/src/modules/objects/class_socket.cpp b/src/modules/objects/class_socket.cpp
index f0afe3a5..4ce0b92a 100644
--- a/src/modules/objects/class_socket.cpp
+++ b/src/modules/objects/class_socket.cpp
@@ -57,7 +57,7 @@ KviScriptSocketObject::KviScriptSocketObject(KviScriptObjectClass * cla,KviScrip
{
m_uConnectionId = 0;
m_sock = KVI_INVALID_SOCKET;
- m_iStatus = KVI_SCRIPT_SOCKET_STATUS_DISCONNECTED;
+ m_itqStatus = KVI_SCRIPT_SOCKET_STATUS_DISCONNECTED;
m_uRemotePort = 0;
m_uSecondaryPort = 0;
m_pSn = 0;
@@ -68,11 +68,11 @@ KviScriptSocketObject::KviScriptSocketObject(KviScriptObjectClass * cla,KviScrip
m_uInBufferLen = 0;
m_uInDataLen = 0;
m_pOutBuffer = new KviDataBuffer();
- m_pFlushTimer = new QTimer();
+ m_pFlushTimer = new TQTimer();
m_bIpV6 = false;
m_uLocalPort = 0;
m_secondarySock = KVI_INVALID_SOCKET;
- connect(m_pFlushTimer,SIGNAL(timeout()),this,SLOT(tryFlush()));
+ connect(m_pFlushTimer,TQT_SIGNAL(timeout()),this,TQT_SLOT(tryFlush()));
}
KviScriptSocketObject::~KviScriptSocketObject()
@@ -128,7 +128,7 @@ void KviScriptSocketObject::reset()
m_pOutBuffer = new KviDataBuffer();
m_uInBufferLen = 0;
m_uInDataLen = 0;
- m_iStatus = KVI_SCRIPT_SOCKET_STATUS_DISCONNECTED;
+ m_itqStatus = KVI_SCRIPT_SOCKET_STATUS_DISCONNECTED;
m_uRemotePort = 0;
m_szRemoteIp.clear();
m_uLocalPort = 0;
@@ -218,7 +218,7 @@ void KviScriptSocketObject::reset()
the incoming connection will be automatically terminated.
!fn: $connectFailedEvent(<reason>)
- This function is called when a connection attempt fails for some reason. <reason> contains
+ This function is called when a connection attempt fails for some reason. <reason> tqcontains
the error string.[br]
This function may be called only between a call to [classfnc:socket]$connect[/classfnc]() and
the [classfnc:socket]$connectEvent[/classfnc]().
@@ -366,7 +366,7 @@ void KviScriptSocketObject::reset()
KVSO_BEGIN_REGISTERCLASS(KviKvsObject_socket,"socket","object")
- KVSO_REGISTER_HANDLER(KviKvsObject_socket,"status",functionStatus)
+ KVSO_REGISTER_HANDLER(KviKvsObject_socket,"status",functiontqStatus)
KVSO_REGISTER_HANDLER(KviKvsObject_socket,"remotePort",functionRemotePort)
KVSO_REGISTER_HANDLER(KviKvsObject_socket,"remoteIp",functionRemoteIp)
KVSO_REGISTER_HANDLER(KviKvsObject_socket,"localIp",functionLocalIp)
@@ -398,7 +398,7 @@ KVSO_BEGIN_CONSTRUCTOR(KviKvsObject_socket,KviKvsObject)
m_bUdp = false;
m_uConnectionId = 0;
m_sock = KVI_INVALID_SOCKET;
- m_iStatus = KVI_SCRIPT_SOCKET_STATUS_DISCONNECTED;
+ m_itqStatus = KVI_SCRIPT_SOCKET_STATUS_DISCONNECTED;
m_uRemotePort = 0;
m_uSecondaryPort = 0;
m_pSn = 0;
@@ -409,11 +409,11 @@ KVSO_BEGIN_CONSTRUCTOR(KviKvsObject_socket,KviKvsObject)
m_uInBufferLen = 0;
m_uInDataLen = 0;
m_pOutBuffer = new KviDataBuffer();
- m_pFlushTimer = new QTimer();
+ m_pFlushTimer = new TQTimer();
m_bIpV6 = false;
m_uLocalPort = 0;
m_secondarySock = KVI_INVALID_SOCKET;
- connect(m_pFlushTimer,SIGNAL(timeout()),this,SLOT(tryFlush()));
+ connect(m_pFlushTimer,TQT_SIGNAL(timeout()),this,TQT_SLOT(tryFlush()));
KVSO_END_CONSTRUCTOR(KviKvsObject_socket)
KVSO_BEGIN_DESTRUCTOR(KviKvsObject_socket)
@@ -430,15 +430,15 @@ KVSO_END_DESTRUCTOR(KviKvsObject_socket)
//----------------------
-bool KviKvsObject_socket::functionStatus(KviKvsObjectFunctionCall *c)
+bool KviKvsObject_socket::functiontqStatus(KviKvsObjectFunctionCall *c)
{
- c->returnValue()->setInteger(m_iStatus);
+ c->returnValue()->setInteger(m_itqStatus);
return true;
}
bool KviKvsObject_socket::functionClose(KviKvsObjectFunctionCall *c)
{
- if((m_pOutBuffer->size() != 0) && (m_iStatus == KVI_SCRIPT_SOCKET_STATUS_CONNECTED))
+ if((m_pOutBuffer->size() != 0) && (m_itqStatus == KVI_SCRIPT_SOCKET_STATUS_CONNECTED))
tryFlush();
reset();
@@ -523,18 +523,18 @@ bool KviKvsObject_socket::functionAccept(KviKvsObjectFunctionCall *c)
bool KviKvsObject_socket::functionSetProtocol(KviKvsObjectFunctionCall *c)
{
- QString m_szHex;
+ TQString m_szHex;
KVSO_PARAMETERS_BEGIN(c)
KVSO_PARAMETER("hex_string",KVS_PT_STRING,0,m_szHex)
KVSO_PARAMETERS_END(c)
- m_bUdp=KviQString::equalCI(m_szHex,"udp");
+ m_bUdp=KviTQString::equalCI(m_szHex,"udp");
return false;
}
bool KviKvsObject_socket::functionWriteHex(KviKvsObjectFunctionCall *c)
{
- QString m_szHex;
+ TQString m_szHex;
KVSO_PARAMETERS_BEGIN(c)
KVSO_PARAMETER("hex_string",KVS_PT_STRING,0,m_szHex)
KVSO_PARAMETERS_END(c)
@@ -542,11 +542,11 @@ bool KviKvsObject_socket::functionWriteHex(KviKvsObjectFunctionCall *c)
if(m_szHex.length() > 0)
{
bool bOk;
- QString szTmp;
+ TQString szTmp;
szTmp=m_szHex.setNum(m_szHex.toInt(&bOk,16),16);
if(szTmp.length()>0)
{
- KviQCString szData8 = szTmp.utf8();
+ KviTQCString szData8 = szTmp.utf8();
m_pOutBuffer->append((const unsigned char *)(szData8.data()),szData8.length());
delayedFlush(0);
c->returnValue()->setInteger(szData8.length());
@@ -591,7 +591,7 @@ bool KviKvsObject_socket::functionConnect(KviKvsObjectFunctionCall *c)
c->warning(__tr2qs("Value %d for port is out of range (values allowed are from 0 to 65535"),m_uRemotePort);
return true;
}
- if((m_sock != KVI_INVALID_SOCKET) || (m_iStatus != KVI_SCRIPT_SOCKET_STATUS_DISCONNECTED))
+ if((m_sock != KVI_INVALID_SOCKET) || (m_itqStatus != KVI_SCRIPT_SOCKET_STATUS_DISCONNECTED))
{
c->warning(__tr2qs("Another connection in progress"));
c->returnValue()->setBoolean(true);
@@ -608,11 +608,11 @@ bool KviKvsObject_socket::functionConnect(KviKvsObjectFunctionCall *c)
debug ("ok connecting");
debug ("connectinhg on ip %s ",m_szRemoteIp.latin1());
debug ("non so ip");
- m_iStatus = KVI_SCRIPT_SOCKET_STATUS_CONNECTING;
+ m_itqStatus = KVI_SCRIPT_SOCKET_STATUS_CONNECTING;
delayedConnect();
} else {
debug ("connectinhg on ip %s port %d",m_szRemoteIp.latin1(),m_uRemotePort);
- m_iStatus = KVI_SCRIPT_SOCKET_STATUS_DNS;
+ m_itqStatus = KVI_SCRIPT_SOCKET_STATUS_DNS;
delayedLookupRemoteIp();
}
c->returnValue()->setBoolean(true);
@@ -626,14 +626,14 @@ bool KviKvsObject_socket::functionConnect(KviKvsObjectFunctionCall *c)
bool KviKvsObject_socket::functionListen(KviKvsObjectFunctionCall *c)
{
- if((m_sock != KVI_INVALID_SOCKET) || (m_iStatus != KVI_SCRIPT_SOCKET_STATUS_DISCONNECTED))
+ if((m_sock != KVI_INVALID_SOCKET) || (m_itqStatus != KVI_SCRIPT_SOCKET_STATUS_DISCONNECTED))
{
c->warning(__tr2qs("Another connection in progress"));
c->returnValue()->setBoolean(false);
return true;
}
kvs_uint_t uLocalPort;
- QString m_szLocalIp;
+ TQString m_szLocalIp;
bool m_bIpV6;
KVSO_PARAMETERS_BEGIN(c)
KVSO_PARAMETER("local_port",KVS_PT_UNSIGNEDINTEGER,0,uLocalPort)
@@ -766,11 +766,11 @@ bool KviKvsObject_socket::functionListen(KviKvsObjectFunctionCall *c)
}
// and setup the READ notifier...
- m_pSn = new QSocketNotifier(m_sock,QSocketNotifier::Read);
- QObject::connect(m_pSn,SIGNAL(activated(int)),this,SLOT(incomingConnection(int)));
+ m_pSn = new TQSocketNotifier(m_sock,TQSocketNotifier::Read);
+ TQObject::connect(m_pSn,TQT_SIGNAL(activated(int)),this,TQT_SLOT(incomingConnection(int)));
m_pSn->setEnabled(true);
- m_iStatus = KVI_SCRIPT_SOCKET_STATUS_LISTENING;
+ m_itqStatus = KVI_SCRIPT_SOCKET_STATUS_LISTENING;
c->returnValue()->setBoolean(true);
return true;
@@ -846,18 +846,18 @@ void KviKvsObject_socket::acceptConnection(kvi_socket_t s,kvi_u32_t uPort,const
sareal.getStringAddress(m_szLocalIp);
}
- m_iStatus = KVI_SCRIPT_SOCKET_STATUS_CONNECTED;
+ m_itqStatus = KVI_SCRIPT_SOCKET_STATUS_CONNECTED;
- m_pSn = new QSocketNotifier((int)m_sock,QSocketNotifier::Read);
- QObject::connect(m_pSn,SIGNAL(activated(int)),this,SLOT(readNotifierFired(int)));
+ m_pSn = new TQSocketNotifier((int)m_sock,TQSocketNotifier::Read);
+ TQObject::connect(m_pSn,TQT_SIGNAL(activated(int)),this,TQT_SLOT(readNotifierFired(int)));
m_pSn->setEnabled(true);
}
void KviKvsObject_socket::delayedConnect()
{
if(m_pDelayTimer)delete m_pDelayTimer;
- m_pDelayTimer = new QTimer();
- connect(m_pDelayTimer,SIGNAL(timeout()),this,SLOT(doConnect()));
+ m_pDelayTimer = new TQTimer();
+ connect(m_pDelayTimer,TQT_SIGNAL(timeout()),this,TQT_SLOT(doConnect()));
m_pDelayTimer->start(0,true);
}
@@ -873,13 +873,13 @@ void KviKvsObject_socket::doConnect()
if(!sa.socketAddress())
{
unsigned int uOldConnectionId = m_uConnectionId;
- QString ipAddressError=__tr2qs("Invalid ip address ");
+ TQString ipAddressError=__tr2qs("Invalid ip address ");
ipAddressError.append(m_szRemoteIp);
KviKvsVariantList params;
- QString tmp;
- KviQString::sprintf(tmp,__tr2qs("Invalid ip address (%Q)"),&m_szRemoteIp);
+ TQString tmp;
+ KviTQString::sprintf(tmp,__tr2qs("Invalid ip address (%Q)"),&m_szRemoteIp);
params.append(new KviKvsVariant(tmp));
callFunction(this,"connectFailedEvent",&params);
/* callEventFunction("connectFailedEvent",0,new KviParameterList(
@@ -936,7 +936,7 @@ debug ("Socket created");
(void *)&sockError,&iSize))sockError=0;
}
unsigned int uOldConnectionId = m_uConnectionId;
- QString callBackError=__tr2qs("Connect failure: ");
+ TQString callBackError=__tr2qs("Connect failure: ");
callBackError.append((KviError::getDescription(KviError::translateSystemError(sockError)).utf8().data()));
callFunction(this,"connectFailedEvent",new KviKvsVariantList(
@@ -950,12 +950,12 @@ debug ("Socket created");
}
}
debug ("Socket connected");
- m_pDelayTimer = new QTimer();
- connect(m_pDelayTimer,SIGNAL(timeout()),this,SLOT(connectTimeout()));
+ m_pDelayTimer = new TQTimer();
+ connect(m_pDelayTimer,TQT_SIGNAL(timeout()),this,TQT_SLOT(connectTimeout()));
m_pDelayTimer->start(m_uConnectTimeout,true);
- m_pSn = new QSocketNotifier((int)m_sock,QSocketNotifier::Write);
- QObject::connect(m_pSn,SIGNAL(activated(int)),this,SLOT(writeNotifierFired(int)));
+ m_pSn = new TQSocketNotifier((int)m_sock,TQSocketNotifier::Write);
+ TQObject::connect(m_pSn,TQT_SIGNAL(activated(int)),this,TQT_SLOT(writeNotifierFired(int)));
m_pSn->setEnabled(true);
}
@@ -972,8 +972,8 @@ void KviKvsObject_socket::connectTimeout()
void KviKvsObject_socket::delayedLookupRemoteIp()
{
if(m_pDelayTimer)delete m_pDelayTimer;
- m_pDelayTimer = new QTimer();
- connect(m_pDelayTimer,SIGNAL(timeout()),this,SLOT(lookupRemoteIp()));
+ m_pDelayTimer = new TQTimer();
+ connect(m_pDelayTimer,TQT_SIGNAL(timeout()),this,TQT_SLOT(lookupRemoteIp()));
m_pDelayTimer->start(0,true);
}
@@ -984,7 +984,7 @@ void KviKvsObject_socket::lookupRemoteIp()
m_pDelayTimer = 0;
if(m_pDns)delete m_pDns;
m_pDns = new KviDns();
- connect(m_pDns,SIGNAL(lookupDone(KviDns *)),this,SLOT(lookupDone(KviDns *)));
+ connect(m_pDns,TQT_SIGNAL(lookupDone(KviDns *)),this,TQT_SLOT(lookupDone(KviDns *)));
if(!m_pDns->lookup(m_szRemoteIp,KviDns::Any))
{
unsigned int uOldConnectionId = m_uConnectionId;
@@ -1051,8 +1051,8 @@ void KviKvsObject_socket::writeNotifierFired(int)
} else {
// Succesfully connected
// create the correct read notifier now...
- m_pSn = new QSocketNotifier((int)m_sock,QSocketNotifier::Read);
- QObject::connect(m_pSn,SIGNAL(activated(int)),this,SLOT(readNotifierFired(int)));
+ m_pSn = new TQSocketNotifier((int)m_sock,TQSocketNotifier::Read);
+ TQObject::connect(m_pSn,TQT_SIGNAL(activated(int)),this,TQT_SLOT(readNotifierFired(int)));
m_pSn->setEnabled(true);
#ifdef COMPILE_IPV6_SUPPORT
@@ -1070,7 +1070,7 @@ void KviKvsObject_socket::writeNotifierFired(int)
KviKvsVariantList *params=0;
callFunction(this,"connectEvent",params);
if(m_uConnectionId == uOldConnectionId)
- m_iStatus = KVI_SCRIPT_SOCKET_STATUS_CONNECTED;
+ m_itqStatus = KVI_SCRIPT_SOCKET_STATUS_CONNECTED;
// else the connection has been already changed!
}
}
@@ -1110,7 +1110,7 @@ void KviKvsObject_socket::readNotifierFired(int)
if(err > 0)
{
- // QString error=KviError::translateSystemError(err);
+ // TQString error=KviError::translateSystemError(err);
callFunction(this,"disconnectEvent",new KviKvsVariantList(
new KviKvsVariant((kvs_int_t)KviError::translateSystemError(err))));
} else {
@@ -1129,7 +1129,7 @@ void KviKvsObject_socket::readNotifierFired(int)
m_uInDataLen += readLength;
//KviStr * s = new KviStr();
- QString s;
+ TQString s;
s.setNum(m_uInDataLen);
@@ -1256,7 +1256,7 @@ void KviKvsObject_socket::reset()
m_pOutBuffer = new KviDataBuffer();
m_uInBufferLen = 0;
m_uInDataLen = 0;
- m_iStatus = KVI_SCRIPT_SOCKET_STATUS_DISCONNECTED;
+ m_itqStatus = KVI_SCRIPT_SOCKET_STATUS_DISCONNECTED;
m_uRemotePort = 0;
m_szRemoteIp="";
m_uLocalPort = 0;
@@ -1284,7 +1284,7 @@ bool KviKvsObject_socket::functionRead(KviKvsObjectFunctionCall *c)
{
if(!m_pInBuffer[i])m_pInBuffer[i] = (char)(255);
}
- QString tmpBuffer = QString::fromUtf8(m_pInBuffer,uLen);
+ TQString tmpBuffer = TQString::fromUtf8(m_pInBuffer,uLen);
c->returnValue()->setString(tmpBuffer);
eatInData(uLen);
@@ -1299,7 +1299,7 @@ bool KviKvsObject_socket::functionReadHex(KviKvsObjectFunctionCall *c)
bool bOk;
if(uLen > 0)
{
- QString szTmp;
+ TQString szTmp;
szTmp =m_pInBuffer;
szTmp.toInt(&bOk,16);
c->returnValue()->setString(szTmp);
@@ -1310,12 +1310,12 @@ bool KviKvsObject_socket::functionReadHex(KviKvsObjectFunctionCall *c)
bool KviKvsObject_socket::functionWrite(KviKvsObjectFunctionCall *c)
{
- QString szData;
+ TQString szData;
KVSO_PARAMETERS_BEGIN(c)
KVSO_PARAMETER("szData",KVS_PT_STRING,0,szData)
KVSO_PARAMETERS_END(c)
-KviQCString szData8 = szData.utf8();
+KviTQCString szData8 = szData.utf8();
if(szData8.length() > 0)
{
m_pOutBuffer->append((const unsigned char*)szData8.data(),szData8.length());
diff --git a/src/modules/objects/class_socket.h b/src/modules/objects/class_socket.h
index 7ed2e421..84771cae 100644
--- a/src/modules/objects/class_socket.h
+++ b/src/modules/objects/class_socket.h
@@ -26,8 +26,8 @@
#include "kvi_pointerlist.h"
-#include <qsocketnotifier.h>
-#include <qtimer.h>
+#include <tqsocketnotifier.h>
+#include <tqtimer.h>
#define KVI_SCRIPT_SOCKET_STATUS_DISCONNECTED 0
#define KVI_SCRIPT_SOCKET_STATUS_DNS 1
@@ -41,20 +41,21 @@ class KviDataBuffer;
class KviScriptSocketObject : public KviScriptObject
{
Q_OBJECT
+ TQ_OBJECT
public:
KviScriptSocketObject(KviScriptObjectClass * cla,KviScriptObject * par,const char * nam);
virtual ~KviScriptSocketObject();
protected:
kvi_socket_t m_sock;
- int m_iStatus;
+ int m_itqStatus;
KviStr m_szRemoteIp;
unsigned short int m_uRemotePort;
KviStr m_szLocalIp;
unsigned short int m_uLocalPort;
unsigned int m_uConnectTimeout;
- QSocketNotifier * m_pSn;
+ TQSocketNotifier * m_pSn;
KviDns * m_pDns;
- QTimer * m_pDelayTimer;
+ TQTimer * m_pDelayTimer;
char * m_pInBuffer;
unsigned int m_uInBufferLen;
unsigned int m_uInDataLen;
@@ -62,13 +63,13 @@ protected:
unsigned int m_uConnectionId;
KviDataBuffer * m_pOutBuffer;
- QTimer * m_pFlushTimer;
+ TQTimer * m_pFlushTimer;
kvi_socket_t m_secondarySock;
unsigned short int m_uSecondaryPort;
KviStr m_szSecondaryIp;
protected:
- bool functionStatus(KviCommand *c,KviParameterList * params,KviStr &buffer);
+ bool functiontqStatus(KviCommand *c,KviParameterList * params,KviStr &buffer);
bool functionRemotePort(KviCommand *c,KviParameterList * params,KviStr &buffer);
bool functionRemoteIp(KviCommand *c,KviParameterList * params,KviStr &buffer);
bool functionLocalPort(KviCommand *c,KviParameterList * params,KviStr &buffer);
@@ -115,20 +116,21 @@ public:
class KviKvsObject_socket : public KviKvsObject
{
Q_OBJECT
+ TQ_OBJECT
public:
KVSO_DECLARE_OBJECT(KviKvsObject_socket)
protected:
bool m_bUdp;
kvi_socket_t m_sock;
- int m_iStatus;
- QString m_szRemoteIp;
+ int m_itqStatus;
+ TQString m_szRemoteIp;
// unsigned short int m_uRemotePort;
- QString m_szLocalIp;
+ TQString m_szLocalIp;
kvi_u32_t m_uLocalPort;
unsigned int m_uConnectTimeout;
- QSocketNotifier * m_pSn;
+ TQSocketNotifier * m_pSn;
KviDns * m_pDns;
- QTimer * m_pDelayTimer;
+ TQTimer * m_pDelayTimer;
char * m_pInBuffer;
unsigned int m_uInBufferLen;
unsigned int m_uInDataLen;
@@ -136,13 +138,13 @@ protected:
unsigned int m_uConnectionId;
kvs_uint_t m_uRemotePort;
KviDataBuffer * m_pOutBuffer;
- QTimer * m_pFlushTimer;
+ TQTimer * m_pFlushTimer;
kvi_socket_t m_secondarySock;
kvi_u32_t m_uSecondaryPort;
- QString m_szSecondaryIp;
+ TQString m_szSecondaryIp;
protected:
- bool functionStatus(KviKvsObjectFunctionCall *c);
+ bool functiontqStatus(KviKvsObjectFunctionCall *c);
bool functionRemotePort(KviKvsObjectFunctionCall *c);
bool functionRemoteIp(KviKvsObjectFunctionCall *c);
bool functionLocalPort(KviKvsObjectFunctionCall *c);
diff --git a/src/modules/objects/class_spinbox.cpp b/src/modules/objects/class_spinbox.cpp
index f87a3a51..62f7df54 100644
--- a/src/modules/objects/class_spinbox.cpp
+++ b/src/modules/objects/class_spinbox.cpp
@@ -21,7 +21,7 @@
// Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
//
-#include <qspinbox.h>
+#include <tqspinbox.h>
#include "class_spinbox.h"
#include "kvi_error.h"
#include "kvi_debug.h"
@@ -132,8 +132,8 @@ KVSO_END_CONSTRUCTOR(KviKvsObject_spinbox)
bool KviKvsObject_spinbox::init(KviKvsRunTimeContext * pContext,KviKvsVariantList *pParams)
{
- setObject(new QSpinBox(parentScriptWidget(), name()), true);
- connect(widget(),SIGNAL(valueChanged(int)),this,SLOT(valueChanged(int)));
+ setObject(TQT_TQOBJECT(new TQSpinBox(tqparentScriptWidget(), name())), true);
+ connect(widget(),TQT_SIGNAL(valueChanged(int)),this,TQT_SLOT(valueChanged(int)));
return true;
}
@@ -145,7 +145,7 @@ bool KviKvsObject_spinbox::functionsetValue(KviKvsObjectFunctionCall *c)
KVSO_PARAMETERS_BEGIN(c)
KVSO_PARAMETER("value",KVS_PT_INT,0,iValue)
KVSO_PARAMETERS_END(c)
- if (widget()) ((QSpinBox *)widget())->setValue(iValue);
+ if (widget()) ((TQSpinBox *)widget())->setValue(iValue);
return true;
}
bool KviKvsObject_spinbox::functionsetMinValue(KviKvsObjectFunctionCall *c)
@@ -154,7 +154,7 @@ bool KviKvsObject_spinbox::functionsetMinValue(KviKvsObjectFunctionCall *c)
KVSO_PARAMETERS_BEGIN(c)
KVSO_PARAMETER("min_value",KVS_PT_INT,0,iMinvalue)
KVSO_PARAMETERS_END(c)
- if (widget()) ((QSpinBox *)widget())->setMinValue(iMinvalue);
+ if (widget()) ((TQSpinBox *)widget())->setMinValue(iMinvalue);
return true;
}
bool KviKvsObject_spinbox::functionsetMaxValue(KviKvsObjectFunctionCall *c)
@@ -163,7 +163,7 @@ bool KviKvsObject_spinbox::functionsetMaxValue(KviKvsObjectFunctionCall *c)
KVSO_PARAMETERS_BEGIN(c)
KVSO_PARAMETER("max_value",KVS_PT_INT,0,iMaxvalue)
KVSO_PARAMETERS_END(c)
- if (widget()) ((QSpinBox *)widget())->setMaxValue(iMaxvalue);
+ if (widget()) ((TQSpinBox *)widget())->setMaxValue(iMaxvalue);
return true;
}
@@ -173,25 +173,25 @@ bool KviKvsObject_spinbox::functionsetLineStep(KviKvsObjectFunctionCall *c)
KVSO_PARAMETERS_BEGIN(c)
KVSO_PARAMETER("line_step",KVS_PT_INT,0,iLinestep)
KVSO_PARAMETERS_END(c)
- if (widget()) ((QSpinBox *)widget())->setLineStep(iLinestep);
+ if (widget()) ((TQSpinBox *)widget())->setLineStep(iLinestep);
return true;
}
bool KviKvsObject_spinbox::functionvalue(KviKvsObjectFunctionCall *c)
{
- if (widget()) c->returnValue()->setInteger(((QSpinBox *)widget())->value());
+ if (widget()) c->returnValue()->setInteger(((TQSpinBox *)widget())->value());
return true;
}
bool KviKvsObject_spinbox::functionminValue(KviKvsObjectFunctionCall *c)
{
- if (widget()) c->returnValue()->setInteger(((QSpinBox *)widget())->minValue());
+ if (widget()) c->returnValue()->setInteger(((TQSpinBox *)widget())->minValue());
return true;
}
bool KviKvsObject_spinbox::functionmaxValue(KviKvsObjectFunctionCall *c)
{
- if (widget()) c->returnValue()->setInteger(((QSpinBox *)widget())->maxValue());
+ if (widget()) c->returnValue()->setInteger(((TQSpinBox *)widget())->maxValue());
return true;
}
bool KviKvsObject_spinbox::functionlineStep(KviKvsObjectFunctionCall *c)
@@ -199,9 +199,9 @@ bool KviKvsObject_spinbox::functionlineStep(KviKvsObjectFunctionCall *c)
if (widget())
{
#ifdef COMPILE_USE_QT4
- c->returnValue()->setInteger(((QSpinBox *)widget())->singleStep());
+ c->returnValue()->setInteger(((TQSpinBox *)widget())->singleStep());
#else
- c->returnValue()->setInteger(((QSpinBox *)widget())->lineStep());
+ c->returnValue()->setInteger(((TQSpinBox *)widget())->lineStep());
#endif
}
@@ -211,7 +211,7 @@ bool KviKvsObject_spinbox::functionlineStep(KviKvsObjectFunctionCall *c)
bool KviKvsObject_spinbox::functionspecialValueText(KviKvsObjectFunctionCall *c)
{
- if (widget()) c->returnValue()->setString(((QSpinBox *)widget())->specialValueText());
+ if (widget()) c->returnValue()->setString(((TQSpinBox *)widget())->specialValueText());
return true;
}
@@ -219,34 +219,34 @@ bool KviKvsObject_spinbox::functionspecialValueText(KviKvsObjectFunctionCall *c)
bool KviKvsObject_spinbox::functionsetSpecialValueText(KviKvsObjectFunctionCall *c)
{
- QString szText;
+ TQString szText;
KVSO_PARAMETERS_BEGIN(c)
KVSO_PARAMETER("text",KVS_PT_STRING,0,szText)
KVSO_PARAMETERS_END(c)
if(widget())
- ((QSpinBox *)widget())->setSpecialValueText(szText);
+ ((TQSpinBox *)widget())->setSpecialValueText(szText);
return true;
}
bool KviKvsObject_spinbox::functionsetPrefix(KviKvsObjectFunctionCall *c)
{
- QString szPrefix;
+ TQString szPrefix;
KVSO_PARAMETERS_BEGIN(c)
KVSO_PARAMETER("text",KVS_PT_STRING,0,szPrefix)
KVSO_PARAMETERS_END(c)
if(widget())
- ((QSpinBox *)widget())->setPrefix(szPrefix);
+ ((TQSpinBox *)widget())->setPrefix(szPrefix);
return true;
}
bool KviKvsObject_spinbox::functionsetSuffix(KviKvsObjectFunctionCall *c)
{
- QString szSuffix;
+ TQString szSuffix;
KVSO_PARAMETERS_BEGIN(c)
KVSO_PARAMETER("text",KVS_PT_STRING,0,szSuffix)
KVSO_PARAMETERS_END(c)
if(widget())
- ((QSpinBox *)widget())->setSuffix(szSuffix);
+ ((TQSpinBox *)widget())->setSuffix(szSuffix);
return true;
}
diff --git a/src/modules/objects/class_spinbox.h b/src/modules/objects/class_spinbox.h
index d5a6ee94..dde0a017 100644
--- a/src/modules/objects/class_spinbox.h
+++ b/src/modules/objects/class_spinbox.h
@@ -25,7 +25,7 @@
-#include <qspinbox.h>
+#include <tqspinbox.h>
#include "class_widget.h"
#include "object_macros.h"
@@ -33,10 +33,11 @@
class KviKvsObject_spinbox : public KviKvsObject_widget
{
Q_OBJECT
+ TQ_OBJECT
public:
KVSO_DECLARE_OBJECT(KviKvsObject_spinbox)
public:
- QWidget * widget() { return (QWidget *)object(); };
+ TQWidget * widget() { return (TQWidget *)object(); };
protected:
virtual bool init(KviKvsRunTimeContext * pContext,KviKvsVariantList *pParams);
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;
}
diff --git a/src/modules/objects/class_tabwidget.h b/src/modules/objects/class_tabwidget.h
index acc76d36..f82d6cac 100644
--- a/src/modules/objects/class_tabwidget.h
+++ b/src/modules/objects/class_tabwidget.h
@@ -22,7 +22,7 @@
// along with this program. If not, write to the Free Software Foundation,
// Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
//
-#include <qtabwidget.h>
+#include <tqtabwidget.h>
#include "class_widget.h"
#include "object_macros.h"
@@ -30,10 +30,11 @@
class KviKvsObject_tabwidget : public KviKvsObject_widget
{
Q_OBJECT
+ TQ_OBJECT
public:
KVSO_DECLARE_OBJECT(KviKvsObject_tabwidget)
public:
- QWidget * widget() { return (QWidget *)object(); };
+ TQWidget * widget() { return (TQWidget *)object(); };
protected:
virtual bool init(KviKvsRunTimeContext * pContext,KviKvsVariantList *pParams);
diff --git a/src/modules/objects/class_tbrowser.cpp b/src/modules/objects/class_tbrowser.cpp
index 67dce8cb..872a9c86 100644
--- a/src/modules/objects/class_tbrowser.cpp
+++ b/src/modules/objects/class_tbrowser.cpp
@@ -21,7 +21,7 @@
// Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
//
-#include <qtextbrowser.h>
+#include <tqtextbrowser.h>
#include "class_tbrowser.h"
#include "kvi_error.h"
#include "kvi_debug.h"
@@ -82,53 +82,53 @@ KVSO_END_CONSTRUCTOR(KviKvsObject_textbrowser)
bool KviKvsObject_textbrowser::init(KviKvsRunTimeContext * pContext,KviKvsVariantList *pParams)
{
- QTextBrowser * tb = new QTextBrowser(parentScriptWidget(), name());
- setObject(tb, true);
- connect(tb,SIGNAL(anchorClicked(const QString &,const QString &)),this,SLOT(anchorClicked(const QString &,const QString &)));
+ TQTextBrowser * tb = new TQTextBrowser(tqparentScriptWidget(), name());
+ setObject(TQT_TQOBJECT(tb), true);
+ connect(tb,TQT_SIGNAL(anchorClicked(const TQString &,const TQString &)),this,TQT_SLOT(anchorClicked(const TQString &,const TQString &)));
return true;
}
bool KviKvsObject_textbrowser::function_setSource(KviKvsObjectFunctionCall *c)
{
- QString szFile;
+ TQString szFile;
KVSO_PARAMETERS_BEGIN(c)
KVSO_PARAMETER("file_name",KVS_PT_STRING,0,szFile)
KVSO_PARAMETERS_END(c)
- if(!QFile::exists(szFile))
+ if(!TQFile::exists(szFile))
{
c->warning(__tr2qs("I can't find the specified file '%Q'."),&szFile);
return true;
}
- if (widget()) ((QTextBrowser *)widget())->setSource(szFile);
+ if (widget()) ((TQTextBrowser *)widget())->setSource(szFile);
return true;
}
bool KviKvsObject_textbrowser::function_forward(KviKvsObjectFunctionCall *c)
{
- if (widget()) ((QTextBrowser *)widget())->forward();
+ if (widget()) ((TQTextBrowser *)widget())->forward();
return true;
}
bool KviKvsObject_textbrowser::function_backward(KviKvsObjectFunctionCall *c)
{
- if (widget()) ((QTextBrowser *)widget())->backward();
+ if (widget()) ((TQTextBrowser *)widget())->backward();
return true;
}
bool KviKvsObject_textbrowser::function_home(KviKvsObjectFunctionCall *c)
{
- if (widget()) ((QTextBrowser *)widget())->home();
+ if (widget()) ((TQTextBrowser *)widget())->home();
return true;
}
bool KviKvsObject_textbrowser::function_reload(KviKvsObjectFunctionCall *c)
{
- if (widget()) ((QTextBrowser *)widget())->reload();
+ if (widget()) ((TQTextBrowser *)widget())->reload();
return true;
}
-void KviKvsObject_textbrowser::anchorClicked(const QString &szName,const QString &szLink)
+void KviKvsObject_textbrowser::anchorClicked(const TQString &szName,const TQString &szLink)
{
KviKvsVariantList parms(new KviKvsVariant(szLink));
callFunction(this,"linkClickedEvent",0,&parms);
diff --git a/src/modules/objects/class_tbrowser.h b/src/modules/objects/class_tbrowser.h
index 980bdc28..f494a05e 100644
--- a/src/modules/objects/class_tbrowser.h
+++ b/src/modules/objects/class_tbrowser.h
@@ -23,19 +23,20 @@
// Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
//
-#include <qtextbrowser.h>
+#include <tqtextbrowser.h>
#include "class_widget.h"
-#include <qfile.h>
+#include <tqfile.h>
#include "class_multilineedit.h"
#include "object_macros.h"
class KviKvsObject_textbrowser : public KviKvsObject_mledit
{
Q_OBJECT
+ TQ_OBJECT
public:
KVSO_DECLARE_OBJECT(KviKvsObject_textbrowser)
public:
- QWidget * widget() { return (QWidget *)object(); };
+ TQWidget * widget() { return (TQWidget *)object(); };
protected:
virtual bool init(KviKvsRunTimeContext * pContext,KviKvsVariantList *pParams);
@@ -46,7 +47,7 @@ protected:
bool function_reload(KviKvsObjectFunctionCall *c);
bool function_linkClickedEvent(KviKvsObjectFunctionCall *c);
protected slots:
- void anchorClicked(const QString &szName,const QString &szLink);
+ void anchorClicked(const TQString &szName,const TQString &szLink);
};
#endif //!_CLASS_TBROWSER_H_
diff --git a/src/modules/objects/class_toolbar.cpp b/src/modules/objects/class_toolbar.cpp
index ed280bd0..036c31ee 100644
--- a/src/modules/objects/class_toolbar.cpp
+++ b/src/modules/objects/class_toolbar.cpp
@@ -79,18 +79,18 @@ KVSO_END_CONSTRUCTOR(KviKvsObject_toolbar)
bool KviKvsObject_toolbar::init(KviKvsRunTimeContext * pContext,KviKvsVariantList *pParams)
{
- if (!parentObject())
+ if (!tqparentObject())
{
- pContext->warning(__tr2qs("the toolbar cannot be a parent-widget!"));
+ pContext->warning(__tr2qs("the toolbar cannot be a tqparent-widget!"));
return true;
}
- if(parentObject()->inherits("KviKvsObject_mainwindow"))
+ if(tqparentObject()->inherits("KviKvsObject_mainwindow"))
{
- setObject(new KviTalToolBar(name(), ((KviTalMainWindow *)parentScriptWidget())), true);
+ setObject(TQT_TQOBJECT(new KviTalToolBar(name(), ((KviTalMainWindow *)tqparentScriptWidget()))), true);
}
else
{
- pContext->warning(__tr2qs("The parent-widget isn't a MainWindow."));
+ pContext->warning(__tr2qs("The tqparent-widget isn't a MainWindow."));
}
return true;
@@ -103,7 +103,7 @@ bool KviKvsObject_toolbar::functionaddSeparator(KviKvsObjectFunctionCall *c)
}
bool KviKvsObject_toolbar::functionsetLabel(KviKvsObjectFunctionCall *c)
{
- QString szLabel;
+ TQString szLabel;
KVSO_PARAMETERS_BEGIN(c)
KVSO_PARAMETER("label",KVS_PT_STRING,0,szLabel)
KVSO_PARAMETERS_END(c)
@@ -140,8 +140,8 @@ bool KviKvsObject_toolbar::functionsetStretchableWidget(KviKvsObjectFunctionCall
return TRUE;
}
#ifndef COMPILE_USE_QT4
- // FIXME: no support for this in Qt4 ?
- if(widget()) ((KviTalToolBar *)widget())->setStretchableWidget(((QWidget *)(ob->object())));
+ // FIXME: no support for this in TQt4 ?
+ if(widget()) ((KviTalToolBar *)widget())->setStretchableWidget(((TQWidget *)(ob->object())));
#endif //!COMPILE_USE_QT4
return true;
}
diff --git a/src/modules/objects/class_toolbar.h b/src/modules/objects/class_toolbar.h
index 1912e639..d258f96a 100644
--- a/src/modules/objects/class_toolbar.h
+++ b/src/modules/objects/class_toolbar.h
@@ -32,10 +32,11 @@
class KviKvsObject_toolbar : public KviKvsObject_widget
{
Q_OBJECT
+ TQ_OBJECT
public:
KVSO_DECLARE_OBJECT(KviKvsObject_toolbar)
public:
- QWidget * widget() { return (QWidget *)object(); };
+ TQWidget * widget() { return (TQWidget *)object(); };
protected:
virtual bool init(KviKvsRunTimeContext * pContext,KviKvsVariantList *pParams);
diff --git a/src/modules/objects/class_toolbutton.cpp b/src/modules/objects/class_toolbutton.cpp
index 032b0c60..c8efb269 100644
--- a/src/modules/objects/class_toolbutton.cpp
+++ b/src/modules/objects/class_toolbutton.cpp
@@ -129,28 +129,28 @@ KVSO_END_CONSTRUCTOR(KviKvsObject_toolbutton)
bool KviKvsObject_toolbutton::init(KviKvsRunTimeContext * pContext,KviKvsVariantList *pParams)
{
- setObject(new QToolButton(parentScriptWidget(), name()), true);
- connect(widget(),SIGNAL(clicked()),this,SLOT(slotClicked()));
+ setObject(TQT_TQOBJECT(new TQToolButton(tqparentScriptWidget(), name())), true);
+ connect(widget(),TQT_SIGNAL(clicked()),this,TQT_SLOT(slotClicked()));
return true;
}
bool KviKvsObject_toolbutton::functionsetImage(KviKvsObjectFunctionCall *c)
{
- QString icon;
+ TQString icon;
KVSO_PARAMETERS_BEGIN(c)
KVSO_PARAMETER("icon_id",KVS_PT_STRING,0,icon)
KVSO_PARAMETERS_END(c)
if (!widget()) return true;
- QPixmap * pix = g_pIconManager->getImage(icon);
+ TQPixmap * pix = g_pIconManager->getImage(icon);
if(pix){
#ifdef COMPILE_USE_QT4
- ((QToolButton *)widget())->setIconSet(QIconSet(*pix));
+ ((TQToolButton *)widget())->setIconSet(TQIconSet(*pix));
#else
- ((QToolButton *)widget())->setIconSet(QIconSet(*pix,QIconSet::Small));
+ ((TQToolButton *)widget())->setIconSet(TQIconSet(*pix,TQIconSet::Small));
#endif
}
else
- ((QToolButton *)widget())->setIconSet(QIconSet());
+ ((TQToolButton *)widget())->setIconSet(TQIconSet());
return true;
}
bool KviKvsObject_toolbutton::functionsetUsesBigPixmap(KviKvsObjectFunctionCall *c)
@@ -160,13 +160,13 @@ bool KviKvsObject_toolbutton::functionsetUsesBigPixmap(KviKvsObjectFunctionCall
KVSO_PARAMETER("bEnabled",KVS_PT_BOOL,0,bEnabled)
KVSO_PARAMETERS_END(c)
if(widget())
- ((QToolButton *)widget())->setUsesBigPixmap(bEnabled);
+ ((TQToolButton *)widget())->setUsesBigPixmap(bEnabled);
return true;
}
bool KviKvsObject_toolbutton::functionusesBigPixmap(KviKvsObjectFunctionCall *c)
{
if (widget())
- c->returnValue()->setBoolean(((QToolButton *)widget())->usesBigPixmap());
+ c->returnValue()->setBoolean(((TQToolButton *)widget())->usesBigPixmap());
return true;
}
bool KviKvsObject_toolbutton::functionsetUsesTextLabel(KviKvsObjectFunctionCall *c)
@@ -176,13 +176,13 @@ bool KviKvsObject_toolbutton::functionsetUsesTextLabel(KviKvsObjectFunctionCall
KVSO_PARAMETER("bEnabled",KVS_PT_BOOL,0,bEnabled)
KVSO_PARAMETERS_END(c)
if(widget())
- ((QToolButton *)widget())->setUsesTextLabel(bEnabled);
+ ((TQToolButton *)widget())->setUsesTextLabel(bEnabled);
return true;
}
bool KviKvsObject_toolbutton::functionusesTextLabel(KviKvsObjectFunctionCall *c)
{
if (widget())
- c->returnValue()->setBoolean(((QToolButton *)widget())->usesTextLabel());
+ c->returnValue()->setBoolean(((TQToolButton *)widget())->usesTextLabel());
return true;
}
bool KviKvsObject_toolbutton::function_setAutoRaise(KviKvsObjectFunctionCall *c)
@@ -192,13 +192,13 @@ bool KviKvsObject_toolbutton::function_setAutoRaise(KviKvsObjectFunctionCall *c)
KVSO_PARAMETER("bEnabled",KVS_PT_BOOL,0,bEnabled)
KVSO_PARAMETERS_END(c)
if(widget())
- ((QToolButton *)widget())->setAutoRaise(bEnabled);
+ ((TQToolButton *)widget())->setAutoRaise(bEnabled);
return true;
}
bool KviKvsObject_toolbutton::function_autoRaise(KviKvsObjectFunctionCall *c)
{
if(widget())
- c->returnValue()->setBoolean(((QToolButton *)widget())->autoRaise());
+ c->returnValue()->setBoolean(((TQToolButton *)widget())->autoRaise());
return true;
}
bool KviKvsObject_toolbutton::functionsetOn(KviKvsObjectFunctionCall *c)
@@ -208,7 +208,7 @@ bool KviKvsObject_toolbutton::functionsetOn(KviKvsObjectFunctionCall *c)
KVSO_PARAMETER("bEnabled",KVS_PT_BOOL,0,bEnabled)
KVSO_PARAMETERS_END(c)
if(widget())
- ((QToolButton *)widget())->setOn(bEnabled);
+ ((TQToolButton *)widget())->setOn(bEnabled);
return true;
}
@@ -219,19 +219,19 @@ bool KviKvsObject_toolbutton::functionsetToggleButton(KviKvsObjectFunctionCall *
KVSO_PARAMETER("bEnabled",KVS_PT_BOOL,0,bEnabled)
KVSO_PARAMETERS_END(c)
if(widget())
- ((QToolButton *)widget())->setToggleButton(bEnabled);
+ ((TQToolButton *)widget())->setToggleButton(bEnabled);
return true;
}
bool KviKvsObject_toolbutton::functiontoggle(KviKvsObjectFunctionCall *c)
{
if (widget())
- ((QToolButton *)widget())->toggle();
+ ((TQToolButton *)widget())->toggle();
return true;
}
bool KviKvsObject_toolbutton::functionsetTextLabel(KviKvsObjectFunctionCall *c)
{
- QString szLabel,szTip;
+ TQString szLabel,szTip;
KVSO_PARAMETERS_BEGIN(c)
KVSO_PARAMETER("label",KVS_PT_STRING,0,szLabel)
KVSO_PARAMETER("tooltip",KVS_PT_STRING,KVS_PF_OPTIONAL,szTip)
@@ -239,18 +239,18 @@ bool KviKvsObject_toolbutton::functionsetTextLabel(KviKvsObjectFunctionCall *c)
if(!widget()) return true;
#ifdef COMPILE_USE_QT4
- ((QToolButton *)widget())->setText(szLabel);
- if (!szTip.isEmpty()) ((QToolButton *)widget())->setToolTip(szTip);
+ ((TQToolButton *)widget())->setText(szLabel);
+ if (!szTip.isEmpty()) ((TQToolButton *)widget())->setToolTip(szTip);
#else
- if (szTip.isEmpty()) ((QToolButton *)widget())->setTextLabel(szLabel);
- else ((QToolButton *)widget())->setTextLabel(szLabel,szTip);
+ if (szTip.isEmpty()) ((TQToolButton *)widget())->setTextLabel(szLabel);
+ else ((TQToolButton *)widget())->setTextLabel(szLabel,szTip);
#endif
return true;
}
bool KviKvsObject_toolbutton::functiontextLabel(KviKvsObjectFunctionCall *c)
{
if (widget())
- c->returnValue()->setString(((QToolButton *)widget())->textLabel());
+ c->returnValue()->setString(((TQToolButton *)widget())->textLabel());
return true;
}
bool KviKvsObject_toolbutton::functionsetPopup(KviKvsObjectFunctionCall *c)
@@ -277,13 +277,13 @@ bool KviKvsObject_toolbutton::functionsetPopup(KviKvsObjectFunctionCall *c)
return TRUE;
}
if(widget())
- ((QToolButton *)widget())->setPopup(((KviTalPopupMenu *)(ob->object())));
+ ((TQToolButton *)widget())->setPopup(((KviTalPopupMenu *)(ob->object())));
return true;
}
bool KviKvsObject_toolbutton::functionopenPopup(KviKvsObjectFunctionCall *c)
{
if(widget())
- ((QToolButton *)widget())->openPopup();
+ ((TQToolButton *)widget())->openPopup();
return true;
}
bool KviKvsObject_toolbutton::functionsetPopupDelay(KviKvsObjectFunctionCall *c)
@@ -293,34 +293,34 @@ bool KviKvsObject_toolbutton::functionsetPopupDelay(KviKvsObjectFunctionCall *c)
KVSO_PARAMETER("delay",KVS_PT_UNSIGNEDINTEGER,0,uDelay)
KVSO_PARAMETERS_END(c)
if (widget())
- ((QToolButton *)widget())->setPopupDelay(uDelay);
+ ((TQToolButton *)widget())->setPopupDelay(uDelay);
return true;
}
bool KviKvsObject_toolbutton::functionpopupDelay(KviKvsObjectFunctionCall *c)
{
if (widget())
- c->returnValue()->setInteger(((QToolButton *)widget())->popupDelay());
+ c->returnValue()->setInteger(((TQToolButton *)widget())->popupDelay());
return true;
}
bool KviKvsObject_toolbutton::functionsetTextPosition(KviKvsObjectFunctionCall *c)
{
- QString szPos;
+ TQString szPos;
KVSO_PARAMETERS_BEGIN(c)
KVSO_PARAMETER("position",KVS_PT_STRING,0,szPos)
KVSO_PARAMETERS_END(c)
if(!widget())return true;
- if(KviQString::equalCI(szPos,"BesideIcon"))
- ((QToolButton *)widget())->setTextPosition(QToolButton::BesideIcon);
- else if(KviQString::equalCI(szPos,"BelowIcon"))
- ((QToolButton *)widget())->setTextPosition(QToolButton::BelowIcon);
+ if(KviTQString::equalCI(szPos,"BesideIcon"))
+ ((TQToolButton *)widget())->setTextPosition(TQToolButton::BesideIcon);
+ else if(KviTQString::equalCI(szPos,"BelowIcon"))
+ ((TQToolButton *)widget())->setTextPosition(TQToolButton::BelowIcon);
else c->warning(__tr2qs("Unknown text position '%Q'"),&szPos);
return true;
}
bool KviKvsObject_toolbutton::functiontextPosition(KviKvsObjectFunctionCall *c)
{
if(!widget()) return true;
- QString szPos="BelowIcon";
- if ((((QToolButton *)widget())->textPosition())==(QToolButton::BesideIcon))
+ TQString szPos="BelowIcon";
+ if ((((TQToolButton *)widget())->textPosition())==(TQToolButton::BesideIcon))
szPos="BesideIcon";
c->returnValue()->setString(szPos);
return true;
diff --git a/src/modules/objects/class_toolbutton.h b/src/modules/objects/class_toolbutton.h
index 2cd4dfec..244f6e9a 100644
--- a/src/modules/objects/class_toolbutton.h
+++ b/src/modules/objects/class_toolbutton.h
@@ -25,17 +25,18 @@
//
-#include <qtoolbutton.h>
+#include <tqtoolbutton.h>
#include "class_widget.h"
#include "object_macros.h"
class KviKvsObject_toolbutton : public KviKvsObject_widget
{
Q_OBJECT
+ TQ_OBJECT
public:
KVSO_DECLARE_OBJECT(KviKvsObject_toolbutton)
public:
- QWidget * widget() { return (QWidget *)object(); };
+ TQWidget * widget() { return (TQWidget *)object(); };
protected:
virtual bool init(KviKvsRunTimeContext * pContext,KviKvsVariantList *pParams);
diff --git a/src/modules/objects/class_urllabel.cpp b/src/modules/objects/class_urllabel.cpp
index 544153c2..8b989236 100644
--- a/src/modules/objects/class_urllabel.cpp
+++ b/src/modules/objects/class_urllabel.cpp
@@ -33,10 +33,10 @@
#include "kvi_window.h"
#include "kvi_kvs_script.h"
#ifdef COMPILE_USE_QT4
-#include <QMouseEvent>
-#define QT_LEFT_BUTTON Qt::LeftButton
+#include <TQMouseEvent>
+#define TQT_LEFT_BUTTON Qt::LeftButton
#else
-#define QT_LEFT_BUTTON QEvent::LeftButton
+#define TQT_LEFT_BUTTON Qt::LeftButton
#endif
//#warning "Functions to change colors for different states"
//#warning "$setUnderline(), $underline()"
@@ -53,39 +53,39 @@ static KviScriptObject * urlLabelClassCreateInstance(KviScriptObjectClass * c,
KviScriptUrlLabelObject::KviScriptUrlLabelObject(KviScriptObjectClass * c, \
KviScriptObject * p, const char *n) : KviScriptLabelObject(c, p, n)
{
- m_normalClr = QColor("black");
- m_enterClr = QColor("blue");
- m_activeClr = QColor("red");
+ m_normalClr = TQColor("black");
+ m_enterClr = TQColor("blue");
+ m_activeClr = TQColor("red");
m_useSingleClick = true;
-// ((QLabel *)widget())->setAutoResize(true);
- //widget()->setCursor(Qt::pointingHandCursor);
- //((KviScriptWidgetObject: * )p)->widget()->setCursor(Qt::pointingHandCursor);
+// ((TQLabel *)widget())->setAutoResize(true);
+ //widget()->setCursor(TQt::pointingHandCursor);
+ //((KviScriptWidgetObject: * )p)->widget()->setCursor(TQt::pointingHandCursor);
}
KviScriptUrlLabelObject::~KviScriptUrlLabelObject()
{
}
-bool KviScriptUrlLabelObject::eventFilter(QObject * o, QEvent * e)
+bool KviScriptUrlLabelObject::eventFilter(TQObject * o, TQEvent * e)
{
- QPalette pal = ((QLabel *)widget())->palette();
+ TQPalette pal = ((TQLabel *)widget())->palette();
switch(e->type())
{
- case QEvent::Enter:
- pal.setColor(QColorGroup::Foreground, m_enterClr);
+ case TQEvent::Enter:
+ pal.setColor(TQColorGroup::Foreground, m_enterClr);
break;
- case QEvent::Leave:
+ case TQEvent::Leave:
// this doesn't work...
- if(((QMouseEvent *)e)->state() & QEvent::LeftButton)
- pal.setColor(QColorGroup::Foreground, \
+ if(((TQMouseEvent *)e)->state() & TQEvent::LeftButton)
+ pal.setColor(TQColorGroup::Foreground, \
m_activeClr);
else
- pal.setColor(QColorGroup::Foreground, \
+ pal.setColor(TQColorGroup::Foreground, \
m_normalClr);
break;
- case QEvent::MouseButtonRelease:
- pal.setColor(QColorGroup::Foreground, m_enterClr);
+ case TQEvent::MouseButtonRelease:
+ pal.setColor(TQColorGroup::Foreground, m_enterClr);
// perform actions here
if(!m_lastClickWasDbl && !m_useSingleClick)
break;
@@ -94,24 +94,24 @@ bool KviScriptUrlLabelObject::eventFilter(QObject * o, QEvent * e)
}
break;
- case QEvent::MouseButtonPress:
+ case TQEvent::MouseButtonPress:
m_lastClickWasDbl = false;
- if(!((QMouseEvent * )e)->button() & \
- QEvent::LeftButton || !m_useSingleClick)
+ if(!((TQMouseEvent * )e)->button() & \
+ TQEvent::LeftButton || !m_useSingleClick)
break;
- pal.setColor(QColorGroup::Foreground, m_activeClr);
+ pal.setColor(TQColorGroup::Foreground, m_activeClr);
break;
- case QEvent::MouseButtonDblClick:
+ case TQEvent::MouseButtonDblClick:
m_lastClickWasDbl = true;
if(m_useSingleClick)
break;
- pal.setColor(QColorGroup::Foreground, m_activeClr);
+ pal.setColor(TQColorGroup::Foreground, m_activeClr);
break;
default: // make gcc happy
break;
}
- ((QLabel *)widget())->setPalette(pal);
+ ((TQLabel *)widget())->setPalette(pal);
return false;
}
@@ -152,7 +152,7 @@ bool KviScriptUrlLabelObject::eventFilter(QObject * o, QEvent * e)
!fn: $setText(<text>)
Sets the label's text. Reimplemented from internal reasons.
!fn: $setCursorChange(<bEnabled:boolean>)
- Tells the label wheather to change or not the shape of cursor,
+ Tells the label wheather to change or not the tqshape of cursor,
when it is above the widget. Default is false.
!fn: <boolean> $cursorChange()
Returns true if the cursor changes over the label, false if not.
@@ -181,9 +181,9 @@ KVSO_END_REGISTERCLASS(KviKvsObject_urlabel)
KVSO_BEGIN_CONSTRUCTOR(KviKvsObject_urlabel,KviKvsObject_label)
- m_normalClr = QColor("black");
- m_enterClr = QColor("blue");
- m_activeClr = QColor("red");
+ m_normalClr = TQColor("black");
+ m_enterClr = TQColor("blue");
+ m_activeClr = TQColor("red");
m_useSingleClick = true;
KVSO_END_CONSTRUCTOR(KviKvsObject_urlabel)
@@ -192,26 +192,26 @@ KVSO_BEGIN_DESTRUCTOR(KviKvsObject_urlabel)
KVSO_END_CONSTRUCTOR(KviKvsObject_urlabel)
-bool KviKvsObject_urlabel::eventFilter(QObject * o, QEvent * e)
+bool KviKvsObject_urlabel::eventFilter(TQObject * o, TQEvent * e)
{
- QPalette pal = ((QLabel *)widget())->palette();
+ TQPalette pal = ((TQLabel *)widget())->palette();
switch(e->type())
{
- case QEvent::Enter:
- pal.setColor(QColorGroup::Foreground, m_enterClr);
+ case TQEvent::Enter:
+ pal.setColor(TQColorGroup::Foreground, m_enterClr);
break;
- case QEvent::Leave:
+ case TQEvent::Leave:
// this doesn't work...
- if(((QMouseEvent *)e)->state() & QT_LEFT_BUTTON)
- pal.setColor(QColorGroup::Foreground, \
+ if(((TQMouseEvent *)e)->state() & TQT_LEFT_BUTTON)
+ pal.setColor(TQColorGroup::Foreground, \
m_activeClr);
else
- pal.setColor(QColorGroup::Foreground, \
+ pal.setColor(TQColorGroup::Foreground, \
m_normalClr);
break;
- case QEvent::MouseButtonRelease:
- pal.setColor(QColorGroup::Foreground, m_enterClr);
+ case TQEvent::MouseButtonRelease:
+ pal.setColor(TQColorGroup::Foreground, m_enterClr);
// perform actions here
if(!m_lastClickWasDbl && !m_useSingleClick)
break;
@@ -225,30 +225,30 @@ bool KviKvsObject_urlabel::eventFilter(QObject * o, QEvent * e)
kvs.run(g_pActiveWindow,0,0/*,KviKvsScript::AssumeLocals*/);
}
break;
- case QEvent::MouseButtonPress:
+ case TQEvent::MouseButtonPress:
m_lastClickWasDbl = false;
- if(!((QMouseEvent * )e)->button() & \
- QT_LEFT_BUTTON || !m_useSingleClick)
+ if(!((TQMouseEvent * )e)->button() & \
+ TQT_LEFT_BUTTON || !m_useSingleClick)
break;
- pal.setColor(QColorGroup::Foreground, m_activeClr);
+ pal.setColor(TQColorGroup::Foreground, m_activeClr);
break;
- case QEvent::MouseButtonDblClick:
+ case TQEvent::MouseButtonDblClick:
m_lastClickWasDbl = true;
if(m_useSingleClick)
break;
- pal.setColor(QColorGroup::Foreground, m_activeClr);
+ pal.setColor(TQColorGroup::Foreground, m_activeClr);
break;
default: // make gcc happy
break;
}
- ((QLabel *)widget())->setPalette(pal);
+ ((TQLabel *)widget())->setPalette(pal);
return false;
}
bool KviKvsObject_urlabel::functionsetUrl(KviKvsObjectFunctionCall *c)
{
- QString szUrl;
+ TQString szUrl;
KVSO_PARAMETERS_BEGIN(c)
KVSO_PARAMETER("url",KVS_PT_STRING,0,szUrl)
KVSO_PARAMETERS_END(c)
@@ -267,7 +267,7 @@ bool KviKvsObject_urlabel::functionurl(KviKvsObjectFunctionCall *c)
}
bool KviKvsObject_urlabel::functionsetAction(KviKvsObjectFunctionCall *c)
{
- QString szAction;
+ TQString szAction;
KVSO_PARAMETERS_BEGIN(c)
KVSO_PARAMETER("action",KVS_PT_STRING,0,szAction)
KVSO_PARAMETERS_END(c)
@@ -281,13 +281,13 @@ bool KviKvsObject_urlabel::functionsetAction(KviKvsObjectFunctionCall *c)
}
bool KviKvsObject_urlabel::functionsetText(KviKvsObjectFunctionCall *c)
{
- QString szText;
+ TQString szText;
KVSO_PARAMETERS_BEGIN(c)
KVSO_PARAMETER("text",KVS_PT_STRING,0,szText)
KVSO_PARAMETERS_END(c)
if(!widget()) return true;
- ((QLabel *)widget())->setText(szText);
- ((QLabel *)widget())->setFixedSize(((QLabel *)widget())->sizeHint());
+ ((TQLabel *)widget())->setText(szText);
+ ((TQLabel *)widget())->setFixedSize(((TQLabel *)widget())->tqsizeHint());
return true;
}
bool KviKvsObject_urlabel::functionaction(KviKvsObjectFunctionCall *c)
@@ -304,9 +304,9 @@ bool KviKvsObject_urlabel::functionsetCursorChange(KviKvsObjectFunctionCall *c)
if(!widget())
return true;
if(m_changeCursor = bFlag)
- widget()->setCursor(Qt::pointingHandCursor);
+ widget()->setCursor(TQt::pointingHandCursor);
else
- widget()->setCursor(Qt::arrowCursor);
+ widget()->setCursor(TQt::arrowCursor);
return true;
}
bool KviKvsObject_urlabel::functionsetUseSingleClick(KviKvsObjectFunctionCall *c)
diff --git a/src/modules/objects/class_urllabel.h b/src/modules/objects/class_urllabel.h
index b9ee35d6..a36d910e 100644
--- a/src/modules/objects/class_urllabel.h
+++ b/src/modules/objects/class_urllabel.h
@@ -33,9 +33,9 @@ class KviKvsObject_urlabel : public KviKvsObject_label
public:
KVSO_DECLARE_OBJECT(KviKvsObject_urlabel)
public:
- QWidget * widget() { return (QWidget *)object(); };
+ TQWidget * widget() { return (TQWidget *)object(); };
protected:
- virtual bool eventFilter(QObject *, QEvent *);
+ virtual bool eventFilter(TQObject *, TQEvent *);
bool functionsetUrl(KviKvsObjectFunctionCall *c);
bool functionsetAction(KviKvsObjectFunctionCall *c);
@@ -47,12 +47,12 @@ protected:
bool functionsetUseSingleClick(KviKvsObjectFunctionCall *c);
bool functionuseSingleClick(KviKvsObjectFunctionCall *c);
- QString m_url;
- QString m_action;
+ TQString m_url;
+ TQString m_action;
- QColor m_normalClr;
- QColor m_enterClr;
- QColor m_activeClr;
+ TQColor m_normalClr;
+ TQColor m_enterClr;
+ TQColor m_activeClr;
bool m_changeCursor;
bool m_useSingleClick;
diff --git a/src/modules/objects/class_vbox.cpp b/src/modules/objects/class_vbox.cpp
index 477a5b69..edec898e 100644
--- a/src/modules/objects/class_vbox.cpp
+++ b/src/modules/objects/class_vbox.cpp
@@ -35,16 +35,16 @@
@type:
class
@short:
- Manages child widget vertical geometry
+ Manages child widget vertical tqgeometry
@inherits:
[class]object[/class]
@description:
- The vbox class widget provides vertical geometry management for its child widgets.
+ The vbox class widget provides vertical tqgeometry management for its child widgets.
@functions:
!fn: $setSpacing(<spacing:int>)
Sets the default spacing of the widgets in pixels
!fn: $setMargin(<margin:int>)
- Sets the dimension of the layout margin : the distance from the border to the outermost child widget edges.
+ Sets the dimension of the tqlayout margin : the distance from the border to the outermost child widget edges.
!fn: $setStretchFactor(<widget:hobject>,<stretch:uint>)
Sets the stretch factor of widget to stretch.
*/
@@ -67,7 +67,7 @@ KVSO_END_CONSTRUCTOR(KviKvsObject_vbox)
bool KviKvsObject_vbox::init(KviKvsRunTimeContext * pContext,KviKvsVariantList *pParams)
{
- setObject(new KviTalVBox(parentScriptWidget()), true);
+ setObject(TQT_TQOBJECT(new KviTalVBox(tqparentScriptWidget())), true);
return true;
}
@@ -118,11 +118,11 @@ bool KviKvsObject_vbox::functionsetStretchFactor(KviKvsObjectFunctionCall *c)
return true;
}
- if(((KviKvsObject_widget *)pObject)->widget()->parentWidget() != widget())
+ if(((KviKvsObject_widget *)pObject)->widget()->tqparentWidget() != widget())
{
c->warning(__tr2qs("The widget must be a child of this vbox"));
return true;
}
- ((KviTalVBox *)widget())->setStretchFactor(((QWidget *)(pObject->object())),uStretch);
+ ((KviTalVBox *)widget())->setStretchFactor(((TQWidget *)(pObject->object())),uStretch);
return true;
} \ No newline at end of file
diff --git a/src/modules/objects/class_vbox.h b/src/modules/objects/class_vbox.h
index d6b9d1cf..24e85e08 100644
--- a/src/modules/objects/class_vbox.h
+++ b/src/modules/objects/class_vbox.h
@@ -32,7 +32,7 @@ class KviKvsObject_vbox : public KviKvsObject_widget
public:
KVSO_DECLARE_OBJECT(KviKvsObject_vbox)
public:
- QWidget * widget() { return (QWidget *)object(); };
+ TQWidget * widget() { return (TQWidget *)object(); };
protected:
virtual bool init(KviKvsRunTimeContext * pContext,KviKvsVariantList *pParams);
bool functionsetMargin(KviKvsObjectFunctionCall *c);
diff --git a/src/modules/objects/class_widget.cpp b/src/modules/objects/class_widget.cpp
index d248c98b..6790bbf6 100644
--- a/src/modules/objects/class_widget.cpp
+++ b/src/modules/objects/class_widget.cpp
@@ -33,26 +33,26 @@
#include "kvi_mirccntrl.h"
#include "kvi_app.h"
#include "kvi_string.h"
-#include <qcursor.h>
-#include <qiconset.h>
-#include <qcolor.h>
-#include <qlayout.h>
-#include <qbitmap.h>
-#include <qmetaobject.h>
+#include <tqcursor.h>
+#include <tqiconset.h>
+#include <tqcolor.h>
+#include <tqlayout.h>
+#include <tqbitmap.h>
+#include <tqmetaobject.h>
#include "class_widget.h"
#include "class_pixmap.h"
#ifdef COMPILE_USE_QT4
- #include <QKeyEvent>
- #include <QDesktopWidget>
+ #include <TQKeyEvent>
+ #include <TQDesktopWidget>
#else
- #include <qwidgetlist.h>
+ #include <tqwidgetlist.h>
#endif
-#include <qwidget.h>
-#include <qtooltip.h>
-#include <qfont.h>
-#include <qvariant.h>
+#include <tqwidget.h>
+#include <tqtooltip.h>
+#include <tqfont.h>
+#include <tqvariant.h>
// FIX ME: WFLAGS
const char * const widgettypes_tbl[] = {
@@ -69,11 +69,11 @@ const char * const widgettypes_tbl[] = {
"NoAutoErase"
};
#ifdef COMPILE_USE_QT4
-const Qt::WidgetAttribute widgetattributes_cod[]= {
- Qt::WA_OpaquePaintEvent,
- Qt::WA_NoSystemBackground,
- Qt::WA_PaintOnScreen,
- Qt::WA_NoMousePropagation,
+const TQt::WidgetAttribute widgetattributes_cod[]= {
+ TQt::WA_OpaquePaintEvent,
+ TQt::WA_NoSystemBackground,
+ TQt::WA_PaintOnScreen,
+ TQt::WA_NoMousePropagation,
};
const char * const widgetattributes_tbl[] = {
@@ -85,36 +85,36 @@ const char * const widgetattributes_tbl[] = {
#define widgetattributes_num (sizeof(widgetattributes_tbl) / sizeof(widgetattributes_tbl[0]))
-const Qt::WindowType widgettypes_cod[] = {
+const TQt::WindowType widgettypes_cod[] = {
#else
const int widgettypes_cod[] = {
#endif
- Qt::WType_TopLevel,
- Qt::WType_Dialog,
- Qt::WType_Popup,
- Qt::WType_Desktop,
- Qt::WStyle_Customize,
- Qt::WStyle_Title,
- Qt::WStyle_StaysOnTop,
- Qt::WStyle_SysMenu,
- Qt::WStyle_Minimize,
- Qt::WStyle_Maximize,
- Qt::WNoAutoErase
+ TQt::WType_TopLevel,
+ TQt::WType_Dialog,
+ TQt::WType_Popup,
+ TQt::WType_Desktop,
+ TQt::WStyle_Customize,
+ TQt::WStyle_Title,
+ TQt::WStyle_StaysOnTop,
+ TQt::WStyle_SysMenu,
+ TQt::WStyle_Minimize,
+ TQt::WStyle_Maximize,
+ TQt::WNoAutoErase
};
#ifdef COMPILE_USE_QT4
- #define QT_WIDGET_TABFOCUS Qt::TabFocus
- #define QT_WIDGET_CLICKFOCUS Qt::ClickFocus
- #define QT_WIDGET_STRONGFOCUS Qt::StrongFocus
- #define QT_WIDGET_NOFOCUS Qt::NoFocus
+ #define TQT_WIDGET_TABFOCUS TTQ_TabFocus
+ #define TQT_WIDGET_CLICKFOCUS TTQ_ClickFocus
+ #define TQT_WIDGET_STRONGFOCUS TTQ_StrongFocus
+ #define TQT_WIDGET_NOFOCUS TTQ_NoFocus
#else
- #define QT_WIDGET_TABFOCUS QWidget::TabFocus
- #define QT_WIDGET_CLICKFOCUS QWidget::ClickFocus
- #define QT_WIDGET_STRONGFOCUS QWidget::StrongFocus
- #define QT_WIDGET_NOFOCUS QWidget::NoFocus
+ #define TQT_WIDGET_TABFOCUS TQ_TabFocus
+ #define TQT_WIDGET_CLICKFOCUS TQ_ClickFocus
+ #define TQT_WIDGET_STRONGFOCUS TQ_StrongFocus
+ #define TQT_WIDGET_NOFOCUS TQ_NoFocus
#endif
@@ -137,52 +137,52 @@ 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()
Returns the x coordinate of the upper-left corner
- of this widget relative to the parent widget,
+ of this widget relative to the tqparent widget,
or to the desktop if this widget is a toplevel one.
!fn: $y()
Returns the y coordinate of the uspper-left corner
- of this widget relative to the parent widget,
+ of this widget relative to the tqparent widget,
or to the desktop if this widget is a toplevel one.
!fn: $width()
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
- to the parent widget or to the desktop (if this widget is
+ Sets the tqgeometry of this widget. <x> and <y> are relative
+ to the tqparent 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).
+ tqparent widget (or the desktop if this widget is a toplevel one).
This is equivalent to [classfnc]$setGeometry[/classfnc](<x>,<y>,
[classfnc]$width[/classfnc](),[classfnc]$height[/classfnc]()).
!fn: $resize(<w_or_array>,[height])
@@ -202,7 +202,7 @@ const int widgettypes_cod[] = {
!fn: $window.caption()
Returns the caption text of this widget.
!fn: $isTopLevel()
- Returns '1' if this widget is a toplevel (parentless) one,
+ Returns '1' if this widget is a toplevel (tqparentless) one,
'0' otherwise.
!fn: $isVisible()
Returns '1' if this widget is currently visible (read: is managed
@@ -212,18 +212,18 @@ const int widgettypes_cod[] = {
See also [classfnc]$show[/classfnc]() and [classfnc]$hide[/classfnc]().
!fn: $raise()
Moves this widget to the top of the stack of the widgets relative
- to its parent. See also [classfnc]$lower[/classfnc].
+ to its tqparent. See also [classfnc]$lower[/classfnc].
!fn: $lower()
Moves this widget to the bottom of the stack of the widgets relative
- to its parent. See also [classfnc]$raise[/classfnc]
+ to its tqparent. See also [classfnc]$raise[/classfnc]
!fn: $hasFocus()
Returns '1' if this widget has the keyboard focus.
See also [classfnc]$setFocus[/classfnc].
!fn: $setFocus()
Sets this widget to be the one that receives keyboard events.
See also [classfnc]$hasFocus[/classfnc]
- !fn: $parentWidget()
- Returns the object id of the parent widget, or '0' if this
+ !fn: $tqparentWidget()
+ Returns the object id of the tqparent widget, or '0' if this
widget is a toplevel one.
!fn: $backgroundColor()
Returns the background color of this widget in hexadecimal
@@ -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
@@ -521,8 +521,8 @@ const int widgettypes_cod[] = {
// but in derived classes WILL be
// ... now that I think about it , it
// may happen that widget() will be zero here too:
- // If the Qt "physical" widget gets destroyed
- // by some external factor (for example when children
+ // If the TQt "physical" widget gets destroyed
+ // 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)
@@ -639,11 +639,11 @@ KVSO_END_CONSTRUCTOR(KviKvsObject_widget)
bool KviKvsObject_widget::init(KviKvsRunTimeContext * pContext,KviKvsVariantList * pParams)
{
- setObject(new QWidget(parentScriptWidget(),getName()),true);
+ setObject(TQT_TQOBJECT(new TQWidget(tqparentScriptWidget(),getName())),true);
return true;
}
-bool KviKvsObject_widget::eventFilter(QObject *o,QEvent *e)
+bool KviKvsObject_widget::eventFilter(TQObject *o,TQEvent *e)
{
if(o == object())
{
@@ -655,203 +655,203 @@ bool KviKvsObject_widget::eventFilter(QObject *o,QEvent *e)
switch(e->type())
{
#ifdef COMPILE_USE_QT4
- case QEvent::ToolTip:
+ case TQEvent::ToolTip:
{
- QHelpEvent *helpEvent = static_cast<QHelpEvent *>(e);
- QPoint point=helpEvent->pos();
- QString szTooltip;
+ TQHelpEvent *helpEvent = static_cast<TQHelpEvent *>(e);
+ TQPoint point=helpEvent->pos();
+ TQString szTooltip;
KviKvsVariant *tipret=new KviKvsVariant(szTooltip);
KviKvsVariantList params(new KviKvsVariant((kvs_int_t)point.x()),new KviKvsVariant((kvs_int_t)point.y()));
callFunction(this,"maybeTipEvent",tipret,&params);
tipret->asString(szTooltip);
- QToolTip::showText(helpEvent->globalPos(),szTooltip);
+ TQToolTip::showText(helpEvent->globalPos(),szTooltip);
break;
}
#endif
- case QEvent::Paint:
+ case TQEvent::Paint:
{
- QRect rect=((QPaintEvent *)e)->rect();
+ TQRect rect=((TQPaintEvent *)e)->rect();
KviKvsVariantList params(new KviKvsVariant((kvs_int_t)rect.x()),new KviKvsVariant((kvs_int_t)rect.y()),new KviKvsVariant((kvs_int_t)rect.width()),new KviKvsVariant((kvs_int_t)rect.height()));
callFunction(this,"paintEvent",retv,&params);
break;
}
- case QEvent::KeyPress:
+ case TQEvent::KeyPress:
{
- QString tmp="";
- switch(((QKeyEvent *)e)->key())
+ TQString tmp="";
+ switch(((TQKeyEvent *)e)->key())
{
- case Qt::Key_Return:
+ case TQt::Key_Return:
tmp="Return";
break;
- case Qt::Key_Down:
+ case TQt::Key_Down:
tmp="Down";
break;
- case Qt::Key_Up:
+ case TQt::Key_Up:
tmp="Up";
break;
- case Qt::Key_Left:
+ case TQt::Key_Left:
tmp="Left";
break;
- case Qt::Key_Right:
+ case TQt::Key_Right:
tmp="Right";
break;
- case Qt::Key_Shift:
+ case TQt::Key_Shift:
tmp="Shift";
break;
- case Qt::Key_Control:
+ case TQt::Key_Control:
tmp="Ctrl";
break;
- case Qt::Key_Alt:
+ case TQt::Key_Alt:
tmp="Alt";
break;
- case Qt::Key_CapsLock:
+ case TQt::Key_CapsLock:
tmp="CapsLock";
break;
- case Qt::Key_Backspace:
+ case TQt::Key_Backspace:
tmp="Backspace";
break;
- case Qt::Key_Delete:
+ case TQt::Key_Delete:
tmp="Del";
break;
- case Qt::Key_Enter:
+ case TQt::Key_Enter:
tmp="Enter";
break;
- case Qt::Key_Escape:
+ case TQt::Key_Escape:
tmp="Esc";
break;
- case Qt::Key_0:
+ case TQt::Key_0:
tmp="0";
- case Qt::Key_1:
+ case TQt::Key_1:
tmp="1";
break;
- case Qt::Key_2:
+ case TQt::Key_2:
tmp="2";
break;
- case Qt::Key_3:
+ case TQt::Key_3:
tmp="3";
break;
- case Qt::Key_4:
+ case TQt::Key_4:
tmp="4";
break;
- case Qt::Key_5:
+ case TQt::Key_5:
tmp="5";
break;
- case Qt::Key_6:
+ case TQt::Key_6:
tmp="6";
break;
- case Qt::Key_7:
+ case TQt::Key_7:
tmp="7";
break;
- case Qt::Key_8:
+ case TQt::Key_8:
tmp="8";
break;
- case Qt::Key_9:
+ case TQt::Key_9:
tmp="9";
break;
- case Qt::Key_Plus:
+ case TQt::Key_Plus:
tmp="+";
break;
- case Qt::Key_Minus:
+ case TQt::Key_Minus:
tmp="-";
break;
- case Qt::Key_Slash:
+ case TQt::Key_Slash:
tmp="/";
break;
- case Qt::Key_Asterisk:
+ case TQt::Key_Asterisk:
tmp="*";
break;
- case Qt::Key_Period:
+ case TQt::Key_Period:
tmp=".";
break;
- case Qt::Key_ParenLeft:
+ case TQt::Key_ParenLeft:
tmp="(";
break;
- case Qt::Key_ParenRight:
+ case TQt::Key_ParenRight:
tmp=")";
break;
- case Qt::Key_Equal:
+ case TQt::Key_Equal:
tmp="=";
break;
- case Qt::Key_AsciiCircum:
+ case TQt::Key_AsciiCircum:
tmp="^";
break;
default:
- if (!((QKeyEvent *)e)->text().isEmpty()) tmp = ((QKeyEvent *)e)->text();
+ if (!((TQKeyEvent *)e)->text().isEmpty()) tmp = ((TQKeyEvent *)e)->text();
}
KviKvsVariantList params(new KviKvsVariant(tmp));
callFunction(this,"keyPressEvent",0,&params);
}
break;
- case QEvent::MouseButtonPress:
- if(((QMouseEvent *)e)->button() & Qt::LeftButton)aparam = 0;
+ case TQEvent::MouseButtonPress:
+ if(((TQMouseEvent *)e)->button() & Qt::LeftButton)aparam = 0;
else {
- if(((QMouseEvent *)e)->button() & Qt::RightButton)aparam = 1;
+ if(((TQMouseEvent *)e)->button() & Qt::RightButton)aparam = 1;
else aparam = 2;
}
- if(!callFunction(this,"mousePressEvent",retv,new KviKvsVariantList(new KviKvsVariant((kvs_int_t)aparam),new KviKvsVariant((kvs_int_t)((QMouseEvent *)e)->pos().x()),new KviKvsVariant((kvs_int_t)((QMouseEvent *)e)->pos().y())
+ if(!callFunction(this,"mousePressEvent",retv,new KviKvsVariantList(new KviKvsVariant((kvs_int_t)aparam),new KviKvsVariant((kvs_int_t)((TQMouseEvent *)e)->pos().x()),new KviKvsVariant((kvs_int_t)((TQMouseEvent *)e)->pos().y())
))) brokenhandler = true; // ignore results of a broken event handler
break;
- case QEvent::MouseButtonRelease:
- if(((QMouseEvent *)e)->button() & Qt::LeftButton)aparam = 0;
+ case TQEvent::MouseButtonRelease:
+ if(((TQMouseEvent *)e)->button() & Qt::LeftButton)aparam = 0;
else {
- if(((QMouseEvent *)e)->button() & Qt::RightButton)aparam = 1;
+ if(((TQMouseEvent *)e)->button() & Qt::RightButton)aparam = 1;
else aparam = 2;
}
- if(!callFunction(this,"mouseReleaseEvent",retv,new KviKvsVariantList(new KviKvsVariant((kvs_int_t)aparam),new KviKvsVariant((kvs_int_t)((QMouseEvent *)e)->pos().x()),new KviKvsVariant((kvs_int_t)((QMouseEvent *)e)->pos().y())
+ if(!callFunction(this,"mouseReleaseEvent",retv,new KviKvsVariantList(new KviKvsVariant((kvs_int_t)aparam),new KviKvsVariant((kvs_int_t)((TQMouseEvent *)e)->pos().x()),new KviKvsVariant((kvs_int_t)((TQMouseEvent *)e)->pos().y())
))) brokenhandler = true; // ignore results of a broken event handler
break;
- case QEvent::MouseButtonDblClick:
- if(( (QMouseEvent *)e)->button() & Qt::LeftButton)aparam = 0;
+ case TQEvent::MouseButtonDblClick:
+ if(( (TQMouseEvent *)e)->button() & Qt::LeftButton)aparam = 0;
else {
- if(((QMouseEvent *)e)->button() & Qt::RightButton)aparam = 1;
+ if(((TQMouseEvent *)e)->button() & Qt::RightButton)aparam = 1;
else aparam = 2;
}
- if(!callFunction(this,"mouseDoubleClickEvent",retv,new KviKvsVariantList(new KviKvsVariant((kvs_int_t)aparam),new KviKvsVariant((kvs_int_t)((QMouseEvent *)e)->pos().x()),new KviKvsVariant((kvs_int_t)((QMouseEvent *)e)->pos().y())
+ if(!callFunction(this,"mouseDoubleClickEvent",retv,new KviKvsVariantList(new KviKvsVariant((kvs_int_t)aparam),new KviKvsVariant((kvs_int_t)((TQMouseEvent *)e)->pos().x()),new KviKvsVariant((kvs_int_t)((TQMouseEvent *)e)->pos().y())
))) brokenhandler = true; // ignore results of a broken event handler
break;
- case QEvent::MouseMove:
- if( (((QMouseEvent *)e)->state()) & Qt::LeftButton) aparam = 0;
+ case TQEvent::MouseMove:
+ if( (((TQMouseEvent *)e)->state()) & Qt::LeftButton) aparam = 0;
else
{
- if(((QMouseEvent *)e)->state() & Qt::RightButton)aparam = 1;
+ if(((TQMouseEvent *)e)->state() & Qt::RightButton)aparam = 1;
else
{
- if(((QMouseEvent *)e)->state() & Qt::MidButton)aparam = 2;
+ if(((TQMouseEvent *)e)->state() & Qt::MidButton)aparam = 2;
else aparam = -1;
}
}
- if(!callFunction(this,"mouseMoveEvent",retv,new KviKvsVariantList(new KviKvsVariant((kvs_int_t)aparam),new KviKvsVariant((kvs_int_t)((QMouseEvent *)e)->pos().x()),new KviKvsVariant((kvs_int_t)((QMouseEvent *)e)->pos().y())
+ if(!callFunction(this,"mouseMoveEvent",retv,new KviKvsVariantList(new KviKvsVariant((kvs_int_t)aparam),new KviKvsVariant((kvs_int_t)((TQMouseEvent *)e)->pos().x()),new KviKvsVariant((kvs_int_t)((TQMouseEvent *)e)->pos().y())
))) brokenhandler = true; // ignore results of a broken event handler
break;
- case QEvent::FocusIn:
+ case TQEvent::FocusIn:
if(!callFunction(this,"focusInEvent",retv,0))brokenhandler = true;
break;
- case QEvent::FocusOut:
+ case TQEvent::FocusOut:
if(!callFunction(this,"focusOutEvent",retv,0))brokenhandler = true;
break;
- case QEvent::Resize:
+ case TQEvent::Resize:
if(!callFunction(this,"resizeEvent",retv,0))brokenhandler = true;
break;
- case QEvent::Move:
+ case TQEvent::Move:
if(!callFunction(this,"moveEvent",retv,0))brokenhandler = true;
break;
- case QEvent::Close:
+ case TQEvent::Close:
if(!callFunction(this,"closeEvent",retv,0))brokenhandler = true;
break;
- case QEvent::Enter:
+ case TQEvent::Enter:
if(!callFunction(this,"mouseEnterEvent",retv,0))brokenhandler = true;
break;
- case QEvent::Leave:
+ case TQEvent::Leave:
if(!callFunction(this,"mouseLeaveEvent",retv,0))brokenhandler = true;
break;
- case QEvent::Show:
+ case TQEvent::Show:
if(!callFunction(this,"showEvent",retv,0))brokenhandler = true;
break;
- case QEvent::Hide:
+ case TQEvent::Hide:
if(!callFunction(this,"hideEvent",retv,0))ret =false;
break;
default:
@@ -865,7 +865,7 @@ bool KviKvsObject_widget::eventFilter(QObject *o,QEvent *e)
/*
if(ret.length() == 1)
{
- if(KviQString::equalCI("1",ret))return true;
+ if(KviTQString::equalCI("1",ret))return true;
}
*/
}
@@ -900,7 +900,7 @@ bool KviKvsObject_widget::function_isEnabled(KviKvsObjectFunctionCall *c)
bool KviKvsObject_widget::function_fontDescent(KviKvsObjectFunctionCall * c)
{
if(!widget()) return true;
- QFontMetrics fm = widget()->fontMetrics();
+ TQFontMetrics fm = widget()->fontMetrics();
int d = fm.descent();
c->returnValue()->setInteger(d);
return true;
@@ -909,27 +909,27 @@ bool KviKvsObject_widget::function_fontDescent(KviKvsObjectFunctionCall * c)
bool KviKvsObject_widget::function_fontAscent(KviKvsObjectFunctionCall * c)
{
if(!widget()) return true;
- QFontMetrics fm = widget()->fontMetrics();
+ TQFontMetrics fm = widget()->fontMetrics();
int d = fm.ascent();
c->returnValue()->setInteger(d);
return true;
}
-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;
}
bool KviKvsObject_widget::function_fontMetricsWidth(KviKvsObjectFunctionCall * c)
{
- QString m_szStr;
+ TQString m_szStr;
KVSO_PARAMETERS_BEGIN(c)
KVSO_PARAMETER("string",KVS_PT_STRING,0,m_szStr)
KVSO_PARAMETERS_END(c)
@@ -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)
{
- QRect r = widget() ? widget()->geometry() : QRect(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
@@ -1049,7 +1049,7 @@ bool KviKvsObject_widget::function_mapToGlobal(KviKvsObjectFunctionCall *c)
KVSO_PARAMETER("x",KVS_PT_INT,0,iX)
KVSO_PARAMETER("y",KVS_PT_INT,0,iY)
KVSO_PARAMETERS_END(c)
- QPoint point=widget()->mapToGlobal(QPoint(iX,iY));
+ TQPoint point=widget()->mapToGlobal(TQPoint(iX,iY));
KviKvsArray * a = new KviKvsArray();
a->set(0,new KviKvsVariant((kvs_int_t)point.x()));
a->set(1,new KviKvsVariant((kvs_int_t)point.y()));
@@ -1066,7 +1066,7 @@ bool KviKvsObject_widget::function_mapFromGlobal(KviKvsObjectFunctionCall *c)
KVSO_PARAMETER("x",KVS_PT_INT,0,iX)
KVSO_PARAMETER("y",KVS_PT_INT,0,iY)
KVSO_PARAMETERS_END(c)
- QPoint point=widget()->mapFromGlobal(QPoint(iX,iY));
+ TQPoint point=widget()->mapFromGlobal(TQPoint(iX,iY));
KviKvsArray * a = new KviKvsArray();
a->set(0,new KviKvsVariant((kvs_int_t)point.x()));
a->set(1,new KviKvsVariant((kvs_int_t)point.y()));
@@ -1115,7 +1115,7 @@ bool KviKvsObject_widget::function_setPaletteForeground(KviKvsObjectFunctionCall
if (c->params()->count()==1)
{
bool bOk,bOk1,bOk2;
- QString value;
+ TQString value;
pColArray->asString(value);
int i=0;
if (value.length()!=6)
@@ -1123,7 +1123,7 @@ bool KviKvsObject_widget::function_setPaletteForeground(KviKvsObjectFunctionCall
c->warning(__tr2qs("A string of 6 digits hex is required"));
return true;
}
- QString buffer(value.mid(0,2));
+ TQString buffer(value.mid(0,2));
iColR=buffer.toInt(&bOk,16);
buffer=value.mid(2,2);
iColG=buffer.toInt(&bOk1,16);
@@ -1134,7 +1134,7 @@ bool KviKvsObject_widget::function_setPaletteForeground(KviKvsObjectFunctionCall
c->warning(__tr2qs("Not an hex digits"));
return true;
}
- if (widget()) widget()->setPaletteForegroundColor(QColor(iColR,iColG,iColB));
+ if (widget()) widget()->setPaletteForegroundColor(TQColor(iColR,iColG,iColB));
return true;
}
@@ -1150,7 +1150,7 @@ bool KviKvsObject_widget::function_setPaletteForeground(KviKvsObjectFunctionCall
return false;
}
}
- if (widget()) widget()->setPaletteForegroundColor(QColor(iColR,iColG,iColB));
+ if (widget()) widget()->setPaletteForegroundColor(TQColor(iColR,iColG,iColB));
return true;
}
@@ -1190,7 +1190,7 @@ bool KviKvsObject_widget::function_setBackgroundColor(KviKvsObjectFunctionCall *
if (c->params()->count()==1)
{
bool bOk,bOk1,bOk2;
- QString value;
+ TQString value;
pColArray->asString(value);
int i=0;
if (value.length()!=6)
@@ -1198,7 +1198,7 @@ bool KviKvsObject_widget::function_setBackgroundColor(KviKvsObjectFunctionCall *
c->warning(__tr2qs("A string of 6 digits hex is required"));
return true;
}
- QString buffer(value.mid(0,2));
+ TQString buffer(value.mid(0,2));
iColR=buffer.toInt(&bOk,16);
buffer=value.mid(2,2);
iColG=buffer.toInt(&bOk1,16);
@@ -1209,7 +1209,7 @@ bool KviKvsObject_widget::function_setBackgroundColor(KviKvsObjectFunctionCall *
c->warning(__tr2qs("Not an hex digits"));
return true;
}
- if (widget()) widget()->setBackgroundColor(QColor(iColR,iColG,iColB));
+ if (widget()) widget()->setBackgroundColor(TQColor(iColR,iColG,iColB));
return true;
}
@@ -1225,14 +1225,14 @@ bool KviKvsObject_widget::function_setBackgroundColor(KviKvsObjectFunctionCall *
return false;
}
}
- if (widget()) widget()->setBackgroundColor(QColor(iColR,iColG,iColB));
+ if (widget()) widget()->setBackgroundColor(TQColor(iColR,iColG,iColB));
return true;
}
bool KviKvsObject_widget::function_backgroundColor(KviKvsObjectFunctionCall *c)
{
if(!widget())return true;
- QColor col = widget()->backgroundColor();
+ TQColor col = widget()->backgroundColor();
KviKvsArray * a = new KviKvsArray();
a->set(0,new KviKvsVariant((kvs_int_t)col.red()));
a->set(1,new KviKvsVariant((kvs_int_t)col.green()));
@@ -1244,7 +1244,7 @@ bool KviKvsObject_widget::function_backgroundColor(KviKvsObjectFunctionCall *c)
bool KviKvsObject_widget::function_foregroundColor(KviKvsObjectFunctionCall *c)
{
if(!widget())return true;
- QColor col = widget()->foregroundColor();
+ TQColor col = widget()->foregroundColor();
KviKvsArray * a = new KviKvsArray();
a->set(0,new KviKvsVariant((kvs_int_t)col.red()));
a->set(1,new KviKvsVariant((kvs_int_t)col.green()));
@@ -1256,7 +1256,7 @@ bool KviKvsObject_widget::function_foregroundColor(KviKvsObjectFunctionCall *c)
bool KviKvsObject_widget::function_parentWidget(KviKvsObjectFunctionCall *c)
{
if(!widget())return true;
- if(parentScriptWidget()) c->returnValue()->setHObject(parentObject()->handle());
+ if(tqparentScriptWidget()) c->returnValue()->setHObject(tqparentObject()->handle());
else
c->returnValue()->setHObject((kvs_hobject_t)0);
return true;
@@ -1274,7 +1274,7 @@ bool KviKvsObject_widget::function_setMouseTracking(KviKvsObjectFunctionCall *c)
bool KviKvsObject_widget::function_setCaption(KviKvsObjectFunctionCall *c)
{
- QString szCaption;
+ TQString szCaption;
KVSO_PARAMETERS_BEGIN(c)
KVSO_PARAMETER("caption",KVS_PT_STRING,0,szCaption)
KVSO_PARAMETERS_END(c)
@@ -1331,11 +1331,11 @@ bool KviKvsObject_widget::function_hide(KviKvsObjectFunctionCall *)
bool KviKvsObject_widget::function_setToolTip(KviKvsObjectFunctionCall *c)
{
- QString szTooltip;
+ TQString szTooltip;
KVSO_PARAMETERS_BEGIN(c)
KVSO_PARAMETER("tooltip",KVS_PT_STRING,0,szTooltip)
KVSO_PARAMETERS_END(c)
- if(widget())QToolTip::add( widget(), szTooltip );
+ if(widget())TQToolTip::add( widget(), szTooltip );
return true;
}
@@ -1447,13 +1447,13 @@ bool KviKvsObject_widget::function_move(KviKvsObjectFunctionCall *c)
}
if(!widget())return true;
- widget()->move(QPoint(iX,iY));
+ 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;
- QSize 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()));
@@ -1504,51 +1504,51 @@ bool KviKvsObject_widget::function_resize(KviKvsObjectFunctionCall *c)
}
if(!widget())return true;
- widget()->resize(QSize(iW,iH));
+ widget()->resize(TQSize(iW,iH));
return true;
}
bool KviKvsObject_widget::function_setFocusPolicy(KviKvsObjectFunctionCall *c)
{
- QString szMode;
+ TQString szMode;
KVSO_PARAMETERS_BEGIN(c)
KVSO_PARAMETER("focus",KVS_PT_STRING,0,szMode)
KVSO_PARAMETERS_END(c)
if(!widget())return true;
- if(KviQString::equalCI(szMode, "TabFocus"))
- widget()->setFocusPolicy(QT_WIDGET_TABFOCUS);
+ if(KviTQString::equalCI(szMode, "TabFocus"))
+ widget()->setFocusPolicy(TQT_WIDGET_TABFOCUS);
else
- if(KviQString::equalCI(szMode, "ClickFocus"))
- widget()->setFocusPolicy(QT_WIDGET_CLICKFOCUS);
+ if(KviTQString::equalCI(szMode, "ClickFocus"))
+ widget()->setFocusPolicy(TQT_WIDGET_CLICKFOCUS);
else
- if(KviQString::equalCI(szMode, "StrongFocus"))
- widget()->setFocusPolicy(QT_WIDGET_STRONGFOCUS);
+ if(KviTQString::equalCI(szMode, "StrongFocus"))
+ widget()->setFocusPolicy(TQT_WIDGET_STRONGFOCUS);
else
- if(KviQString::equalCI(szMode, "NoFocus"))
- widget()->setFocusPolicy(QT_WIDGET_NOFOCUS);
+ if(KviTQString::equalCI(szMode, "NoFocus"))
+ widget()->setFocusPolicy(TQT_WIDGET_NOFOCUS);
else c->warning(__tr2qs("Invalid parameters"));
return true;
}
bool KviKvsObject_widget::function_setWFlags(KviKvsObjectFunctionCall *c)
{
- QStringList wflags;
- //Qt::WindowType sum;
+ TQStringList wflags;
+ //TQt::WindowType sum;
KVSO_PARAMETERS_BEGIN(c)
KVSO_PARAMETER("widget_flags",KVS_PT_STRINGLIST,KVS_PF_OPTIONAL,wflags)
KVSO_PARAMETERS_END(c)
if (!widget()) return true;
#ifdef COMPILE_USE_QT4
- Qt::WindowFlags flag,sum=0;
+ TQt::WindowFlags flag,sum=0;
#else
int flag,sum=0;
#endif
- for ( QStringList::Iterator it = wflags.begin(); it != wflags.end(); ++it )
+ for ( TQStringList::Iterator it = wflags.begin(); it != wflags.end(); ++it )
{
flag=0;
for(unsigned int j = 0; j < widgettypes_num; j++)
{
- if(KviQString::equalCI((*it), widgettypes_tbl[j]))
+ if(KviTQString::equalCI((*it), widgettypes_tbl[j]))
{
flag=widgettypes_cod[j];
break;
@@ -1564,7 +1564,7 @@ bool KviKvsObject_widget::function_setWFlags(KviKvsObjectFunctionCall *c)
#ifdef COMPILE_USE_QT4
widget()->setWindowFlags(sum);
#else
- widget()->reparent(widget()->parentWidget(),sum,QPoint(widget()->x(),widget()->y()));
+ widget()->reparent(widget()->tqparentWidget(),sum,TQPoint(widget()->x(),widget()->y()));
#endif
return true;
}
@@ -1572,7 +1572,7 @@ bool KviKvsObject_widget::function_setWFlags(KviKvsObjectFunctionCall *c)
bool KviKvsObject_widget::function_setFont(KviKvsObjectFunctionCall *c)
{
- QString szFamily,szStyle;
+ TQString szFamily,szStyle;
kvs_int_t uSize;
KVSO_PARAMETERS_BEGIN(c)
KVSO_PARAMETER("size",KVS_PT_UNSIGNEDINTEGER,0,uSize)
@@ -1580,15 +1580,15 @@ bool KviKvsObject_widget::function_setFont(KviKvsObjectFunctionCall *c)
KVSO_PARAMETER("style",KVS_PT_STRING,0,szStyle)
KVSO_PARAMETERS_END(c)
if(!widget())return true;
- QFont font=widget()->font();
+ TQFont font=widget()->font();
font.setFamily(szFamily);
font.setPointSize(uSize);
- 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(KviTQString::equalCI(szStyle,"italic")) font.setItalic(TRUE);
+ else if(KviTQString::equalCI(szStyle,"bold")) font.setBold(TRUE);
+ else if(KviTQString::equalCI(szStyle,"underline"))font.setUnderline(TRUE);
+ else if(KviTQString::equalCI(szStyle,"overline")) font.setOverline(TRUE);
+ else if(KviTQString::equalCI(szStyle,"strikeout"))font.setStrikeOut(TRUE);
+ else if(KviTQString::equalCI(szStyle,"fixedpitch")) font.setFixedPitch(TRUE);
else c->warning(__tr2qs("Unknown style '%Q'"),&szStyle);
widget()->setFont(font);
return true;
@@ -1616,7 +1616,7 @@ bool KviKvsObject_widget::function_addWidgetToWrappedLayout(KviKvsObjectFunction
c->warning(__tr2qs("Widget parameter is not a valid object"));
return true;
}
- QLayout *lay=widget()->layout();
+ TQLayout *lay=widget()->tqlayout();
if (!lay)
{
c->warning(__tr2qs("No Layout associated to the widget "));
@@ -1627,7 +1627,7 @@ bool KviKvsObject_widget::function_addWidgetToWrappedLayout(KviKvsObjectFunction
c->warning(__tr2qs("Can't add a non-widget object"));
return true;
}
- lay->add(((QWidget *)(ob->object())));
+ lay->add(((TQWidget *)(ob->object())));
return true;
}
bool KviKvsObject_widget::function_reparent(KviKvsObjectFunctionCall *c)
@@ -1641,7 +1641,7 @@ bool KviKvsObject_widget::function_reparent(KviKvsObjectFunctionCall *c)
if(!widget()) return true;
if(!ob)
{
- widget()->reparent(0,QPoint(widget()->x(),widget()->y()));
+ widget()->reparent(0,TQPoint(widget()->x(),widget()->y()));
return true;
}
else
@@ -1650,41 +1650,41 @@ bool KviKvsObject_widget::function_reparent(KviKvsObjectFunctionCall *c)
c->warning(__tr("Parent must be a widget object"));
return true;
}
- widget()->reparent(((QWidget *)(ob->object())),QPoint(((QWidget *)(ob->object()))->x(),((QWidget *)(ob->object()))->y()));
+ widget()->reparent(((TQWidget *)(ob->object())),TQPoint(((TQWidget *)(ob->object()))->x(),((TQWidget *)(ob->object()))->y()));
return true;
}
bool KviKvsObject_widget::function_setIcon(KviKvsObjectFunctionCall *c)
{
- QString icon;
+ TQString icon;
KVSO_PARAMETERS_BEGIN(c)
KVSO_PARAMETER("icon",KVS_PT_STRING,0,icon)
KVSO_PARAMETERS_END(c)
if(!widget())return true;
- QPixmap * pix = g_pIconManager->getImage(icon);
+ TQPixmap * pix = g_pIconManager->getImage(icon);
if(pix)widget()->setIcon(*pix);
return true;
}
bool KviKvsObject_widget::function_setBackgroundImage(KviKvsObjectFunctionCall *c)
{
- QString image;
+ TQString image;
KVSO_PARAMETERS_BEGIN(c)
KVSO_PARAMETER("image",KVS_PT_STRING,0,image)
KVSO_PARAMETERS_END(c)
if(!widget())return true;
- QPixmap * pix = g_pIconManager->getImage(image);
+ TQPixmap * pix = g_pIconManager->getImage(image);
if(pix)widget()->setPaletteBackgroundPixmap(*pix);
return true;
}
bool KviKvsObject_widget::function_globalCursorX(KviKvsObjectFunctionCall *c)
{
- if(widget())c->returnValue()->setInteger(QCursor::pos().x());
+ if(widget())c->returnValue()->setInteger(TQCursor::pos().x());
return true;
}
bool KviKvsObject_widget::function_globalCursorY(KviKvsObjectFunctionCall *c)
{
- if(widget())c->returnValue()->setInteger(QCursor::pos().y());
+ if(widget())c->returnValue()->setInteger(TQCursor::pos().y());
return true;
}
bool KviKvsObject_widget::function_setMask(KviKvsObjectFunctionCall *c)
@@ -1706,20 +1706,20 @@ bool KviKvsObject_widget::function_setMask(KviKvsObjectFunctionCall *c)
c->warning(__tr2qs("Pixmap object required"));
return true;
}
- QPixmap * pm=((KviKvsObject_pixmap *)obj)->getPixmap();
+ TQPixmap * pm=((KviKvsObject_pixmap *)obj)->getPixmap();
#ifdef COMPILE_USE_QT4
- QBitmap mask(pm->mask());
+ TQBitmap tqmask(pm->tqmask());
#else
- QBitmap mask(*pm->mask());
+ TQBitmap tqmask(*pm->tqmask());
#endif
- if (mask.isNull()) c->warning(__tr2qs("Null mask"));
- widget()->setMask(mask);
+ if (tqmask.isNull()) c->warning(__tr2qs("Null tqmask"));
+ widget()->setMask(tqmask);
return true;
}
#ifdef COMPILE_USE_QT4
bool KviKvsObject_widget::function_setAttribute(KviKvsObjectFunctionCall *c)
{
- QString attribute;
+ TQString attribute;
bool bFlag;
KVSO_PARAMETERS_BEGIN(c)
KVSO_PARAMETER("widget_atribute",KVS_PT_STRING,0,attribute)
@@ -1730,7 +1730,7 @@ bool KviKvsObject_widget::function_setAttribute(KviKvsObjectFunctionCall *c)
unsigned int j = 0;
for(; j < widgetattributes_num; j++)
{
- if(KviQString::equalCI(attribute, widgetattributes_tbl[j]))
+ if(KviTQString::equalCI(attribute, widgetattributes_tbl[j]))
{
found=true;
break;
diff --git a/src/modules/objects/class_widget.h b/src/modules/objects/class_widget.h
index ecd87bba..807d50ab 100644
--- a/src/modules/objects/class_widget.h
+++ b/src/modules/objects/class_widget.h
@@ -23,21 +23,22 @@
//
#include <kvi_tal_tooltip.h>
#include "kvi_string.h"
-#include "qtooltip.h"
+#include "tqtooltip.h"
#include "object_macros.h"
class KviKvsObject_widget : public KviKvsObject
{
Q_OBJECT
+ TQ_OBJECT
public:
KVSO_DECLARE_OBJECT(KviKvsObject_widget)
public:
- QWidget * widget() { return (QWidget *)object(); };
+ TQWidget * widget() { return (TQWidget *)object(); };
protected:
virtual bool init(KviKvsRunTimeContext * pContext,KviKvsVariantList *pParams);
- virtual bool eventFilter(QObject *o,QEvent *e);
+ virtual bool eventFilter(TQObject *o,TQEvent *e);
// ok, it is clear that we're messing with the naming conventions for the
// object classes :D
@@ -58,7 +59,7 @@ protected:
bool function_fontMetricsHeight(KviKvsObjectFunctionCall * c);
bool function_fontMetricsWidth(KviKvsObjectFunctionCall * c);
bool function_foregroundColor(KviKvsObjectFunctionCall *c);
- bool function_geometry(KviKvsObjectFunctionCall *c);
+ bool function_tqgeometry(KviKvsObjectFunctionCall *c);
bool function_globalCursorX(KviKvsObjectFunctionCall *c);
bool function_globalCursorY(KviKvsObjectFunctionCall *c);
bool function_hasFocus(KviKvsObjectFunctionCall *c);
@@ -73,7 +74,7 @@ protected:
bool function_move(KviKvsObjectFunctionCall *c);
bool function_parentWidget(KviKvsObjectFunctionCall *c);
bool function_raise(KviKvsObjectFunctionCall *);
- bool function_repaint(KviKvsObjectFunctionCall *c);
+ bool function_tqrepaint(KviKvsObjectFunctionCall *c);
bool function_reparent(KviKvsObjectFunctionCall *c);
bool function_resize(KviKvsObjectFunctionCall *c);
bool function_screenResolution(KviKvsObjectFunctionCall * c);
@@ -95,7 +96,7 @@ protected:
bool function_setGeometry(KviKvsObjectFunctionCall *c);
bool function_setWFlags(KviKvsObjectFunctionCall *c);
bool function_show(KviKvsObjectFunctionCall *c);
- bool function_sizeHint(KviKvsObjectFunctionCall *c);
+ bool function_tqsizeHint(KviKvsObjectFunctionCall *c);
bool function_width(KviKvsObjectFunctionCall *);
bool function_x(KviKvsObjectFunctionCall *);
bool function_y(KviKvsObjectFunctionCall *);
diff --git a/src/modules/objects/class_window.cpp b/src/modules/objects/class_window.cpp
index 9218cb8f..732e6f4e 100644
--- a/src/modules/objects/class_window.cpp
+++ b/src/modules/objects/class_window.cpp
@@ -32,14 +32,14 @@
-KviKvsScriptWindowWindow::KviKvsScriptWindowWindow(KviFrame * pParent,const QString &szName)
+KviKvsScriptWindowWindow::KviKvsScriptWindowWindow(KviFrame * pParent,const TQString &szName)
: KviWindow(KVI_WINDOW_TYPE_SCRIPTOBJECT,pParent,szName)
{
m_pCentralWidget = 0;
#ifdef COMPILE_USE_QT4
- setBackgroundMode(Qt::NoBackground);
+ setBackgroundMode(TQt::NoBackground);
#else
- setBackgroundMode(QWidget::NoBackground);
+ setBackgroundMode(TQWidget::NoBackground);
#endif
}
@@ -47,13 +47,13 @@ KviKvsScriptWindowWindow::~KviKvsScriptWindowWindow()
{
}
-void KviKvsScriptWindowWindow::setCentralWidget(KviKvsObject_widget *o,QWidget * w)
+void KviKvsScriptWindowWindow::setCentralWidget(KviKvsObject_widget *o,TQWidget * w)
{
m_pCentralWidgetObject = o;
m_pCentralWidget = w;
}
-void KviKvsScriptWindowWindow::resizeEvent(QResizeEvent *e)
+void KviKvsScriptWindowWindow::resizeEvent(TQResizeEvent *e)
{
if(m_pCentralWidget)
m_pCentralWidget->setGeometry(0,0,width(),height());
@@ -87,9 +87,9 @@ void KviKvsScriptWindowWindow::centralWidgetDestroyed()
[class]widget[/class]
@description:
This class rappresents a MDI window in a KVIrc frame.
- Regardless of the parent object passed, the window will be always
+ Regardless of the tqparent object passed, the window will be always
a "physical" child of the frame window: you can't embed a window object
- inside a widget or another window. The parent object will just "own" this
+ inside a widget or another window. The tqparent object will just "own" this
window object and eventually destroy it when it dies.
This class can manage only a single central child widget that must
be set with $setCentralWidget().
@@ -117,15 +117,15 @@ KVSO_END_CONSTRUCTOR(KviKvsObject_window)
bool KviKvsObject_window::init(KviKvsRunTimeContext * pContext,KviKvsVariantList *pParams)
{
KviWindow * w = new KviKvsScriptWindowWindow(pContext->window()->frame(),name());
- setObject(w);
+ setObject(TQT_TQOBJECT(w));
pContext->window()->frame()->addWindow(w,false);
- w->minimize(); // must be minimized before children are added, otherwise the focus handling goes nuts...
+ w->minimize(); // must be minimized before tqchildren are added, otherwise the focus handling goes nuts...
return true;
}
bool KviKvsObject_window::functionsetCaption(KviKvsObjectFunctionCall *c)
{
- QString szCaption;
+ TQString szCaption;
KVSO_PARAMETERS_BEGIN(c)
KVSO_PARAMETER("caption",KVS_PT_STRING,0,szCaption)
KVSO_PARAMETERS_END(c)
diff --git a/src/modules/objects/class_window.h b/src/modules/objects/class_window.h
index 1f2ae482..4477a2df 100644
--- a/src/modules/objects/class_window.h
+++ b/src/modules/objects/class_window.h
@@ -32,7 +32,7 @@ class KviKvsObject_window : public KviKvsObject_widget
public:
KVSO_DECLARE_OBJECT(KviKvsObject_window)
public:
- QWidget * widget() { return (QWidget *)object(); };
+ TQWidget * widget() { return (TQWidget *)object(); };
protected:
virtual bool init(KviKvsRunTimeContext * pContext,KviKvsVariantList *pParams);
@@ -46,16 +46,17 @@ protected:
class KviKvsScriptWindowWindow : public KviWindow
{
Q_OBJECT
+ TQ_OBJECT
public:
- KviKvsScriptWindowWindow(KviFrame * pParent,const QString &szName);
+ KviKvsScriptWindowWindow(KviFrame * pParent,const TQString &szName);
~KviKvsScriptWindowWindow();
protected:
KviKvsObject_widget * m_pCentralWidgetObject;
- QWidget * m_pCentralWidget;
+ TQWidget * m_pCentralWidget;
public:
- void setCentralWidget(KviKvsObject_widget *o,QWidget * w);
- void setCaptionString(const QString &s){ setFixedCaption(s); };
- virtual void resizeEvent(QResizeEvent *e);
+ void setCentralWidget(KviKvsObject_widget *o,TQWidget * w);
+ void setCaptionString(const TQString &s){ setFixedCaption(s); };
+ virtual void resizeEvent(TQResizeEvent *e);
protected slots:
void centralWidgetObjectDestroyed();
void centralWidgetDestroyed();
diff --git a/src/modules/objects/class_wizard.cpp b/src/modules/objects/class_wizard.cpp
index 091b3065..67226503 100644
--- a/src/modules/objects/class_wizard.cpp
+++ b/src/modules/objects/class_wizard.cpp
@@ -22,7 +22,7 @@
//
#include <kvi_tal_wizard.h>
-#include <qpushbutton.h>
+#include <tqpushbutton.h>
#include "class_wizard.h"
#include "kvi_error.h"
#include "kvi_debug.h"
@@ -124,14 +124,14 @@ KVSO_END_CONSTRUCTOR(KviKvsObject_wizard)
bool KviKvsObject_wizard::init(KviKvsRunTimeContext * pContext,KviKvsVariantList *pParams)
{
- setObject(new KviKvsMdmWizard(parentScriptWidget(), name(),this), true);
+ setObject(TQT_TQOBJECT(new KviKvsMdmWizard(tqparentScriptWidget(), name(),this)), true);
return true;
}
bool KviKvsObject_wizard::functionaddPage(KviKvsObjectFunctionCall *c)
{
KviKvsObject *ob;
- QString szLabel;
+ TQString szLabel;
kvs_hobject_t hObject;
KVSO_PARAMETERS_BEGIN(c)
KVSO_PARAMETER("page_widget",KVS_PT_HOBJECT,0,hObject)
@@ -144,13 +144,13 @@ bool KviKvsObject_wizard::functionaddPage(KviKvsObjectFunctionCall *c)
c->warning(__tr2qs("Can't add a non-widget object"));
return true;
}
- ((KviTalWizard *)widget())->addPage(((QWidget *)(ob->object())),szLabel);
+ ((KviTalWizard *)widget())->addPage(((TQWidget *)(ob->object())),szLabel);
return true;
}
bool KviKvsObject_wizard::functioninsertPage(KviKvsObjectFunctionCall *c)
{
KviKvsObject *ob;
- QString szLabel;
+ TQString szLabel;
kvs_int_t uIndex;
kvs_hobject_t hObject;
KVSO_PARAMETERS_BEGIN(c)
@@ -165,7 +165,7 @@ bool KviKvsObject_wizard::functioninsertPage(KviKvsObjectFunctionCall *c)
c->warning(__tr2qs("Can't add a non-widget object"));
return true;
}
- ((KviTalWizard *)widget())->insertPage(((QWidget *)(ob->object())),szLabel,uIndex);
+ ((KviTalWizard *)widget())->insertPage(((TQWidget *)(ob->object())),szLabel,uIndex);
return true;
}
@@ -173,7 +173,7 @@ bool KviKvsObject_wizard::functioninsertPage(KviKvsObjectFunctionCall *c)
bool KviKvsObject_wizard::functionsetTitle(KviKvsObjectFunctionCall *c)
{
KviKvsObject *ob;
- QString szTitle;
+ TQString szTitle;
kvs_hobject_t hObject;
KVSO_PARAMETERS_BEGIN(c)
KVSO_PARAMETER("page_widget",KVS_PT_HOBJECT,0,hObject)
@@ -186,7 +186,7 @@ bool KviKvsObject_wizard::functionsetTitle(KviKvsObjectFunctionCall *c)
c->warning(__tr2qs("Widget object required"));
return true;
}
- ((KviTalWizard *)widget())->setPageTitle(((QWidget *)(ob->object())),szTitle);
+ ((KviTalWizard *)widget())->setPageTitle(((TQWidget *)(ob->object())),szTitle);
return true;
}
bool KviKvsObject_wizard::functionsetBackEnabled(KviKvsObjectFunctionCall *c)
@@ -205,7 +205,7 @@ bool KviKvsObject_wizard::functionsetBackEnabled(KviKvsObjectFunctionCall *c)
c->warning(__tr2qs("Widget object required"));
return true;
}
- ((KviTalWizard *)widget())->setBackEnabled(((QWidget *)(ob->object())),bEnabled);
+ ((KviTalWizard *)widget())->setBackEnabled(((TQWidget *)(ob->object())),bEnabled);
return true;
}
@@ -225,7 +225,7 @@ bool KviKvsObject_wizard::functionsetNextEnabled(KviKvsObjectFunctionCall *c)
c->warning(__tr2qs("Widget object required"));
return true;
}
- ((KviTalWizard *)widget())->setNextEnabled(((QWidget *)(ob->object())),bEnabled);
+ ((KviTalWizard *)widget())->setNextEnabled(((TQWidget *)(ob->object())),bEnabled);
return true;
}
bool KviKvsObject_wizard::functionsetFinishEnabled(KviKvsObjectFunctionCall *c)
@@ -244,7 +244,7 @@ bool KviKvsObject_wizard::functionsetFinishEnabled(KviKvsObjectFunctionCall *c)
c->warning(__tr2qs("Widget object required"));
return true;
}
- ((KviTalWizard *)widget())->setFinishEnabled(((QWidget *)(ob->object())),bEnabled);
+ ((KviTalWizard *)widget())->setFinishEnabled(((TQWidget *)(ob->object())),bEnabled);
return true;
}
bool KviKvsObject_wizard::functionsetHelpEnabled(KviKvsObjectFunctionCall *c)
@@ -263,12 +263,12 @@ bool KviKvsObject_wizard::functionsetHelpEnabled(KviKvsObjectFunctionCall *c)
c->warning(__tr2qs("Widget object required"));
return true;
}
- ((KviTalWizard *)widget())->setHelpEnabled(((QWidget *)(ob->object())),bEnabled);
+ ((KviTalWizard *)widget())->setHelpEnabled(((TQWidget *)(ob->object())),bEnabled);
return true;
}
bool KviKvsObject_wizard::functionsetBackBtnText(KviKvsObjectFunctionCall *c)
{
- QString szText;
+ TQString szText;
KVSO_PARAMETERS_BEGIN(c)
KVSO_PARAMETER("text",KVS_PT_STRING,0,szText)
KVSO_PARAMETERS_END(c)
@@ -278,7 +278,7 @@ bool KviKvsObject_wizard::functionsetBackBtnText(KviKvsObjectFunctionCall *c)
}
bool KviKvsObject_wizard::functionsetNextBtnText(KviKvsObjectFunctionCall *c)
{
- QString szText;
+ TQString szText;
KVSO_PARAMETERS_BEGIN(c)
KVSO_PARAMETER("text",KVS_PT_STRING,0,szText)
KVSO_PARAMETERS_END(c)
@@ -288,7 +288,7 @@ bool KviKvsObject_wizard::functionsetNextBtnText(KviKvsObjectFunctionCall *c)
}
bool KviKvsObject_wizard::functionsetHelpBtnText(KviKvsObjectFunctionCall *c)
{
- QString szText;
+ TQString szText;
KVSO_PARAMETERS_BEGIN(c)
KVSO_PARAMETER("text",KVS_PT_STRING,0,szText)
KVSO_PARAMETERS_END(c)
@@ -298,7 +298,7 @@ bool KviKvsObject_wizard::functionsetHelpBtnText(KviKvsObjectFunctionCall *c)
}
bool KviKvsObject_wizard::functionsetFinishBtnText(KviKvsObjectFunctionCall *c)
{
- QString szText;
+ TQString szText;
KVSO_PARAMETERS_BEGIN(c)
KVSO_PARAMETER("text",KVS_PT_STRING,0,szText)
KVSO_PARAMETERS_END(c)
@@ -340,12 +340,12 @@ void KviKvsObject_wizard::backClicked()
KviKvsVariantList *params=0;
callFunction(this,"backClickedEvent",params);
}
-KviKvsMdmWizard::KviKvsMdmWizard(QWidget * par,const char * name,KviKvsObject_wizard * parent)
+KviKvsMdmWizard::KviKvsMdmWizard(TQWidget * par,const char * name,KviKvsObject_wizard * tqparent)
:KviTalWizard(par)
{
- m_pParentScript=parent;
- connect (this->backButton(),SIGNAL(clicked()),this,SLOT(slotBackClicked()));
- connect (this->nextButton(),SIGNAL(clicked()),this,SLOT(slotNextClicked()));
+ m_pParentScript=tqparent;
+ connect (this->backButton(),TQT_SIGNAL(clicked()),this,TQT_SLOT(slotBackClicked()));
+ connect (this->nextButton(),TQT_SIGNAL(clicked()),this,TQT_SLOT(slotNextClicked()));
}
void KviKvsMdmWizard::accept()
{
diff --git a/src/modules/objects/class_wizard.h b/src/modules/objects/class_wizard.h
index 0c605efe..ddc8a839 100644
--- a/src/modules/objects/class_wizard.h
+++ b/src/modules/objects/class_wizard.h
@@ -33,7 +33,7 @@ class KviKvsObject_wizard : public KviKvsObject_widget
public:
KVSO_DECLARE_OBJECT(KviKvsObject_wizard)
public:
- QWidget * widget() { return (QWidget *)object(); };
+ TQWidget * widget() { return (TQWidget *)object(); };
bool accept();
bool reject();
void nextClicked();
@@ -65,8 +65,9 @@ class KviKvsMdmWizard : public KviTalWizard
{
Q_OBJECT
+ TQ_OBJECT
public:
- KviKvsMdmWizard(QWidget * par,const char * name,KviKvsObject_wizard *);
+ KviKvsMdmWizard(TQWidget * par,const char * name,KviKvsObject_wizard *);
void accept();
void reject();
virtual ~KviKvsMdmWizard();
diff --git a/src/modules/objects/class_workspace.cpp b/src/modules/objects/class_workspace.cpp
index 1f6d8a3e..90e36876 100644
--- a/src/modules/objects/class_workspace.cpp
+++ b/src/modules/objects/class_workspace.cpp
@@ -24,7 +24,7 @@
-#include <qworkspace.h>
+#include <tqworkspace.h>
#include "class_workspace.h"
#include "kvi_error.h"
#include "kvi_debug.h"
@@ -110,7 +110,7 @@
constructor[br]
{[br]
$$->$setGeometry(%X,%Y,100,100)[br]
- $$->%lay=$new(layout,$$)[br]
+ $$->%lay=$new(tqlayout,$$)[br]
%i=0[br]
while (%i<10)[br]
{[br]
@@ -184,13 +184,13 @@ KVSO_END_CONSTRUCTOR(KviKvsObject_workspace)
bool KviKvsObject_workspace::init(KviKvsRunTimeContext * pContext,KviKvsVariantList *pParams)
{
- setObject(new QWorkspace(parentScriptWidget(), name()), true);
+ setObject(TQT_TQOBJECT(new TQWorkspace(tqparentScriptWidget(), name())), true);
return true;
}
bool KviKvsObject_workspace::functionactiveWindow(KviKvsObjectFunctionCall *c)
{
- //if(widget()) c->returnValue()->setHObject((unsigned long)(((QWorkspace *)widget())->activeWindow()));
+ //if(widget()) c->returnValue()->setHObject((unsigned long)(((TQWorkspace *)widget())->activeWindow()));
// FIXME!
c->returnValue()->setHObject(0);
return true; //?pFIX ME?
@@ -199,7 +199,7 @@ bool KviKvsObject_workspace::functionactiveWindow(KviKvsObjectFunctionCall *c)
bool KviKvsObject_workspace::functionscrollBarsEnabled(KviKvsObjectFunctionCall *c)
{
if(widget())
- c->returnValue()->setBoolean(((QWorkspace *)widget())->scrollBarsEnabled());
+ c->returnValue()->setBoolean(((TQWorkspace *)widget())->scrollBarsEnabled());
return true;
}
@@ -210,42 +210,42 @@ bool KviKvsObject_workspace::functionsetscrollBarsEnabled(KviKvsObjectFunctionCa
KVSO_PARAMETER("bEnabled",KVS_PT_BOOL,0,bEnabled)
KVSO_PARAMETERS_END(c)
if(widget())
- ((QWorkspace *)widget())->setScrollBarsEnabled(bEnabled);
+ ((TQWorkspace *)widget())->setScrollBarsEnabled(bEnabled);
return true;
}
bool KviKvsObject_workspace::functioncascade(KviKvsObjectFunctionCall *c)
{
if(widget())
- ((QWorkspace *)widget())->cascade();
+ ((TQWorkspace *)widget())->cascade();
return true;
}
bool KviKvsObject_workspace::functiontile(KviKvsObjectFunctionCall *c)
{
if(widget())
- ((QWorkspace *)widget())->tile();
+ ((TQWorkspace *)widget())->tile();
return true;
}
bool KviKvsObject_workspace::functioncloseActiveWindow(KviKvsObjectFunctionCall *c)
{
if(widget())
- ((QWorkspace *)widget())->closeActiveWindow();
+ ((TQWorkspace *)widget())->closeActiveWindow();
return true;
}
bool KviKvsObject_workspace::functioncloseAllWindows(KviKvsObjectFunctionCall *c)
{
if(widget())
- ((QWorkspace *)widget())->closeAllWindows();
+ ((TQWorkspace *)widget())->closeAllWindows();
return true;
}
bool KviKvsObject_workspace::functionactivateNextWindow(KviKvsObjectFunctionCall *c)
{
if(widget())
- ((QWorkspace *)widget())->activateNextWindow();
+ ((TQWorkspace *)widget())->activateNextWindow();
return true;
}
@@ -253,9 +253,9 @@ bool KviKvsObject_workspace::functionactivatePrevWindow(KviKvsObjectFunctionCall
{
if(widget()){
#ifdef COMPILE_USE_QT4
- ((QWorkspace *)widget())->activatePreviousWindow();
+ ((TQWorkspace *)widget())->activatePreviousWindow();
#else
- ((QWorkspace *)widget())->activatePrevWindow();
+ ((TQWorkspace *)widget())->activatePrevWindow();
#endif
}
return true;
diff --git a/src/modules/objects/class_workspace.h b/src/modules/objects/class_workspace.h
index c18264df..d250d1e1 100644
--- a/src/modules/objects/class_workspace.h
+++ b/src/modules/objects/class_workspace.h
@@ -26,7 +26,7 @@
-#include <qworkspace.h>
+#include <tqworkspace.h>
#include "class_widget.h"
class KviKvsObject_workspace : public KviKvsObject_widget
@@ -34,7 +34,7 @@ class KviKvsObject_workspace : public KviKvsObject_widget
public:
KVSO_DECLARE_OBJECT(KviKvsObject_workspace)
public:
- QWidget * widget() { return (QWidget *)object(); };
+ TQWidget * widget() { return (TQWidget *)object(); };
protected:
virtual bool init(KviKvsRunTimeContext * pContext,KviKvsVariantList *pParams);
diff --git a/src/modules/objects/class_wrapper.cpp b/src/modules/objects/class_wrapper.cpp
index 02ff632c..87d2e0c4 100644
--- a/src/modules/objects/class_wrapper.cpp
+++ b/src/modules/objects/class_wrapper.cpp
@@ -29,10 +29,10 @@
#include "kvi_iconmanager.h"
#include "class_widget.h"
-#include <qwidget.h>
+#include <tqwidget.h>
#ifndef COMPILE_USE_QT4
- #include <qobjectlist.h>
- #include <qwidgetlist.h>
+ #include <tqobjectlist.h>
+ #include <tqwidgetlist.h>
#endif
#include "kvi_app.h"
#include "kvi_frame.h"
@@ -47,7 +47,7 @@
@type:
class
@short:
- Provides a wrapper class that hooks to an existing Qt graphic object modifying it.
+ Provides a wrapper class that hooks to an existing TQt graphic object modifying it.
@inherits:
[class]object[/class]
[class]widget[/class]
@@ -58,21 +58,21 @@
in fact, could hook every widget, you can modify the property or you can be inserted other widget as child of this...[br]
in short you have absolute liberty. [br]
The power of this class is fantastic, because it allows the change at "run time" of almost all the elements of the Kvirc.[br]
- But to use this class in optimal way and to exploit its power, you have to know the Qt.... so you won't have limits [br]
- The KVIrc Qt widgets are arranged in trees (just as the objects).[br]
+ But to use this class in optimal way and to exploit its power, you have to know the TQt.... so you won't have limits [br]
+ The KVIrc TQt widgets are arranged in trees (just as the objects).[br]
The difference is that there are more toplevel widgets (and so more than one tree).[br]
- You can use [fnc]$objects.dump()[/fnc] to take a look at the KVIrc Qt objects tree.[br]
+ You can use [fnc]$objects.dump()[/fnc] to take a look at the KVIrc TQt objects tree.[br]
Here is a part of the tree:[br][br]
Ptr 14332520: top level object: kvirc_frame, class KviFrame, visible, rect = -4, -4, 1024, 708
- Ptr 17296024: object: qt_top_dock, class QDockArea
+ Ptr 17296024: object: qt_top_dock, class TQDockArea
Ptr 14882136: object: qt_custom_toolbar, class KviCustomToolBar
- Ptr 18143368: object: qt_dockwidget_internal, class QDockWindowTitleBar
+ Ptr 18143368: object: qt_dockwidget_internal, class TQDockWindowTitleBar
[br][br]
Every listed widget has a "name", a "class" and a set of properties.[br]
The first entry in this example is a KVIrc server window, class "KviFrame" and name "kvirc_frame":
it is a toplevel widget.[br]
The "qt_top_dock", "qt_custom_toolbar" and the "qt_dockwidget_internal" are
- direct children of that widget.[br]
+ direct tqchildren of that widget.[br]
To indicate a specific widget we will use the "class::name" form.[br]
So to indicate the main KVIrc frame you will use "KviFrame::kvirc_main_frame".
Look at this example:[br]
@@ -93,7 +93,7 @@
Now %A. will be point to the wrapped object, therefore we could modify its property or to consider it as if it were an object created by us in scripting. [br]
Obviously, deleting the created object (for example %A) you don't will delete the object of Kvirc (in this case the statusbar). [br]
Another example could be this:[br]
- %A=$new(wrapper,0,test,KviFrame::kvirc_frame,QToolButton::kvirc.identityoptions)[br]
+ %A=$new(wrapper,0,test,KviFrame::kvirc_frame,TQToolButton::kvirc.identityoptions)[br]
%A->$setProperty(usesBigPixmap,0)[br]
In this fool example with the function $setProperty, we has setted the property usesBigPixmap to False, making to become the small icons of the ToolBar.[br]
[br]
@@ -122,17 +122,17 @@ bool KviKvsObject_wrapper::init(KviKvsRunTimeContext * pContext,KviKvsVariantLis
if( !pParams ) return false;
debug ("ci sono i parametri");
- QWidget *pWidget = 0;
+ TQWidget *pWidget = 0;
int i=0;
while(i!=pParams->count())
{
- QString szClass;
- QString szName;
- QString s=0;
+ TQString szClass;
+ TQString szName;
+ TQString s=0;
pParams->at(i)->asString(s);
if (!s.isEmpty())
{
- int idx = s.find("::");
+ int idx = s.tqfind("::");
if( idx != -1 ) {
szClass = s.left(idx);
szName = s.right(s.length() - idx - 2);
@@ -144,7 +144,7 @@ bool KviKvsObject_wrapper::init(KviKvsRunTimeContext * pContext,KviKvsVariantLis
debug ("szName %s",szName.latin1());
debug ("s %s",s.latin1());
- if(KviQString::equalCI(szClass,"WinId"))
+ if(KviTQString::equalCI(szClass,"WinId"))
{
if(pWidget)
{
@@ -156,10 +156,10 @@ bool KviKvsObject_wrapper::init(KviKvsRunTimeContext * pContext,KviKvsVariantLis
} else {
if(pWidget) {
pWidget = findWidgetToWrap(
- !szClass.isEmpty() ? szClass : KviQString::empty, !szName.isEmpty() ? szName : KviQString::empty, pWidget
+ !szClass.isEmpty() ? szClass : KviTQString::empty, !szName.isEmpty() ? szName : KviTQString::empty, pWidget
);
} else {
- pWidget = findTopLevelWidgetToWrap(szClass.isEmpty() ? szClass : KviQString::empty, !szName.isEmpty() ? szName : KviQString::empty);
+ pWidget = findTopLevelWidgetToWrap(szClass.isEmpty() ? szClass : KviTQString::empty, !szName.isEmpty() ? szName : KviTQString::empty);
}
}
if( !pWidget )
@@ -176,52 +176,52 @@ bool KviKvsObject_wrapper::init(KviKvsRunTimeContext * pContext,KviKvsVariantLis
pContext->warning(__tr2qs("Failed to find the widget to wrap"));
return false;
}
- setObject(pWidget,false);
+ setObject(TQT_TQOBJECT(pWidget),false);
return true;
}
-QWidget *KviKvsObject_wrapper::findTopLevelWidgetToWrap(const QString szClass, const QString szName)
+TQWidget *KviKvsObject_wrapper::findTopLevelWidgetToWrap(const TQString szClass, const TQString szName)
{
#ifdef COMPILE_USE_QT4
- QWidgetList list = g_pApp->topLevelWidgets();
+ TQWidgetList list = g_pApp->tqtopLevelWidgets();
if( !list.count() ) return 0;
for(int idx=0;idx<list.count();idx++)
{
bool bNameMatch = false;
bool bClassMatch = false;
if( !szName.isEmpty() )
- bNameMatch = KviQString::equalCI(list.at(idx)->name(), szName);
+ bNameMatch = KviTQString::equalCI(list.at(idx)->name(), szName);
else
bNameMatch = true;
if( !szClass.isEmpty())
- bClassMatch = KviQString::equalCI(list.at(idx)->className(), szClass);
+ bClassMatch = KviTQString::equalCI(list.at(idx)->className(), szClass);
else
bClassMatch = true;
if( bNameMatch && bClassMatch ) {
- QWidget *w = list.at(idx);
+ TQWidget *w = list.at(idx);
return w;
}
}
return 0;
#else
- QWidgetList *list = g_pApp->topLevelWidgets();
+ TQWidgetList *list = g_pApp->tqtopLevelWidgets();
if( !list ) return 0;
- QWidgetListIt it(*list);
+ TQWidgetListIt it(*list);
while( it.current() ) {
bool bNameMatch = false;
bool bClassMatch = false;
if( szName )
- bNameMatch = KviQString::equalCI(it.current()->name(), szName);
+ bNameMatch = KviTQString::equalCI(it.current()->name(), szName);
else
bNameMatch = true;
if( szClass )
- bClassMatch = KviQString::equalCI(it.current()->className(), szClass);
+ bClassMatch = KviTQString::equalCI(it.current()->className(), szClass);
else
bClassMatch = true;
if( bNameMatch && bClassMatch ) {
- QWidget *w = it.current();
+ TQWidget *w = it.current();
delete list;
return w;
}
@@ -233,15 +233,15 @@ QWidget *KviKvsObject_wrapper::findTopLevelWidgetToWrap(const QString szClass, c
#endif
}
-QWidget *KviKvsObject_wrapper::findWidgetToWrap(const char *szClass, const char *szName, QWidget *childOf)
+TQWidget *KviKvsObject_wrapper::findWidgetToWrap(const char *szClass, const char *szName, TQWidget *childOf)
{
#ifdef COMPILE_USE_QT4
- QObjectList list = childOf->queryList(szClass ? szClass : 0, szName ? szName : 0, false, true);
+ TQObjectList list = childOf->queryList(szClass ? szClass : 0, szName ? szName : 0, false, true);
if( !list.count() ) return 0;
for(int idx=0;idx<list.count();idx++)
{
if( list.at(idx)->isWidgetType() ) {
- QWidget *w = (QWidget *)list.at(idx);
+ TQWidget *w = (TQWidget *)list.at(idx);
return w;
}
@@ -249,13 +249,13 @@ QWidget *KviKvsObject_wrapper::findWidgetToWrap(const char *szClass, const char
return 0;
#else
- QObjectList *list = childOf->queryList(szClass ? szClass : 0, szName ? szName : 0, false, true);
+ TQObjectList *list = childOf->queryList(szClass ? szClass : 0, szName ? szName : 0, false, true);
if( !list ) return 0;
- QObjectListIt it(*list);
+ TQObjectListIt it(*list);
while( it.current() ) {
if( it.current()->isWidgetType() ) {
- QWidget *w = (QWidget *) it.current();
+ TQWidget *w = (TQWidget *) it.current();
delete list;
return w;
}
diff --git a/src/modules/objects/class_wrapper.h b/src/modules/objects/class_wrapper.h
index 900b0672..62bb651d 100644
--- a/src/modules/objects/class_wrapper.h
+++ b/src/modules/objects/class_wrapper.h
@@ -27,7 +27,7 @@
#include "class_widget.h"
-#include "qlistview.h"
+#include "tqlistview.h"
@@ -37,14 +37,15 @@
class KviKvsObject_wrapper : public KviKvsObject_widget
{
Q_OBJECT
+ TQ_OBJECT
public:
KVSO_DECLARE_OBJECT(KviKvsObject_wrapper)
public:
- QWidget * widget() { return (QWidget *)object(); };
+ TQWidget * widget() { return (TQWidget *)object(); };
protected:
virtual bool init(KviKvsRunTimeContext * pContext,KviKvsVariantList *pParams);
- QWidget * findTopLevelWidgetToWrap(const QString szClass, const QString szName);
- QWidget * findWidgetToWrap(const char *szClass, const char *szName, QWidget *childOf);
+ TQWidget * findTopLevelWidgetToWrap(const TQString szClass, const TQString szName);
+ TQWidget * findWidgetToWrap(const char *szClass, const char *szName, TQWidget *childOf);
};
diff --git a/src/modules/objects/class_xmlreader.cpp b/src/modules/objects/class_xmlreader.cpp
index f4bccc8f..243a0b79 100644
--- a/src/modules/objects/class_xmlreader.cpp
+++ b/src/modules/objects/class_xmlreader.cpp
@@ -128,15 +128,15 @@
*/
-#ifndef QT_NO_XML
+#ifndef TQT_NO_XML
-#include <qxml.h>
+#include <tqxml.h>
-class KviXmlHandler : public QXmlDefaultHandler
+class KviXmlHandler : public TQXmlDefaultHandler
{
protected:
KviKvsObject_xmlreader * m_pReader;
- QString m_szErrorString;
+ TQString m_szErrorString;
public:
KviXmlHandler(KviKvsObject_xmlreader * pReader)
{
@@ -156,12 +156,12 @@ private:
m_szErrorString = __tr2qs("Processing aborted");
return false;
}
- void decodeException(QString &szMsg,bool bError,const QXmlParseException &exception)
+ void decodeException(TQString &szMsg,bool bError,const TQXmlParseException &exception)
{
if(bError)
- KviQString::sprintf(szMsg,__tr2qs("Error near line %d, column %d"),exception.lineNumber(),exception.columnNumber());
+ KviTQString::sprintf(szMsg,__tr2qs("Error near line %d, column %d"),exception.lineNumber(),exception.columnNumber());
else
- KviQString::sprintf(szMsg,__tr2qs("Warning near line %d, column %d"),exception.lineNumber(),exception.columnNumber());
+ KviTQString::sprintf(szMsg,__tr2qs("Warning near line %d, column %d"),exception.lineNumber(),exception.columnNumber());
szMsg += ": ";
szMsg += exception.message();
}
@@ -187,7 +187,7 @@ public:
return handleKvsCallReturnValue(&ret);
}
- virtual bool startElement(const QString &szNamespaceUri,const QString &szLocalName,const QString &szQualifiedName,const QXmlAttributes &attrs)
+ virtual bool startElement(const TQString &szNamespaceUri,const TQString &szLocalName,const TQString &szQualifiedName,const TQXmlAttributes &attrs)
{
KviKvsVariant ret;
KviKvsVariantList par;
@@ -205,7 +205,7 @@ public:
return handleKvsCallReturnValue(&ret);
}
- virtual bool endElement(const QString &szNamespaceUri,const QString &szLocalName,const QString &szQualifiedName)
+ virtual bool endElement(const TQString &szNamespaceUri,const TQString &szLocalName,const TQString &szQualifiedName)
{
KviKvsVariant ret;
KviKvsVariantList par;
@@ -218,7 +218,7 @@ public:
return handleKvsCallReturnValue(&ret);
}
- virtual bool characters(const QString &szChars)
+ virtual bool characters(const TQString &szChars)
{
KviKvsVariant ret;
KviKvsVariantList par;
@@ -229,10 +229,10 @@ public:
return handleKvsCallReturnValue(&ret);
}
- virtual bool warning(const QXmlParseException &exception)
+ virtual bool warning(const TQXmlParseException &exception)
{
// recoverable
- QString szMsg;
+ TQString szMsg;
decodeException(szMsg,false,exception);
KviKvsVariant ret;
@@ -244,10 +244,10 @@ public:
return handleKvsCallReturnValue(&ret);
}
- virtual bool error(const QXmlParseException &exception)
+ virtual bool error(const TQXmlParseException &exception)
{
// recoverable
- QString szMsg;
+ TQString szMsg;
decodeException(szMsg,false,exception);
KviKvsVariant ret;
@@ -259,21 +259,21 @@ public:
return handleKvsCallReturnValue(&ret);
}
- virtual bool fatalError(const QXmlParseException &exception)
+ virtual bool fatalError(const TQXmlParseException &exception)
{
- QString szMsg;
+ TQString szMsg;
decodeException(szMsg,true,exception);
m_pReader->fatalError(szMsg);
return true;
}
- virtual QString errorString()
+ virtual TQString errorString()
{
return m_szErrorString;
}
};
-#endif // !QT_NO_XML
+#endif // !TQT_NO_XML
KVSO_BEGIN_REGISTERCLASS(KviKvsObject_xmlreader,"xmlreader","object")
@@ -295,7 +295,7 @@ KVSO_END_CONSTRUCTOR(KviKvsObject_xmlreader)
KVSO_BEGIN_DESTRUCTOR(KviKvsObject_xmlreader)
KVSO_END_DESTRUCTOR(KviKvsObject_xmlreader)
-void KviKvsObject_xmlreader::fatalError(const QString &szError)
+void KviKvsObject_xmlreader::fatalError(const TQString &szError)
{
m_szLastError = szError;
@@ -306,27 +306,27 @@ void KviKvsObject_xmlreader::fatalError(const QString &szError)
bool KviKvsObject_xmlreader::function_parse(KviKvsObjectFunctionCall *c)
{
- QString szString;
+ TQString szString;
KVSO_PARAMETERS_BEGIN(c)
KVSO_PARAMETER("string",KVS_PT_STRING,0,szString)
KVSO_PARAMETERS_END(c)
-#ifdef QT_NO_XML
- fatalError(__tr2qs("XML support not available in the Qt library"));
+#ifdef TQT_NO_XML
+ fatalError(__tr2qs("XML support not available in the TQt library"));
c->returnValue()->setBoolean(false);
#else
m_szLastError = "";
KviXmlHandler handler(this);
- QXmlInputSource source;
+ TQXmlInputSource source;
// We have a problem here.. most kvirc functions already interpret the data
// read from files. We should have binary data handling features to get this to work correctly.
// The following snippet of code tries to provide a best-effort workaround.
- KviQCString utf8data = KviQString::toUtf8(szString);
- QByteArray data = utf8data;
+ KviTQCString utf8data = KviTQString::toUtf8(szString);
+ TQByteArray data = utf8data;
data.truncate(utf8data.length()); // don't include the null terminator in data
source.setData(data);
//debug("PARSING(%s) LEN(%d)",szString.utf8().data(),szString.utf8().length());
- QXmlSimpleReader reader;
+ TQXmlSimpleReader reader;
reader.setContentHandler(&handler);
reader.setErrorHandler(&handler);
c->returnValue()->setBoolean(reader.parse(source));
diff --git a/src/modules/objects/class_xmlreader.h b/src/modules/objects/class_xmlreader.h
index dca69333..d1854ced 100644
--- a/src/modules/objects/class_xmlreader.h
+++ b/src/modules/objects/class_xmlreader.h
@@ -32,15 +32,16 @@
class KviKvsObject_xmlreader : public KviKvsObject
{
Q_OBJECT
+ TQ_OBJECT
public:
KVSO_DECLARE_OBJECT(KviKvsObject_xmlreader)
public:
bool function_parse(KviKvsObjectFunctionCall *c);
bool function_lastError(KviKvsObjectFunctionCall *c);
- void fatalError(const QString &szError);
+ void fatalError(const TQString &szError);
protected:
- QString m_szLastError;
+ TQString m_szLastError;
};
#endif //!_CLASS_XMLREADER_H_
diff --git a/src/modules/objects/libkviobjects.cpp b/src/modules/objects/libkviobjects.cpp
index 73eacace..81d3bef1 100644
--- a/src/modules/objects/libkviobjects.cpp
+++ b/src/modules/objects/libkviobjects.cpp
@@ -23,7 +23,7 @@
//=============================================================================
#include "kvi_tal_listview.h"
-#include <qimage.h>
+#include <tqimage.h>
#include "kvi_iconmanager.h"
#include "kvi_window.h"
#include "kvi_out.h"
@@ -40,11 +40,11 @@
#include "kvi_app.h"
#include "kvi_fileutils.h"
#ifndef COMPILE_USE_QT4
- #include <qwidgetlist.h>
- #include <qobjectlist.h>
+ #include <tqwidgetlist.h>
+ #include <tqobjectlist.h>
#endif
-#include <qdir.h>
+#include <tqdir.h>
#include "class_button.h"
#include "class_checkbox.h"
@@ -86,7 +86,7 @@
#include "class_dockwindow.h"
#include "class_vbox.h"
#include "class_hbox.h"
-static void dumpChildObjects(KviWindow *pWnd, QObject *parent, const char *spacing, bool bWidgetsOnly, KviKvsArray *n, int &idx);
+static void dumpChildObjects(KviWindow *pWnd, TQObject *tqparent, const char *spacing, bool bWidgetsOnly, KviKvsArray *n, int &idx);
static bool objects_module_cleanup(KviModule *m)
{
@@ -153,7 +153,7 @@ static bool objects_kvs_cmd_killClass(KviKvsModuleCommandCall * c)
Suppresses any warning message
@description:
Removes the definition of the class <class_name>.[br]
- All the instances of the class are killed (thus children objects are killed too).[br]
+ All the instances of the class are killed (thus tqchildren objects are killed too).[br]
All the derived class definitions are removed as well.[br]
Builtin class definitions cannot be removed and this commands
kills only all the instances of that class (derived class definitions
@@ -164,7 +164,7 @@ static bool objects_kvs_cmd_killClass(KviKvsModuleCommandCall * c)
*/
- QString szClass;
+ TQString szClass;
KVSM_PARAMETERS_BEGIN(c)
KVSM_PARAMETER("class",KVS_PT_NONEMPTYSTRING,0,szClass)
KVSM_PARAMETERS_END(c)
@@ -209,7 +209,7 @@ static bool objects_kvs_cmd_clearObjects(KviKvsModuleCommandCall * c)
*/
KviKvsKernel::instance()->objectController()->clearInstances();
- if(!c->switches()->find('i',"ii")) KviKvsKernel::instance()->objectController()->clearUserClasses();
+ if(!c->switches()->tqfind('i',"ii")) KviKvsKernel::instance()->objectController()->clearUserClasses();
return true;
}
@@ -242,7 +242,7 @@ static bool objects_kvs_cmd_connect(KviKvsModuleCommandCall * c)
KviKvsObject *obSrc;
KviKvsObject *obTrg;
- QString szSignal,szSlot;
+ TQString szSignal,szSlot;
kvs_hobject_t hSrc,hTrg;
KVSM_PARAMETERS_BEGIN(c)
KVSO_PARAMETER("object source",KVS_PT_HOBJECT,0,hSrc)
@@ -332,8 +332,8 @@ static bool objects_kvs_fnc_instances(KviKvsModuleFunctionCall * c)
[doc:objects]objects documentation[/doc]
*/
- QString szClassName;
- QString szFlags;
+ TQString szClassName;
+ TQString szFlags;
KVSM_PARAMETERS_BEGIN(c)
KVSO_PARAMETER("class name",KVS_PT_NONEMPTYSTRING,0,szClassName)
KVSO_PARAMETER("flags",KVS_PT_STRING,KVS_PF_OPTIONAL,szFlags)
@@ -345,7 +345,7 @@ static bool objects_kvs_fnc_instances(KviKvsModuleFunctionCall * c)
KviKvsObjectClass * pClass = KviKvsKernel::instance()->objectController()->lookupClass(szClassName);
if(!pClass)
{
- if(!szFlags.contains(QChar('q')))
+ if(!szFlags.tqcontains(TQChar('q')))
c->warning(__tr2qs("The class '%Q' does not exist"),&szClassName);
return true;
}
@@ -353,7 +353,7 @@ static bool objects_kvs_fnc_instances(KviKvsModuleFunctionCall * c)
KviPointerHashTableIterator<void *,KviKvsObject> it(*od);
kvs_uint_t uIdx = 0;
- if(szFlags.contains(QChar('s')))
+ if(szFlags.tqcontains(TQChar('s')))
{
while(KviKvsObject * ob = it.current())
{
@@ -404,7 +404,7 @@ static bool objects_kvs_fnc_variables(KviKvsModuleFunctionCall * c)
c->warning(__tr2qs("Object does not exists"));
return true;
}
- KviPointerHashTableIterator<QString,KviKvsVariant> it(* ob->dataContainer()->dict());
+ KviPointerHashTableIterator<TQString,KviKvsVariant> it(* ob->dataContainer()->dict());
KviKvsHash* pHash = new KviKvsHash();
c->returnValue()->setHash(pHash);
while(KviKvsVariant * t = it.current())
@@ -434,7 +434,7 @@ static bool objects_kvs_fnc_variables(KviKvsModuleFunctionCall * c)
*/
static bool objects_kvs_fnc_classAllHandlers(KviKvsModuleFunctionCall * c)
{
- QString szClassName;
+ TQString szClassName;
KVSM_PARAMETERS_BEGIN(c)
KVSO_PARAMETER("class name",KVS_PT_NONEMPTYSTRING,0,szClassName)
KVSM_PARAMETERS_END(c)
@@ -445,12 +445,12 @@ static bool objects_kvs_fnc_classAllHandlers(KviKvsModuleFunctionCall * c)
return true;
}
- KviPointerHashTableIterator<QString,KviKvsObjectFunctionHandler> it(* pClass->getHandlers());
+ KviPointerHashTableIterator<TQString,KviKvsObjectFunctionHandler> it(* pClass->getHandlers());
KviKvsHash* pHash = new KviKvsHash();
c->returnValue()->setHash(pHash);
while(KviKvsObjectFunctionHandler * t = it.current())
{
- QString szCode;
+ TQString szCode;
KviKvsObjectFunctionHandler *handler=pClass->lookupFunctionHandler(it.currentKey());
pClass->getFunctionCode(szCode,*handler);
pHash->set(it.currentKey(),new KviKvsVariant(szCode));
@@ -481,8 +481,8 @@ static bool objects_kvs_fnc_classes(KviKvsModuleFunctionCall * c)
KviKvsArray * pArry = new KviKvsArray();
c->returnValue()->setArray(pArry);
int uIdx=0;
- KviPointerHashTableIterator<QString,KviKvsObjectClass> it(*KviKvsKernel::instance()->objectController()->classDict());
- KviPointerHashTable<QString,bool> *classdict=new KviPointerHashTable<QString,bool>;
+ KviPointerHashTableIterator<TQString,KviKvsObjectClass> it(*KviKvsKernel::instance()->objectController()->classDict());
+ KviPointerHashTable<TQString,bool> *classdict=new KviPointerHashTable<TQString,bool>;
classdict->setAutoDelete(false);
bool bFake=true;
while(KviKvsObjectClass * pClass=it.current())
@@ -490,21 +490,21 @@ static bool objects_kvs_fnc_classes(KviKvsModuleFunctionCall * c)
if (!pClass->isBuiltin())classdict->insert(it.currentKey(),&bFake);
++it;
}
- QString szPath;
+ TQString szPath;
g_pApp->getLocalKvircDirectory(szPath,KviApp::Classes);
- QDir d(szPath);
- QStringList sl;
- sl = d.entryList(QDir::Files);
- for(QStringList::Iterator it2 = sl.begin();it2 != sl.end();++it2)
+ TQDir d(szPath);
+ TQStringList sl;
+ sl = d.entryList(TQDir::Files);
+ for(TQStringList::Iterator it2 = sl.begin();it2 != sl.end();++it2)
{
- QString szName=*it2;
- szName.replace("--","::");
+ TQString szName=*it2;
+ szName.tqreplace("--","::");
if (szName!=".." && szName!=".") classdict->insert(szName.left(szName.length()-4),&bFake);
}
KviKvsArray* pArray = new KviKvsArray();
c->returnValue()->setArray(pArray);
int idx=0;
- KviPointerHashTableIterator<QString,bool> strIt(*classdict);
+ KviPointerHashTableIterator<TQString,bool> strIt(*classdict);
while(strIt.current())
{
pArray->set(idx,new KviKvsVariant(strIt.currentKey()));
@@ -542,7 +542,7 @@ static bool objects_kvs_cmd_disconnect(KviKvsModuleCommandCall * c)
KviKvsObject *obSrc;
KviKvsObject *obTrg;
- QString szSignal,szSlot;
+ TQString szSignal,szSlot;
kvs_hobject_t hSrc,hTrg;
KVSM_PARAMETERS_BEGIN(c)
KVSO_PARAMETER("object source",KVS_PT_HOBJECT,0,hSrc)
@@ -615,21 +615,21 @@ static bool objects_kvs_cmd_bitBlt(KviKvsModuleCommandCall * c)
return true;
}
- QImage * imgSource=0;
- QPaintDevice * pdSource = 0;
+ TQImage * imgSource=0;
+ TQPaintDevice * pdSource = 0;
- if(obSrc->inherits("KviKvsObject_pixmap")) pdSource =((KviKvsObject_pixmap *)obSrc)->getPixmap();
- else if (obSrc->inherits("KviKvsObject_widget")) pdSource=((KviKvsObject_widget *)obSrc)->widget();
+ if(obSrc->inherits("KviKvsObject_pixmap")) pdSource =TQT_TQPAINTDEVICE(((KviKvsObject_pixmap *)obSrc)->getPixmap());
+ else if (obSrc->inherits("KviKvsObject_widget")) pdSource=TQT_TQPAINTDEVICE(((KviKvsObject_widget *)obSrc)->widget());
if (!pdSource)
{
c->warning(__tr2qs("Widget, Image or Pixmap required "));
return true;
}
- QPaintDevice * pdDest = 0;
+ TQPaintDevice * pdDest = 0;
if(obDst->inherits("KviKvsObject_pixmap")){
- pdDest= ((KviKvsObject_pixmap *)obDst)->getPixmap();
+ pdDest= TQT_TQPAINTDEVICE(((KviKvsObject_pixmap *)obDst)->getPixmap());
}
- else if (obDst->inherits("KviKvsObject_widget")) pdDest=((KviKvsObject_widget *)obDst)->widget();
+ else if (obDst->inherits("KviKvsObject_widget")) pdDest=TQT_TQPAINTDEVICE(((KviKvsObject_widget *)obDst)->widget());
if (!pdDest)
{
c->warning(__tr2qs("Widget or Pixmap required"));
@@ -639,9 +639,9 @@ static bool objects_kvs_cmd_bitBlt(KviKvsModuleCommandCall * c)
((KviKvsObject_pixmap *)obDst)->pixmapChanged();
}
#ifdef COMPILE_USE_QT4
- /*QPainter p(pdDest);
- QRect rectdest(iXdst,iYdst,uW,uH);
- QRect rectsrc(iXsrc,iYsrc,uW,uH);
+ /*TQPainter p(pdDest);
+ TQRect rectdest(iXdst,iYdst,uW,uH);
+ TQRect rectsrc(iXsrc,iYsrc,uW,uH);
p.drawPixmap(rectdest,pdSource,rectsrc);
*/
@@ -721,9 +721,9 @@ static bool objects_kvs_cmd_blend(KviKvsModuleCommandCall * c)
return true;
}
- QPaintDevice * pdDest = 0;
- if(obDest->inherits("KviKvsObject_pixmap")) pdDest = ((KviKvsObject_pixmap *)obDest)->getPixmap();
- else if (obDest->inherits("KviKvsObject_widget")) pdDest=((KviKvsObject_widget *)obDest)->widget();
+ TQPaintDevice * pdDest = 0;
+ if(obDest->inherits("KviKvsObject_pixmap")) pdDest = TQT_TQPAINTDEVICE(((KviKvsObject_pixmap *)obDest)->getPixmap());
+ else if (obDest->inherits("KviKvsObject_widget")) pdDest=TQT_TQPAINTDEVICE(((KviKvsObject_widget *)obDest)->widget());
if (!pdDest)
{
@@ -734,8 +734,8 @@ static bool objects_kvs_cmd_blend(KviKvsModuleCommandCall * c)
if(obDest->inherits("KviKvsObject_pixmap")) ((KviKvsObject_pixmap *)obDest)->pixmapChanged();
- QImage *img_back=((KviKvsObject_pixmap *)obBck)->getImage();
- QImage *img_fore=((KviKvsObject_pixmap *)obFor)->getImage();
+ TQImage *img_back=((KviKvsObject_pixmap *)obBck)->getImage();
+ TQImage *img_fore=((KviKvsObject_pixmap *)obFor)->getImage();
// check size
if ((iBkX+uW>img_back->width())||(iBkY+uH>img_back->height()))
@@ -748,16 +748,16 @@ static bool objects_kvs_cmd_blend(KviKvsModuleCommandCall * c)
c->warning(__tr2qs("Values for foreground are out of image size "));
return true;
}
- QImage buffer;
+ TQImage buffer;
buffer.create(uW,uH,32);
buffer.setAlphaBuffer(true);
for(int y = 0;y < buffer.height();y++)
{
- QRgb * dst = (QRgb *)buffer.scanLine(y);
- QRgb * end = dst + buffer.width();
- QRgb * bkg = (QRgb *)img_back->scanLine(y+iBkY);
+ TQRgb * dst = (TQRgb *)buffer.scanLine(y);
+ TQRgb * end = dst + buffer.width();
+ TQRgb * bkg = (TQRgb *)img_back->scanLine(y+iBkY);
bkg += iBkX;
- QRgb * fgn = (QRgb *)img_fore->scanLine(y+iFoY);
+ TQRgb * fgn = (TQRgb *)img_fore->scanLine(y+iFoY);
fgn += iFoX;
double dRemaining = 1.0 - dBlend;
int a=0;
@@ -765,11 +765,11 @@ static bool objects_kvs_cmd_blend(KviKvsModuleCommandCall * c)
{
- *dst = qRgba(
- (int)((qRed(*bkg) * dRemaining) + (qRed(*fgn) * dBlend)),
- (int)((qGreen(*bkg) * dRemaining) + (qGreen(*fgn) * dBlend)),
- (int)((qBlue(*bkg) * dRemaining) + (qBlue(*fgn) * dBlend)),
- (int)((qAlpha(*bkg) * dRemaining) + (qAlpha(*fgn) * dBlend))
+ *dst = tqRgba(
+ (int)((tqRed(*bkg) * dRemaining) + (tqRed(*fgn) * dBlend)),
+ (int)((tqGreen(*bkg) * dRemaining) + (tqGreen(*fgn) * dBlend)),
+ (int)((tqBlue(*bkg) * dRemaining) + (tqBlue(*fgn) * dBlend)),
+ (int)((tqAlpha(*bkg) * dRemaining) + (tqAlpha(*fgn) * dBlend))
);
dst++;
@@ -780,8 +780,8 @@ static bool objects_kvs_cmd_blend(KviKvsModuleCommandCall * c)
}
#ifdef COMPILE_USE_QT4
- QPainter p(pdDest);
- QRect rect(iDesX,iDesY,buffer.width(),buffer.height());
+ TQPainter p(pdDest);
+ TQRect rect(iDesX,iDesY,buffer.width(),buffer.height());
p.drawImage(rect,buffer);
#else
bitBlt(pdDest,iDesX,iDesY,&buffer,0,0,buffer.width(),buffer.height());
@@ -827,10 +827,10 @@ static bool objects_kvs_fnc_listObjects(KviKvsModuleFunctionCall * cmd)
KVSO_PARAMETERS_END(cmd)
if (bFlag) cmd->window()->output(80, "Objects dump:");
#ifdef COMPILE_USE_QT4
- QWidgetList list = g_pApp->topLevelWidgets();
+ TQWidgetList list = g_pApp->tqtopLevelWidgets();
KviStr spacing = ">";
- QString szTemp;
+ TQString szTemp;
KviKvsArray * n = new KviKvsArray();
int idx=0;
for(int i=0;i<list.count();i++)
@@ -846,9 +846,9 @@ static bool objects_kvs_fnc_listObjects(KviKvsModuleFunctionCall * cmd)
list.at(i)->isVisible() ? "visible" : "hidden",
list.at(i)->x(), list.at(i)->y(), list.at(i)->width(), list.at(i)->height());
}
- QString szClass=list.at(i)->className();
- QString szObj=list.at(i)->name();
- QString szTemp;
+ TQString szClass=list.at(i)->className();
+ TQString szObj=list.at(i)->name();
+ TQString szTemp;
szTemp = szClass + "::" + szObj;
KviKvsVariant v;
v.setString(szTemp);
@@ -865,11 +865,11 @@ static bool objects_kvs_fnc_listObjects(KviKvsModuleFunctionCall * cmd)
}
#else
- QWidgetList *l = g_pApp->topLevelWidgets();
+ TQWidgetList *l = g_pApp->tqtopLevelWidgets();
l->setAutoDelete(false);
- QWidgetListIt it(*l);
+ TQWidgetListIt it(*l);
KviStr spacing = ">";
- QString szTemp;
+ TQString szTemp;
KviKvsArray * n = new KviKvsArray();
int idx=0;
while( it.current() )
@@ -885,9 +885,9 @@ static bool objects_kvs_fnc_listObjects(KviKvsModuleFunctionCall * cmd)
it.current()->isVisible() ? "visible" : "hidden",
it.current()->x(), it.current()->y(), it.current()->width(), it.current()->height());
}
- QString szClass=it.current()->className();
- QString szObj=it.current()->name();
- QString szTemp;
+ TQString szClass=it.current()->className();
+ TQString szObj=it.current()->name();
+ TQString szTemp;
szTemp = szClass + "::" + szObj;
KviKvsVariant v;
v.setString(szTemp);
@@ -898,7 +898,7 @@ static bool objects_kvs_fnc_listObjects(KviKvsModuleFunctionCall * cmd)
idx++;
- dumpChildObjects(cmd->window(), it.current(), spacing.ptr(), bFlag,n,idx);
+ dumpChildObjects(cmd->window(), TQT_TQOBJECT(it.current()), spacing.ptr(), bFlag,n,idx);
}
@@ -910,12 +910,12 @@ static bool objects_kvs_fnc_listObjects(KviKvsModuleFunctionCall * cmd)
return true;
}
-static void dumpChildObjects(KviWindow *pWnd, QObject *parent, const char *spacing, bool bFlag, KviKvsArray *n, int &idx)
+static void dumpChildObjects(KviWindow *pWnd, TQObject *tqparent, const char *spacing, bool bFlag, KviKvsArray *n, int &idx)
{
#ifdef COMPILE_USE_QT4
- const QObjectList list = parent->children();
+ const TQObjectList list = tqparent->tqchildren();
if( !list.count() ) return;
- QString sp(spacing);
+ TQString sp(spacing);
sp.append(">");
for(int i=0;i<list.count();i++)
{
@@ -928,9 +928,9 @@ static void dumpChildObjects(KviWindow *pWnd, QObject *parent, const char *spaci
list.at(i)->name(), KVI_TEXT_BOLD, list.at(i)->className()
);
}
- QString szClass=list.at(i)->className();
- QString szObj=list.at(i)->name();
- QString szTemp;
+ TQString szClass=list.at(i)->className();
+ TQString szObj=list.at(i)->name();
+ TQString szTemp;
szTemp=spacing+szClass+"::"+szObj;
KviKvsVariant v;
v.setString(szTemp);
@@ -942,11 +942,10 @@ static void dumpChildObjects(KviWindow *pWnd, QObject *parent, const char *spaci
}
#else
- const QObjectList *l = parent->children();
- if( !l ) return;
- if( l->isEmpty() ) return;
- QObjectListIt it(*l);
- QString sp(spacing);
+ const TQObjectList l = tqparent->childrenListObject();
+ if( l.isEmpty() ) return;
+ TQObjectListIt it(l);
+ TQString sp(spacing);
sp.append(">");
while( it.current() )
{
@@ -959,9 +958,9 @@ static void dumpChildObjects(KviWindow *pWnd, QObject *parent, const char *spaci
it.current()->name(), KVI_TEXT_BOLD, it.current()->className()
);
}
- QString szClass=it.current()->className();
- QString szObj=it.current()->name();
- QString szTemp;
+ TQString szClass=it.current()->className();
+ TQString szObj=it.current()->name();
+ TQString szTemp;
szTemp=spacing+szClass+"::"+szObj;
KviKvsVariant v;
v.setString(szTemp);
diff --git a/src/modules/objects/object_macros.h b/src/modules/objects/object_macros.h
index 9c0360b2..8e9b788d 100644
--- a/src/modules/objects/object_macros.h
+++ b/src/modules/objects/object_macros.h
@@ -31,7 +31,7 @@
#include "kvi_kvs_object_functioncall.h"
#define KVSO_DECLARE_OBJECT(__className) \
- __className(KviKvsObjectClass * pClass,KviKvsObject * pParent,const QString &szName); \
+ __className(KviKvsObjectClass * pClass,KviKvsObject * pParent,const TQString &szName); \
~__className(); \
static void registerSelf(); \
static void unregisterSelf();
@@ -51,7 +51,7 @@
#define KVSO_BEGIN_REGISTERCLASS(__className,__stringName,__baseClass) \
static KviKvsObjectClass * g_pKvs##__className##Class = 0; \
- static KviKvsObject * kvs_##__className##_createInstance(KviKvsObjectClass * pClass,KviKvsObject * pParent,const QString &szName) \
+ static KviKvsObject * kvs_##__className##_createInstance(KviKvsObjectClass * pClass,KviKvsObject * pParent,const TQString &szName) \
{ \
return new __className(pClass,pParent,szName); \
} \
@@ -72,7 +72,7 @@
#define KVSO_BEGIN_CONSTRUCTOR(__className,__baseClass) \
- __className::__className(KviKvsObjectClass * pClass,KviKvsObject * pParent,const QString &szName) \
+ __className::__className(KviKvsObjectClass * pClass,KviKvsObject * pParent,const TQString &szName) \
: __baseClass(pClass,pParent,szName) \
{