summaryrefslogtreecommitdiffstats
path: root/kparts/tests
diff options
context:
space:
mode:
Diffstat (limited to 'kparts/tests')
-rw-r--r--kparts/tests/example.cpp26
-rw-r--r--kparts/tests/example.h2
-rw-r--r--kparts/tests/ghostview.cpp16
-rw-r--r--kparts/tests/normalktm.cpp26
-rw-r--r--kparts/tests/normalktm.h2
-rw-r--r--kparts/tests/notepad.cpp40
-rw-r--r--kparts/tests/notepad.h8
-rw-r--r--kparts/tests/parts.cpp36
-rw-r--r--kparts/tests/parts.h6
-rw-r--r--kparts/tests/plugin_spellcheck.cpp10
-rw-r--r--kparts/tests/plugin_spellcheck.h4
11 files changed, 88 insertions, 88 deletions
diff --git a/kparts/tests/example.cpp b/kparts/tests/example.cpp
index 51f493686..a1e8110e5 100644
--- a/kparts/tests/example.cpp
+++ b/kparts/tests/example.cpp
@@ -3,9 +3,9 @@
#include "parts.h"
#include "notepad.h"
-#include <qsplitter.h>
-#include <qcheckbox.h>
-#include <qdir.h>
+#include <tqsplitter.h>
+#include <tqcheckbox.h>
+#include <tqdir.h>
#include <kiconloader.h>
#include <kstandarddirs.h>
@@ -21,27 +21,27 @@ Shell::Shell()
m_manager = new KParts::PartManager( this );
// When the manager says the active part changes, the builder updates (recreates) the GUI
- connect( m_manager, SIGNAL( activePartChanged( KParts::Part * ) ),
- this, SLOT( createGUI( KParts::Part * ) ) );
+ connect( m_manager, TQT_SIGNAL( activePartChanged( KParts::Part * ) ),
+ this, TQT_SLOT( createGUI( KParts::Part * ) ) );
// We can do this "switch active part" because we have a splitter with
// two items in it.
// I wonder what kdevelop uses/will use to embed kedit, BTW.
- m_splitter = new QSplitter( this );
+ m_splitter = new TQSplitter( this );
m_part1 = new Part1(this, m_splitter);
m_part2 = new Part2(this, m_splitter);
KActionCollection *coll = actionCollection();
- (void)new KAction( "&View local file", 0, this, SLOT( slotFileOpen() ), coll, "open_local_file" );
- (void)new KAction( "&View remote file", 0, this, SLOT( slotFileOpenRemote() ), coll, "open_remote_file" );
+ (void)new KAction( "&View local file", 0, this, TQT_SLOT( slotFileOpen() ), coll, "open_local_file" );
+ (void)new KAction( "&View remote file", 0, this, TQT_SLOT( slotFileOpenRemote() ), coll, "open_remote_file" );
- m_paEditFile = new KAction( "&Edit file", 0, this, SLOT( slotFileEdit() ), coll, "edit_file" );
- m_paCloseEditor = new KAction( "&Close file editor", 0, this, SLOT( slotFileCloseEditor() ), coll, "close_editor" );
+ m_paEditFile = new KAction( "&Edit file", 0, this, TQT_SLOT( slotFileEdit() ), coll, "edit_file" );
+ m_paCloseEditor = new KAction( "&Close file editor", 0, this, TQT_SLOT( slotFileCloseEditor() ), coll, "close_editor" );
m_paCloseEditor->setEnabled(false);
- KAction * paQuit = new KAction( "&Quit", 0, this, SLOT( close() ), coll, "shell_quit" );
- paQuit->setIconSet(QIconSet(BarIcon("exit")));
+ KAction * paQuit = new KAction( "&Quit", 0, this, TQT_SLOT( close() ), coll, "shell_quit" );
+ paQuit->setIconSet(TQIconSet(BarIcon("exit")));
(void)new KAction( "Yet another menu item", 0, coll, "shell_yami" );
(void)new KAction( "Yet another submenu item", 0, coll, "shell_yasmi" );
@@ -115,7 +115,7 @@ void Shell::slotFileEdit()
if ( !m_editorpart )
embedEditor();
// TODO use KFileDialog to allow testing remote files
- if ( ! m_editorpart->openURL( QDir::current().absPath()+"/kpartstest_shell.rc" ) )
+ if ( ! m_editorpart->openURL( TQDir::current().absPath()+"/kpartstest_shell.rc" ) )
KMessageBox::error(this,"Couldn't open file !");
}
diff --git a/kparts/tests/example.h b/kparts/tests/example.h
index ec3d67540..1da6acef6 100644
--- a/kparts/tests/example.h
+++ b/kparts/tests/example.h
@@ -33,7 +33,7 @@ private:
KParts::Part *m_part2;
KParts::ReadWritePart *m_editorpart;
KParts::PartManager *m_manager;
- QWidget *m_splitter;
+ TQWidget *m_splitter;
};
#endif
diff --git a/kparts/tests/ghostview.cpp b/kparts/tests/ghostview.cpp
index 49736abfc..a1ace7720 100644
--- a/kparts/tests/ghostview.cpp
+++ b/kparts/tests/ghostview.cpp
@@ -8,9 +8,9 @@
#include <kcmdlineargs.h>
#include <klibloader.h>
-#include <qwidget.h>
-#include <qdir.h>
-#include <qfile.h>
+#include <tqwidget.h>
+#include <tqdir.h>
+#include <tqfile.h>
#include <ktrader.h>
@@ -21,9 +21,9 @@ Shell::Shell()
setXMLFile( "ghostviewtest_shell.rc" );
KAction * paOpen = new KAction( "&Open file" , "fileopen", 0, this,
- SLOT( slotFileOpen() ), actionCollection(), "file_open" );
+ TQT_SLOT( slotFileOpen() ), actionCollection(), "file_open" );
- KAction * paQuit = new KAction( "&Quit" , "exit", 0, this, SLOT( close() ), actionCollection(), "file_quit" );
+ KAction * paQuit = new KAction( "&Quit" , "exit", 0, this, TQT_SLOT( close() ), actionCollection(), "file_quit" );
// Try to find a postscript component first
KTrader::OfferList offers = KTrader::self()->query("application/postscript", "('KParts/ReadOnlyPart' in ServiceTypes) or ('Browser/View' in ServiceTypes)");
@@ -35,7 +35,7 @@ Shell::Shell()
{
KService::Ptr ptr = (*it);
- factory = KLibLoader::self()->factory( QFile::encodeName(ptr->library()) );
+ factory = KLibLoader::self()->factory( TQFile::encodeName(ptr->library()) );
if (factory)
{
m_gvpart = static_cast<KParts::ReadOnlyPart *>(factory->create(this, ptr->name().latin1(), "KParts::ReadOnlyPart"));
@@ -85,7 +85,7 @@ void Shell::openURL( const KURL & url )
void Shell::slotFileOpen()
{
- KURL url = KFileDialog::getOpenURL( QString::null, "*.ps|Postscript files (*.ps)", 0L, "file dialog" );
+ KURL url = KFileDialog::getOpenURL( TQString::null, "*.ps|Postscript files (*.ps)", 0L, "file dialog" );
if( !url.isEmpty() )
openURL( url );
@@ -109,7 +109,7 @@ int main( int argc, char **argv )
if ( args->count() == 1 )
{
// Allow full paths, but also simple filenames from current dir
- KURL url( QDir::currentDirPath()+"/", args->arg(0) );
+ KURL url( TQDir::currentDirPath()+"/", args->arg(0) );
shell->openURL( url );
}
shell->show();
diff --git a/kparts/tests/normalktm.cpp b/kparts/tests/normalktm.cpp
index f8884ae74..ec4420a7e 100644
--- a/kparts/tests/normalktm.cpp
+++ b/kparts/tests/normalktm.cpp
@@ -3,9 +3,9 @@
#include "parts.h"
#include "notepad.h"
-#include <qsplitter.h>
-#include <qcheckbox.h>
-#include <qdir.h>
+#include <tqsplitter.h>
+#include <tqcheckbox.h>
+#include <tqdir.h>
#include <kiconloader.h>
#include <kstandarddirs.h>
@@ -21,30 +21,30 @@ Shell::Shell()
// We can do this "switch active part" because we have a splitter with
// two items in it.
// I wonder what kdevelop uses/will use to embed kedit, BTW.
- m_splitter = new QSplitter( this );
+ m_splitter = new TQSplitter( this );
m_part1 = new Part1(this, m_splitter);
m_part2 = new Part2(this, m_splitter);
- QPopupMenu * pFile = new QPopupMenu( this );
+ TQPopupMenu * pFile = new TQPopupMenu( this );
menuBar()->insertItem( "File", pFile );
- QObject * coll = this;
- KAction * paLocal = new KAction( "&View local file", 0, this, SLOT( slotFileOpen() ), coll, "open_local_file" );
+ TQObject * coll = this;
+ KAction * paLocal = new KAction( "&View local file", 0, this, TQT_SLOT( slotFileOpen() ), coll, "open_local_file" );
// No XML : we need to plug our actions ourselves
paLocal->plug( pFile );
- KAction * paRemote = new KAction( "&View remote file", 0, this, SLOT( slotFileOpenRemote() ), coll, "open_remote_file" );
+ KAction * paRemote = new KAction( "&View remote file", 0, this, TQT_SLOT( slotFileOpenRemote() ), coll, "open_remote_file" );
paRemote->plug( pFile );
- m_paEditFile = new KAction( "&Edit file", 0, this, SLOT( slotFileEdit() ), coll, "edit_file" );
+ m_paEditFile = new KAction( "&Edit file", 0, this, TQT_SLOT( slotFileEdit() ), coll, "edit_file" );
m_paEditFile->plug( pFile );
- m_paCloseEditor = new KAction( "&Close file editor", 0, this, SLOT( slotFileCloseEditor() ), coll, "close_editor" );
+ m_paCloseEditor = new KAction( "&Close file editor", 0, this, TQT_SLOT( slotFileCloseEditor() ), coll, "close_editor" );
m_paCloseEditor->setEnabled(false);
m_paCloseEditor->plug( pFile );
- KAction * paQuit = new KAction( "&Quit", 0, this, SLOT( close() ), coll, "shell_quit" );
- paQuit->setIconSet(QIconSet(BarIcon("exit")));
+ KAction * paQuit = new KAction( "&Quit", 0, this, TQT_SLOT( close() ), coll, "shell_quit" );
+ paQuit->setIconSet(TQIconSet(BarIcon("exit")));
paQuit->plug( pFile );
setCentralWidget( m_splitter );
@@ -102,7 +102,7 @@ void Shell::slotFileEdit()
if ( !m_editorpart )
embedEditor();
// TODO use KFileDialog to allow testing remote files
- if ( ! m_editorpart->openURL( QDir::current().absPath()+"/kpartstest_shell.rc" ) )
+ if ( ! m_editorpart->openURL( TQDir::current().absPath()+"/kpartstest_shell.rc" ) )
KMessageBox::error(this,"Couldn't open file !");
}
diff --git a/kparts/tests/normalktm.h b/kparts/tests/normalktm.h
index bcf7b89bc..9a61a0082 100644
--- a/kparts/tests/normalktm.h
+++ b/kparts/tests/normalktm.h
@@ -32,7 +32,7 @@ private:
KParts::ReadOnlyPart *m_part1;
KParts::Part *m_part2;
KParts::ReadWritePart *m_editorpart;
- QWidget *m_splitter;
+ TQWidget *m_splitter;
};
#endif
diff --git a/kparts/tests/notepad.cpp b/kparts/tests/notepad.cpp
index 8e6f5462c..e0857a51e 100644
--- a/kparts/tests/notepad.cpp
+++ b/kparts/tests/notepad.cpp
@@ -3,10 +3,10 @@
#include <kparts/partmanager.h>
#include <kparts/mainwindow.h>
-#include <qsplitter.h>
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qmultilineedit.h>
+#include <tqsplitter.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqmultilineedit.h>
#include <kaboutdata.h>
#include <kapplication.h>
@@ -16,17 +16,17 @@
#include <kstatusbar.h>
#include <kstandarddirs.h>
-NotepadPart::NotepadPart( QWidget* parentWidget, const char*,
- QObject* parent, const char* name,
- const QStringList& )
+NotepadPart::NotepadPart( TQWidget* parentWidget, const char*,
+ TQObject* parent, const char* name,
+ const TQStringList& )
: KParts::ReadWritePart( parent, name )
{
setInstance( NotepadFactory::instance() );
- m_edit = new QMultiLineEdit( parentWidget, "NotepadPart's multiline edit" );
+ m_edit = new TQMultiLineEdit( parentWidget, "NotepadPart's multiline edit" );
setWidget( m_edit );
- (void)new KAction( "Search and replace", 0, this, SLOT( slotSearchReplace() ), actionCollection(), "searchreplace" );
+ (void)new KAction( "Search and replace", 0, this, TQT_SLOT( slotSearchReplace() ), actionCollection(), "searchreplace" );
setXMLFile( "notepadpart.rc" );
setReadWrite( true );
}
@@ -39,9 +39,9 @@ void NotepadPart::setReadWrite( bool rw )
{
m_edit->setReadOnly( !rw );
if (rw)
- connect( m_edit, SIGNAL( textChanged() ), this, SLOT( setModified() ) );
+ connect( m_edit, TQT_SIGNAL( textChanged() ), this, TQT_SLOT( setModified() ) );
else
- disconnect( m_edit, SIGNAL( textChanged() ), this, SLOT( setModified() ) );
+ disconnect( m_edit, TQT_SIGNAL( textChanged() ), this, TQT_SLOT( setModified() ) );
ReadWritePart::setReadWrite( rw );
}
@@ -55,10 +55,10 @@ bool NotepadPart::openFile()
{
kdDebug() << "NotepadPart: opening " << m_file << endl;
// Hehe this is from a tutorial I did some time ago :)
- QFile f(m_file);
- QString s;
+ TQFile f(m_file);
+ TQString s;
if ( f.open(IO_ReadOnly) ) {
- QTextStream t( &f );
+ TQTextStream t( &f );
while ( !t.eof() ) {
s += t.readLine() + "\n";
}
@@ -75,10 +75,10 @@ bool NotepadPart::saveFile()
{
if ( !isReadWrite() )
return false;
- QFile f(m_file);
- QString s;
+ TQFile f(m_file);
+ TQString s;
if ( f.open(IO_WriteOnly) ) {
- QTextStream t( &f );
+ TQTextStream t( &f );
t << m_edit->text();
f.close();
return true;
@@ -90,9 +90,9 @@ void NotepadPart::slotSearchReplace()
{
// What's this ? (David)
/*
- QValueList<KParts::XMLGUIServant *> plugins = KParts::Plugin::pluginServants( this );
- QValueList<KParts::XMLGUIServant *>::ConstIterator it = plugins.begin();
- QValueList<KParts::XMLGUIServant *>::ConstIterator end = plugins.end();
+ TQValueList<KParts::XMLGUIServant *> plugins = KParts::Plugin::pluginServants( this );
+ TQValueList<KParts::XMLGUIServant *>::ConstIterator it = plugins.begin();
+ TQValueList<KParts::XMLGUIServant *>::ConstIterator end = plugins.end();
for (; it != end; ++it )
factory()->removeServant( *it );
*/
diff --git a/kparts/tests/notepad.h b/kparts/tests/notepad.h
index bd499d651..9956543a3 100644
--- a/kparts/tests/notepad.h
+++ b/kparts/tests/notepad.h
@@ -17,9 +17,9 @@ class NotepadPart : public KParts::ReadWritePart
{
Q_OBJECT
public:
- NotepadPart( QWidget*, const char* widgetName,
- QObject* parent, const char* name,
- const QStringList& args = QStringList() );
+ NotepadPart( TQWidget*, const char* widgetName,
+ TQObject* parent, const char* name,
+ const TQStringList& args = TQStringList() );
virtual ~NotepadPart();
virtual void setReadWrite( bool rw );
@@ -34,7 +34,7 @@ protected slots:
void slotSearchReplace();
protected:
- QMultiLineEdit * m_edit;
+ TQMultiLineEdit * m_edit;
};
typedef KParts::GenericFactory<NotepadPart> NotepadFactory;
diff --git a/kparts/tests/parts.cpp b/kparts/tests/parts.cpp
index 27513185c..d932a168f 100644
--- a/kparts/tests/parts.cpp
+++ b/kparts/tests/parts.cpp
@@ -3,13 +3,13 @@
#include "parts.h"
-#include <qcheckbox.h>
-#include <qfile.h>
-#include <qdir.h>
-#include <qtextstream.h>
-#include <qmultilineedit.h>
-#include <qlineedit.h>
-#include <qvbox.h>
+#include <tqcheckbox.h>
+#include <tqfile.h>
+#include <tqdir.h>
+#include <tqtextstream.h>
+#include <tqmultilineedit.h>
+#include <tqlineedit.h>
+#include <tqvbox.h>
#include <kiconloader.h>
#include <kapplication.h>
@@ -18,12 +18,12 @@
#include <kaction.h>
#include <klocale.h>
-Part1::Part1( QObject *parent, QWidget * parentWidget )
+Part1::Part1( TQObject *parent, TQWidget * parentWidget )
: KParts::ReadOnlyPart( parent, "Part1" )
{
m_instance = new KInstance( "kpartstestpart" );
setInstance( m_instance );
- m_edit = new QMultiLineEdit( parentWidget );
+ m_edit = new TQMultiLineEdit( parentWidget );
setWidget( m_edit );
setXMLFile( "kpartstest_part1.rc" );
@@ -37,12 +37,12 @@ Part1::~Part1()
bool Part1::openFile()
{
- kdDebug() << "Part1: opening " << QFile::encodeName(m_file) << endl;
+ kdDebug() << "Part1: opening " << TQFile::encodeName(m_file) << endl;
// Hehe this is from a tutorial I did some time ago :)
- QFile f(m_file);
- QString s;
+ TQFile f(m_file);
+ TQString s;
if ( f.open(IO_ReadOnly) ) {
- QTextStream t( &f );
+ TQTextStream t( &f );
while ( !t.eof() ) {
s += t.readLine() + "\n";
}
@@ -56,22 +56,22 @@ bool Part1::openFile()
return true;
}
-Part2::Part2( QObject *parent, QWidget * parentWidget )
+Part2::Part2( TQObject *parent, TQWidget * parentWidget )
: KParts::Part( parent, "Part2" )
{
m_instance = new KInstance( "part2" );
setInstance( m_instance );
- QWidget * w = new QWidget( parentWidget, "Part2Widget" );
+ TQWidget * w = new TQWidget( parentWidget, "Part2Widget" );
setWidget( w );
- QCheckBox * cb = new QCheckBox( "something", w );
+ TQCheckBox * cb = new TQCheckBox( "something", w );
- QLineEdit * l = new QLineEdit( "something", widget() );
+ TQLineEdit * l = new TQLineEdit( "something", widget() );
l->move(0,50);
// Since the main widget is a dummy one, we HAVE to set
// strong focus for it, otherwise we get the
// the famous activating-file-menu-switches-part bug.
- w->setFocusPolicy( QWidget::ClickFocus );
+ w->setFocusPolicy( TQWidget::ClickFocus );
// setXMLFile( ... ); // no actions currently
}
diff --git a/kparts/tests/parts.h b/kparts/tests/parts.h
index 27ec5fa1a..30e7d1768 100644
--- a/kparts/tests/parts.h
+++ b/kparts/tests/parts.h
@@ -13,14 +13,14 @@ class Part1 : public KParts::ReadOnlyPart
{
Q_OBJECT
public:
- Part1( QObject *parent, QWidget * parentWidget );
+ Part1( TQObject *parent, TQWidget * parentWidget );
virtual ~Part1();
protected:
virtual bool openFile();
protected:
- QMultiLineEdit * m_edit;
+ TQMultiLineEdit * m_edit;
KInstance *m_instance;
};
@@ -28,7 +28,7 @@ class Part2 : public KParts::Part
{
Q_OBJECT
public:
- Part2( QObject *parent, QWidget * parentWidget );
+ Part2( TQObject *parent, TQWidget * parentWidget );
virtual ~Part2();
protected:
diff --git a/kparts/tests/plugin_spellcheck.cpp b/kparts/tests/plugin_spellcheck.cpp
index 156552e1b..5521bf22f 100644
--- a/kparts/tests/plugin_spellcheck.cpp
+++ b/kparts/tests/plugin_spellcheck.cpp
@@ -1,5 +1,5 @@
#include "notepad.h" // this plugin applies to a notepad part
-#include <qmultilineedit.h>
+#include <tqmultilineedit.h>
#include "plugin_spellcheck.h"
#include <kaction.h>
#include <kgenericfactory.h>
@@ -7,11 +7,11 @@
#include <klocale.h>
#include <kdebug.h>
-PluginSpellCheck::PluginSpellCheck( QObject* parent, const char* name,
- const QStringList& )
+PluginSpellCheck::PluginSpellCheck( TQObject* parent, const char* name,
+ const TQStringList& )
: Plugin( parent, name )
{
- (void) new KAction( "&Select current line (plugin)", 0, this, SLOT(slotSpellCheck()),
+ (void) new KAction( "&Select current line (plugin)", 0, this, TQT_SLOT(slotSpellCheck()),
actionCollection(), "spellcheck" );
}
@@ -28,7 +28,7 @@ void PluginSpellCheck::slotSpellCheck()
else
{
NotepadPart * part = (NotepadPart *) parent();
- QMultiLineEdit * widget = (QMultiLineEdit *) part->widget();
+ TQMultiLineEdit * widget = (TQMultiLineEdit *) part->widget();
widget->selectAll(); //selects current line !
}
}
diff --git a/kparts/tests/plugin_spellcheck.h b/kparts/tests/plugin_spellcheck.h
index 31d6b5380..56f0e657a 100644
--- a/kparts/tests/plugin_spellcheck.h
+++ b/kparts/tests/plugin_spellcheck.h
@@ -7,8 +7,8 @@ class PluginSpellCheck : public KParts::Plugin
{
Q_OBJECT
public:
- PluginSpellCheck( QObject* parent = 0, const char* name = 0,
- const QStringList& = QStringList() );
+ PluginSpellCheck( TQObject* parent = 0, const char* name = 0,
+ const TQStringList& = TQStringList() );
virtual ~PluginSpellCheck();
public slots: