summaryrefslogtreecommitdiffstats
path: root/languages/cpp/app_templates/kpartapp
diff options
context:
space:
mode:
Diffstat (limited to 'languages/cpp/app_templates/kpartapp')
-rw-r--r--languages/cpp/app_templates/kpartapp/app.cpp20
-rw-r--r--languages/cpp/app_templates/kpartapp/app_part.cpp54
-rw-r--r--languages/cpp/app_templates/kpartapp/app_part.h12
3 files changed, 43 insertions, 43 deletions
diff --git a/languages/cpp/app_templates/kpartapp/app.cpp b/languages/cpp/app_templates/kpartapp/app.cpp
index 68c34ab3..3a8a2274 100644
--- a/languages/cpp/app_templates/kpartapp/app.cpp
+++ b/languages/cpp/app_templates/kpartapp/app.cpp
@@ -76,16 +76,16 @@ void %{APPNAME}::load(const KURL& url)
void %{APPNAME}::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());
- m_toolbarAction = KStdAction::showToolbar(this, SLOT(optionsShowToolbar()), actionCollection());
- m_statusbarAction = KStdAction::showStatusbar(this, SLOT(optionsShowStatusbar()), actionCollection());
+ m_toolbarAction = KStdAction::showToolbar(this, TQT_SLOT(optionsShowToolbar()), actionCollection());
+ m_statusbarAction = KStdAction::showStatusbar(this, TQT_SLOT(optionsShowStatusbar()), actionCollection());
- 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 %{APPNAME}::saveProperties(KConfig* /*config*/)
@@ -159,8 +159,8 @@ void %{APPNAME}::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();
}
@@ -183,7 +183,7 @@ void %{APPNAME}::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/languages/cpp/app_templates/kpartapp/app_part.cpp b/languages/cpp/app_templates/kpartapp/app_part.cpp
index bf63557f..809d642a 100644
--- a/languages/cpp/app_templates/kpartapp/app_part.cpp
+++ b/languages/cpp/app_templates/kpartapp/app_part.cpp
@@ -8,27 +8,27 @@
#include <kglobal.h>
#include <klocale.h>
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qmultilineedit.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqmultilineedit.h>
-%{APPNAME}Part::%{APPNAME}Part( QWidget *parentWidget, const char *widgetName,
- QObject *parent, const char *name )
+%{APPNAME}Part::%{APPNAME}Part( TQWidget *parentWidget, const char *widgetName,
+ TQObject *parent, const char *name )
: KParts::ReadWritePart(parent, name)
{
// we need an instance
setInstance( %{APPNAME}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::open(this, SLOT(fileOpen()), actionCollection());
- KStdAction::saveAs(this, SLOT(fileSaveAs()), actionCollection());
- KStdAction::save(this, SLOT(save()), actionCollection());
+ KStdAction::open(this, TQT_SLOT(fileOpen()), actionCollection());
+ KStdAction::saveAs(this, TQT_SLOT(fileSaveAs()), actionCollection());
+ KStdAction::save(this, TQT_SLOT(save()), actionCollection());
// set our XML-UI resource file
setXMLFile("%{APPNAMELC}_part.rc");
@@ -49,12 +49,12 @@ void %{APPNAME}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);
@@ -80,15 +80,15 @@ void %{APPNAME}Part::setModified(bool modified)
bool %{APPNAME}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";
@@ -110,12 +110,12 @@ bool %{APPNAME}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();
@@ -128,7 +128,7 @@ void %{APPNAME}Part::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
- QString file_name = KFileDialog::getOpenFileName();
+ TQString file_name = KFileDialog::getOpenFileName();
if (file_name.isEmpty() == false)
openURL(file_name);
@@ -137,7 +137,7 @@ void %{APPNAME}Part::fileOpen()
void %{APPNAME}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);
}
@@ -164,15 +164,15 @@ KAboutData* %{APPNAME}PartFactory::s_about = 0L;
s_instance = 0L;
}
-KParts::Part* %{APPNAME}PartFactory::createPartObject( QWidget *parentWidget, const char *widgetName,
- QObject *parent, const char *name,
- const char *classname, const QStringList &args )
+KParts::Part* %{APPNAME}PartFactory::createPartObject( TQWidget *parentWidget, const char *widgetName,
+ TQObject *parent, const char *name,
+ const char *classname, const TQStringList &args )
{
// Create an instance of our Part
%{APPNAME}Part* obj = new %{APPNAME}Part( parentWidget, widgetName, parent, name );
// See if we are to be read-write or not
- if (QCString(classname) == "KParts::ReadOnlyPart")
+ if (TQCString(classname) == "KParts::ReadOnlyPart")
obj->setReadWrite(false);
return obj;
diff --git a/languages/cpp/app_templates/kpartapp/app_part.h b/languages/cpp/app_templates/kpartapp/app_part.h
index 37c30189..6b56c36a 100644
--- a/languages/cpp/app_templates/kpartapp/app_part.h
+++ b/languages/cpp/app_templates/kpartapp/app_part.h
@@ -25,8 +25,8 @@ public:
/**
* Default constructor
*/
- %{APPNAME}Part(QWidget *parentWidget, const char *widgetName,
- QObject *parent, const char *name);
+ %{APPNAME}Part(TQWidget *parentWidget, const char *widgetName,
+ TQObject *parent, const char *name);
/**
* Destructor
@@ -61,7 +61,7 @@ protected slots:
void fileSaveAs();
private:
- QMultiLineEdit *m_widget;
+ TQMultiLineEdit *m_widget;
};
class KInstance;
@@ -73,9 +73,9 @@ class %{APPNAME}PartFactory : public KParts::Factory
public:
%{APPNAME}PartFactory();
virtual ~%{APPNAME}PartFactory();
- virtual KParts::Part* createPartObject( QWidget *parentWidget, const char *widgetName,
- QObject *parent, const char *name,
- const char *classname, const QStringList &args );
+ virtual KParts::Part* createPartObject( TQWidget *parentWidget, const char *widgetName,
+ TQObject *parent, const char *name,
+ const char *classname, const TQStringList &args );
static KInstance* instance();
private: