diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-28 18:31:12 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-28 18:31:12 +0000 |
commit | 0a80cfd57d271dd44221467efb426675fa470356 (patch) | |
tree | 6f503a31aa078eaf8fa015cf1749808529d49fc9 /src/modules/dcc/dialogs.cpp | |
parent | 3329e5a804e28ef3f5eb51d1e7affdd5a508e8f2 (diff) | |
download | kvirc-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/dcc/dialogs.cpp')
-rw-r--r-- | src/modules/dcc/dialogs.cpp | 88 |
1 files changed, 44 insertions, 44 deletions
diff --git a/src/modules/dcc/dialogs.cpp b/src/modules/dcc/dialogs.cpp index 0ec0afba..89435202 100644 --- a/src/modules/dcc/dialogs.cpp +++ b/src/modules/dcc/dialogs.cpp @@ -25,12 +25,12 @@ #include "kvi_iconmanager.h" #include "kvi_app.h" -#include <qlayout.h> -#include <qpushbutton.h> -#include <qlabel.h> -#include <qstringlist.h> -#include <qevent.h> -#include <qdesktopwidget.h> +#include <tqlayout.h> +#include <tqpushbutton.h> +#include <tqlabel.h> +#include <tqstringlist.h> +#include <tqevent.h> +#include <tqdesktopwidget.h> KviDccBox::KviDccBox(KviDccBroker * br,KviDccDescriptor * dcc) { @@ -50,24 +50,24 @@ void KviDccBox::forgetDescriptor() m_pDescriptor = 0; } -KviDccAcceptBox::KviDccAcceptBox(KviDccBroker * br,KviDccDescriptor * dcc,const QString &text,const QString &capt) -: QWidget(0,"dcc_accept_box") , KviDccBox(br,dcc) +KviDccAcceptBox::KviDccAcceptBox(KviDccBroker * br,KviDccDescriptor * dcc,const TQString &text,const TQString &capt) +: TQWidget(0,"dcc_accept_box") , KviDccBox(br,dcc) { - QVBoxLayout * vb = new QVBoxLayout(this,4,4); - QLabel * l = new QLabel(text,this); + TQVBoxLayout * vb = new TQVBoxLayout(this,4,4); + TQLabel * l = new TQLabel(text,this); #ifdef COMPILE_USE_QT4 l->setWordWrap(true); #endif vb->addWidget(l); - QHBoxLayout *hb = new QHBoxLayout(4); - vb->addLayout(hb,Qt::AlignCenter); - QPushButton * btn = new QPushButton(__tr2qs_ctx("&Accept","dcc"),this); + TQHBoxLayout *hb = new TQHBoxLayout(4); + vb->addLayout(hb,TQt::AlignCenter); + TQPushButton * btn = new TQPushButton(__tr2qs_ctx("&Accept","dcc"),this); btn->setDefault(true); //btn->setFocus(); hb->addWidget(btn); - connect(btn,SIGNAL(clicked()),this,SLOT(acceptClicked())); - btn = new QPushButton(__tr2qs_ctx("&Reject","dcc"),this); - connect(btn,SIGNAL(clicked()),this,SLOT(rejectClicked())); + connect(btn,TQT_SIGNAL(clicked()),this,TQT_SLOT(acceptClicked())); + btn = new TQPushButton(__tr2qs_ctx("&Reject","dcc"),this); + connect(btn,TQT_SIGNAL(clicked()),this,TQT_SLOT(rejectClicked())); hb->addWidget(btn); setIcon(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_DCCMSG))); @@ -85,63 +85,63 @@ void KviDccAcceptBox::acceptClicked() { hide(); emit accepted(this,m_pDescriptor); - g_pApp->collectGarbage(this); + g_pApp->collectGarbage(TQT_TQOBJECT(this)); } void KviDccAcceptBox::rejectClicked() { hide(); emit rejected(this,m_pDescriptor); - g_pApp->collectGarbage(this); + g_pApp->collectGarbage(TQT_TQOBJECT(this)); } -void KviDccAcceptBox::closeEvent(QCloseEvent *e) +void KviDccAcceptBox::closeEvent(TQCloseEvent *e) { hide(); e->ignore(); emit rejected(this,m_pDescriptor); - g_pApp->collectGarbage(this); + g_pApp->collectGarbage(TQT_TQOBJECT(this)); } -void KviDccAcceptBox::showEvent(QShowEvent *e) +void KviDccAcceptBox::showEvent(TQShowEvent *e) { move((g_pApp->desktop()->width() - width()) >> 1, (g_pApp->desktop()->height() - height()) >> 1); - QWidget::showEvent(e); + TQWidget::showEvent(e); } -KviDccRenameBox::KviDccRenameBox(KviDccBroker * br,KviDccDescriptor * dcc,const QString &text,bool bDisableResume) -: QWidget(0,"dcc_rename_box") , KviDccBox(br,dcc) +KviDccRenameBox::KviDccRenameBox(KviDccBroker * br,KviDccDescriptor * dcc,const TQString &text,bool bDisableResume) +: TQWidget(0,"dcc_rename_box") , KviDccBox(br,dcc) { - QVBoxLayout * vb = new QVBoxLayout(this,4,4); - QLabel * l = new QLabel(text,this); + TQVBoxLayout * vb = new TQVBoxLayout(this,4,4); + TQLabel * l = new TQLabel(text,this); #ifdef COMPILE_USE_QT4 l->setWordWrap(true); #endif vb->addWidget(l); - QHBoxLayout *hb = new QHBoxLayout(4); - vb->addLayout(hb,Qt::AlignCenter); + TQHBoxLayout *hb = new TQHBoxLayout(4); + vb->addLayout(hb,TQt::AlignCenter); - QPushButton * btn = new QPushButton(__tr2qs_ctx("&Rename","dcc"),this); + TQPushButton * btn = new TQPushButton(__tr2qs_ctx("&Rename","dcc"),this); hb->addWidget(btn); - connect(btn,SIGNAL(clicked()),this,SLOT(renameClicked())); + connect(btn,TQT_SIGNAL(clicked()),this,TQT_SLOT(renameClicked())); - btn = new QPushButton(__tr2qs_ctx("Over&write","dcc"),this); + btn = new TQPushButton(__tr2qs_ctx("Over&write","dcc"),this); hb->addWidget(btn); - connect(btn,SIGNAL(clicked()),this,SLOT(overwriteClicked())); + connect(btn,TQT_SIGNAL(clicked()),this,TQT_SLOT(overwriteClicked())); - btn = new QPushButton(__tr2qs_ctx("Re&sume","dcc"),this); + btn = new TQPushButton(__tr2qs_ctx("Re&sume","dcc"),this); hb->addWidget(btn); - connect(btn,SIGNAL(clicked()),this,SLOT(resumeClicked())); + connect(btn,TQT_SIGNAL(clicked()),this,TQT_SLOT(resumeClicked())); if(bDisableResume)btn->setEnabled(false); - btn = new QPushButton(__tr2qs_ctx("Cancel","dcc"),this); + btn = new TQPushButton(__tr2qs_ctx("Cancel","dcc"),this); hb->addWidget(btn); - connect(btn,SIGNAL(clicked()),this,SLOT(cancelClicked())); + connect(btn,TQT_SIGNAL(clicked()),this,TQT_SLOT(cancelClicked())); btn->setDefault(true); //btn->setFocus(); @@ -153,36 +153,36 @@ KviDccRenameBox::~KviDccRenameBox() { } -void KviDccRenameBox::closeEvent(QCloseEvent *e) +void KviDccRenameBox::closeEvent(TQCloseEvent *e) { hide(); e->ignore(); if(m_pDescriptor) { emit cancelSelected(this,m_pDescriptor); - g_pApp->collectGarbage(this); + g_pApp->collectGarbage(TQT_TQOBJECT(this)); } } -void KviDccRenameBox::showEvent(QShowEvent *e) +void KviDccRenameBox::showEvent(TQShowEvent *e) { move((g_pApp->desktop()->width() - width()) >> 1, (g_pApp->desktop()->height() - height()) >> 1); - QWidget::showEvent(e); + TQWidget::showEvent(e); } void KviDccRenameBox::renameClicked() { hide(); emit renameSelected(this,m_pDescriptor); - g_pApp->collectGarbage(this); + g_pApp->collectGarbage(TQT_TQOBJECT(this)); } void KviDccRenameBox::overwriteClicked() { hide(); emit overwriteSelected(this,m_pDescriptor); - g_pApp->collectGarbage(this); + g_pApp->collectGarbage(TQT_TQOBJECT(this)); } void KviDccRenameBox::resumeClicked() @@ -190,14 +190,14 @@ void KviDccRenameBox::resumeClicked() hide(); m_pDescriptor->bResume = true; emit overwriteSelected(this,m_pDescriptor); - g_pApp->collectGarbage(this); + g_pApp->collectGarbage(TQT_TQOBJECT(this)); } void KviDccRenameBox::cancelClicked() { hide(); emit cancelSelected(this,m_pDescriptor); - g_pApp->collectGarbage(this); + g_pApp->collectGarbage(TQT_TQOBJECT(this)); } |