summaryrefslogtreecommitdiffstats
path: root/kapptemplate/kpartapp/app_part.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kapptemplate/kpartapp/app_part.cpp')
-rw-r--r--kapptemplate/kpartapp/app_part.cpp44
1 files changed, 22 insertions, 22 deletions
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);
}