summaryrefslogtreecommitdiffstats
path: root/kapptemplate/kapp/app.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kapptemplate/kapp/app.cpp')
-rw-r--r--kapptemplate/kapp/app.cpp50
1 files changed, 25 insertions, 25 deletions
diff --git a/kapptemplate/kapp/app.cpp b/kapptemplate/kapp/app.cpp
index 58ed3415..04f88108 100644
--- a/kapptemplate/kapp/app.cpp
+++ b/kapptemplate/kapp/app.cpp
@@ -10,8 +10,8 @@ cat << EOF > $LOCATION_ROOT/${APP_NAME_LC}/${APP_NAME_LC}.cpp
#include "${APP_NAME_LC}pref.h"
#include <kprinter.h>
-#include <qpainter.h>
-#include <qpaintdevicemetrics.h>
+#include <tqpainter.h>
+#include <tqpaintdevicemetrics.h>
#include <kdeversion.h>
#include <kglobal.h>
@@ -51,10 +51,10 @@ ${APP_NAME}::${APP_NAME}()
setupGUI();
// allow the view to change the statusbar and caption
- connect(m_view, SIGNAL(signalChangeStatusbar(const QString&)),
- this, SLOT(changeStatusbar(const QString&)));
- connect(m_view, SIGNAL(signalChangeCaption(const QString&)),
- this, SLOT(changeCaption(const QString&)));
+ connect(m_view, TQT_SIGNAL(signalChangeStatusbar(const TQString&)),
+ this, TQT_SLOT(changeStatusbar(const TQString&)));
+ connect(m_view, TQT_SIGNAL(signalChangeCaption(const TQString&)),
+ this, TQT_SLOT(changeCaption(const TQString&)));
}
@@ -65,7 +65,7 @@ ${APP_NAME}::~${APP_NAME}()
void ${APP_NAME}::load(const KURL& url)
{
- QString target;
+ TQString target;
// the below code is what you should normally do. in this
// example case, we want the url to our own. you probably
// want to use this code instead for your app
@@ -91,19 +91,19 @@ void ${APP_NAME}::load(const KURL& url)
void ${APP_NAME}::setupActions()
{
- KStdAction::openNew(this, SLOT(fileNew()), actionCollection());
- KStdAction::open(this, SLOT(fileOpen()), actionCollection());
- KStdAction::save(this, SLOT(fileSave()), actionCollection());
- KStdAction::saveAs(this, SLOT(fileSaveAs()), actionCollection());
- KStdAction::print(this, SLOT(filePrint()), actionCollection());
- KStdAction::quit(kapp, SLOT(quit()), actionCollection());
+ KStdAction::openNew(this, TQT_SLOT(fileNew()), actionCollection());
+ KStdAction::open(this, TQT_SLOT(fileOpen()), actionCollection());
+ KStdAction::save(this, TQT_SLOT(fileSave()), actionCollection());
+ KStdAction::saveAs(this, TQT_SLOT(fileSaveAs()), actionCollection());
+ KStdAction::print(this, TQT_SLOT(filePrint()), actionCollection());
+ KStdAction::quit(kapp, TQT_SLOT(quit()), actionCollection());
- KStdAction::preferences(this, SLOT(optionsPreferences()), actionCollection());
+ KStdAction::preferences(this, TQT_SLOT(optionsPreferences()), actionCollection());
// this doesn't do anything useful. it's just here to illustrate
// how to insert a custom menu and menu item
KAction *custom = new KAction(i18n("Cus&tom Menuitem"), 0,
- this, SLOT(optionsPreferences()),
+ this, TQT_SLOT(optionsPreferences()),
actionCollection(), "custom_action");
}
@@ -129,19 +129,19 @@ void ${APP_NAME}::readProperties(KConfig *config)
// the app is being restored. read in here whatever you wrote
// in 'saveProperties'
- QString url = config->readPathEntry("lastURL");
+ TQString url = config->readPathEntry("lastURL");
if (!url.isEmpty())
m_view->openURL(KURL::fromPathOrURL(url));
}
-void ${APP_NAME}::dragEnterEvent(QDragEnterEvent *event)
+void ${APP_NAME}::dragEnterEvent(TQDragEnterEvent *event)
{
// accept uri drops only
event->accept(KURLDrag::canDecode(event));
}
-void ${APP_NAME}::dropEvent(QDropEvent *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*
@@ -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(QString::null, this, i18n("Open Location") );
+ KURL url = KURLRequesterDlg::getURL(TQString::null, this, i18n("Open Location") );
if (!url.isEmpty())
m_view->openURL(url);
}
@@ -207,13 +207,13 @@ void ${APP_NAME}::filePrint()
if (m_printer->setup(this))
{
// setup the printer. with Qt, you always "print" to a
- // QPainter.. whether the output medium is a pixmap, a screen,
+ // TQPainter.. whether the output medium is a pixmap, a screen,
// or paper
- QPainter p;
+ TQPainter p;
p.begin(m_printer);
// we let our view do the actual printing
- QPaintDeviceMetrics metrics(m_printer);
+ TQPaintDeviceMetrics metrics(m_printer);
m_view->print(&p, metrics.height(), metrics.width());
// and send the result to the printer
@@ -226,7 +226,7 @@ void ${APP_NAME}::optionsConfigureToolbars()
// use the standard toolbar editor
saveMainWindowSettings( KGlobal::config(), autoSaveGroup() );
KEditToolbar dlg(actionCollection());
- connect(&dlg, SIGNAL(newToolbarConfig()), this, SLOT(newToolbarConfig()));
+ connect(&dlg, TQT_SIGNAL(newToolbarConfig()), this, TQT_SLOT(newToolbarConfig()));
dlg.exec();
}
@@ -248,13 +248,13 @@ void ${APP_NAME}::optionsPreferences()
}
}
-void ${APP_NAME}::changeStatusbar(const QString& text)
+void ${APP_NAME}::changeStatusbar(const TQString& text)
{
// display the text on the statusbar
statusBar()->message(text);
}
-void ${APP_NAME}::changeCaption(const QString& text)
+void ${APP_NAME}::changeCaption(const TQString& text)
{
// display the text on the caption
setCaption(text);