diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-05-04 19:54:24 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-05-04 19:54:24 +0000 |
commit | d7633c195a464e4d344ada9eea61afd10110598a (patch) | |
tree | 1f2da0b135f3ed84955e340cae823f00c4ce7284 /src/svnfrontend/stopdlg.cpp | |
parent | 3fa7eb804f67b2789f128075cc2522f398640250 (diff) | |
download | tdesvn-d7633c195a464e4d344ada9eea61afd10110598a.tar.gz tdesvn-d7633c195a464e4d344ada9eea61afd10110598a.zip |
Port kdesvn to TQt4
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kdesvn@1230412 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/svnfrontend/stopdlg.cpp')
-rw-r--r-- | src/svnfrontend/stopdlg.cpp | 72 |
1 files changed, 36 insertions, 36 deletions
diff --git a/src/svnfrontend/stopdlg.cpp b/src/svnfrontend/stopdlg.cpp index 06bee04..6030b17 100644 --- a/src/svnfrontend/stopdlg.cpp +++ b/src/svnfrontend/stopdlg.cpp @@ -25,17 +25,17 @@ #include <kapplication.h> #include <klocale.h> #include <kwin.h> -#include <qtimer.h> -#include <qpushbutton.h> -#include <qlayout.h> -#include <qlabel.h> -#include <qwidgetlist.h> +#include <tqtimer.h> +#include <tqpushbutton.h> +#include <tqlayout.h> +#include <tqlabel.h> +#include <tqwidgetlist.h> #include <kprogress.h> #include <kdebug.h> #include <ktextbrowser.h> -StopDlg::StopDlg(QObject*listener,QWidget *parent, const char *name,const QString&caption,const QString&text) - : KDialogBase(KDialogBase::Plain,caption,KDialogBase::Cancel, KDialogBase::Cancel,parent, name,true) +StopDlg::StopDlg(TQObject*listener,TQWidget *tqparent, const char *name,const TQString&caption,const TQString&text) + : KDialogBase(KDialogBase::Plain,caption,KDialogBase::Cancel, KDialogBase::Cancel,tqparent, name,true) ,m_Context(listener),m_MinDuration(1000),mCancelled(false),mShown(false),m_BarShown(false), cstack(0) { @@ -43,44 +43,44 @@ StopDlg::StopDlg(QObject*listener,QWidget *parent, const char *name,const QStrin m_lastLogLines = 0; m_lastLog = ""; - mShowTimer = new QTimer(this); + mShowTimer = new TQTimer(this); m_StopTick.start(); showButton(KDialogBase::Close, false); mCancelText = actionButton(KDialogBase::Cancel)->text(); - QFrame* mainWidget = plainPage(); - layout = new QVBoxLayout(mainWidget, 10); - mLabel = new QLabel(text, mainWidget); - layout->addWidget(mLabel); + TQFrame* mainWidget = plainPage(); + tqlayout = new TQVBoxLayout(mainWidget, 10); + mLabel = new TQLabel(text, mainWidget); + tqlayout->addWidget(mLabel); m_ProgressBar=new KProgress(15,mainWidget); m_ProgressBar->setCenterIndicator (false); m_ProgressBar->setTextEnabled(false); - layout->addWidget(m_ProgressBar); + tqlayout->addWidget(m_ProgressBar); m_NetBar = new KProgress(15,mainWidget); - layout->addWidget(m_NetBar); + tqlayout->addWidget(m_NetBar); mWait = false; m_LogWindow = 0; - connect(mShowTimer, SIGNAL(timeout()), this, SLOT(slotAutoShow())); + connect(mShowTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotAutoShow())); if (m_Context) { - connect(m_Context,SIGNAL(tickProgress()),this,SLOT(slotTick())); - connect(m_Context,SIGNAL(waitShow(bool)),this,SLOT(slotWait(bool))); - connect(m_Context,SIGNAL(netProgress(long long int, long long int)), - this,SLOT(slotNetProgres(long long int, long long int))); - connect(this,SIGNAL(sigCancel(bool)),m_Context,SLOT(setCanceled(bool))); + connect(m_Context,TQT_SIGNAL(tickProgress()),this,TQT_SLOT(slotTick())); + connect(m_Context,TQT_SIGNAL(waitShow(bool)),this,TQT_SLOT(slotWait(bool))); + connect(m_Context,TQT_SIGNAL(netProgress(long long int, long long int)), + this,TQT_SLOT(slotNetProgres(long long int, long long int))); + connect(this,TQT_SIGNAL(sigCancel(bool)),m_Context,TQT_SLOT(setCanceled(bool))); } mShowTimer->start(m_MinDuration, true); setMinimumSize(280,160); adjustSize(); } -void StopDlg::showEvent( QShowEvent*) +void StopDlg::showEvent( TQShowEvent*) { - cstack = new CursorStack(Qt::BusyCursor); + cstack = new CursorStack(TQt::BusyCursor); } -void StopDlg::hideEvent(QHideEvent*) +void StopDlg::hideEvent(TQHideEvent*) { delete cstack; cstack = 0; } @@ -102,8 +102,8 @@ StopDlg::~StopDlg() void StopDlg::slotAutoShow() { bool hasDialogs = false; - QWidget * w = kapp->activeModalWidget(); - if (w && w!=this && w!=parentWidget() ) { + TQWidget * w = TQT_TQWIDGET(kapp->activeModalWidget()); + if (w && w!=this && w!=tqparentWidget() ) { hasDialogs = true; } if (hasDialogs) { @@ -156,15 +156,15 @@ void StopDlg::slotTick() } } -void StopDlg::slotExtraMessage(const QString&msg) +void StopDlg::slotExtraMessage(const TQString&msg) { ++m_lastLogLines; if (!m_LogWindow) { - QFrame* mainWidget = plainPage(); + TQFrame* mainWidget = plainPage(); m_LogWindow = new KTextBrowser(mainWidget); - layout->addWidget(m_LogWindow); + tqlayout->addWidget(m_LogWindow); m_LogWindow->show(); - resize( QSize(500, 400).expandedTo(minimumSizeHint()) ); + resize( TQSize(500, 400).expandedTo(tqminimumSizeHint()) ); } if (m_lastLogLines >= Kdesvnsettings::self()->cmdline_log_minline() && isHidden() ) { @@ -181,14 +181,14 @@ void StopDlg::slotNetProgres(long long int current, long long int max) m_NetBar->show(); m_netBarShown=true; } - QString s1 = helpers::ByteToString()(current); + TQString s1 = helpers::ByteToString()(current); if (max > -1 && max != m_NetBar->totalSteps()) { - QString s2 = helpers::ByteToString()(max); - m_NetBar->setFormat(i18n("%1 of %2").arg(s1).arg(s2)); + TQString s2 = helpers::ByteToString()(max); + m_NetBar->setFormat(i18n("%1 of %2").tqarg(s1).tqarg(s2)); m_NetBar->setTotalSteps(max); } if (max == -1) { - m_NetBar->setFormat(i18n("%1 transferred.").arg(s1)); + m_NetBar->setFormat(i18n("%1 transferred.").tqarg(s1)); m_NetBar->setTotalSteps(current+1); } m_NetBar->setValue(current); @@ -197,10 +197,10 @@ void StopDlg::slotNetProgres(long long int current, long long int max) } } -StopSimpleDlg::StopSimpleDlg(QWidget *parent, const char *name,const QString&caption,const QString&text) - : StopDlg(0,parent,name,caption,text),cancelld(false) +StopSimpleDlg::StopSimpleDlg(TQWidget *tqparent, const char *name,const TQString&caption,const TQString&text) + : StopDlg(0,tqparent,name,caption,text),cancelld(false) { - connect(this,SIGNAL(sigCancel(bool)),this,SLOT(slotSimpleCancel(bool))); + connect(this,TQT_SIGNAL(sigCancel(bool)),this,TQT_SLOT(slotSimpleCancel(bool))); } void StopSimpleDlg::slotSimpleCancel(bool how) |