summaryrefslogtreecommitdiffstats
path: root/libkdepim/komposer
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:53:50 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:53:50 +0000
commit7be55ffa061c026e35e2d6a0effe1161ddb0d41f (patch)
tree8474f9b444b2756228600050f07a7ff25de532b2 /libkdepim/komposer
parentf587f20a6d09f1729dd0a8c1cd8ee0110aec7451 (diff)
downloadtdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.tar.gz
tdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1157655 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'libkdepim/komposer')
-rw-r--r--libkdepim/komposer/core/attachment.cpp32
-rw-r--r--libkdepim/komposer/core/attachment.h40
-rw-r--r--libkdepim/komposer/core/core.cpp70
-rw-r--r--libkdepim/komposer/core/core.h26
-rw-r--r--libkdepim/komposer/core/corewidget.cpp4
-rw-r--r--libkdepim/komposer/core/corewidget.h16
-rw-r--r--libkdepim/komposer/core/editor.cpp4
-rw-r--r--libkdepim/komposer/core/editor.h16
-rw-r--r--libkdepim/komposer/core/komposerIface.h20
-rw-r--r--libkdepim/komposer/core/plugin.cpp6
-rw-r--r--libkdepim/komposer/core/plugin.h8
-rw-r--r--libkdepim/komposer/core/pluginmanager.cpp132
-rw-r--r--libkdepim/komposer/core/pluginmanager.h40
-rw-r--r--libkdepim/komposer/core/prefsmodule.cpp36
-rw-r--r--libkdepim/komposer/core/prefsmodule.h18
-rw-r--r--libkdepim/komposer/core/tests/managertest.cpp4
-rw-r--r--libkdepim/komposer/core/tests/managertest.h6
-rw-r--r--libkdepim/komposer/core/tests/tester.cpp4
-rw-r--r--libkdepim/komposer/core/tests/tester.h10
-rw-r--r--libkdepim/komposer/core/tests/testfactory.h10
-rw-r--r--libkdepim/komposer/core/tests/testmanager.cpp16
-rw-r--r--libkdepim/komposer/core/tests/testmanager.h4
-rw-r--r--libkdepim/komposer/plugins/default/defaulteditor.cpp120
-rw-r--r--libkdepim/komposer/plugins/default/defaulteditor.h12
-rw-r--r--libkdepim/komposer/test/test.cpp2
25 files changed, 328 insertions, 328 deletions
diff --git a/libkdepim/komposer/core/attachment.cpp b/libkdepim/komposer/core/attachment.cpp
index f5b936c0c..f8240380e 100644
--- a/libkdepim/komposer/core/attachment.cpp
+++ b/libkdepim/komposer/core/attachment.cpp
@@ -26,24 +26,24 @@ using namespace Komposer;
class Attachment::Private
{
public:
- QString name;
- QCString cte;
- QByteArray data;
- QCString type;
- QCString subType;
- QCString paramAttr;
- QString paramValue;
- QCString contDisp;
+ TQString name;
+ TQCString cte;
+ TQByteArray data;
+ TQCString type;
+ TQCString subType;
+ TQCString paramAttr;
+ TQString paramValue;
+ TQCString contDisp;
};
-Attachment::Attachment( const QString &name,
- const QCString &cte,
- const QByteArray &data,
- const QCString &type,
- const QCString &subType,
- const QCString &paramAttr,
- const QString &paramValue,
- const QCString &contDisp )
+Attachment::Attachment( const TQString &name,
+ const TQCString &cte,
+ const TQByteArray &data,
+ const TQCString &type,
+ const TQCString &subType,
+ const TQCString &paramAttr,
+ const TQString &paramValue,
+ const TQCString &contDisp )
: d( new Private )
{
d->name = name;
diff --git a/libkdepim/komposer/core/attachment.h b/libkdepim/komposer/core/attachment.h
index fc19fb2da..5c4e1ebf2 100644
--- a/libkdepim/komposer/core/attachment.h
+++ b/libkdepim/komposer/core/attachment.h
@@ -22,9 +22,9 @@
#ifndef KOMPOSER_ATTACHMENT_H
#define KOMPOSER_ATTACHMENT_H
-#include <qstring.h>
-#include <qcstring.h>
-#include <qvaluelist.h>
+#include <tqstring.h>
+#include <tqcstring.h>
+#include <tqvaluelist.h>
namespace Komposer
{
@@ -32,30 +32,30 @@ namespace Komposer
class Attachment
{
public:
- Attachment( const QString &name,
- const QCString &cte,
- const QByteArray &data,
- const QCString &type,
- const QCString &subType,
- const QCString &paramAttr,
- const QString &paramValue,
- const QCString &contDisp );
+ Attachment( const TQString &name,
+ const TQCString &cte,
+ const TQByteArray &data,
+ const TQCString &type,
+ const TQCString &subType,
+ const TQCString &paramAttr,
+ const TQString &paramValue,
+ const TQCString &contDisp );
~Attachment();
- QString name() const;
- QCString cte() const;
- QByteArray data() const;
- QCString type() const;
- QCString subType() const;
- QCString paramAttr() const;
- QString paramValue() const;
- QCString contentDisposition() const;
+ TQString name() const;
+ TQCString cte() const;
+ TQByteArray data() const;
+ TQCString type() const;
+ TQCString subType() const;
+ TQCString paramAttr() const;
+ TQString paramValue() const;
+ TQCString contentDisposition() const;
private:
class Private;
Private *d;
};
- typedef QValueList<Attachment> AttachmentList;
+ typedef TQValueList<Attachment> AttachmentList;
}
#endif
diff --git a/libkdepim/komposer/core/core.cpp b/libkdepim/komposer/core/core.cpp
index 6a14fdb38..f93e59cc9 100644
--- a/libkdepim/komposer/core/core.cpp
+++ b/libkdepim/komposer/core/core.cpp
@@ -47,13 +47,13 @@
#include <kstdaccel.h>
#include <kdebug.h>
-#include <qwidgetstack.h>
-#include <qhbox.h>
-#include <qwidget.h>
+#include <tqwidgetstack.h>
+#include <tqhbox.h>
+#include <tqwidget.h>
using namespace Komposer;
-Core::Core( QWidget *parent, const char *name )
+Core::Core( TQWidget *parent, const char *name )
: KomposerIface( "KomposerIface" ),
KMainWindow( parent, name ), m_currentEditor( 0 )
{
@@ -118,9 +118,9 @@ Core::slotPluginLoaded( Plugin *plugin )
void
Core::slotAllPluginsLoaded()
{
- QValueList<KPluginInfo*> plugins = m_pluginManager->availablePlugins();
+ TQValueList<KPluginInfo*> plugins = m_pluginManager->availablePlugins();
kdDebug()<<"Number of available plugins is "<< plugins.count() <<endl;
- for ( QValueList<KPluginInfo*>::iterator it = plugins.begin(); it != plugins.end(); ++it ) {
+ for ( TQValueList<KPluginInfo*>::iterator it = plugins.begin(); it != plugins.end(); ++it ) {
KPluginInfo *i = ( *it );
kdDebug()<<"\tAvailable plugin "<< i->pluginName()
<<", comment = "<< i->comment() <<endl;
@@ -156,13 +156,13 @@ Core::selectEditor( Komposer::Editor *editor )
editor->select();
- QPtrList<KParts::Part> *partList = const_cast<QPtrList<KParts::Part>*>(
+ TQPtrList<KParts::Part> *partList = const_cast<TQPtrList<KParts::Part>*>(
m_partManager->parts() );
if ( partList->find( part ) == -1 )
addPart( part );
m_partManager->setActivePart( part );
- QWidget *view = part->widget();
+ TQWidget *view = part->widget();
Q_ASSERT( view );
kdDebug()<<"Raising view "<<view<<endl;
@@ -176,7 +176,7 @@ Core::selectEditor( Komposer::Editor *editor )
}
void
-Core::selectEditor( const QString &editorName )
+Core::selectEditor( const TQString &editorName )
{
}
@@ -217,19 +217,19 @@ void
Core::initWidgets()
{
statusBar()->show();
- QHBox *topWidget = new QHBox( this );
+ TQHBox *topWidget = new TQHBox( this );
setCentralWidget( topWidget );
- m_stack = new QWidgetStack( topWidget );
+ m_stack = new TQWidgetStack( topWidget );
}
void
Core::initCore()
{
m_pluginManager = new PluginManager( this );
- connect( m_pluginManager, SIGNAL(pluginLoaded(Plugin*)),
- SLOT(slotPluginLoaded(Plugin*)) );
- connect( m_pluginManager, SIGNAL(allPluginsLoaded()),
- SLOT(slotAllPluginsLoaded()) );
+ connect( m_pluginManager, TQT_SIGNAL(pluginLoaded(Plugin*)),
+ TQT_SLOT(slotPluginLoaded(Plugin*)) );
+ connect( m_pluginManager, TQT_SIGNAL(allPluginsLoaded()),
+ TQT_SLOT(slotAllPluginsLoaded()) );
m_pluginManager->loadAllPlugins();
@@ -239,39 +239,39 @@ Core::initCore()
void
Core::initConnections()
{
- connect( kapp, SIGNAL(shutDown()),
- SLOT(slotQuit()) );
+ connect( kapp, TQT_SIGNAL(shutDown()),
+ TQT_SLOT(slotQuit()) );
}
void
Core::createActions()
{
- KStdAction::close( this, SLOT(slotClose()), actionCollection() );
+ KStdAction::close( this, TQT_SLOT(slotClose()), actionCollection() );
(void) new KAction( i18n( "&Send" ), "mail_send", CTRL+Key_Return,
- this, SLOT(slotSendNow()), actionCollection(),
+ this, TQT_SLOT(slotSendNow()), actionCollection(),
"send_default" );
(void) new KAction( i18n( "&Queue" ), "queue", 0,
- this, SLOT(slotSendLater()),
+ this, TQT_SLOT(slotSendLater()),
actionCollection(), "send_alternative" );
(void) new KAction( i18n( "Save in &Drafts Folder" ), "filesave", 0,
- this, SLOT(slotSaveDraft()),
+ this, TQT_SLOT(slotSaveDraft()),
actionCollection(), "save_in_drafts" );
(void) new KAction( i18n( "&Insert File..." ), "fileopen", 0,
- this, SLOT(slotInsertFile()),
+ this, TQT_SLOT(slotInsertFile()),
actionCollection(), "insert_file" );
(void) new KAction( i18n( "&Address Book" ), "contents",0,
- this, SLOT(slotAddrBook()),
+ this, TQT_SLOT(slotAddrBook()),
actionCollection(), "addressbook" );
(void) new KAction( i18n( "&New Composer" ), "mail_new",
KStdAccel::shortcut( KStdAccel::New ),
- this, SLOT(slotNewComposer()),
+ this, TQT_SLOT(slotNewComposer()),
actionCollection(), "new_composer" );
(void) new KAction( i18n( "&Attach File..." ), "attach",
- 0, this, SLOT(slotAttachFile()),
+ 0, this, TQT_SLOT(slotAttachFile()),
actionCollection(), "attach_file" );
}
@@ -330,26 +330,26 @@ Core::send( int how )
}
void
-Core::addAttachment( const KURL &url, const QString &comment )
+Core::addAttachment( const KURL &url, const TQString &comment )
{
}
void
-Core::setBody( const QString &body )
+Core::setBody( const TQString &body )
{
m_currentEditor->setText( body );
}
void
-Core::addAttachment( const QString &name,
- const QCString &cte,
- const QByteArray &data,
- const QCString &type,
- const QCString &subType,
- const QCString &paramAttr,
- const QString &paramValue,
- const QCString &contDisp )
+Core::addAttachment( const TQString &name,
+ const TQCString &cte,
+ const TQByteArray &data,
+ const TQCString &type,
+ const TQCString &subType,
+ const TQCString &paramAttr,
+ const TQString &paramValue,
+ const TQCString &contDisp )
{
}
diff --git a/libkdepim/komposer/core/core.h b/libkdepim/komposer/core/core.h
index 0c5149610..3719b912c 100644
--- a/libkdepim/komposer/core/core.h
+++ b/libkdepim/komposer/core/core.h
@@ -25,7 +25,7 @@
#include "komposerIface.h"
#include <kmainwindow.h>
-#include <qptrlist.h>
+#include <tqptrlist.h>
namespace KSettings {
class Dialog;
@@ -46,21 +46,21 @@ namespace Komposer
{
Q_OBJECT
public:
- Core( QWidget *parentWidget = 0, const char *name = 0 );
+ Core( TQWidget *parentWidget = 0, const char *name = 0 );
virtual ~Core();
public slots:
virtual void send( int how );
- virtual void addAttachment( const KURL &url, const QString &comment );
- virtual void setBody( const QString &body );
- virtual void addAttachment( const QString &name,
- const QCString &cte,
- const QByteArray &data,
- const QCString &type,
- const QCString &subType,
- const QCString &paramAttr,
- const QString &paramValue,
- const QCString &contDisp );
+ virtual void addAttachment( const KURL &url, const TQString &comment );
+ virtual void setBody( const TQString &body );
+ virtual void addAttachment( const TQString &name,
+ const TQCString &cte,
+ const TQByteArray &data,
+ const TQCString &type,
+ const TQCString &subType,
+ const TQCString &paramAttr,
+ const TQString &paramValue,
+ const TQCString &contDisp );
@@ -92,7 +92,7 @@ namespace Komposer
void addPlugin( Komposer::Plugin *plugin );
private:
- QWidgetStack *m_stack;
+ TQWidgetStack *m_stack;
Editor *m_currentEditor;
PluginManager *m_pluginManager;
diff --git a/libkdepim/komposer/core/corewidget.cpp b/libkdepim/komposer/core/corewidget.cpp
index 74fa92375..c65893766 100644
--- a/libkdepim/komposer/core/corewidget.cpp
+++ b/libkdepim/komposer/core/corewidget.cpp
@@ -24,8 +24,8 @@
using namespace Komposer;
-CoreWidget::CoreWidget( QWidget *parent, const char *name )
- : QWidget( parent, name )
+CoreWidget::CoreWidget( TQWidget *parent, const char *name )
+ : TQWidget( parent, name )
{
}
diff --git a/libkdepim/komposer/core/corewidget.h b/libkdepim/komposer/core/corewidget.h
index b4166d8a0..8b07a0a7a 100644
--- a/libkdepim/komposer/core/corewidget.h
+++ b/libkdepim/komposer/core/corewidget.h
@@ -24,7 +24,7 @@
#include "attachment.h"
-#include <qwidget.h>
+#include <tqwidget.h>
namespace Komposer
{
@@ -33,14 +33,14 @@ namespace Komposer
{
Q_OBJECT
public:
- CoreWidget( QWidget *parent, const char *name=0 );
+ CoreWidget( TQWidget *parent, const char *name=0 );
- virtual QString subject() const =0;
- virtual QStringList to() const =0;
- virtual QStringList cc() const =0;
- virtual QStringList bcc() const =0;
- virtual QString from() const =0;
- virtual QString replyTo() const =0;
+ virtual TQString subject() const =0;
+ virtual TQStringList to() const =0;
+ virtual TQStringList cc() const =0;
+ virtual TQStringList bcc() const =0;
+ virtual TQString from() const =0;
+ virtual TQString replyTo() const =0;
virtual AttachmentList attachments() const =0;
};
}
diff --git a/libkdepim/komposer/core/editor.cpp b/libkdepim/komposer/core/editor.cpp
index 2e3bfd51b..5dada393f 100644
--- a/libkdepim/komposer/core/editor.cpp
+++ b/libkdepim/komposer/core/editor.cpp
@@ -27,10 +27,10 @@ namespace Komposer {
class Editor::Private {
public:
- QString id;
+ TQString id;
};
-Editor::Editor( QObject *parent, const char *name, const QStringList &args )
+Editor::Editor( TQObject *parent, const char *name, const TQStringList &args )
: Plugin( parent, name, args ), d( new Private )
{
}
diff --git a/libkdepim/komposer/core/editor.h b/libkdepim/komposer/core/editor.h
index 3b8d601a5..a5b78915d 100644
--- a/libkdepim/komposer/core/editor.h
+++ b/libkdepim/komposer/core/editor.h
@@ -25,7 +25,7 @@
#include "plugin.h"
-#include <qstringlist.h>
+#include <tqstringlist.h>
namespace KParts {
class Part;
@@ -50,14 +50,14 @@ namespace Komposer {
* This is the magic function that all derivatives have to reimplement.
* It returns the actual editor component.
*/
- virtual QWidget *widget() =0;
+ virtual TQWidget *widget() =0;
int supportedTextFormats() const;
/**
* Returns the full text inside the editor.
*/
- virtual QString text() const =0;
+ virtual TQString text() const =0;
/**
* This function is called when the plugin is selected by the user before the
@@ -66,7 +66,7 @@ namespace Komposer {
virtual void select();
/**
- * Reimplement this method and return a @ref QStringList of all config
+ * Reimplement this method and return a @ref TQStringList of all config
* modules your application part should offer via Komposer. Note that the
* part and the module will have to take care for config syncing themselves.
* Usually @p DCOP used for that purpose.
@@ -74,7 +74,7 @@ namespace Komposer {
* @note Make sure you offer the modules in the form:
* <code>"pathrelativetosettings/mysettings.desktop"</code>
*/
- virtual QStringList configModules() const { return QStringList(); }
+ virtual TQStringList configModules() const { return TQStringList(); }
public slots:
@@ -83,16 +83,16 @@ namespace Komposer {
* Most commonly used on replaying.
* If any text is present if will be deleted.
*/
- virtual void setText( const QString &txt ) =0;
+ virtual void setText( const TQString &txt ) =0;
/**
* Changes currently used signature. If no signature is present
* a new one should be appened.
*/
- virtual void changeSignature( const QString &txt ) =0;
+ virtual void changeSignature( const TQString &txt ) =0;
protected:
- Editor( QObject *parent, const char *name, const QStringList &args );
+ Editor( TQObject *parent, const char *name, const TQStringList &args );
private:
class Private;
diff --git a/libkdepim/komposer/core/komposerIface.h b/libkdepim/komposer/core/komposerIface.h
index bf8877c6a..eecab2f3a 100644
--- a/libkdepim/komposer/core/komposerIface.h
+++ b/libkdepim/komposer/core/komposerIface.h
@@ -47,12 +47,12 @@ k_dcop:
/**
Add url as attachment with a user-defined comment.
*/
- virtual void addAttachment( const KURL &url, const QString &comment) = 0;
+ virtual void addAttachment( const KURL &url, const TQString &comment) = 0;
/**
Set message body.
*/
- virtual void setBody( const QString &body ) = 0;
+ virtual void setBody( const TQString &body ) = 0;
/**
Add attachment.
@@ -66,14 +66,14 @@ k_dcop:
@param paramValue Value of parameter of content type
@param contDisp Content disposition
*/
- virtual void addAttachment( const QString &name,
- const QCString &cte,
- const QByteArray &data,
- const QCString &type,
- const QCString &subType,
- const QCString &paramAttr,
- const QString &paramValue,
- const QCString &contDisp ) = 0;
+ virtual void addAttachment( const TQString &name,
+ const TQCString &cte,
+ const TQByteArray &data,
+ const TQCString &type,
+ const TQCString &subType,
+ const TQCString &paramAttr,
+ const TQString &paramValue,
+ const TQCString &contDisp ) = 0;
public:
KomposerIface( const char *name )
: DCOPObject( name )
diff --git a/libkdepim/komposer/core/plugin.cpp b/libkdepim/komposer/core/plugin.cpp
index 5706b0d08..41af47cd9 100644
--- a/libkdepim/komposer/core/plugin.cpp
+++ b/libkdepim/komposer/core/plugin.cpp
@@ -24,7 +24,7 @@
#include "core.h"
#include <kdebug.h>
-#include <qstring.h>
+#include <tqstring.h>
namespace Komposer
{
@@ -35,8 +35,8 @@ public:
//Core* core;
};
-Plugin::Plugin( QObject *parent, const char *name, const QStringList & )
- : QObject( parent, name ), d( new Private )
+Plugin::Plugin( TQObject *parent, const char *name, const TQStringList & )
+ : TQObject( parent, name ), d( new Private )
{
//d->core = core;
}
diff --git a/libkdepim/komposer/core/plugin.h b/libkdepim/komposer/core/plugin.h
index 402a7bc81..2dddd09f4 100644
--- a/libkdepim/komposer/core/plugin.h
+++ b/libkdepim/komposer/core/plugin.h
@@ -22,14 +22,14 @@
#ifndef KOMPOSER_PLUGIN_H
#define KOMPOSER_PLUGIN_H
-#include <qobject.h>
+#include <tqobject.h>
#include <kxmlguiclient.h>
namespace Komposer
{
class Core;
- class Plugin : public QObject,
+ class Plugin : public TQObject,
virtual public KXMLGUIClient
{
Q_OBJECT
@@ -37,7 +37,7 @@ namespace Komposer
virtual ~Plugin();
signals:
- void statusMessage( const QString & );
+ void statusMessage( const TQString & );
void readyForUnload();
protected slots:
@@ -63,7 +63,7 @@ namespace Komposer
Core *core() const;
protected:
friend class PluginManager;
- Plugin( QObject *parent, const char *name, const QStringList& args = QStringList() );
+ Plugin( TQObject *parent, const char *name, const TQStringList& args = TQStringList() );
private:
class Private;
diff --git a/libkdepim/komposer/core/pluginmanager.cpp b/libkdepim/komposer/core/pluginmanager.cpp
index 82e7f0e9b..c7cf74927 100644
--- a/libkdepim/komposer/core/pluginmanager.cpp
+++ b/libkdepim/komposer/core/pluginmanager.cpp
@@ -24,11 +24,11 @@
#include "plugin.h"
-#include <qapplication.h>
-#include <qfile.h>
-#include <qregexp.h>
-#include <qtimer.h>
-#include <qvaluestack.h>
+#include <tqapplication.h>
+#include <tqfile.h>
+#include <tqregexp.h>
+#include <tqtimer.h>
+#include <tqvaluestack.h>
#include <kapplication.h>
#include <kdebug.h>
@@ -48,11 +48,11 @@ class PluginManager::Private
{
public:
// All available plugins, regardless of category, and loaded or not
- QValueList<KPluginInfo*> plugins;
+ TQValueList<KPluginInfo*> plugins;
// Dict of all currently loaded plugins, mapping the KPluginInfo to
// a plugin
- QMap<KPluginInfo*, Plugin*> loadedPlugins;
+ TQMap<KPluginInfo*, Plugin*> loadedPlugins;
// The plugin manager's mode. The mode is StartingUp until loadAllPlugins()
// has finished loading the plugins, after which it is set to Running.
@@ -63,11 +63,11 @@ public:
KSharedConfig::Ptr config;
// Plugins pending for loading
- QValueStack<QString> pluginsToLoad;
+ TQValueStack<TQString> pluginsToLoad;
};
-PluginManager::PluginManager( QObject *parent )
- : QObject( parent )
+PluginManager::PluginManager( TQObject *parent )
+ : TQObject( parent )
{
d = new Private;
@@ -79,11 +79,11 @@ PluginManager::PluginManager( QObject *parent )
d->shutdownMode = Private::StartingUp;
KSettings::Dispatcher::self()->registerInstance( KGlobal::instance(),
- this, SLOT( loadAllPlugins() ) );
+ this, TQT_SLOT( loadAllPlugins() ) );
d->plugins = KPluginInfo::fromServices(
- KTrader::self()->query( QString::fromLatin1( "Komposer/Plugin" ),
- QString::fromLatin1( "[X-Komposer-Version] == 1" ) ) );
+ KTrader::self()->query( TQString::fromLatin1( "Komposer/Plugin" ),
+ TQString::fromLatin1( "[X-Komposer-Version] == 1" ) ) );
}
PluginManager::~PluginManager()
@@ -100,11 +100,11 @@ PluginManager::~PluginManager()
}
// Quick cleanup of the remaining plugins, hope it helps
- QMap<KPluginInfo*, Plugin*>::ConstIterator it;
+ TQMap<KPluginInfo*, Plugin*>::ConstIterator it;
for ( it = d->loadedPlugins.begin(); it != d->loadedPlugins.end(); /* EMPTY */ )
{
// Remove causes the iterator to become invalid, so pre-increment first
- QMap<KPluginInfo*, Plugin*>::ConstIterator nextIt( it );
+ TQMap<KPluginInfo*, Plugin*>::ConstIterator nextIt( it );
++nextIt;
kdWarning() << k_funcinfo << "Deleting stale plugin '"
<< it.data()->name() << "'" << endl;
@@ -115,14 +115,14 @@ PluginManager::~PluginManager()
delete d;
}
-QValueList<KPluginInfo*>
-PluginManager::availablePlugins( const QString &category ) const
+TQValueList<KPluginInfo*>
+PluginManager::availablePlugins( const TQString &category ) const
{
if ( category.isEmpty() )
return d->plugins;
- QValueList<KPluginInfo*> result;
- QValueList<KPluginInfo*>::ConstIterator it;
+ TQValueList<KPluginInfo*> result;
+ TQValueList<KPluginInfo*>::ConstIterator it;
for ( it = d->plugins.begin(); it != d->plugins.end(); ++it )
{
if ( ( *it )->category() == category )
@@ -132,11 +132,11 @@ PluginManager::availablePlugins( const QString &category ) const
return result;
}
-QMap<KPluginInfo*, Plugin*>
-PluginManager::loadedPlugins( const QString &category ) const
+TQMap<KPluginInfo*, Plugin*>
+PluginManager::loadedPlugins( const TQString &category ) const
{
- QMap<KPluginInfo*, Plugin*> result;
- QMap<KPluginInfo*, Plugin*>::ConstIterator it;
+ TQMap<KPluginInfo*, Plugin*> result;
+ TQMap<KPluginInfo*, Plugin*>::ConstIterator it;
for ( it = d->loadedPlugins.begin(); it != d->loadedPlugins.end(); ++it )
{
if ( category.isEmpty() || it.key()->category() == category )
@@ -158,27 +158,27 @@ PluginManager::shutdown()
if ( d->loadedPlugins.empty() ) {
d->shutdownMode = Private::DoneShutdown;
} else {
- QMap<KPluginInfo*, Plugin*>::ConstIterator it;
+ TQMap<KPluginInfo*, Plugin*>::ConstIterator it;
for ( it = d->loadedPlugins.begin(); it != d->loadedPlugins.end(); /* EMPTY */ )
{
// Remove causes the iterator to become invalid, so pre-increment first
- QMap<KPluginInfo*, Plugin*>::ConstIterator nextIt( it );
+ TQMap<KPluginInfo*, Plugin*>::ConstIterator nextIt( it );
++nextIt;
it.data()->aboutToUnload();
it = nextIt;
}
}
- QTimer::singleShot( 3000, this, SLOT(slotShutdownTimeout()) );
+ TQTimer::singleShot( 3000, this, TQT_SLOT(slotShutdownTimeout()) );
}
void
PluginManager::slotPluginReadyForUnload()
{
- // Using QObject::sender() is on purpose here, because otherwise all
+ // Using TQObject::sender() is on purpose here, because otherwise all
// plugins would have to pass 'this' as parameter, which makes the API
// less clean for plugin authors
- Plugin* plugin = dynamic_cast<Plugin*>( const_cast<QObject*>( sender() ) );
+ Plugin* plugin = dynamic_cast<Plugin*>( const_cast<TQObject*>( sender() ) );
if ( !plugin )
{
kdWarning() << k_funcinfo << "Calling object is not a plugin!" << endl;
@@ -198,14 +198,14 @@ PluginManager::slotShutdownTimeout()
return;
#ifndef NDEBUG
- QStringList remaining;
- for ( QMap<KPluginInfo*, Plugin*>::ConstIterator it = d->loadedPlugins.begin();
+ TQStringList remaining;
+ for ( TQMap<KPluginInfo*, Plugin*>::ConstIterator it = d->loadedPlugins.begin();
it != d->loadedPlugins.end(); ++it )
remaining.append( it.key()->pluginName() );
kdWarning() << k_funcinfo << "Some plugins didn't shutdown in time!" << endl
<< "Remaining plugins: "
- << remaining.join( QString::fromLatin1( ", " ) ) << endl
+ << remaining.join( TQString::fromLatin1( ", " ) ) << endl
<< "Forcing Komposer shutdown now." << endl;
#endif
@@ -228,19 +228,19 @@ PluginManager::loadAllPlugins()
if ( !d->config )
d->config = KSharedConfig::openConfig( "komposerrc" );
- QMap<QString, QString> entries = d->config->entryMap(
- QString::fromLatin1( "Plugins" ) );
+ TQMap<TQString, TQString> entries = d->config->entryMap(
+ TQString::fromLatin1( "Plugins" ) );
- QMap<QString, QString>::Iterator it;
+ TQMap<TQString, TQString>::Iterator it;
for ( it = entries.begin(); it != entries.end(); ++it )
{
- QString key = it.key();
- if ( key.endsWith( QString::fromLatin1( "Enabled" ) ) )
+ TQString key = it.key();
+ if ( key.endsWith( TQString::fromLatin1( "Enabled" ) ) )
{
key.setLength( key.length() - 7 );
//kdDebug() << k_funcinfo << "Set " << key << " to " << it.data() << endl;
- if ( it.data() == QString::fromLatin1( "true" ) )
+ if ( it.data() == TQString::fromLatin1( "true" ) )
{
if ( !plugin( key ) )
d->pluginsToLoad.push( key );
@@ -257,7 +257,7 @@ PluginManager::loadAllPlugins()
}
// Schedule the plugins to load
- QTimer::singleShot( 0, this, SLOT( slotLoadNextPlugin() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( slotLoadNextPlugin() ) );
}
void PluginManager::slotLoadNextPlugin()
@@ -272,31 +272,31 @@ void PluginManager::slotLoadNextPlugin()
return;
}
- QString key = d->pluginsToLoad.pop();
+ TQString key = d->pluginsToLoad.pop();
loadPluginInternal( key );
// Schedule the next run unconditionally to avoid code duplication on the
// allPluginsLoaded() signal's handling. This has the added benefit that
// the signal is delayed one event loop, so the accounts are more likely
// to be instantiated.
- QTimer::singleShot( 0, this, SLOT( slotLoadNextPlugin() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( slotLoadNextPlugin() ) );
}
Plugin*
-PluginManager::loadPlugin( const QString &pluginId,
+PluginManager::loadPlugin( const TQString &pluginId,
PluginLoadMode mode /* = LoadSync */ )
{
if ( mode == LoadSync ) {
return loadPluginInternal( pluginId );
} else {
d->pluginsToLoad.push( pluginId );
- QTimer::singleShot( 0, this, SLOT( slotLoadNextPlugin() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( slotLoadNextPlugin() ) );
return 0;
}
}
Plugin*
-PluginManager::loadPluginInternal( const QString &pluginId )
+PluginManager::loadPluginInternal( const TQString &pluginId )
{
KPluginInfo* info = infoForPluginId( pluginId );
if ( !info ) {
@@ -310,18 +310,18 @@ PluginManager::loadPluginInternal( const QString &pluginId )
int error = 0;
Plugin *plugin = KParts::ComponentFactory::createInstanceFromQuery<Komposer::Plugin>(
- QString::fromLatin1( "Komposer/Plugin" ),
- QString::fromLatin1( "[X-KDE-PluginInfo-Name]=='%1'" ).arg( pluginId ),
- this, 0, QStringList(), &error );
+ TQString::fromLatin1( "Komposer/Plugin" ),
+ TQString::fromLatin1( "[X-KDE-PluginInfo-Name]=='%1'" ).arg( pluginId ),
+ this, 0, TQStringList(), &error );
if ( plugin ) {
d->loadedPlugins.insert( info, plugin );
info->setPluginEnabled( true );
- connect( plugin, SIGNAL(destroyed(QObject*)),
- this, SLOT(slotPluginDestroyed(QObject*)) );
- connect( plugin, SIGNAL(readyForUnload()),
- this, SLOT(slotPluginReadyForUnload()) );
+ connect( plugin, TQT_SIGNAL(destroyed(TQObject*)),
+ this, TQT_SLOT(slotPluginDestroyed(TQObject*)) );
+ connect( plugin, TQT_SIGNAL(readyForUnload()),
+ this, TQT_SLOT(slotPluginReadyForUnload()) );
kdDebug() << k_funcinfo << "Successfully loaded plugin '"
<< pluginId << "'" << endl;
@@ -365,9 +365,9 @@ PluginManager::loadPluginInternal( const QString &pluginId )
}
bool
-PluginManager::unloadPlugin( const QString &spec )
+PluginManager::unloadPlugin( const TQString &spec )
{
- QMap<KPluginInfo*, Plugin*>::ConstIterator it;
+ TQMap<KPluginInfo*, Plugin*>::ConstIterator it;
for ( it = d->loadedPlugins.begin(); it != d->loadedPlugins.end(); ++it )
{
if ( it.key()->pluginName() == spec )
@@ -381,9 +381,9 @@ PluginManager::unloadPlugin( const QString &spec )
}
void
-PluginManager::slotPluginDestroyed( QObject *plugin )
+PluginManager::slotPluginDestroyed( TQObject *plugin )
{
- QMap<KPluginInfo*, Plugin*>::Iterator it;
+ TQMap<KPluginInfo*, Plugin*>::Iterator it;
for ( it = d->loadedPlugins.begin(); it != d->loadedPlugins.end(); ++it )
{
if ( it.data() == plugin )
@@ -397,12 +397,12 @@ PluginManager::slotPluginDestroyed( QObject *plugin )
{
// Use a timer to make sure any pending deleteLater() calls have
// been handled first
- QTimer::singleShot( 0, this, SLOT(slotShutdownDone()) );
+ TQTimer::singleShot( 0, this, TQT_SLOT(slotShutdownDone()) );
}
}
Plugin*
-PluginManager::plugin( const QString &pluginId ) const
+PluginManager::plugin( const TQString &pluginId ) const
{
KPluginInfo *info = infoForPluginId( pluginId );
if ( !info )
@@ -417,46 +417,46 @@ PluginManager::plugin( const QString &pluginId ) const
QString
PluginManager::pluginName( const Plugin *plugin ) const
{
- QMap<KPluginInfo*, Plugin*>::ConstIterator it;
+ TQMap<KPluginInfo*, Plugin*>::ConstIterator it;
for ( it = d->loadedPlugins.begin(); it != d->loadedPlugins.end(); ++it )
{
if ( it.data() == plugin )
return it.key()->name();
}
- return QString::fromLatin1( "Unknown" );
+ return TQString::fromLatin1( "Unknown" );
}
QString
PluginManager::pluginId( const Plugin *plugin ) const
{
- QMap<KPluginInfo*, Plugin*>::ConstIterator it;
+ TQMap<KPluginInfo*, Plugin*>::ConstIterator it;
for ( it = d->loadedPlugins.begin(); it != d->loadedPlugins.end(); ++it )
{
if ( it.data() == plugin )
return it.key()->pluginName();
}
- return QString::fromLatin1( "unknown" );
+ return TQString::fromLatin1( "unknown" );
}
QString
PluginManager::pluginIcon( const Plugin *plugin ) const
{
- QMap<KPluginInfo*, Plugin*>::ConstIterator it;
+ TQMap<KPluginInfo*, Plugin*>::ConstIterator it;
for ( it = d->loadedPlugins.begin(); it != d->loadedPlugins.end(); ++it )
{
if ( it.data() == plugin )
return it.key()->icon();
}
- return QString::fromLatin1( "Unknown" );
+ return TQString::fromLatin1( "Unknown" );
}
KPluginInfo*
-PluginManager::infoForPluginId( const QString &pluginId ) const
+PluginManager::infoForPluginId( const TQString &pluginId ) const
{
- QValueList<KPluginInfo*>::ConstIterator it;
+ TQValueList<KPluginInfo*>::ConstIterator it;
for ( it = d->plugins.begin(); it != d->plugins.end(); ++it )
{
if ( ( *it )->pluginName() == pluginId )
@@ -467,7 +467,7 @@ PluginManager::infoForPluginId( const QString &pluginId ) const
}
bool
-PluginManager::setPluginEnabled( const QString &pluginId, bool enabled /* = true */ )
+PluginManager::setPluginEnabled( const TQString &pluginId, bool enabled /* = true */ )
{
if ( !d->config )
d->config = KSharedConfig::openConfig( "komposerrc" );
@@ -478,7 +478,7 @@ PluginManager::setPluginEnabled( const QString &pluginId, bool enabled /* = true
if ( !infoForPluginId( pluginId ) )
return false;
- d->config->writeEntry( pluginId + QString::fromLatin1( "Enabled" ), enabled );
+ d->config->writeEntry( pluginId + TQString::fromLatin1( "Enabled" ), enabled );
d->config->sync();
return true;
diff --git a/libkdepim/komposer/core/pluginmanager.h b/libkdepim/komposer/core/pluginmanager.h
index b19f8ad27..179cf48de 100644
--- a/libkdepim/komposer/core/pluginmanager.h
+++ b/libkdepim/komposer/core/pluginmanager.h
@@ -24,11 +24,11 @@
#ifndef KOMPOSER_PLUGINMANAGER_H
#define KOMPOSER_PLUGINMANAGER_H
-#include <qmap.h>
-#include <qobject.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qvaluelist.h>
+#include <tqmap.h>
+#include <tqobject.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqvaluelist.h>
class KPluginInfo;
@@ -42,7 +42,7 @@ namespace Komposer
Q_OBJECT
public:
- PluginManager( QObject * );
+ PluginManager( TQObject * );
~PluginManager();
@@ -56,16 +56,16 @@ namespace Komposer
* You can query all information on the plugins through the @ref KPluginInfo
* interface.
*/
- QValueList<KPluginInfo*> availablePlugins( const QString &category
- = QString::null ) const;
+ TQValueList<KPluginInfo*> availablePlugins( const TQString &category
+ = TQString::null ) const;
/**
* Returns a list of all plugins that are actually loaded.
* If you omit the category you get all, otherwise it's a filtered list.
* See also @ref availablePlugins().
*/
- QMap<KPluginInfo*, Plugin*> loadedPlugins( const QString &category
- = QString::null ) const;
+ TQMap<KPluginInfo*, Plugin*> loadedPlugins( const TQString &category
+ = TQString::null ) const;
/**
* @brief Search by plugin name. This is the key used as X-KDE-PluginInfo-Name
@@ -78,7 +78,7 @@ namespace Komposer
* which returns
* the pointer to the plugin if it's already loaded.
*/
- Plugin* plugin( const QString &pluginName ) const;
+ Plugin* plugin( const TQString &pluginName ) const;
/**
* @brief Return the short user-visible name of the plugin.
@@ -87,7 +87,7 @@ namespace Komposer
*
* @return The name of the protocol, in the user's locale.
*/
- QString pluginName( const Plugin *plugin ) const;
+ TQString pluginName( const Plugin *plugin ) const;
/**
* @brief Return the internal name of the plugin.
@@ -97,12 +97,12 @@ namespace Komposer
*
* @return The name of the protocol, in the user's locale.
*/
- QString pluginId( const Plugin *plugin ) const;
+ TQString pluginId( const Plugin *plugin ) const;
/**
* @brief Unload the plugin specified by @p pluginName
*/
- bool unloadPlugin( const QString &pluginName );
+ bool unloadPlugin( const TQString &pluginName );
/**
* @brief Retrieve the name of the icon for a @ref Plugin.
@@ -110,7 +110,7 @@ namespace Komposer
* @return An empty string if the given plugin is not loaded
* or the filename of the icon to use.
*/
- QString pluginIcon( const Plugin *plugin ) const;
+ TQString pluginIcon( const Plugin *plugin ) const;
/**
* Shuts down the plugin manager on Komposer shutdown, but first
@@ -138,7 +138,7 @@ namespace Komposer
*
* Returns false when no appropriate plugin can be found.
*/
- bool setPluginEnabled( const QString &name, bool enabled = true );
+ bool setPluginEnabled( const TQString &name, bool enabled = true );
/**
* Plugin loading mode. Used by @loadPlugin. Code that doesn't want to block
@@ -158,7 +158,7 @@ namespace Komposer
*
* See also @ref plugin().
*/
- Plugin* loadPlugin( const QString &pluginId, PluginLoadMode mode = LoadSync );
+ Plugin* loadPlugin( const TQString &pluginId, PluginLoadMode mode = LoadSync );
/**
* @brief Loads all the enabled plugins. Also used to reread the
@@ -197,7 +197,7 @@ namespace Komposer
/**
* @brief Cleans up some references if the plugin is destroyed
*/
- void slotPluginDestroyed( QObject *plugin );
+ void slotPluginDestroyed( TQObject *plugin );
/**
* shutdown() starts a timer, when it fires we force all plugins
@@ -231,7 +231,7 @@ namespace Komposer
* Called by @ref loadPlugin directly or through the queue for async plugin
* loading.
*/
- Plugin *loadPluginInternal( const QString &pluginId );
+ Plugin *loadPluginInternal( const TQString &pluginId );
/**
* @internal
@@ -240,7 +240,7 @@ namespace Komposer
*
* Returns a null pointer when no plugin info is found.
*/
- KPluginInfo *infoForPluginId( const QString &pluginId ) const;
+ KPluginInfo *infoForPluginId( const TQString &pluginId ) const;
private:
class Private;
Private *d;
diff --git a/libkdepim/komposer/core/prefsmodule.cpp b/libkdepim/komposer/core/prefsmodule.cpp
index b907154c4..7dd1673e9 100644
--- a/libkdepim/komposer/core/prefsmodule.cpp
+++ b/libkdepim/komposer/core/prefsmodule.cpp
@@ -27,24 +27,24 @@
#include <klocale.h>
#include <ktrader.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qbuttongroup.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqbuttongroup.h>
#include <kdepimmacros.h>
extern "C"
{
- KDE_EXPORT KCModule *create_komposerconfig( QWidget *parent, const char * ) {
+ KDE_EXPORT KCModule *create_komposerconfig( TQWidget *parent, const char * ) {
return new Komposer::PrefsModule( parent, "komposerprefs" );
}
}
using namespace Komposer;
-PrefsModule::PrefsModule( QWidget *parent, const char *name )
+PrefsModule::PrefsModule( TQWidget *parent, const char *name )
: KPrefsModule( Komposer::Prefs::self(), parent, name )
{
- QVBoxLayout *topLayout = new QVBoxLayout( this );
+ TQVBoxLayout *topLayout = new TQVBoxLayout( this );
EditorSelection *editors = new EditorSelection( i18n( "Editors" ),
Komposer::Prefs::self()->m_activeEditor,
@@ -70,26 +70,26 @@ PrefsModule::aboutData() const
}
-EditorSelection::EditorSelection( const QString &text, QString &reference,
- QWidget *parent )
+EditorSelection::EditorSelection( const TQString &text, TQString &reference,
+ TQWidget *parent )
: m_reference( reference )
{
- m_box = new QGroupBox( 0, Qt::Vertical, text, parent );
- QVBoxLayout *boxLayout = new QVBoxLayout( m_box->layout() );
+ m_box = new TQGroupBox( 0, Qt::Vertical, text, parent );
+ TQVBoxLayout *boxLayout = new TQVBoxLayout( m_box->layout() );
boxLayout->setAlignment( Qt::AlignTop );
m_editorsCombo = new KComboBox( m_box );
boxLayout->addWidget( m_editorsCombo );
- connect( m_editorsCombo, SIGNAL(activated(const QString&)),
- SLOT(slotActivated(const QString&)) );
+ connect( m_editorsCombo, TQT_SIGNAL(activated(const TQString&)),
+ TQT_SLOT(slotActivated(const TQString&)) );
}
EditorSelection::~EditorSelection()
{
}
-QGroupBox*
+TQGroupBox*
EditorSelection::groupBox() const
{
return m_box;
@@ -101,14 +101,14 @@ EditorSelection::readConfig()
m_editorsCombo->clear();
KTrader::OfferList editors = KTrader::self()->query(
- QString::fromLatin1( "Komposer/Editor" ) );
+ TQString::fromLatin1( "Komposer/Editor" ) );
KTrader::OfferList::ConstIterator it;
int i = 0;
for ( it = editors.begin(); it != editors.end(); ++it, ++i ) {
- if ( !(*it)->hasServiceType( QString::fromLatin1( "Komposer/Editor" ) ) )
+ if ( !(*it)->hasServiceType( TQString::fromLatin1( "Komposer/Editor" ) ) )
continue;
- QString name = (*it)->property( "X-KDE-KomposerIdentifier" ).toString();
+ TQString name = (*it)->property( "X-KDE-KomposerIdentifier" ).toString();
m_editorsCombo->insertItem( name );
if ( m_reference.contains( name ) )
m_editorsCombo->setCurrentItem( i );
@@ -122,14 +122,14 @@ void EditorSelection::writeConfig()
}
void
-EditorSelection::slotActivated( const QString &editor )
+EditorSelection::slotActivated( const TQString &editor )
{
if ( !editor.isEmpty() )
emit changed();
}
void
-EditorSelection::setItem( const QString &str )
+EditorSelection::setItem( const TQString &str )
{
for ( int i = 0; i < m_editorsCombo->count(); ++i ) {
if ( m_editorsCombo->text( i ) == str ) {
diff --git a/libkdepim/komposer/core/prefsmodule.h b/libkdepim/komposer/core/prefsmodule.h
index 95ad3eef4..640bb0f10 100644
--- a/libkdepim/komposer/core/prefsmodule.h
+++ b/libkdepim/komposer/core/prefsmodule.h
@@ -23,7 +23,7 @@
#include <kprefsdialog.h>
#include <kservice.h>
-#include <qmap.h>
+#include <tqmap.h>
class QGroupBox;
class QListViewItem;
@@ -36,7 +36,7 @@ namespace Komposer {
{
Q_OBJECT
public:
- PrefsModule( QWidget *parent=0, const char *name=0 );
+ PrefsModule( TQWidget *parent=0, const char *name=0 );
virtual const KAboutData *aboutData() const;
};
@@ -45,25 +45,25 @@ namespace Komposer {
Q_OBJECT
public:
- EditorSelection( const QString &text, QString &reference, QWidget *parent );
+ EditorSelection( const TQString &text, TQString &reference, TQWidget *parent );
~EditorSelection();
void readConfig();
void writeConfig();
- QGroupBox *groupBox() const;
+ TQGroupBox *groupBox() const;
private slots:
- void slotActivated( const QString & );
+ void slotActivated( const TQString & );
private:
- void setItem( const QString & );
+ void setItem( const TQString & );
private:
- QString &m_reference;
+ TQString &m_reference;
- QGroupBox *m_box;
+ TQGroupBox *m_box;
KComboBox *m_editorsCombo;
- QMap<QString, KService::Ptr> m_services;
+ TQMap<TQString, KService::Ptr> m_services;
};
}
diff --git a/libkdepim/komposer/core/tests/managertest.cpp b/libkdepim/komposer/core/tests/managertest.cpp
index feec64599..487a84c59 100644
--- a/libkdepim/komposer/core/tests/managertest.cpp
+++ b/libkdepim/komposer/core/tests/managertest.cpp
@@ -23,8 +23,8 @@
#include "pluginmanager.h"
using namespace Komposer;
-ManagerTest::ManagerTest( QObject* parent )
- : QObject( parent )
+ManagerTest::ManagerTest( TQObject* parent )
+ : TQObject( parent )
{
m_manager = new PluginManager( this );
}
diff --git a/libkdepim/komposer/core/tests/managertest.h b/libkdepim/komposer/core/tests/managertest.h
index 0148b29a8..397bfaf01 100644
--- a/libkdepim/komposer/core/tests/managertest.h
+++ b/libkdepim/komposer/core/tests/managertest.h
@@ -21,19 +21,19 @@
#ifndef MANAGERTEST_H
#define MANAGERTEST_H
-#include <qobject.h>
+#include <tqobject.h>
#include "tester.h"
namespace Komposer {
class PluginManager;
}
-class ManagerTest : public QObject,
+class ManagerTest : public TQObject,
public Tester
{
Q_OBJECT
public:
- ManagerTest( QObject* parent = 0 );
+ ManagerTest( TQObject* parent = 0 );
public slots:
void allTests();
diff --git a/libkdepim/komposer/core/tests/tester.cpp b/libkdepim/komposer/core/tests/tester.cpp
index 7fe8a90b2..b32c89644 100644
--- a/libkdepim/komposer/core/tests/tester.cpp
+++ b/libkdepim/komposer/core/tests/tester.cpp
@@ -21,8 +21,8 @@
#include "tester.h"
-Tester::Tester( QObject* parent )
- : QObject( parent )
+Tester::Tester( TQObject* parent )
+ : TQObject( parent )
{
}
diff --git a/libkdepim/komposer/core/tests/tester.h b/libkdepim/komposer/core/tests/tester.h
index 74ebd80d0..5981d681d 100644
--- a/libkdepim/komposer/core/tests/tester.h
+++ b/libkdepim/komposer/core/tests/tester.h
@@ -22,7 +22,7 @@
#define TESTER_H
#include <kdebug.h>
-#include <qstringlist.h>
+#include <tqstringlist.h>
#define CHECK( x, y ) check( __FILE__, __LINE__, #x, x, y )
@@ -42,7 +42,7 @@ public:
int testsFailed() const {
return m_errorList.count();
}
- QStringList errorList() const {
+ TQStringList errorList() const {
return m_errorList;
}
@@ -52,8 +52,8 @@ protected:
const T& result, const T& expectedResult )
{
if ( result != expectedResult ) {
- QString error;
- QTextStream ts( &error, IO_WriteOnly );
+ TQString error;
+ TQTextStream ts( &error, IO_WriteOnly );
ts << file << "["<< line <<"]:"
<<" failed on \""<< str <<"\""
<< "\ntests:\t\t result = "
@@ -64,7 +64,7 @@ protected:
++m_tests;
}
private:
- QStringList m_errorList;
+ TQStringList m_errorList;
int m_tests;
};
diff --git a/libkdepim/komposer/core/tests/testfactory.h b/libkdepim/komposer/core/tests/testfactory.h
index 588941d8e..9354e52ad 100644
--- a/libkdepim/komposer/core/tests/testfactory.h
+++ b/libkdepim/komposer/core/tests/testfactory.h
@@ -23,7 +23,7 @@
#include "managertest.h"
-#include <qasciidict.h>
+#include <tqasciidict.h>
#define ADD_TEST(x) addTest( #x, new x )
@@ -40,15 +40,15 @@ public:
{
int result = 0;
kdDebug()<<"Running tests..."<<endl;
- QAsciiDictIterator<Tester> it( m_tests );
+ TQAsciiDictIterator<Tester> it( m_tests );
for( ; it.current(); ++it ) {
Tester* test = it.current();
test->allTests();
- QStringList errorList = test->errorList();
+ TQStringList errorList = test->errorList();
if ( !errorList.empty() ) {
++result;
kdDebug()<< it.currentKey() <<" errors:" << endl;
- for ( QStringList::Iterator itr = errorList.begin();
+ for ( TQStringList::Iterator itr = errorList.begin();
itr != errorList.end(); ++itr ) {
kdDebug()<< "\t" << (*itr).latin1() <<endl;;
}
@@ -65,7 +65,7 @@ public:
m_tests.insert( name, test );
}
private:
- QAsciiDict<Tester> m_tests;
+ TQAsciiDict<Tester> m_tests;
};
#endif
diff --git a/libkdepim/komposer/core/tests/testmanager.cpp b/libkdepim/komposer/core/tests/testmanager.cpp
index d73fb6e8c..8895cfe9e 100644
--- a/libkdepim/komposer/core/tests/testmanager.cpp
+++ b/libkdepim/komposer/core/tests/testmanager.cpp
@@ -11,19 +11,19 @@
using namespace Komposer;
-TestManager::TestManager( QObject *parent )
- : QObject( parent )
+TestManager::TestManager( TQObject *parent )
+ : TQObject( parent )
{
m_manager = new PluginManager( this );
- connect( m_manager, SIGNAL(pluginLoaded(Plugin*)),
- SLOT(slotPluginLoaded(Plugin*)) );
- connect( m_manager, SIGNAL(allPluginsLoaded()),
- SLOT(slotAllPluginsLoaded()) );
+ connect( m_manager, TQT_SIGNAL(pluginLoaded(Plugin*)),
+ TQT_SLOT(slotPluginLoaded(Plugin*)) );
+ connect( m_manager, TQT_SIGNAL(allPluginsLoaded()),
+ TQT_SLOT(slotAllPluginsLoaded()) );
m_manager->loadAllPlugins();
- QValueList<KPluginInfo*> plugins = m_manager->availablePlugins();
+ TQValueList<KPluginInfo*> plugins = m_manager->availablePlugins();
kdDebug()<<"Number of available plugins is "<< plugins.count() <<endl;
- for ( QValueList<KPluginInfo*>::iterator it = plugins.begin(); it != plugins.end(); ++it ) {
+ for ( TQValueList<KPluginInfo*>::iterator it = plugins.begin(); it != plugins.end(); ++it ) {
KPluginInfo *i = ( *it );
kdDebug()<<"\tAvailable plugin "<< i->name()
<<", comment = "<< i->comment() <<endl;
diff --git a/libkdepim/komposer/core/tests/testmanager.h b/libkdepim/komposer/core/tests/testmanager.h
index 3bb805966..c5ff8517d 100644
--- a/libkdepim/komposer/core/tests/testmanager.h
+++ b/libkdepim/komposer/core/tests/testmanager.h
@@ -1,7 +1,7 @@
#ifndef TESTMANAGER_H
#define TESTMANAGER_H
-#include <qobject.h>
+#include <tqobject.h>
namespace Komposer {
class Plugin;
@@ -13,7 +13,7 @@ class TestManager : public QObject
{
Q_OBJECT
public:
- TestManager( QObject *parent );
+ TestManager( TQObject *parent );
public slots:
void slotPluginLoaded( Plugin *plugin );
diff --git a/libkdepim/komposer/plugins/default/defaulteditor.cpp b/libkdepim/komposer/plugins/default/defaulteditor.cpp
index d08fbee5e..b8abf17be 100644
--- a/libkdepim/komposer/plugins/default/defaulteditor.cpp
+++ b/libkdepim/komposer/plugins/default/defaulteditor.cpp
@@ -39,19 +39,19 @@
#include <kreplacedialog.h>
#include <kreplace.h>
-#include <qtextedit.h>
-#include <qwidget.h>
+#include <tqtextedit.h>
+#include <tqwidget.h>
typedef KGenericFactory<DefaultEditor> DefaultEditorFactory;
K_EXPORT_COMPONENT_FACTORY( libkomposer_defaulteditor,
DefaultEditorFactory( "komposer_defaulteditor" ) )
-DefaultEditor::DefaultEditor( QObject *parent, const char *name, const QStringList &args )
+DefaultEditor::DefaultEditor( TQObject *parent, const char *name, const TQStringList &args )
: Editor( parent, name, args ), m_textEdit( 0 )
{
setInstance( DefaultEditorFactory::instance() );
- m_textEdit = new QTextEdit( 0 );
+ m_textEdit = new TQTextEdit( 0 );
createActions( actionCollection() );
@@ -63,7 +63,7 @@ DefaultEditor::~DefaultEditor()
}
-QWidget*
+TQWidget*
DefaultEditor::widget()
{
return m_textEdit;
@@ -76,18 +76,18 @@ DefaultEditor::text() const
}
void
-DefaultEditor::setText( const QString &text )
+DefaultEditor::setText( const TQString &text )
{
m_textEdit->setText( text );
}
void
-DefaultEditor::changeSignature( const QString &sig )
+DefaultEditor::changeSignature( const TQString &sig )
{
- QString text = m_textEdit->text();
+ TQString text = m_textEdit->text();
int sigStart = text.findRev( "-- " );
- QString sigText = QString( "-- \n%1" ).arg( sig );
+ TQString sigText = TQString( "-- \n%1" ).arg( sig );
text.replace( sigStart, text.length(), sigText );
}
@@ -98,71 +98,71 @@ DefaultEditor::createActions( KActionCollection *ac )
//
// File Actions
//
- (void) KStdAction::open( this, SLOT(open()), ac );
- (void) KStdAction::openRecent( this, SLOT(openURL(const KURL &)), ac );
- (void) KStdAction::save( this, SLOT(save()), ac );
- (void) KStdAction::saveAs( this, SLOT(saveAs()), ac );
+ (void) KStdAction::open( this, TQT_SLOT(open()), ac );
+ (void) KStdAction::openRecent( this, TQT_SLOT(openURL(const KURL &)), ac );
+ (void) KStdAction::save( this, TQT_SLOT(save()), ac );
+ (void) KStdAction::saveAs( this, TQT_SLOT(saveAs()), ac );
//
// Edit Actions
//
- KAction *actionUndo = KStdAction::undo( m_textEdit, SLOT(undo()), ac );
+ KAction *actionUndo = KStdAction::undo( m_textEdit, TQT_SLOT(undo()), ac );
actionUndo->setEnabled( false );
- connect( m_textEdit, SIGNAL(undoAvailable(bool)),
- actionUndo, SLOT(setEnabled(bool)) );
+ connect( m_textEdit, TQT_SIGNAL(undoAvailable(bool)),
+ actionUndo, TQT_SLOT(setEnabled(bool)) );
- KAction *actionRedo = KStdAction::redo( m_textEdit, SLOT(redo()), ac );
+ KAction *actionRedo = KStdAction::redo( m_textEdit, TQT_SLOT(redo()), ac );
actionRedo->setEnabled( false );
- connect( m_textEdit, SIGNAL(redoAvailable(bool)),
- actionRedo, SLOT(setEnabled(bool)) );
+ connect( m_textEdit, TQT_SIGNAL(redoAvailable(bool)),
+ actionRedo, TQT_SLOT(setEnabled(bool)) );
- KAction *action_cut = KStdAction::cut( m_textEdit, SLOT(cut()), ac );
+ KAction *action_cut = KStdAction::cut( m_textEdit, TQT_SLOT(cut()), ac );
action_cut->setEnabled( false );
- connect( m_textEdit, SIGNAL(copyAvailable(bool)),
- action_cut, SLOT(setEnabled(bool)) );
+ connect( m_textEdit, TQT_SIGNAL(copyAvailable(bool)),
+ action_cut, TQT_SLOT(setEnabled(bool)) );
- KAction *action_copy = KStdAction::copy( m_textEdit, SLOT(copy()), ac );
+ KAction *action_copy = KStdAction::copy( m_textEdit, TQT_SLOT(copy()), ac );
action_copy->setEnabled( false );
- connect( m_textEdit, SIGNAL(copyAvailable(bool)),
- action_copy, SLOT(setEnabled(bool)) );
+ connect( m_textEdit, TQT_SIGNAL(copyAvailable(bool)),
+ action_copy, TQT_SLOT(setEnabled(bool)) );
- (void) KStdAction::print( this, SLOT(print()), ac );
+ (void) KStdAction::print( this, TQT_SLOT(print()), ac );
- (void) KStdAction::paste( m_textEdit, SLOT(paste()), ac );
+ (void) KStdAction::paste( m_textEdit, TQT_SLOT(paste()), ac );
(void) new KAction( i18n( "C&lear" ), 0,
- m_textEdit, SLOT(removeSelectedText()),
+ m_textEdit, TQT_SLOT(removeSelectedText()),
ac, "edit_clear" );
- (void) KStdAction::selectAll( m_textEdit, SLOT(selectAll()), ac );
+ (void) KStdAction::selectAll( m_textEdit, TQT_SLOT(selectAll()), ac );
//
// View Actions
//
- (void) KStdAction::zoomIn( m_textEdit, SLOT(zoomIn()), ac );
- (void) KStdAction::zoomOut( m_textEdit, SLOT(zoomOut()), ac );
+ (void) KStdAction::zoomIn( m_textEdit, TQT_SLOT(zoomIn()), ac );
+ (void) KStdAction::zoomOut( m_textEdit, TQT_SLOT(zoomOut()), ac );
//
// Character Formatting
//
m_actionBold = new KToggleAction( i18n("&Bold"), "text_bold", CTRL+Key_B,
ac, "format_bold" );
- connect( m_actionBold, SIGNAL(toggled(bool)),
- m_textEdit, SLOT(setBold(bool)) );
+ connect( m_actionBold, TQT_SIGNAL(toggled(bool)),
+ m_textEdit, TQT_SLOT(setBold(bool)) );
m_actionItalic = new KToggleAction( i18n("&Italic"), "text_italic", CTRL+Key_I,
ac, "format_italic" );
- connect( m_actionItalic, SIGNAL(toggled(bool)),
- m_textEdit, SLOT(setItalic(bool) ));
+ connect( m_actionItalic, TQT_SIGNAL(toggled(bool)),
+ m_textEdit, TQT_SLOT(setItalic(bool) ));
m_actionUnderline = new KToggleAction( i18n("&Underline"), "text_under", CTRL+Key_U,
ac, "format_underline" );
- connect( m_actionUnderline, SIGNAL(toggled(bool)),
- m_textEdit, SLOT(setUnderline(bool)) );
+ connect( m_actionUnderline, TQT_SIGNAL(toggled(bool)),
+ m_textEdit, TQT_SLOT(setUnderline(bool)) );
(void) new KAction( i18n("Text &Color..."), "colorpicker", 0,
- this, SLOT(formatColor()),
+ this, TQT_SLOT(formatColor()),
ac, "format_color" );
//
@@ -170,37 +170,37 @@ DefaultEditor::createActions( KActionCollection *ac )
//
m_actionFont = new KFontAction( i18n("&Font"), 0,
ac, "format_font" );
- connect( m_actionFont, SIGNAL(activated(const QString &)),
- m_textEdit, SLOT(setFamily(const QString &)) );
+ connect( m_actionFont, TQT_SIGNAL(activated(const TQString &)),
+ m_textEdit, TQT_SLOT(setFamily(const TQString &)) );
m_actionFontSize = new KFontSizeAction( i18n("Font &Size"), 0,
ac, "format_font_size" );
- connect( m_actionFontSize, SIGNAL(fontSizeChanged(int)),
- m_textEdit, SLOT(setPointSize(int)) );
+ connect( m_actionFontSize, TQT_SIGNAL(fontSizeChanged(int)),
+ m_textEdit, TQT_SLOT(setPointSize(int)) );
//
// Alignment
//
m_actionAlignLeft = new KToggleAction( i18n("Align &Left"), "text_left", 0,
ac, "format_align_left" );
- connect( m_actionAlignLeft, SIGNAL(toggled(bool)),
- this, SLOT(setAlignLeft(bool)) );
+ connect( m_actionAlignLeft, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(setAlignLeft(bool)) );
m_actionAlignCenter = new KToggleAction( i18n("Align &Center"), "text_center", 0,
ac, "format_align_center" );
- connect( m_actionAlignCenter, SIGNAL(toggled(bool)),
- this, SLOT(setAlignCenter(bool)) );
+ connect( m_actionAlignCenter, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(setAlignCenter(bool)) );
m_actionAlignRight = new KToggleAction( i18n("Align &Right"), "text_right", 0,
ac, "format_align_right" );
- connect( m_actionAlignRight, SIGNAL(toggled(bool)),
- this, SLOT(setAlignRight(bool)) );
+ connect( m_actionAlignRight, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(setAlignRight(bool)) );
m_actionAlignJustify = new KToggleAction( i18n("&Justify"), "text_block", 0,
ac, "format_align_justify" );
- connect( m_actionAlignJustify, SIGNAL(toggled(bool)),
- this, SLOT(setAlignJustify(bool)) );
+ connect( m_actionAlignJustify, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(setAlignJustify(bool)) );
m_actionAlignLeft->setExclusiveGroup( "alignment" );
m_actionAlignCenter->setExclusiveGroup( "alignment" );
@@ -210,19 +210,19 @@ DefaultEditor::createActions( KActionCollection *ac )
//
// Tools
//
- (void) KStdAction::spelling( this, SLOT(checkSpelling()), ac );
+ (void) KStdAction::spelling( this, TQT_SLOT(checkSpelling()), ac );
//
// Setup enable/disable
//
updateActions();
- connect( m_textEdit, SIGNAL(currentFontChanged(const QFont &)),
- this, SLOT( updateFont() ) );
- connect( m_textEdit, SIGNAL(currentFontChanged(const QFont &)),
- this, SLOT(updateCharFmt()) );
- connect( m_textEdit, SIGNAL(cursorPositionChanged(int, int)),
- this, SLOT(updateAligment()) );
+ connect( m_textEdit, TQT_SIGNAL(currentFontChanged(const TQFont &)),
+ this, TQT_SLOT( updateFont() ) );
+ connect( m_textEdit, TQT_SIGNAL(currentFontChanged(const TQFont &)),
+ this, TQT_SLOT(updateCharFmt()) );
+ connect( m_textEdit, TQT_SIGNAL(cursorPositionChanged(int, int)),
+ this, TQT_SLOT(updateAligment()) );
}
void
@@ -275,10 +275,10 @@ DefaultEditor::updateFont()
void
DefaultEditor::formatColor()
{
- QColor col;
+ TQColor col;
int s = KColorDialog::getColor( col, m_textEdit->color(), m_textEdit );
- if ( s != QDialog::Accepted )
+ if ( s != TQDialog::Accepted )
return;
m_textEdit->setColor( col );
@@ -343,7 +343,7 @@ DefaultEditor::saveAs()
void
DefaultEditor::checkSpelling()
{
- QString s;
+ TQString s;
if ( m_textEdit->hasSelectedText() )
s = m_textEdit->selectedText();
else
diff --git a/libkdepim/komposer/plugins/default/defaulteditor.h b/libkdepim/komposer/plugins/default/defaulteditor.h
index 18f47d147..158109e1e 100644
--- a/libkdepim/komposer/plugins/default/defaulteditor.h
+++ b/libkdepim/komposer/plugins/default/defaulteditor.h
@@ -35,14 +35,14 @@ class DefaultEditor : public Komposer::Editor
{
Q_OBJECT
public:
- DefaultEditor( QObject *parent, const char *name, const QStringList &args );
+ DefaultEditor( TQObject *parent, const char *name, const TQStringList &args );
~DefaultEditor();
- virtual QWidget *widget();
- virtual QString text() const;
+ virtual TQWidget *widget();
+ virtual TQString text() const;
public slots:
- virtual void setText( const QString &txt );
- virtual void changeSignature( const QString &txt );
+ virtual void setText( const TQString &txt );
+ virtual void changeSignature( const TQString &txt );
/**
* Displays a file dialog and loads the selected file.
@@ -99,7 +99,7 @@ protected slots:
void updateAligment();
private:
- QTextEdit *m_textEdit;
+ TQTextEdit *m_textEdit;
KToggleAction *m_actionBold;
KToggleAction *m_actionItalic;
diff --git a/libkdepim/komposer/test/test.cpp b/libkdepim/komposer/test/test.cpp
index 28c3344ce..5d4544d2a 100644
--- a/libkdepim/komposer/test/test.cpp
+++ b/libkdepim/komposer/test/test.cpp
@@ -27,7 +27,7 @@
#include <klocale.h>
#include <kuniqueapplication.h>
-#include <qlabel.h>
+#include <tqlabel.h>
static const char description[] =
I18N_NOOP( "KDE mail editing manager" );