summaryrefslogtreecommitdiffstats
path: root/src/modules/objects/class_mainwindow.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-28 18:31:12 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-28 18:31:12 +0000
commit0a80cfd57d271dd44221467efb426675fa470356 (patch)
tree6f503a31aa078eaf8fa015cf1749808529d49fc9 /src/modules/objects/class_mainwindow.cpp
parent3329e5a804e28ef3f5eb51d1e7affdd5a508e8f2 (diff)
downloadkvirc-0a80cfd57d271dd44221467efb426675fa470356.tar.gz
kvirc-0a80cfd57d271dd44221467efb426675fa470356.zip
TQt4 port kvirc
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kvirc@1238719 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/modules/objects/class_mainwindow.cpp')
-rw-r--r--src/modules/objects/class_mainwindow.cpp50
1 files changed, 25 insertions, 25 deletions
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);