summaryrefslogtreecommitdiffstats
path: root/src/modules/codetester
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/codetester
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/codetester')
-rw-r--r--src/modules/codetester/codetester.cpp40
-rw-r--r--src/modules/codetester/codetester.h22
2 files changed, 32 insertions, 30 deletions
diff --git a/src/modules/codetester/codetester.cpp b/src/modules/codetester/codetester.cpp
index 69a46abc..a4728959 100644
--- a/src/modules/codetester/codetester.cpp
+++ b/src/modules/codetester/codetester.cpp
@@ -35,10 +35,10 @@
#include "kvi_kvs_script.h"
#include "kvi_kvs_variantlist.h"
-#include <qpushbutton.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qtoolbutton.h>
+#include <tqpushbutton.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqtoolbutton.h>
#include "kvi_tal_popupmenu.h"
extern KviPointerList<KviCodeTesterWindow> * g_pCodeTesterWindowList;
@@ -46,19 +46,19 @@ extern KviPointerList<KviCodeTesterWindow> * g_pCodeTesterWindowList;
-KviCodeTester::KviCodeTester(QWidget * par)
-: QWidget(par,"code_tester")
+KviCodeTester::KviCodeTester(TQWidget * par)
+: TQWidget(par,"code_tester")
{
- QGridLayout * g = new QGridLayout(this,2,4,2,2);
+ TQGridLayout * g = new TQGridLayout(this,2,4,2,2);
m_pEditor = KviScriptEditor::createInstance(this);
g->addMultiCellWidget(m_pEditor,0,0,0,3);
- m_pExecuteButton = new QPushButton(__tr2qs("&Execute"),this);
+ m_pExecuteButton = new TQPushButton(__tr2qs("&Execute"),this);
g->addWidget(m_pExecuteButton,1,3);
- connect(m_pExecuteButton,SIGNAL(clicked()),this,SLOT(execute()));
+ connect(m_pExecuteButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(execute()));
- m_pModeLabel = new QLabel(__tr("Params:"),this);
+ m_pModeLabel = new TQLabel(__tr("Params:"),this);
g->addWidget(m_pModeLabel,1,1);
- m_pParams = new QLineEdit(this);
+ m_pParams = new TQLineEdit(this);
g->addWidget(m_pParams,1,2);
}
@@ -71,12 +71,12 @@ KviCodeTester::~KviCodeTester()
void KviCodeTester::execute()
{
- QString parms = m_pParams->text();
- QString buffer;
+ TQString parms = m_pParams->text();
+ TQString buffer;
m_pEditor->getText(buffer);
KviConsole * con = g_pApp->activeConsole();
//KviParameterList * l = new KviParameterList(parms.ptr());
- KviKvsScript::run(buffer,con,new KviKvsVariantList(new QString(parms)));
+ KviKvsScript::run(buffer,con,new KviKvsVariantList(new TQString(parms)));
}
KviCodeTesterWindow::KviCodeTesterWindow(KviFrame * lpFrm)
@@ -92,12 +92,12 @@ KviCodeTesterWindow::~KviCodeTesterWindow()
g_pCodeTesterWindowList->removeRef(this);
}
-QPixmap * KviCodeTesterWindow::myIconPtr()
+TQPixmap * KviCodeTesterWindow::myIconPtr()
{
return g_pIconManager->getSmallIcon(KVI_SMALLICON_BOMB);
}
-void KviCodeTesterWindow::resizeEvent(QResizeEvent *e)
+void KviCodeTesterWindow::resizeEvent(TQResizeEvent *e)
{
m_pTester->setGeometry(0,0,width(),height());
}
@@ -106,9 +106,9 @@ void KviCodeTesterWindow::fillCaptionBuffers()
{
m_szPlainTextCaption = __tr2qs("Script Tester");
- static QString p1("<nobr><font color=\"");
- static QString p2("\"><b>");
- static QString p3("</b></font></nobr>");
+ static TQString p1("<nobr><font color=\"");
+ static TQString p2("\"><b>");
+ static TQString p3("</b></font></nobr>");
m_szHtmlActiveCaption = p1;
m_szHtmlActiveCaption += KVI_OPTION_COLOR(KviOption_colorCaptionTextActive).name();
@@ -145,7 +145,7 @@ void KviCodeTesterWindow::loadProperties(KviConfig *cfg)
{
/*
#ifdef COMPILE_SCRIPTTOOLBAR
- QValueList<int> def;
+ TQValueList<int> def;
def.append(20);
def.append(80);
m_pEditor->setSizes(cfg->readIntListEntry("Sizes",def));
diff --git a/src/modules/codetester/codetester.h b/src/modules/codetester/codetester.h
index ce24ca5d..3b9556f1 100644
--- a/src/modules/codetester/codetester.h
+++ b/src/modules/codetester/codetester.h
@@ -25,24 +25,25 @@
#include "kvi_window.h"
#include "kvi_string.h"
-#include <qlineedit.h>
+#include <tqlineedit.h>
-class QPushButton;
-class QLabel;
+class TQPushButton;
+class TQLabel;
class KviScriptEditor;
-class KviCodeTester : public QWidget
+class KviCodeTester : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- KviCodeTester(QWidget * par);
+ KviCodeTester(TQWidget * par);
~KviCodeTester();
private:
KviScriptEditor * m_pEditor;
- QLineEdit * m_pParams;
- QPushButton * m_pExecuteButton;
- QLabel * m_pModeLabel;
+ TQLineEdit * m_pParams;
+ TQPushButton * m_pExecuteButton;
+ TQLabel * m_pModeLabel;
private slots:
void execute();
};
@@ -50,15 +51,16 @@ private slots:
class KviCodeTesterWindow : public KviWindow
{
Q_OBJECT
+ TQ_OBJECT
public:
KviCodeTesterWindow(KviFrame * lpFrm);
~KviCodeTesterWindow();
protected:
KviCodeTester * m_pTester;
protected:
- virtual QPixmap * myIconPtr();
+ virtual TQPixmap * myIconPtr();
virtual void fillCaptionBuffers();
- virtual void resizeEvent(QResizeEvent *e);
+ virtual void resizeEvent(TQResizeEvent *e);
virtual void getConfigGroupName(KviStr &szName);
virtual void saveProperties(KviConfig *);
virtual void loadProperties(KviConfig *);