diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-12 01:36:19 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-12 01:36:19 +0000 |
commit | 99a2774ca6f1cab334de5d43fe36fc44ae889a4c (patch) | |
tree | eff34cf0762227f6baf2a93e8fef48d4bed2651c /kapptemplate/kapp | |
parent | 1c104292188541106338d4940b0f04beeb4301a0 (diff) | |
download | tdesdk-99a2774ca6f1cab334de5d43fe36fc44ae889a4c.tar.gz tdesdk-99a2774ca6f1cab334de5d43fe36fc44ae889a4c.zip |
TQt4 convert kdesdk
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdesdk@1236185 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kapptemplate/kapp')
-rw-r--r-- | kapptemplate/kapp/app-Makefile.am | 2 | ||||
-rw-r--r-- | kapptemplate/kapp/app.cpp | 6 | ||||
-rw-r--r-- | kapptemplate/kapp/app.h | 3 | ||||
-rw-r--r-- | kapptemplate/kapp/apppref.cpp | 16 | ||||
-rw-r--r-- | kapptemplate/kapp/apppref.h | 11 | ||||
-rw-r--r-- | kapptemplate/kapp/appview.cpp | 6 | ||||
-rw-r--r-- | kapptemplate/kapp/appview.h | 3 |
7 files changed, 26 insertions, 21 deletions
diff --git a/kapptemplate/kapp/app-Makefile.am b/kapptemplate/kapp/app-Makefile.am index 9ed82a08..5cf0ca86 100644 --- a/kapptemplate/kapp/app-Makefile.am +++ b/kapptemplate/kapp/app-Makefile.am @@ -31,7 +31,7 @@ ${APP_NAME_LC}_client_LDFLAGS = \$(KDE_RPATH) \$(all_libraries) ${APP_NAME_LC}_client_LDADD = \$(LIB_KDECORE) ${APP_NAME_LC}_client_SOURCES = ${APP_NAME_LC}_client.cpp -# let automoc handle all of the meta source files (moc) +# let autotqmoc handle all of the meta source files (tqmoc) METASOURCES = AUTO messages: rc.cpp diff --git a/kapptemplate/kapp/app.cpp b/kapptemplate/kapp/app.cpp index 04f88108..a1333cf7 100644 --- a/kapptemplate/kapp/app.cpp +++ b/kapptemplate/kapp/app.cpp @@ -144,7 +144,7 @@ void ${APP_NAME}::dragEnterEvent(TQDragEnterEvent *event) void ${APP_NAME}::dropEvent(TQDropEvent *event) { // this is a very simplistic implementation of a drop event. we - // will only accept a dropped URL. the Qt dnd code can do *much* + // will only accept a dropped URL. the TQt dnd code can do *much* // much more, so please read the docs there KURL::List urls; @@ -174,7 +174,7 @@ void ${APP_NAME}::fileOpen() // this slot is called whenever the File->Open menu is selected, // the Open shortcut is pressed (usually CTRL+O) or the Open toolbar // button is clicked - KURL url = KURLRequesterDlg::getURL(TQString::null, this, i18n("Open Location") ); + KURL url = KURLRequesterDlg::getURL(TQString(), this, i18n("Open Location") ); if (!url.isEmpty()) m_view->openURL(url); } @@ -206,7 +206,7 @@ void ${APP_NAME}::filePrint() if (!m_printer) m_printer = new KPrinter; if (m_printer->setup(this)) { - // setup the printer. with Qt, you always "print" to a + // setup the printer. with TQt, you always "print" to a // TQPainter.. whether the output medium is a pixmap, a screen, // or paper TQPainter p; diff --git a/kapptemplate/kapp/app.h b/kapptemplate/kapp/app.h index 2b1d1d55..dfcbf7cc 100644 --- a/kapptemplate/kapp/app.h +++ b/kapptemplate/kapp/app.h @@ -26,6 +26,7 @@ class KURL; class ${APP_NAME} : public KMainWindow { Q_OBJECT + TQ_OBJECT public: /** * Default Constructor @@ -44,7 +45,7 @@ public: protected: /** - * Overridden virtuals for Qt drag 'n drop (XDND) + * Overridden virtuals for TQt drag 'n drop (XDND) */ virtual void dragEnterEvent(TQDragEnterEvent *event); virtual void dropEvent(TQDropEvent *event); diff --git a/kapptemplate/kapp/apppref.cpp b/kapptemplate/kapp/apppref.cpp index 6a479b83..5ab7d8a6 100644 --- a/kapptemplate/kapp/apppref.cpp +++ b/kapptemplate/kapp/apppref.cpp @@ -22,20 +22,20 @@ ${APP_NAME}Preferences::${APP_NAME}Preferences() m_pageTwo = new ${APP_NAME}PrefPageTwo(frame); } -${APP_NAME}PrefPageOne::${APP_NAME}PrefPageOne(TQWidget *parent) - : TQFrame(parent) +${APP_NAME}PrefPageOne::${APP_NAME}PrefPageOne(TQWidget *tqparent) + : TQFrame(tqparent) { - TQHBoxLayout *layout = new TQHBoxLayout(this); - layout->setAutoAdd(true); + TQHBoxLayout *tqlayout = new TQHBoxLayout(this); + tqlayout->setAutoAdd(true); new TQLabel("Add something here", this); } -${APP_NAME}PrefPageTwo::${APP_NAME}PrefPageTwo(TQWidget *parent) - : TQFrame(parent) +${APP_NAME}PrefPageTwo::${APP_NAME}PrefPageTwo(TQWidget *tqparent) + : TQFrame(tqparent) { - TQHBoxLayout *layout = new TQHBoxLayout(this); - layout->setAutoAdd(true); + TQHBoxLayout *tqlayout = new TQHBoxLayout(this); + tqlayout->setAutoAdd(true); new TQLabel("Add something here", this); } diff --git a/kapptemplate/kapp/apppref.h b/kapptemplate/kapp/apppref.h index 234223f6..c20c8af3 100644 --- a/kapptemplate/kapp/apppref.h +++ b/kapptemplate/kapp/apppref.h @@ -12,6 +12,7 @@ class ${APP_NAME}PrefPageTwo; class ${APP_NAME}Preferences : public KDialogBase { Q_OBJECT + TQ_OBJECT public: ${APP_NAME}Preferences(); @@ -20,18 +21,20 @@ private: ${APP_NAME}PrefPageTwo *m_pageTwo; }; -class ${APP_NAME}PrefPageOne : public QFrame +class ${APP_NAME}PrefPageOne : public TQFrame { Q_OBJECT + TQ_OBJECT public: - ${APP_NAME}PrefPageOne(TQWidget *parent = 0); + ${APP_NAME}PrefPageOne(TQWidget *tqparent = 0); }; -class ${APP_NAME}PrefPageTwo : public QFrame +class ${APP_NAME}PrefPageTwo : public TQFrame { Q_OBJECT + TQ_OBJECT public: - ${APP_NAME}PrefPageTwo(TQWidget *parent = 0); + ${APP_NAME}PrefPageTwo(TQWidget *tqparent = 0); }; #endif // ${APP_NAME_UC}PREF_H diff --git a/kapptemplate/kapp/appview.cpp b/kapptemplate/kapp/appview.cpp index 3527596b..48365348 100644 --- a/kapptemplate/kapp/appview.cpp +++ b/kapptemplate/kapp/appview.cpp @@ -12,11 +12,11 @@ cat << EOF > $LOCATION_ROOT/${APP_NAME_LC}/${APP_NAME_LC}view.cpp #include <kmessagebox.h> #include <krun.h> -${APP_NAME}View::${APP_NAME}View(TQWidget *parent) - : TQWidget(parent), +${APP_NAME}View::${APP_NAME}View(TQWidget *tqparent) + : TQWidget(tqparent), DCOPObject("${APP_NAME}Iface") { - // setup our layout manager to automatically add our widgets + // setup our tqlayout manager to automatically add our widgets TQHBoxLayout *top_layout = new TQHBoxLayout(this); top_layout->setAutoAdd(true); diff --git a/kapptemplate/kapp/appview.h b/kapptemplate/kapp/appview.h index 14fc3043..25dddfd1 100644 --- a/kapptemplate/kapp/appview.h +++ b/kapptemplate/kapp/appview.h @@ -24,11 +24,12 @@ class KURL; class ${APP_NAME}View : public TQWidget, public ${APP_NAME}Iface { Q_OBJECT + TQ_OBJECT public: /** * Default constructor */ - ${APP_NAME}View(TQWidget *parent); + ${APP_NAME}View(TQWidget *tqparent); /** * Destructor |