diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:54:04 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:54:04 +0000 |
commit | dc6b8e72fed2586239e3514819238c520636c9d9 (patch) | |
tree | 88b200df0a0b7fab9d6f147596173556f1ed9a13 /kommander/widgets/dialog.cpp | |
parent | 6927d4436e54551917f600b706a8d6109e49de1c (diff) | |
download | tdewebdev-dc6b8e72fed2586239e3514819238c520636c9d9.tar.gz tdewebdev-dc6b8e72fed2586239e3514819238c520636c9d9.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdewebdev@1157656 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kommander/widgets/dialog.cpp')
-rw-r--r-- | kommander/widgets/dialog.cpp | 80 |
1 files changed, 40 insertions, 40 deletions
diff --git a/kommander/widgets/dialog.cpp b/kommander/widgets/dialog.cpp index ef9b727b..fd3b0b27 100644 --- a/kommander/widgets/dialog.cpp +++ b/kommander/widgets/dialog.cpp @@ -17,14 +17,14 @@ #include <klocale.h> /* QT INCLUDES */ -#include <qstring.h> -#include <qwidget.h> -#include <qstringlist.h> -#include <qevent.h> -#include <qdialog.h> -#include <qpoint.h> -#include <qcursor.h> -#include <qapplication.h> +#include <tqstring.h> +#include <tqwidget.h> +#include <tqstringlist.h> +#include <tqevent.h> +#include <tqdialog.h> +#include <tqpoint.h> +#include <tqcursor.h> +#include <tqapplication.h> /* OTHER INCLUDES */ #include <specials.h> @@ -40,10 +40,10 @@ enum Functions { LastFunction }; -Dialog::Dialog(QWidget *a_parent, const char *a_name, bool a_modal, int a_flags) - : QDialog(a_parent, a_name, a_modal, a_flags), KommanderWindow(this) +Dialog::Dialog(TQWidget *a_parent, const char *a_name, bool a_modal, int a_flags) + : TQDialog(a_parent, a_name, a_modal, a_flags), KommanderWindow(this) { - QStringList states; + TQStringList states; states << "default"; states << "initialization"; states << "destroy"; @@ -53,9 +53,9 @@ Dialog::Dialog(QWidget *a_parent, const char *a_name, bool a_modal, int a_flags) m_shebang = "#!/usr/bin/kmdr-executor"; m_firstShow = true; KommanderPlugin::setDefaultGroup(Group::DCOP); - KommanderPlugin::registerFunction(D_focusWidget, "focusWidget(QString widget)", i18n("The name of the widget having focus"), 1); - KommanderPlugin::registerFunction(D_waitCursor, "waitCursor(QString widget)", i18n("Set a wait cursor. CAUTION: if set more than once an equal number of calls to restore must be made to clear it."), 1); - KommanderPlugin::registerFunction(D_restoreCursor, "restoreCursor(QString widget)", i18n("Restore normal curser. NOTE: must be called as many times as wait was."), 1); + KommanderPlugin::registerFunction(D_focusWidget, "focusWidget(TQString widget)", i18n("The name of the widget having focus"), 1); + KommanderPlugin::registerFunction(D_waitCursor, "waitCursor(TQString widget)", i18n("Set a wait cursor. CAUTION: if set more than once an equal number of calls to restore must be made to clear it."), 1); + KommanderPlugin::registerFunction(D_restoreCursor, "restoreCursor(TQString widget)", i18n("Restore normal curser. NOTE: must be called as many times as wait was."), 1); } Dialog::~Dialog() @@ -64,9 +64,9 @@ Dialog::~Dialog() destroy(); } -QString Dialog::currentState() const +TQString Dialog::currentState() const { - return QString("default"); + return TQString("default"); } bool Dialog::isKommanderWidget() const @@ -86,22 +86,22 @@ void Dialog::setUseInternalParser(bool b) } -QStringList Dialog::associatedText() const +TQStringList Dialog::associatedText() const { return KommanderWidget::associatedText(); } -void Dialog::setAssociatedText(const QStringList& a_at) +void Dialog::setAssociatedText(const TQStringList& a_at) { KommanderWidget::setAssociatedText(a_at); } -void Dialog::setPopulationText(const QString& a_text) +void Dialog::setPopulationText(const TQString& a_text) { KommanderWidget::setPopulationText( a_text ); } -QString Dialog::populationText() const +TQString Dialog::populationText() const { return KommanderWidget::populationText(); } @@ -113,7 +113,7 @@ void Dialog::populate() void Dialog::initialize() { - const QStringList assoc = associatedText(); + const TQStringList assoc = associatedText(); if (assoc.count() > 1 && !assoc[1].isEmpty()) { MyProcess proc(this); @@ -123,7 +123,7 @@ void Dialog::initialize() void Dialog::destroy() { - const QStringList assoc = associatedText(); + const TQStringList assoc = associatedText(); if (assoc.count() > 2 && !assoc[2].isEmpty()) { MyProcess proc(this); @@ -132,7 +132,7 @@ void Dialog::destroy() } -void Dialog::setWidgetText(const QString& a_text) +void Dialog::setWidgetText(const TQString& a_text) { setCaption(a_text); emit widgetTextChanged(a_text); @@ -140,7 +140,7 @@ void Dialog::setWidgetText(const QString& a_text) void Dialog::exec() { - QDialog::exec(); + TQDialog::exec(); emit finished(); } @@ -148,14 +148,14 @@ void Dialog::show() { //if the dialog is embedded in a KPart, the show can be called many times. //to avoid re-init and sending signals we don't want, in that case call only the -//QWidget's show method to show the widgets, but don't do any QDialog specific +//QWidget's show method to show the widgets, but don't do any TQDialog specific //task if (!m_firstShow) { - QWidget::show(); + TQWidget::show(); } else { - QDialog::show(); + TQDialog::show(); if (!inEditor) initialize(); m_firstShow = false; @@ -166,28 +166,28 @@ void Dialog::done(int r) { /* if (!inEditor) destroy();*/ - QDialog::done(r); + TQDialog::done(r); } -void Dialog::showEvent(QShowEvent *e) +void Dialog::showEvent(TQShowEvent *e) { - QDialog::showEvent( e ); + TQDialog::showEvent( e ); emit widgetOpened(); } -void Dialog::keyPressEvent( QKeyEvent *e ) +void Dialog::keyPressEvent( TQKeyEvent *e ) { if ( e->state() == 0 && e->key() == Key_Escape) return; else - QDialog::keyPressEvent(e); + TQDialog::keyPressEvent(e); } -void Dialog::contextMenuEvent( QContextMenuEvent * e ) +void Dialog::contextMenuEvent( TQContextMenuEvent * e ) { - QDialog::contextMenuEvent( e ); - QPoint p = e->globalPos(); + TQDialog::contextMenuEvent( e ); + TQPoint p = e->globalPos(); emit contextMenuRequested(p.x(), p.y()); } @@ -196,7 +196,7 @@ bool Dialog::isFunctionSupported(int f) return f == DCOP::text || f == DCOP::setText || f == DCOP::geometry || (f > FirstFunction && f < LastFunction); } -QString Dialog::handleDCOP(int function, const QStringList& args) +TQString Dialog::handleDCOP(int function, const TQStringList& args) { switch (function) { case DCOP::text: @@ -205,21 +205,21 @@ QString Dialog::handleDCOP(int function, const QStringList& args) setWidgetText(args[0]); break; case DCOP::geometry: - return QString::number(this->x())+" "+QString::number(this->y())+" "+QString::number(this->width())+" "+QString::number(this->height()); + return TQString::number(this->x())+" "+TQString::number(this->y())+" "+TQString::number(this->width())+" "+TQString::number(this->height()); break; case D_focusWidget: return focusWidget()->name(); break; case D_waitCursor: - QApplication::setOverrideCursor(QCursor(Qt::WaitCursor)); + TQApplication::setOverrideCursor(TQCursor(Qt::WaitCursor)); break; case D_restoreCursor: - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); break; default: return KommanderWidget::handleDCOP(function, args); } - return QString(); + return TQString(); } |