diff options
Diffstat (limited to 'krita/ui/kis_label_progress.cc')
-rw-r--r-- | krita/ui/kis_label_progress.cc | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/krita/ui/kis_label_progress.cc b/krita/ui/kis_label_progress.cc index e08a7fcf..c04452f4 100644 --- a/krita/ui/kis_label_progress.cc +++ b/krita/ui/kis_label_progress.cc @@ -16,11 +16,11 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include <qlayout.h> -#include <qtooltip.h> -#include <qtoolbutton.h> -#include <qcursor.h> -#include <qeventloop.h> +#include <tqlayout.h> +#include <tqtooltip.h> +#include <tqtoolbutton.h> +#include <tqcursor.h> +#include <tqeventloop.h> #include <kdebug.h> #include <kapplication.h> @@ -32,33 +32,33 @@ #include "kis_label_progress.h" #include "kis_cursor.h" -class EscapeButton : public QToolButton { +class EscapeButton : public TQToolButton { public: - EscapeButton(QWidget * parent, const char * name) : QToolButton(parent, name) {}; + EscapeButton(TQWidget * tqparent, const char * name) : TQToolButton(tqparent, name) {}; - void keyReleaseEvent(QKeyEvent *e) + void keyReleaseEvent(TQKeyEvent *e) { - if (e->key()==Qt::Key_Escape) + if (e->key()==TQt::Key_Escape) emit clicked(); } }; -KisLabelProgress::KisLabelProgress(QWidget *parent, const char *name, WFlags f) : super(parent, name, f) +KisLabelProgress::KisLabelProgress(TQWidget *tqparent, const char *name, WFlags f) : super(tqparent, name, f) { m_subject = 0; m_modal = false; - QHBoxLayout *box = new QHBoxLayout(this); + TQHBoxLayout *box = new TQHBoxLayout(this); box->setAutoAdd(true); - QIconSet cancelIconSet = SmallIconSet("stop"); + TQIconSet cancelIconSet = SmallIconSet("stop"); m_cancelButton = new EscapeButton(this, "cancel_button"); m_cancelButton->setIconSet(cancelIconSet); - QToolTip::add(m_cancelButton, i18n("Cancel")); - connect(m_cancelButton, SIGNAL(clicked()), this, SLOT(cancelPressed())); + TQToolTip::add(m_cancelButton, i18n("Cancel")); + connect(m_cancelButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(cancelPressed())); m_bar = new KProgress(100, this); } @@ -75,11 +75,11 @@ void KisLabelProgress::setSubject(KisProgressSubject *subject, bool modal, bool m_subject = subject; m_modal = modal; - connect(subject, SIGNAL(notifyProgress(int)), this, SLOT(update(int))); - connect(subject, SIGNAL(notifyProgressStage(const QString&, int)), this, SLOT(updateStage(const QString&, int))); - connect(subject, SIGNAL(notifyProgressDone()), this, SLOT(done())); - connect(subject, SIGNAL(notifyProgressError()), this, SLOT(error())); - connect(subject, SIGNAL(destroyed()), this, SLOT(subjectDestroyed())); + connect(subject, TQT_SIGNAL(notifyProgress(int)), this, TQT_SLOT(update(int))); + connect(subject, TQT_SIGNAL(notifyProgressStage(const TQString&, int)), this, TQT_SLOT(updateStage(const TQString&, int))); + connect(subject, TQT_SIGNAL(notifyProgressDone()), this, TQT_SLOT(done())); + connect(subject, TQT_SIGNAL(notifyProgressError()), this, TQT_SLOT(error())); + connect(subject, TQT_SIGNAL(destroyed()), this, TQT_SLOT(subjectDestroyed())); show(); @@ -102,14 +102,14 @@ void KisLabelProgress::setSubject(KisProgressSubject *subject, bool modal, bool } if (modal) { - QApplication::setOverrideCursor(KisCursor::waitCursor()); + TQApplication::setOverrideCursor(KisCursor::waitCursor()); } m_bar->setValue(0); } } -bool KisLabelProgress::event(QEvent * e) +bool KisLabelProgress::event(TQEvent * e) { if (!e) return false; @@ -139,7 +139,7 @@ bool KisLabelProgress::event(QEvent * e) subjectDestroyed(); break; default: - return QLabel::event(e); + return TQLabel::event(e); }; return true; @@ -152,7 +152,7 @@ void KisLabelProgress::reset() m_subject = 0; if (m_modal) { - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); } m_modal = false; @@ -173,11 +173,11 @@ void KisLabelProgress::update(int percent) app->processEvents(); // The following is safer, but makes cancel impossible: - //QApplication::eventLoop()->processEvents(QEventLoop::ExcludeUserInput | - // QEventLoop::ExcludeSocketNotifiers); + //TQApplication::eventLoop()->processEvents(TQEventLoop::ExcludeUserInput | + // TQEventLoop::ExcludeSocketNotifiers); } -void KisLabelProgress::updateStage(const QString&, int percent) +void KisLabelProgress::updateStage(const TQString&, int percent) { m_bar->setValue(percent); |