summaryrefslogtreecommitdiffstats
path: root/kapptemplate
diff options
context:
space:
mode:
Diffstat (limited to 'kapptemplate')
-rw-r--r--kapptemplate/kapp/app.cpp50
-rw-r--r--kapptemplate/kapp/app.h8
-rw-r--r--kapptemplate/kapp/app_client.cpp14
-rw-r--r--kapptemplate/kapp/appiface.h2
-rw-r--r--kapptemplate/kapp/apppref.cpp22
-rw-r--r--kapptemplate/kapp/apppref.h6
-rw-r--r--kapptemplate/kapp/appview.cpp28
-rw-r--r--kapptemplate/kapp/appview.h20
-rw-r--r--kapptemplate/kpartapp/app.cpp16
-rw-r--r--kapptemplate/kpartapp/app_part.cpp44
-rw-r--r--kapptemplate/kpartapp/app_part.h6
-rw-r--r--kapptemplate/kpartplugin/plugin_app.cpp16
-rw-r--r--kapptemplate/kpartplugin/plugin_app.h4
13 files changed, 118 insertions, 118 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);
diff --git a/kapptemplate/kapp/app.h b/kapptemplate/kapp/app.h
index 7f7b0d39..2b1d1d55 100644
--- a/kapptemplate/kapp/app.h
+++ b/kapptemplate/kapp/app.h
@@ -46,8 +46,8 @@ protected:
/**
* Overridden virtuals for Qt drag 'n drop (XDND)
*/
- virtual void dragEnterEvent(QDragEnterEvent *event);
- virtual void dropEvent(QDropEvent *event);
+ virtual void dragEnterEvent(TQDragEnterEvent *event);
+ virtual void dropEvent(TQDropEvent *event);
protected:
/**
@@ -74,8 +74,8 @@ private slots:
void optionsPreferences();
void newToolbarConfig();
- void changeStatusbar(const QString& text);
- void changeCaption(const QString& text);
+ void changeStatusbar(const TQString& text);
+ void changeCaption(const TQString& text);
private:
void setupAccel();
diff --git a/kapptemplate/kapp/app_client.cpp b/kapptemplate/kapp/app_client.cpp
index cd5e065d..53de48f5 100644
--- a/kapptemplate/kapp/app_client.cpp
+++ b/kapptemplate/kapp/app_client.cpp
@@ -2,8 +2,8 @@ echo "Creating $LOCATION_ROOT/${APP_NAME_LC}/${APP_NAME_LC}_client.cpp...";
cat << EOF > $LOCATION_ROOT/${APP_NAME_LC}/${APP_NAME_LC}_client.cpp
#include <kapplication.h>
#include <dcopclient.h>
-#include <qdatastream.h>
-#include <qstring.h>
+#include <tqdatastream.h>
+#include <tqstring.h>
int main(int argc, char **argv)
{
@@ -14,13 +14,13 @@ int main(int argc, char **argv)
client->attach();
// do a 'send' for now
- QByteArray data;
- QDataStream ds(data, IO_WriteOnly);
+ TQByteArray data;
+ TQDataStream ds(data, IO_WriteOnly);
if (argc > 1)
- ds << QString(argv[1]);
+ ds << TQString(argv[1]);
else
- ds << QString("http://www.kde.org");
- client->send("${APP_NAME_LC}", "${APP_NAME}Iface", "openURL(QString)", data);
+ ds << TQString("http://www.kde.org");
+ client->send("${APP_NAME_LC}", "${APP_NAME}Iface", "openURL(TQString)", data);
return app.exec();
}
diff --git a/kapptemplate/kapp/appiface.h b/kapptemplate/kapp/appiface.h
index 2601df94..9b1ab6ec 100644
--- a/kapptemplate/kapp/appiface.h
+++ b/kapptemplate/kapp/appiface.h
@@ -11,7 +11,7 @@ class ${APP_NAME}Iface : virtual public DCOPObject
public:
k_dcop:
- virtual void openURL(QString url) = 0;
+ virtual void openURL(TQString url) = 0;
};
#endif // ${APP_NAME_UC}IFACE_H
diff --git a/kapptemplate/kapp/apppref.cpp b/kapptemplate/kapp/apppref.cpp
index b025924a..6a479b83 100644
--- a/kapptemplate/kapp/apppref.cpp
+++ b/kapptemplate/kapp/apppref.cpp
@@ -4,8 +4,8 @@ cat << EOF > $LOCATION_ROOT/${APP_NAME_LC}/${APP_NAME_LC}pref.cpp
#include <klocale.h>
-#include <qlayout.h>
-#include <qlabel.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
${APP_NAME}Preferences::${APP_NAME}Preferences()
: KDialogBase(TreeList, "${APP_NAME} Preferences",
@@ -14,7 +14,7 @@ ${APP_NAME}Preferences::${APP_NAME}Preferences()
// this is the base class for your preferences dialog. it is now
// a Treelist dialog.. but there are a number of other
// possibilities (including Tab, Swallow, and just Plain)
- QFrame *frame;
+ TQFrame *frame;
frame = addPage(i18n("First Page"), i18n("Page One Options"));
m_pageOne = new ${APP_NAME}PrefPageOne(frame);
@@ -22,21 +22,21 @@ ${APP_NAME}Preferences::${APP_NAME}Preferences()
m_pageTwo = new ${APP_NAME}PrefPageTwo(frame);
}
-${APP_NAME}PrefPageOne::${APP_NAME}PrefPageOne(QWidget *parent)
- : QFrame(parent)
+${APP_NAME}PrefPageOne::${APP_NAME}PrefPageOne(TQWidget *parent)
+ : TQFrame(parent)
{
- QHBoxLayout *layout = new QHBoxLayout(this);
+ TQHBoxLayout *layout = new TQHBoxLayout(this);
layout->setAutoAdd(true);
- new QLabel("Add something here", this);
+ new TQLabel("Add something here", this);
}
-${APP_NAME}PrefPageTwo::${APP_NAME}PrefPageTwo(QWidget *parent)
- : QFrame(parent)
+${APP_NAME}PrefPageTwo::${APP_NAME}PrefPageTwo(TQWidget *parent)
+ : TQFrame(parent)
{
- QHBoxLayout *layout = new QHBoxLayout(this);
+ TQHBoxLayout *layout = new TQHBoxLayout(this);
layout->setAutoAdd(true);
- new QLabel("Add something here", this);
+ new TQLabel("Add something here", this);
}
#include "${APP_NAME_LC}pref.moc"
diff --git a/kapptemplate/kapp/apppref.h b/kapptemplate/kapp/apppref.h
index 97371936..234223f6 100644
--- a/kapptemplate/kapp/apppref.h
+++ b/kapptemplate/kapp/apppref.h
@@ -4,7 +4,7 @@ cat << EOF > $LOCATION_ROOT/${APP_NAME_LC}/${APP_NAME_LC}pref.h
#define ${APP_NAME_UC}PREF_H
#include <kdialogbase.h>
-#include <qframe.h>
+#include <tqframe.h>
class ${APP_NAME}PrefPageOne;
class ${APP_NAME}PrefPageTwo;
@@ -24,14 +24,14 @@ class ${APP_NAME}PrefPageOne : public QFrame
{
Q_OBJECT
public:
- ${APP_NAME}PrefPageOne(QWidget *parent = 0);
+ ${APP_NAME}PrefPageOne(TQWidget *parent = 0);
};
class ${APP_NAME}PrefPageTwo : public QFrame
{
Q_OBJECT
public:
- ${APP_NAME}PrefPageTwo(QWidget *parent = 0);
+ ${APP_NAME}PrefPageTwo(TQWidget *parent = 0);
};
#endif // ${APP_NAME_UC}PREF_H
diff --git a/kapptemplate/kapp/appview.cpp b/kapptemplate/kapp/appview.cpp
index 575e8a5d..3527596b 100644
--- a/kapptemplate/kapp/appview.cpp
+++ b/kapptemplate/kapp/appview.cpp
@@ -2,8 +2,8 @@ echo "Creating $LOCATION_ROOT/${APP_NAME_LC}/${APP_NAME_LC}view.cpp...";
cat << EOF > $LOCATION_ROOT/${APP_NAME_LC}/${APP_NAME_LC}view.cpp
#include "${APP_NAME_LC}view.h"
-#include <qpainter.h>
-#include <qlayout.h>
+#include <tqpainter.h>
+#include <tqlayout.h>
#include <kurl.h>
@@ -12,12 +12,12 @@ cat << EOF > $LOCATION_ROOT/${APP_NAME_LC}/${APP_NAME_LC}view.cpp
#include <kmessagebox.h>
#include <krun.h>
-${APP_NAME}View::${APP_NAME}View(QWidget *parent)
- : QWidget(parent),
+${APP_NAME}View::${APP_NAME}View(TQWidget *parent)
+ : TQWidget(parent),
DCOPObject("${APP_NAME}Iface")
{
// setup our layout manager to automatically add our widgets
- QHBoxLayout *top_layout = new QHBoxLayout(this);
+ TQHBoxLayout *top_layout = new TQHBoxLayout(this);
top_layout->setAutoAdd(true);
// we want to look for all components that satisfy our needs. the
@@ -62,10 +62,10 @@ ${APP_NAME}View::${APP_NAME}View(QWidget *parent)
return;
}
- connect(m_html, SIGNAL(setWindowCaption(const QString&)),
- this, SLOT(slotSetTitle(const QString&)));
- connect(m_html, SIGNAL(setStatusBarText(const QString&)),
- this, SLOT(slotOnURL(const QString&)));
+ connect(m_html, TQT_SIGNAL(setWindowCaption(const TQString&)),
+ this, TQT_SLOT(slotSetTitle(const TQString&)));
+ connect(m_html, TQT_SIGNAL(setStatusBarText(const TQString&)),
+ this, TQT_SLOT(slotOnURL(const TQString&)));
}
@@ -73,18 +73,18 @@ ${APP_NAME}View::~${APP_NAME}View()
{
}
-void ${APP_NAME}View::print(QPainter *p, int height, int width)
+void ${APP_NAME}View::print(TQPainter *p, int height, int width)
{
// do the actual printing, here
// p->drawText(etc..)
}
-QString ${APP_NAME}View::currentURL()
+TQString ${APP_NAME}View::currentURL()
{
return m_html->url().url();
}
-void ${APP_NAME}View::openURL(QString url)
+void ${APP_NAME}View::openURL(TQString url)
{
openURL(KURL(url));
}
@@ -94,12 +94,12 @@ void ${APP_NAME}View::openURL(const KURL& url)
m_html->openURL(url);
}
-void ${APP_NAME}View::slotOnURL(const QString& url)
+void ${APP_NAME}View::slotOnURL(const TQString& url)
{
emit signalChangeStatusbar(url);
}
-void ${APP_NAME}View::slotSetTitle(const QString& title)
+void ${APP_NAME}View::slotSetTitle(const TQString& title)
{
emit signalChangeCaption(title);
}
diff --git a/kapptemplate/kapp/appview.h b/kapptemplate/kapp/appview.h
index 881b979c..76e61701 100644
--- a/kapptemplate/kapp/appview.h
+++ b/kapptemplate/kapp/appview.h
@@ -3,7 +3,7 @@ cat << EOF > $LOCATION_ROOT/$APP_NAME_LC/${APP_NAME_LC}view.h
#ifndef ${APP_NAME_UC}VIEW_H
#define ${APP_NAME_UC}VIEW_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include <kparts/part.h>
#include <${APP_NAME_LC}iface.h>
@@ -21,14 +21,14 @@ class KURL;
* @author $AUTHOR <$EMAIL>
* @version $APP_VERSION
*/
-class ${APP_NAME}View : public QWidget, public ${APP_NAME}Iface
+class ${APP_NAME}View : public TQWidget, public ${APP_NAME}Iface
{
Q_OBJECT
public:
/**
* Default constructor
*/
- ${APP_NAME}View(QWidget *parent);
+ ${APP_NAME}View(TQWidget *parent);
/**
* Destructor
@@ -38,12 +38,12 @@ public:
/**
* Random 'get' function
*/
- QString currentURL();
+ TQString currentURL();
/**
* Random 'set' function accessed by DCOP
*/
- virtual void openURL(QString url);
+ virtual void openURL(TQString url);
/**
* Random 'set' function
@@ -53,22 +53,22 @@ public:
/**
* Print this view to any medium -- paper or not
*/
- void print(QPainter *, int height, int width);
+ void print(TQPainter *, int height, int width);
signals:
/**
* Use this signal to change the content of the statusbar
*/
- void signalChangeStatusbar(const QString& text);
+ void signalChangeStatusbar(const TQString& text);
/**
* Use this signal to change the content of the caption
*/
- void signalChangeCaption(const QString& text);
+ void signalChangeCaption(const TQString& text);
private slots:
- void slotOnURL(const QString& url);
- void slotSetTitle(const QString& title);
+ void slotOnURL(const TQString& url);
+ void slotSetTitle(const TQString& title);
private:
KParts::ReadOnlyPart *m_html;
diff --git a/kapptemplate/kpartapp/app.cpp b/kapptemplate/kpartapp/app.cpp
index 8b04053e..626aa8bd 100644
--- a/kapptemplate/kpartapp/app.cpp
+++ b/kapptemplate/kpartapp/app.cpp
@@ -79,16 +79,16 @@ void ${APP_NAME}::load(const KURL& url)
void ${APP_NAME}::setupActions()
{
- KStdAction::openNew(this, SLOT(fileNew()), actionCollection());
- KStdAction::open(this, SLOT(fileOpen()), actionCollection());
+ KStdAction::openNew(this, TQT_SLOT(fileNew()), actionCollection());
+ KStdAction::open(this, TQT_SLOT(fileOpen()), actionCollection());
- KStdAction::quit(kapp, SLOT(quit()), actionCollection());
+ KStdAction::quit(kapp, TQT_SLOT(quit()), actionCollection());
createStandardStatusBarAction();
setStandardToolBarMenuEnabled(true);
- KStdAction::keyBindings(this, SLOT(optionsConfigureKeys()), actionCollection());
- KStdAction::configureToolbars(this, SLOT(optionsConfigureToolbars()), actionCollection());
+ KStdAction::keyBindings(this, TQT_SLOT(optionsConfigureKeys()), actionCollection());
+ KStdAction::configureToolbars(this, TQT_SLOT(optionsConfigureToolbars()), actionCollection());
}
void ${APP_NAME}::saveProperties(KConfig* /*config*/)
@@ -136,8 +136,8 @@ void ${APP_NAME}::optionsConfigureToolbars()
// use the standard toolbar editor
KEditToolbar dlg(factory());
- connect(&dlg, SIGNAL(newToolbarConfig()),
- this, SLOT(applyNewToolbarConfig()));
+ connect(&dlg, TQT_SIGNAL(newToolbarConfig()),
+ this, TQT_SLOT(applyNewToolbarConfig()));
dlg.exec();
}
@@ -152,7 +152,7 @@ void ${APP_NAME}::fileOpen()
// the Open shortcut is pressed (usually CTRL+O) or the Open toolbar
// button is clicked
KURL url =
- KFileDialog::getOpenURL( QString::null, QString::null, this );
+ KFileDialog::getOpenURL( TQString::null, TQString::null, this );
if (url.isEmpty() == false)
{
diff --git a/kapptemplate/kpartapp/app_part.cpp b/kapptemplate/kpartapp/app_part.cpp
index c2821950..d8880577 100644
--- a/kapptemplate/kpartapp/app_part.cpp
+++ b/kapptemplate/kpartapp/app_part.cpp
@@ -10,30 +10,30 @@ cat << EOF > $LOCATION_ROOT/${APP_NAME_LC}/${APP_NAME_LC}_part.cpp
#include <kfiledialog.h>
#include <kparts/genericfactory.h>
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qmultilineedit.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqmultilineedit.h>
typedef KParts::GenericFactory<${APP_NAME}Part> ${APP_NAME}PartFactory;
K_EXPORT_COMPONENT_FACTORY( lib${APP_NAME_LC}part, ${APP_NAME}PartFactory )
-${APP_NAME}Part::${APP_NAME}Part( QWidget *parentWidget, const char *widgetName,
- QObject *parent, const char *name,
- const QStringList & /*args*/ )
+${APP_NAME}Part::${APP_NAME}Part( TQWidget *parentWidget, const char *widgetName,
+ TQObject *parent, const char *name,
+ const TQStringList & /*args*/ )
: KParts::ReadWritePart(parent, name)
{
// we need an instance
setInstance( ${APP_NAME}PartFactory::instance() );
// this should be your custom internal widget
- m_widget = new QMultiLineEdit( parentWidget, widgetName );
+ m_widget = new TQMultiLineEdit( parentWidget, widgetName );
// notify the part that this is our internal widget
setWidget(m_widget);
// create our actions
- KStdAction::saveAs(this, SLOT(fileSaveAs()), actionCollection());
- KStdAction::save(this, SLOT(save()), actionCollection());
+ KStdAction::saveAs(this, TQT_SLOT(fileSaveAs()), actionCollection());
+ KStdAction::save(this, TQT_SLOT(save()), actionCollection());
// set our XML-UI resource file
setXMLFile("${APP_NAME_LC}_part.rc");
@@ -54,12 +54,12 @@ void ${APP_NAME}Part::setReadWrite(bool rw)
// notify your internal widget of the read-write state
m_widget->setReadOnly(!rw);
if (rw)
- connect(m_widget, SIGNAL(textChanged()),
- this, SLOT(setModified()));
+ connect(m_widget, TQT_SIGNAL(textChanged()),
+ this, TQT_SLOT(setModified()));
else
{
- disconnect(m_widget, SIGNAL(textChanged()),
- this, SLOT(setModified()));
+ disconnect(m_widget, TQT_SIGNAL(textChanged()),
+ this, TQT_SLOT(setModified()));
}
ReadWritePart::setReadWrite(rw);
@@ -95,15 +95,15 @@ KAboutData *${APP_NAME}Part::createAboutData()
bool ${APP_NAME}Part::openFile()
{
- // m_file is always local so we can use QFile on it
- QFile file(m_file);
+ // m_file is always local so we can use TQFile on it
+ TQFile file(m_file);
if (file.open(IO_ReadOnly) == false)
return false;
- // our example widget is text-based, so we use QTextStream instead
+ // our example widget is text-based, so we use TQTextStream instead
// of a raw QDataStream
- QTextStream stream(&file);
- QString str;
+ TQTextStream stream(&file);
+ TQString str;
while (!stream.eof())
str += stream.readLine() + "\n";
@@ -125,12 +125,12 @@ bool ${APP_NAME}Part::saveFile()
return false;
// m_file is always local, so we use QFile
- QFile file(m_file);
+ TQFile file(m_file);
if (file.open(IO_WriteOnly) == false)
return false;
- // use QTextStream to dump the text to the file
- QTextStream stream(&file);
+ // use TQTextStream to dump the text to the file
+ TQTextStream stream(&file);
stream << m_widget->text();
file.close();
@@ -141,7 +141,7 @@ bool ${APP_NAME}Part::saveFile()
void ${APP_NAME}Part::fileSaveAs()
{
// this slot is called whenever the File->Save As menu is selected,
- QString file_name = KFileDialog::getSaveFileName();
+ TQString file_name = KFileDialog::getSaveFileName();
if (file_name.isEmpty() == false)
saveAs(file_name);
}
diff --git a/kapptemplate/kpartapp/app_part.h b/kapptemplate/kpartapp/app_part.h
index 18841510..e60b147b 100644
--- a/kapptemplate/kpartapp/app_part.h
+++ b/kapptemplate/kpartapp/app_part.h
@@ -26,8 +26,8 @@ public:
/**
* Default constructor
*/
- ${APP_NAME}Part(QWidget *parentWidget, const char *widgetName,
- QObject *parent, const char *name, const QStringList &args);
+ ${APP_NAME}Part(TQWidget *parentWidget, const char *widgetName,
+ TQObject *parent, const char *name, const TQStringList &args);
/**
* Destructor
@@ -63,7 +63,7 @@ protected slots:
void fileSaveAs();
private:
- QMultiLineEdit *m_widget;
+ TQMultiLineEdit *m_widget;
};
#endif // ${APP_NAME_UC}PART_H
diff --git a/kapptemplate/kpartplugin/plugin_app.cpp b/kapptemplate/kpartplugin/plugin_app.cpp
index 71c68bc7..0ec7a273 100644
--- a/kapptemplate/kpartplugin/plugin_app.cpp
+++ b/kapptemplate/kpartplugin/plugin_app.cpp
@@ -13,14 +13,14 @@ typedef KGenericFactory<Plugin${APP_NAME}> ${APP_NAME}Factory;
K_EXPORT_COMPONENT_FACTORY( lib${APP_NAME_LC}plugin,
${APP_NAME}Factory( "${APP_NAME_LC}" ) );
-Plugin${APP_NAME}::Plugin${APP_NAME}( QObject* parent, const char* name,
- const QStringList & /*args*/ )
+Plugin${APP_NAME}::Plugin${APP_NAME}( TQObject* parent, const char* name,
+ const TQStringList & /*args*/ )
: Plugin( parent, name )
{
// Instantiate all of your actions here. These will appear in
// Konqueror's menu and toolbars.
(void) new KAction( i18n("&Plugin Action"), "${APP_NAME_LC}", 0,
- this, SLOT(slotAction()),
+ this, TQT_SLOT(slotAction()),
actionCollection(), "plugin_action" );
}
@@ -35,8 +35,8 @@ void Plugin${APP_NAME}::slotAction()
// change the following block.
if ( !parent()->inherits("KHTMLPart") )
{
- QString title( i18n( "Cannot Translate Source" ) );
- QString text( i18n( "You cannot translate anything except web pages "
+ TQString title( i18n( "Cannot Translate Source" ) );
+ TQString text( i18n( "You cannot translate anything except web pages "
"with this plugin." ) );
KMessageBox::sorry( 0, text, title );
@@ -55,8 +55,8 @@ void Plugin${APP_NAME}::slotAction()
// valid URL
if ( !url.isValid() )
{
- QString title( i18n( "Malformed URL" ) );
- QString text( i18n( "The URL you entered is not valid, please "
+ TQString title( i18n( "Malformed URL" ) );
+ TQString text( i18n( "The URL you entered is not valid, please "
"correct it and try again." ) );
KMessageBox::sorry( 0, text, title );
@@ -69,7 +69,7 @@ void Plugin${APP_NAME}::slotAction()
// BEGIN
KURL work( "http://babel.altavista.com/translate.dyn" );
- QString query( "urltext=" );
+ TQString query( "urltext=" );
query += KURL::encode_string( url.url() );
work.setQuery( query );
// END
diff --git a/kapptemplate/kpartplugin/plugin_app.h b/kapptemplate/kpartplugin/plugin_app.h
index 3e651499..8bb225b8 100644
--- a/kapptemplate/kpartplugin/plugin_app.h
+++ b/kapptemplate/kpartplugin/plugin_app.h
@@ -9,8 +9,8 @@ class Plugin${APP_NAME} : public KParts::Plugin
{
Q_OBJECT
public:
- Plugin${APP_NAME}( QObject* parent = 0, const char* name = 0,
- const QStringList &args = QStringList() );
+ Plugin${APP_NAME}( TQObject* parent = 0, const char* name = 0,
+ const TQStringList &args = TQStringList() );
virtual ~Plugin${APP_NAME}();
public slots: