summaryrefslogtreecommitdiffstats
path: root/kparts
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:46:43 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:46:43 +0000
commitffe8a83e053396df448e9413828527613ca3bd46 (patch)
treea73d4169e02df4a50f9a12cb165fcd0ab5bac7c6 /kparts
parent682bf3bfdcbcbb1fca85e8a36ed03e062e0555d5 (diff)
downloadtdelibs-ffe8a83e053396df448e9413828527613ca3bd46.tar.gz
tdelibs-ffe8a83e053396df448e9413828527613ca3bd46.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1157647 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kparts')
-rw-r--r--kparts/browserextension.cpp140
-rw-r--r--kparts/browserextension.h100
-rw-r--r--kparts/browserinterface.cpp22
-rw-r--r--kparts/browserinterface.h8
-rw-r--r--kparts/browserrun.cpp94
-rw-r--r--kparts/browserrun.h42
-rw-r--r--kparts/componentfactory.h90
-rw-r--r--kparts/dockmainwindow.cpp42
-rw-r--r--kparts/dockmainwindow.h6
-rw-r--r--kparts/event.cpp10
-rw-r--r--kparts/event.h24
-rw-r--r--kparts/factory.cpp14
-rw-r--r--kparts/factory.h18
-rw-r--r--kparts/genericfactory.h16
-rw-r--r--kparts/historyprovider.cpp16
-rw-r--r--kparts/historyprovider.h16
-rw-r--r--kparts/mainwindow.cpp40
-rw-r--r--kparts/mainwindow.h8
-rw-r--r--kparts/part.cpp112
-rw-r--r--kparts/part.h64
-rw-r--r--kparts/partmanager.cpp144
-rw-r--r--kparts/partmanager.h34
-rw-r--r--kparts/plugin.cpp104
-rw-r--r--kparts/plugin.h40
-rw-r--r--kparts/statusbarextension.cpp38
-rw-r--r--kparts/statusbarextension.h18
-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
37 files changed, 718 insertions, 718 deletions
diff --git a/kparts/browserextension.cpp b/kparts/browserextension.cpp
index cd4bca4b5..060d9220e 100644
--- a/kparts/browserextension.cpp
+++ b/kparts/browserextension.cpp
@@ -19,14 +19,14 @@
*/
#include "browserextension.h"
-#include <qapplication.h>
-#include <qclipboard.h>
-#include <qtimer.h>
-#include <qobjectlist.h>
-#include <qmetaobject.h>
-#include <qregexp.h>
-#include <qstrlist.h>
-#include <qstylesheet.h>
+#include <tqapplication.h>
+#include <tqclipboard.h>
+#include <tqtimer.h>
+#include <tqobjectlist.h>
+#include <tqmetaobject.h>
+#include <tqregexp.h>
+#include <tqstrlist.h>
+#include <tqstylesheet.h>
#include <kdebug.h>
#include <klocale.h>
@@ -73,8 +73,8 @@ struct URLArgsPrivate
newTab = false;
forcesNewWindow = false;
}
- QString contentType; // for POST
- QMap<QString, QString> metaData;
+ TQString contentType; // for POST
+ TQMap<TQString, TQString> metaData;
bool doPost;
bool redirectedRequest;
bool lockHistory;
@@ -94,7 +94,7 @@ URLArgs::URLArgs()
}
-URLArgs::URLArgs( bool _reload, int _xOffset, int _yOffset, const QString &_serviceType )
+URLArgs::URLArgs( bool _reload, int _xOffset, int _yOffset, const TQString &_serviceType )
{
reload = _reload;
xOffset = _xOffset;
@@ -136,7 +136,7 @@ URLArgs::~URLArgs()
d = 0;
}
-void URLArgs::setContentType( const QString & contentType )
+void URLArgs::setContentType( const TQString & contentType )
{
if (!d)
d = new URLArgsPrivate;
@@ -155,12 +155,12 @@ bool URLArgs::redirectedRequest () const
return d ? d->redirectedRequest : false;
}
-QString URLArgs::contentType() const
+TQString URLArgs::contentType() const
{
- return d ? d->contentType : QString::null;
+ return d ? d->contentType : TQString::null;
}
-QMap<QString, QString> &URLArgs::metaData()
+TQMap<TQString, TQString> &URLArgs::metaData()
{
if (!d)
d = new URLArgsPrivate;
@@ -276,7 +276,7 @@ WindowArgs &WindowArgs::operator=( const WindowArgs &args )
return *this;
}
-WindowArgs::WindowArgs( const QRect &_geometry, bool _fullscreen, bool _menuBarVisible,
+WindowArgs::WindowArgs( const TQRect &_geometry, bool _fullscreen, bool _menuBarVisible,
bool _toolBarsVisible, bool _statusBarVisible, bool _resizable )
{
d = 0;
@@ -340,10 +340,10 @@ public:
KURL m_delayedURL;
KParts::URLArgs m_delayedArgs;
};
- QValueList<DelayedRequest> m_requests;
+ TQValueList<DelayedRequest> m_requests;
bool m_urlDropHandlingEnabled;
KBitArray m_actionStatus;
- QMap<int, QString> m_actionText;
+ TQMap<int, TQString> m_actionText;
BrowserInterface *m_browserInterface;
};
@@ -356,7 +356,7 @@ static KStaticDeleter<BrowserExtension::ActionNumberMap> actionNumberMapsd;
BrowserExtension::BrowserExtension( KParts::ReadOnlyPart *parent,
const char *name )
-: QObject( parent, name), m_part( parent )
+: TQObject( parent, name), m_part( parent )
{
//kdDebug() << "BrowserExtension::BrowserExtension() " << this << endl;
d = new BrowserExtensionPrivate;
@@ -370,21 +370,21 @@ BrowserExtension::BrowserExtension( KParts::ReadOnlyPart *parent,
// they're supported or not
ActionSlotMap::ConstIterator it = s_actionSlotMap->begin();
ActionSlotMap::ConstIterator itEnd = s_actionSlotMap->end();
- QStrList slotNames = metaObject()->slotNames();
+ TQStrList slotNames = metaObject()->slotNames();
for ( int i=0 ; it != itEnd ; ++it, ++i )
{
// Does the extension have a slot with the name of this action ?
d->m_actionStatus.setBit( i, slotNames.contains( it.key()+"()" ) );
}
- connect( m_part, SIGNAL( completed() ),
- this, SLOT( slotCompleted() ) );
- connect( this, SIGNAL( openURLRequest( const KURL &, const KParts::URLArgs & ) ),
- this, SLOT( slotOpenURLRequest( const KURL &, const KParts::URLArgs & ) ) );
- connect( this, SIGNAL( enableAction( const char *, bool ) ),
- this, SLOT( slotEnableAction( const char *, bool ) ) );
- connect( this, SIGNAL( setActionText( const char *, const QString& ) ),
- this, SLOT( slotSetActionText( const char *, const QString& ) ) );
+ connect( m_part, TQT_SIGNAL( completed() ),
+ this, TQT_SLOT( slotCompleted() ) );
+ connect( this, TQT_SIGNAL( openURLRequest( const KURL &, const KParts::URLArgs & ) ),
+ this, TQT_SLOT( slotOpenURLRequest( const KURL &, const KParts::URLArgs & ) ) );
+ connect( this, TQT_SIGNAL( enableAction( const char *, bool ) ),
+ this, TQT_SLOT( slotEnableAction( const char *, bool ) ) );
+ connect( this, TQT_SIGNAL( setActionText( const char *, const TQString& ) ),
+ this, TQT_SLOT( slotSetActionText( const char *, const TQString& ) ) );
}
BrowserExtension::~BrowserExtension()
@@ -413,12 +413,12 @@ int BrowserExtension::yOffset()
return 0;
}
-void BrowserExtension::saveState( QDataStream &stream )
+void BrowserExtension::saveState( TQDataStream &stream )
{
stream << m_part->url() << (Q_INT32)xOffset() << (Q_INT32)yOffset();
}
-void BrowserExtension::restoreState( QDataStream &stream )
+void BrowserExtension::restoreState( TQDataStream &stream )
{
KURL u;
Q_INT32 xOfs, yOfs;
@@ -451,13 +451,13 @@ void BrowserExtension::slotCompleted()
void BrowserExtension::pasteRequest()
{
- QCString plain( "plain" );
- QString url = QApplication::clipboard()->text(plain, QClipboard::Selection).stripWhiteSpace();
+ TQCString plain( "plain" );
+ TQString url = TQApplication::clipboard()->text(plain, QClipboard::Selection).stripWhiteSpace();
// Remove linefeeds and any whitespace surrounding it.
- url.remove(QRegExp("[\\ ]*\\n+[\\ ]*"));
+ url.remove(TQRegExp("[\\ ]*\\n+[\\ ]*"));
// Check if it's a URL
- QStringList filters = KURIFilter::self()->pluginNames();
+ TQStringList filters = KURIFilter::self()->pluginNames();
filters.remove( "kuriikwsfilter" );
filters.remove( "localdomainurifilter" );
KURIFilterData filterData;
@@ -482,7 +482,7 @@ void BrowserExtension::pasteRequest()
else if ( KURIFilter::self()->filterURI( filterData, "kuriikwsfilter" ) && url.length() < 250 )
{
if ( KMessageBox::questionYesNo( m_part->widget(),
- i18n( "<qt>Do you want to search the Internet for <b>%1</b>?" ).arg( QStyleSheet::escape(url) ),
+ i18n( "<qt>Do you want to search the Internet for <b>%1</b>?" ).arg( TQStyleSheet::escape(url) ),
i18n( "Internet Search" ), KGuiItem( i18n( "&Search" ), "find"),
KStdGuiItem::cancel(), "MiddleClickSearch" ) == KMessageBox::Yes)
slotOpenURLRequest( filterData.uri(), KParts::URLArgs() );
@@ -496,7 +496,7 @@ void BrowserExtension::slotOpenURLRequest( const KURL &url, const KParts::URLArg
req.m_delayedURL = url;
req.m_delayedArgs = args;
d->m_requests.append( req );
- QTimer::singleShot( 0, this, SLOT( slotEmitOpenURLRequestDelayed() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( slotEmitOpenURLRequestDelayed() ) );
}
void BrowserExtension::slotEmitOpenURLRequestDelayed()
@@ -537,7 +537,7 @@ bool BrowserExtension::isActionEnabled( const char * name ) const
return d->m_actionStatus[ actionNumber ];
}
-void BrowserExtension::slotSetActionText( const char * name, const QString& text )
+void BrowserExtension::slotSetActionText( const char * name, const TQString& text )
{
kdDebug() << "BrowserExtension::slotSetActionText " << name << " " << text << endl;
ActionNumberMap::ConstIterator it = s_actionNumberMap->find( name );
@@ -549,13 +549,13 @@ void BrowserExtension::slotSetActionText( const char * name, const QString& text
kdWarning() << "BrowserExtension::slotSetActionText unknown action " << name << endl;
}
-QString BrowserExtension::actionText( const char * name ) const
+TQString BrowserExtension::actionText( const char * name ) const
{
int actionNumber = (*s_actionNumberMap)[ name ];
- QMap<int, QString>::ConstIterator it = d->m_actionText.find( actionNumber );
+ TQMap<int, TQString>::ConstIterator it = d->m_actionText.find( actionNumber );
if ( it != d->m_actionText.end() )
return *it;
- return QString::null;
+ return TQString::null;
}
// for compatibility
@@ -576,19 +576,19 @@ void BrowserExtension::createActionSlotMap()
assert(!s_actionSlotMap);
s_actionSlotMap = actionSlotMapsd.setObject( s_actionSlotMap, new ActionSlotMap );
- s_actionSlotMap->insert( "cut", SLOT( cut() ) );
- s_actionSlotMap->insert( "copy", SLOT( copy() ) );
- s_actionSlotMap->insert( "paste", SLOT( paste() ) );
- s_actionSlotMap->insert( "rename", SLOT( rename() ) );
- s_actionSlotMap->insert( "trash", SLOT( trash() ) );
- s_actionSlotMap->insert( "del", SLOT( del() ) );
- s_actionSlotMap->insert( "properties", SLOT( properties() ) );
- s_actionSlotMap->insert( "editMimeType", SLOT( editMimeType() ) );
- s_actionSlotMap->insert( "print", SLOT( print() ) );
+ s_actionSlotMap->insert( "cut", TQT_SLOT( cut() ) );
+ s_actionSlotMap->insert( "copy", TQT_SLOT( copy() ) );
+ s_actionSlotMap->insert( "paste", TQT_SLOT( paste() ) );
+ s_actionSlotMap->insert( "rename", TQT_SLOT( rename() ) );
+ s_actionSlotMap->insert( "trash", TQT_SLOT( trash() ) );
+ s_actionSlotMap->insert( "del", TQT_SLOT( del() ) );
+ s_actionSlotMap->insert( "properties", TQT_SLOT( properties() ) );
+ s_actionSlotMap->insert( "editMimeType", TQT_SLOT( editMimeType() ) );
+ s_actionSlotMap->insert( "print", TQT_SLOT( print() ) );
// Tricky. Those aren't actions in fact, but simply methods that a browserextension
// can have or not. No need to return them here.
- //s_actionSlotMap->insert( "reparseConfiguration", SLOT( reparseConfiguration() ) );
- //s_actionSlotMap->insert( "refreshMimeTypes", SLOT( refreshMimeTypes() ) );
+ //s_actionSlotMap->insert( "reparseConfiguration", TQT_SLOT( reparseConfiguration() ) );
+ //s_actionSlotMap->insert( "refreshMimeTypes", TQT_SLOT( refreshMimeTypes() ) );
// nothing for setSaveViewPropertiesLocally either
// Create the action-number map
@@ -603,15 +603,15 @@ void BrowserExtension::createActionSlotMap()
}
}
-BrowserExtension *BrowserExtension::childObject( QObject *obj )
+BrowserExtension *BrowserExtension::childObject( TQObject *obj )
{
if ( !obj || !obj->children() )
return 0L;
// we try to do it on our own, in hope that we are faster than
// queryList, which looks kind of big :-)
- const QObjectList *children = obj->children();
- QObjectListIt it( *children );
+ const TQObjectList *children = obj->children();
+ TQObjectListIt it( *children );
for (; it.current(); ++it )
if ( it.current()->inherits( "KParts::BrowserExtension" ) )
return static_cast<KParts::BrowserExtension *>( it.current() );
@@ -638,7 +638,7 @@ public:
}
BrowserHostExtension::BrowserHostExtension( KParts::ReadOnlyPart *parent, const char *name )
- : QObject( parent, name )
+ : TQObject( parent, name )
{
d = new BrowserHostExtensionPrivate;
d->m_part = parent;
@@ -649,14 +649,14 @@ BrowserHostExtension::~BrowserHostExtension()
delete d;
}
-QStringList BrowserHostExtension::frameNames() const
+TQStringList BrowserHostExtension::frameNames() const
{
- return QStringList();
+ return TQStringList();
}
-const QPtrList<KParts::ReadOnlyPart> BrowserHostExtension::frames() const
+const TQPtrList<KParts::ReadOnlyPart> BrowserHostExtension::frames() const
{
- return QPtrList<KParts::ReadOnlyPart>();
+ return TQPtrList<KParts::ReadOnlyPart>();
}
bool BrowserHostExtension::openURLInFrame( const KURL &, const KParts::URLArgs & )
@@ -664,15 +664,15 @@ bool BrowserHostExtension::openURLInFrame( const KURL &, const KParts::URLArgs &
return false;
}
-BrowserHostExtension *BrowserHostExtension::childObject( QObject *obj )
+BrowserHostExtension *BrowserHostExtension::childObject( TQObject *obj )
{
if ( !obj || !obj->children() )
return 0L;
// we try to do it on our own, in hope that we are faster than
// queryList, which looks kind of big :-)
- const QObjectList *children = obj->children();
- QObjectListIt it( *children );
+ const TQObjectList *children = obj->children();
+ TQObjectListIt it( *children );
for (; it.current(); ++it )
if ( it.current()->inherits( "KParts::BrowserHostExtension" ) )
return static_cast<KParts::BrowserHostExtension *>( it.current() );
@@ -684,7 +684,7 @@ void BrowserExtension::virtual_hook( int, void* )
{ /*BASE::virtual_hook( id, data );*/ }
BrowserHostExtension *
-BrowserHostExtension::findFrameParent(KParts::ReadOnlyPart *callingPart, const QString &frame)
+BrowserHostExtension::findFrameParent(KParts::ReadOnlyPart *callingPart, const TQString &frame)
{
FindFrameParentParams param;
param.parent = 0;
@@ -697,31 +697,31 @@ BrowserHostExtension::findFrameParent(KParts::ReadOnlyPart *callingPart, const Q
void BrowserHostExtension::virtual_hook( int, void* )
{ /*BASE::virtual_hook( id, data );*/ }
-LiveConnectExtension::LiveConnectExtension( KParts::ReadOnlyPart *parent, const char *name ) : QObject( parent, name) {}
+LiveConnectExtension::LiveConnectExtension( KParts::ReadOnlyPart *parent, const char *name ) : TQObject( parent, name) {}
-bool LiveConnectExtension::get( const unsigned long, const QString &, Type &, unsigned long &, QString & ) {
+bool LiveConnectExtension::get( const unsigned long, const TQString &, Type &, unsigned long &, TQString & ) {
return false;
}
-bool LiveConnectExtension::put( const unsigned long, const QString &, const QString & ) {
+bool LiveConnectExtension::put( const unsigned long, const TQString &, const TQString & ) {
return false;
}
-bool LiveConnectExtension::call( const unsigned long, const QString &, const QStringList &, Type &, unsigned long &, QString & ) {
+bool LiveConnectExtension::call( const unsigned long, const TQString &, const TQStringList &, Type &, unsigned long &, TQString & ) {
return false;
}
void LiveConnectExtension::unregister( const unsigned long ) {}
-LiveConnectExtension *LiveConnectExtension::childObject( QObject *obj )
+LiveConnectExtension *LiveConnectExtension::childObject( TQObject *obj )
{
if ( !obj || !obj->children() )
return 0L;
// we try to do it on our own, in hope that we are faster than
// queryList, which looks kind of big :-)
- const QObjectList *children = obj->children();
- QObjectListIt it( *children );
+ const TQObjectList *children = obj->children();
+ TQObjectListIt it( *children );
for (; it.current(); ++it )
if ( it.current()->inherits( "KParts::LiveConnectExtension" ) )
return static_cast<KParts::LiveConnectExtension *>( it.current() );
diff --git a/kparts/browserextension.h b/kparts/browserextension.h
index 2130f3741..5a3c0f7eb 100644
--- a/kparts/browserextension.h
+++ b/kparts/browserextension.h
@@ -23,17 +23,17 @@
#include <sys/types.h>
-#include <qpoint.h>
-#include <qptrlist.h>
-#include <qdatastream.h>
-#include <qstringlist.h>
-#include <qpair.h>
+#include <tqpoint.h>
+#include <tqptrlist.h>
+#include <tqdatastream.h>
+#include <tqstringlist.h>
+#include <tqpair.h>
#include <kparts/part.h>
#include <kparts/event.h>
class KFileItem;
-typedef QPtrList<KFileItem> KFileItemList;
+typedef TQPtrList<KFileItem> KFileItemList;
class QString;
namespace KParts {
@@ -60,14 +60,14 @@ struct KPARTS_EXPORT URLArgs
URLArgs( const URLArgs &args );
URLArgs &operator=( const URLArgs &args);
- URLArgs( bool reload, int xOffset, int yOffset, const QString &serviceType = QString::null );
+ URLArgs( bool reload, int xOffset, int yOffset, const TQString &serviceType = TQString::null );
virtual ~URLArgs();
/**
* This buffer can be used by the part to save and restore its contents.
* See KHTMLPart for instance.
*/
- QStringList docState;
+ TQStringList docState;
/**
* @p reload is set when the cache shouldn't be used (forced reload).
@@ -86,21 +86,21 @@ struct KPARTS_EXPORT URLArgs
/**
* The servicetype (usually mimetype) to use when opening the next URL.
*/
- QString serviceType;
+ TQString serviceType;
/**
* KHTML-specific field, contents of the HTTP POST data.
*/
- QByteArray postData;
+ TQByteArray postData;
/**
* KHTML-specific field, header defining the type of the POST data.
*/
- void setContentType( const QString & contentType );
+ void setContentType( const TQString & contentType );
/**
* KHTML-specific field, header defining the type of the POST data.
*/
- QString contentType() const;
+ TQString contentType() const;
/**
* KHTML-specific field, whether to do a POST instead of a GET,
* for the next openURL.
@@ -131,12 +131,12 @@ struct KPARTS_EXPORT URLArgs
* Meta-data to associate with the next KIO operation
* @see KIO::TransferJob etc.
*/
- QMap<QString, QString> &metaData();
+ TQMap<TQString, TQString> &metaData();
/**
* The frame in which to open the URL. KHTML/Konqueror-specific.
*/
- QString frameName;
+ TQString frameName;
/**
* If true, the part who asks for a URL to be opened can be 'trusted'
@@ -187,7 +187,7 @@ struct KPARTS_EXPORT WindowArgs
~WindowArgs();
WindowArgs( const WindowArgs &args );
WindowArgs &operator=( const WindowArgs &args );
- WindowArgs( const QRect &_geometry, bool _fullscreen, bool _menuBarVisible,
+ WindowArgs( const TQRect &_geometry, bool _fullscreen, bool _menuBarVisible,
bool _toolBarsVisible, bool _statusBarVisible, bool _resizable );
WindowArgs( int _x, int _y, int _width, int _height, bool _fullscreen,
bool _menuBarVisible, bool _toolBarsVisible,
@@ -228,7 +228,7 @@ public:
KURL url() const { return m_url; }
URLArgs args() const { return m_args; }
- static bool test( const QEvent *event ) { return Event::test( event, s_strOpenURLEvent ); }
+ static bool test( const TQEvent *event ) { return Event::test( event, s_strOpenURLEvent ); }
private:
static const char *s_strOpenURLEvent;
@@ -382,7 +382,7 @@ public:
* If you want to save additional properties, reimplement it
* but don't forget to call the parent method (probably first).
*/
- virtual void saveState( QDataStream &stream );
+ virtual void saveState( TQDataStream &stream );
/**
* Used by the browser to restore the view in the state
@@ -391,7 +391,7 @@ public:
* If you saved additional properties, reimplement it
* but don't forget to call the parent method (probably first).
*/
- virtual void restoreState( QDataStream &stream );
+ virtual void restoreState( TQDataStream &stream );
/**
* Returns whether url drop handling is enabled.
@@ -430,12 +430,12 @@ public:
* to query later for the text of the action, using this method.
* @since 3.5
*/
- QString actionText( const char * name ) const;
+ TQString actionText( const char * name ) const;
- typedef QMap<QCString,QCString> ActionSlotMap;
+ typedef TQMap<TQCString,TQCString> ActionSlotMap;
/**
* Returns a map containing the action names as keys and corresponding
- * SLOT()'ified method names as data entries.
+ * TQT_SLOT()'ified method names as data entries.
*
* This is very useful for
* the host component, when connecting the own signals with the
@@ -455,11 +455,11 @@ public:
* Connecting to the slot can be done like this:
*
* \code
- * connect( yourObject, SIGNAL( yourSignal() ),
+ * connect( yourObject, TQT_SIGNAL( yourSignal() ),
* extension, mapIterator.data() )
* \endcode
*
- * (where "mapIterator" is your QMap<QCString,QCString> iterator)
+ * (where "mapIterator" is your TQMap<TQCString,TQCString> iterator)
*/
static ActionSlotMap actionSlotMap();
@@ -473,7 +473,7 @@ public:
* Queries @p obj for a child object which inherits from this
* BrowserExtension class. Convenience method.
*/
- static BrowserExtension *childObject( QObject *obj );
+ static BrowserExtension *childObject( TQObject *obj );
/**
* Asks the hosting browser to perform a paste (using openURLRequestDelayed)
@@ -501,7 +501,7 @@ signals:
* See class documentation for the list of standard actions.
* @since 3.5
*/
- void setActionText( const char * name, const QString& text );
+ void setActionText( const char * name, const TQString& text );
/**
* Asks the host (browser) to open @p url.
@@ -539,7 +539,7 @@ signals:
/**
* Updates the URL shown in the browser's location bar to @p url.
*/
- void setLocationBarURL( const QString &url );
+ void setLocationBarURL( const TQString &url );
/**
* Sets the URL of an icon for the currently displayed page.
@@ -579,13 +579,13 @@ signals:
*/
void speedProgress( int bytesPerSecond );
- void infoMessage( const QString & );
+ void infoMessage( const TQString & );
/**
* Emit this to make the browser show a standard popup menu
* at the point @p global for the files @p items.
*/
- void popupMenu( const QPoint &global, const KFileItemList &items );
+ void popupMenu( const TQPoint &global, const KFileItemList &items );
/**
* Emit this to make the browser show a standard popup menu
@@ -593,9 +593,9 @@ signals:
*
* The GUI described by @p client is being merged with the popupmenu of the host
*/
- void popupMenu( KXMLGUIClient *client, const QPoint &global, const KFileItemList &items );
+ void popupMenu( KXMLGUIClient *client, const TQPoint &global, const KFileItemList &items );
- void popupMenu( KXMLGUIClient *client, const QPoint &global, const KFileItemList &items, const KParts::URLArgs &args, KParts::BrowserExtension::PopupFlags i );
+ void popupMenu( KXMLGUIClient *client, const TQPoint &global, const KFileItemList &items, const KParts::URLArgs &args, KParts::BrowserExtension::PopupFlags i );
/**
* Emit this to make the browser show a standard popup menu
@@ -605,8 +605,8 @@ signals:
* about this URL as possible, like the @p mimeType and the file type
* (@p mode: S_IFREG, S_IFDIR...)
*/
- void popupMenu( const QPoint &global, const KURL &url,
- const QString &mimeType, mode_t mode = (mode_t)-1 );
+ void popupMenu( const TQPoint &global, const KURL &url,
+ const TQString &mimeType, mode_t mode = (mode_t)-1 );
/**
* Emit this to make the browser show a standard popup menu
@@ -618,8 +618,8 @@ signals:
* The GUI described by @p client is being merged with the popupmenu of the host
*/
void popupMenu( KXMLGUIClient *client,
- const QPoint &global, const KURL &url,
- const QString &mimeType, mode_t mode = (mode_t)-1 );
+ const TQPoint &global, const KURL &url,
+ const TQString &mimeType, mode_t mode = (mode_t)-1 );
/**
* Emit this to make the browser show a standard popup menu
@@ -631,7 +631,7 @@ signals:
* The GUI described by @p client is being merged with the popupmenu of the host
*/
void popupMenu( KXMLGUIClient *client,
- const QPoint &global, const KURL &url,
+ const TQPoint &global, const KURL &url,
const KParts::URLArgs &args, KParts::BrowserExtension::PopupFlags i, mode_t mode = (mode_t)-1 );
/**
@@ -644,7 +644,7 @@ signals:
* Inform the hosting application about the current selection.
* Used when some text is selected.
*/
- void selectionInfo( const QString &text );
+ void selectionInfo( const TQString &text );
/**
* Inform the hosting application about the current selection.
* Used when a set of URLs is selected.
@@ -661,7 +661,7 @@ signals:
* Ask the hosting application to add a new HTML (aka Mozilla/Netscape)
* SideBar entry.
*/
- void addWebSideBar(const KURL &url, const QString& name);
+ void addWebSideBar(const KURL &url, const TQString& name);
/**
* Ask the hosting application to move the top level widget.
@@ -698,13 +698,13 @@ private slots:
void slotOpenURLRequest( const KURL &url, const KParts::URLArgs &args );
void slotEmitOpenURLRequestDelayed();
void slotEnableAction( const char *, bool );
- void slotSetActionText( const char*, const QString& );
+ void slotSetActionText( const char*, const TQString& );
private:
KParts::ReadOnlyPart *m_part;
URLArgs m_args;
public:
- typedef QMap<QCString,int> ActionNumberMap;
+ typedef TQMap<TQCString,int> ActionNumberMap;
private:
static ActionNumberMap * s_actionNumberMap;
@@ -735,21 +735,21 @@ public:
*
* Note that this method does not query the child objects recursively.
*/
- virtual QStringList frameNames() const;
+ virtual TQStringList frameNames() const;
/**
* Returns a list of pointers to all hosted child objects.
*
* Note that this method does not query the child objects recursively.
*/
- virtual const QPtrList<KParts::ReadOnlyPart> frames() const;
+ virtual const TQPtrList<KParts::ReadOnlyPart> frames() const;
/**
* Returns the part that contains @p frame and that may be accessed
* by @p callingPart
* @since 3.3
*/
- BrowserHostExtension *findFrameParent(KParts::ReadOnlyPart *callingPart, const QString &frame);
+ BrowserHostExtension *findFrameParent(KParts::ReadOnlyPart *callingPart, const TQString &frame);
/**
* Opens the given url in a hosted child frame. The frame name is specified in the
@@ -761,7 +761,7 @@ public:
* Queries @p obj for a child object which inherits from this
* BrowserHostExtension class. Convenience method.
*/
- static BrowserHostExtension *childObject( QObject *obj );
+ static BrowserHostExtension *childObject( TQObject *obj );
protected:
/** This 'enum' along with the structure below is NOT part of the public API.
@@ -774,7 +774,7 @@ protected:
{
BrowserHostExtension *parent;
KParts::ReadOnlyPart *callingPart;
- QString frame;
+ TQString frame;
};
virtual void virtual_hook( int id, void* data );
@@ -796,7 +796,7 @@ public:
enum Type {
TypeVoid=0, TypeBool, TypeFunction, TypeNumber, TypeObject, TypeString
};
- typedef QValueList<QPair<Type, QString> > ArgList;
+ typedef TQValueList<QPair<Type, TQString> > ArgList;
LiveConnectExtension( KParts::ReadOnlyPart *parent, const char *name = 0L );
@@ -804,26 +804,26 @@ public:
/**
* get a field value from objid, return true on success
*/
- virtual bool get( const unsigned long objid, const QString & field, Type & type, unsigned long & retobjid, QString & value );
+ virtual bool get( const unsigned long objid, const TQString & field, Type & type, unsigned long & retobjid, TQString & value );
/**
* put a field value in objid, return true on success
*/
- virtual bool put( const unsigned long objid, const QString & field, const QString & value );
+ virtual bool put( const unsigned long objid, const TQString & field, const TQString & value );
/**
* calls a function of objid, return true on success
*/
- virtual bool call( const unsigned long objid, const QString & func, const QStringList & args, Type & type, unsigned long & retobjid, QString & value );
+ virtual bool call( const unsigned long objid, const TQString & func, const TQStringList & args, Type & type, unsigned long & retobjid, TQString & value );
/**
* notifies the part that there is no reference anymore to objid
*/
virtual void unregister( const unsigned long objid );
- static LiveConnectExtension *childObject( QObject *obj );
+ static LiveConnectExtension *childObject( TQObject *obj );
signals:
/**
* notify an event from the part of object objid
*/
- virtual void partEvent( const unsigned long objid, const QString & event, const ArgList & args );
+ virtual void partEvent( const unsigned long objid, const TQString & event, const ArgList & args );
};
}
diff --git a/kparts/browserinterface.cpp b/kparts/browserinterface.cpp
index 77e12e2b8..fc9909a9f 100644
--- a/kparts/browserinterface.cpp
+++ b/kparts/browserinterface.cpp
@@ -1,15 +1,15 @@
#include "browserinterface.h"
-#include <qmetaobject.h>
+#include <tqmetaobject.h>
#include <config.h>
#include <private/qucomextra_p.h>
using namespace KParts;
-BrowserInterface::BrowserInterface( QObject *parent, const char *name )
- : QObject( parent, name )
+BrowserInterface::BrowserInterface( TQObject *parent, const char *name )
+ : TQObject( parent, name )
{
}
@@ -17,7 +17,7 @@ BrowserInterface::~BrowserInterface()
{
}
-void BrowserInterface::callMethod( const char *name, const QVariant &argument )
+void BrowserInterface::callMethod( const char *name, const TQVariant &argument )
{
int slot = metaObject()->findSlot( name );
@@ -25,28 +25,28 @@ void BrowserInterface::callMethod( const char *name, const QVariant &argument )
return;
QUObject o[ 2 ];
- QStringList strLst;
+ TQStringList strLst;
uint i;
switch ( argument.type() )
{
- case QVariant::Invalid:
+ case TQVariant::Invalid:
break;
- case QVariant::String:
+ case TQVariant::String:
static_QUType_QString.set( o + 1, argument.toString() );
break;
- case QVariant::StringList:
+ case TQVariant::StringList:
strLst = argument.toStringList();
static_QUType_ptr.set( o + 1, &strLst );
break;
- case QVariant::Int:
+ case TQVariant::Int:
static_QUType_int.set( o + 1, argument.toInt() );
break;
- case QVariant::UInt:
+ case TQVariant::UInt:
i = argument.toUInt();
static_QUType_ptr.set( o + 1, &i );
break;
- case QVariant::Bool:
+ case TQVariant::Bool:
static_QUType_bool.set( o + 1, argument.toBool() );
break;
default: return;
diff --git a/kparts/browserinterface.h b/kparts/browserinterface.h
index d74b64bb2..8d3f0ad98 100644
--- a/kparts/browserinterface.h
+++ b/kparts/browserinterface.h
@@ -1,8 +1,8 @@
#ifndef __browserinterface_h__
#define __browserinterface_h__
-#include <qobject.h>
-#include <qvariant.h>
+#include <tqobject.h>
+#include <tqvariant.h>
#include <kdelibs_export.h>
@@ -39,14 +39,14 @@ class KPARTS_EXPORT BrowserInterface : public QObject
{
Q_OBJECT
public:
- BrowserInterface( QObject *parent, const char *name = 0 );
+ BrowserInterface( TQObject *parent, const char *name = 0 );
virtual ~BrowserInterface();
/**
* Perform a dynamic invocation of a method in the BrowserInterface
* implementation. Methods are to be implemented as simple Qt slots.
*/
- void callMethod( const char *name, const QVariant &argument );
+ void callMethod( const char *name, const TQVariant &argument );
};
}
diff --git a/kparts/browserrun.cpp b/kparts/browserrun.cpp
index 0fd6126d3..b3e81f8d2 100644
--- a/kparts/browserrun.cpp
+++ b/kparts/browserrun.cpp
@@ -36,11 +36,11 @@ class BrowserRun::BrowserRunPrivate
{
public:
bool m_bHideErrorDialog;
- QString contentDisposition;
+ TQString contentDisposition;
};
BrowserRun::BrowserRun( const KURL& url, const KParts::URLArgs& args,
- KParts::ReadOnlyPart *part, QWidget* window,
+ KParts::ReadOnlyPart *part, TQWidget* window,
bool removeReferrer, bool trustedSource )
: KRun( url, window, 0 /*mode*/, false /*is_local_file known*/, false /* no GUI */ ),
m_args( args ), m_part( part ), m_window( window ),
@@ -52,7 +52,7 @@ BrowserRun::BrowserRun( const KURL& url, const KParts::URLArgs& args,
// BIC: merge with above ctor
BrowserRun::BrowserRun( const KURL& url, const KParts::URLArgs& args,
- KParts::ReadOnlyPart *part, QWidget* window,
+ KParts::ReadOnlyPart *part, TQWidget* window,
bool removeReferrer, bool trustedSource, bool hideErrorDialog )
: KRun( url, window, 0 /*mode*/, false /*is_local_file known*/, false /* no GUI */ ),
m_args( args ), m_part( part ), m_window( window ),
@@ -83,7 +83,7 @@ void BrowserRun::init()
if ( m_bIsLocalFile ) {
struct stat buff;
- if ( stat( QFile::encodeName(m_strURL.path()), &buff ) == -1 )
+ if ( stat( TQFile::encodeName(m_strURL.path()), &buff ) == -1 )
{
kdDebug(1000) << "BrowserRun::init : " << m_strURL.prettyURL() << " doesn't exist." << endl;
redirectToError( KIO::ERR_DOES_NOT_EXIST, m_strURL.path() );
@@ -116,7 +116,7 @@ void BrowserRun::scanFile()
if ( m_part )
{
- QString proto = m_part->url().protocol().lower();
+ TQString proto = m_part->url().protocol().lower();
if (proto == "https" || proto == "webdavs") {
m_args.metaData().insert("main_frame_request", "TRUE" );
@@ -146,10 +146,10 @@ void BrowserRun::scanFile()
job->addMetaData( m_args.metaData() );
job->setWindow( m_window );
- connect( job, SIGNAL( result( KIO::Job *)),
- this, SLOT( slotBrowserScanFinished(KIO::Job *)));
- connect( job, SIGNAL( mimetype( KIO::Job *, const QString &)),
- this, SLOT( slotBrowserMimetype(KIO::Job *, const QString &)));
+ connect( job, TQT_SIGNAL( result( KIO::Job *)),
+ this, TQT_SLOT( slotBrowserScanFinished(KIO::Job *)));
+ connect( job, TQT_SIGNAL( mimetype( KIO::Job *, const TQString &)),
+ this, TQT_SLOT( slotBrowserMimetype(KIO::Job *, const TQString &)));
m_job = job;
}
@@ -176,7 +176,7 @@ void BrowserRun::slotBrowserScanFinished(KIO::Job *job)
}
}
-void BrowserRun::slotBrowserMimetype( KIO::Job *_job, const QString &type )
+void BrowserRun::slotBrowserMimetype( KIO::Job *_job, const TQString &type )
{
Q_ASSERT( _job == m_job );
KIO::TransferJob *job = static_cast<KIO::TransferJob *>(m_job);
@@ -191,7 +191,7 @@ void BrowserRun::slotBrowserMimetype( KIO::Job *_job, const QString &type )
//kdDebug(1000) << "m_suggestedFilename=" << m_suggestedFilename << endl;
// Make a copy to avoid a dead reference
- QString _type = type;
+ TQString _type = type;
job->putOnHold();
m_job = 0;
@@ -200,16 +200,16 @@ void BrowserRun::slotBrowserMimetype( KIO::Job *_job, const QString &type )
foundMimeType( _type );
}
-BrowserRun::NonEmbeddableResult BrowserRun::handleNonEmbeddable( const QString& _mimeType )
+BrowserRun::NonEmbeddableResult BrowserRun::handleNonEmbeddable( const TQString& _mimeType )
{
- QString mimeType( _mimeType );
+ TQString mimeType( _mimeType );
Q_ASSERT( !m_bFinished ); // only come here if the mimetype couldn't be embedded
// Support for saving remote files.
if ( mimeType != "inode/directory" && // dirs can't be saved
!m_strURL.isLocalFile() )
{
if ( isTextExecutable(mimeType) )
- mimeType = QString::fromLatin1("text/plain"); // view, don't execute
+ mimeType = TQString::fromLatin1("text/plain"); // view, don't execute
kdDebug(1000) << "BrowserRun: ask for saving" << endl;
KService::Ptr offer = KServiceTypeProfile::preferredService(mimeType, "Application");
// ... -> ask whether to save
@@ -234,18 +234,18 @@ BrowserRun::NonEmbeddableResult BrowserRun::handleNonEmbeddable( const QString&
{
kdDebug(1000) << "BrowserRun: request comes from a POST, can't pass a URL to another app, need to save" << endl;
m_sMimeType = mimeType;
- QString extension;
- QString fileName = m_suggestedFilename.isEmpty() ? m_strURL.fileName() : m_suggestedFilename;
+ TQString extension;
+ TQString fileName = m_suggestedFilename.isEmpty() ? m_strURL.fileName() : m_suggestedFilename;
int extensionPos = fileName.findRev( '.' );
if ( extensionPos != -1 )
extension = fileName.mid( extensionPos ); // keep the '.'
- KTempFile tempFile( QString::null, extension );
+ KTempFile tempFile( TQString::null, extension );
KURL destURL;
destURL.setPath( tempFile.name() );
KIO::Job *job = KIO::file_copy( m_strURL, destURL, 0600, true /*overwrite*/, false /*no resume*/, true /*progress info*/ );
job->setWindow (m_window);
- connect( job, SIGNAL( result( KIO::Job *)),
- this, SLOT( slotCopyToTempFileResult(KIO::Job *)) );
+ connect( job, TQT_SIGNAL( result( KIO::Job *)),
+ this, TQT_SLOT( slotCopyToTempFileResult(KIO::Job *)) );
return Delayed; // We'll continue after the job has finished
}
}
@@ -264,7 +264,7 @@ BrowserRun::NonEmbeddableResult BrowserRun::handleNonEmbeddable( const QString&
}
//static
-bool BrowserRun::allowExecution( const QString &serviceType, const KURL &url )
+bool BrowserRun::allowExecution( const TQString &serviceType, const KURL &url )
{
if ( !isExecutable( serviceType ) )
return true;
@@ -276,11 +276,11 @@ bool BrowserRun::allowExecution( const QString &serviceType, const KURL &url )
i18n("Execute File?"), i18n("Execute") ) == KMessageBox::Continue );
}
-static QString makeQuestion( const KURL& url, const QString& mimeType, const QString& suggestedFilename )
+static TQString makeQuestion( const KURL& url, const TQString& mimeType, const TQString& suggestedFilename )
{
- QString surl = KStringHandler::csqueeze( url.prettyURL() );
+ TQString surl = KStringHandler::csqueeze( url.prettyURL() );
KMimeType::Ptr mime = KMimeType::mimeType( mimeType );
- QString comment = mimeType;
+ TQString comment = mimeType;
// Test if the mimeType is not recognize as octet-stream.
// If so then keep mime-type as comment
@@ -297,30 +297,30 @@ static QString makeQuestion( const KURL& url, const QString& mimeType, const QSt
}
//static
-BrowserRun::AskSaveResult BrowserRun::askSave( const KURL & url, KService::Ptr offer, const QString& mimeType, const QString & suggestedFilename )
+BrowserRun::AskSaveResult BrowserRun::askSave( const KURL & url, KService::Ptr offer, const TQString& mimeType, const TQString & suggestedFilename )
{
// SYNC SYNC SYNC SYNC SYNC SYNC SYNC SYNC SYNC SYNC SYNC SYNC SYNC SYNC
// NOTE: Keep this function in sync with kdebase/kcontrol/filetypes/filetypedetails.cpp
// FileTypeDetails::updateAskSave()
- QString question = makeQuestion( url, mimeType, suggestedFilename );
+ TQString question = makeQuestion( url, mimeType, suggestedFilename );
// Text used for the open button
- QString openText = (offer && !offer->name().isEmpty())
+ TQString openText = (offer && !offer->name().isEmpty())
? i18n("&Open with '%1'").arg(offer->name())
: i18n("&Open With...");
int choice = KMessageBox::questionYesNoCancel(
0L, question, url.host(),
KStdGuiItem::saveAs(), openText,
- QString::fromLatin1("askSave")+ mimeType ); // dontAskAgainName, KEEP IN SYNC!!!
+ TQString::fromLatin1("askSave")+ mimeType ); // dontAskAgainName, KEEP IN SYNC!!!
return choice == KMessageBox::Yes ? Save : ( choice == KMessageBox::No ? Open : Cancel );
// SYNC SYNC SYNC SYNC SYNC SYNC SYNC SYNC SYNC SYNC SYNC SYNC SYNC SYNC
}
//static
-BrowserRun::AskSaveResult BrowserRun::askEmbedOrSave( const KURL & url, const QString& mimeType, const QString & suggestedFilename, int flags )
+BrowserRun::AskSaveResult BrowserRun::askEmbedOrSave( const KURL & url, const TQString& mimeType, const TQString & suggestedFilename, int flags )
{
// SYNC SYNC SYNC SYNC SYNC SYNC SYNC SYNC SYNC SYNC SYNC SYNC SYNC SYNC
// NOTE: Keep this funcion in sync with kdebase/kcontrol/filetypes/filetypedetails.cpp
@@ -346,30 +346,30 @@ BrowserRun::AskSaveResult BrowserRun::askEmbedOrSave( const KURL & url, const QS
mimeType.startsWith( "print" ) ) )
return Open;
- QString question = makeQuestion( url, mimeType, suggestedFilename );
+ TQString question = makeQuestion( url, mimeType, suggestedFilename );
int choice = KMessageBox::questionYesNoCancel(
0L, question, url.host(),
KStdGuiItem::saveAs(), KGuiItem( i18n( "&Open" ), "fileopen"),
- QString::fromLatin1("askEmbedOrSave")+ mimeType ); // dontAskAgainName, KEEP IN SYNC!!!
+ TQString::fromLatin1("askEmbedOrSave")+ mimeType ); // dontAskAgainName, KEEP IN SYNC!!!
return choice == KMessageBox::Yes ? Save : ( choice == KMessageBox::No ? Open : Cancel );
// SYNC SYNC SYNC SYNC SYNC SYNC SYNC SYNC SYNC SYNC SYNC SYNC SYNC SYNC
}
// Default implementation, overridden in KHTMLRun
-void BrowserRun::save( const KURL & url, const QString & suggestedFilename )
+void BrowserRun::save( const KURL & url, const TQString & suggestedFilename )
{
simpleSave( url, suggestedFilename, m_window );
}
// static
-void BrowserRun::simpleSave( const KURL & url, const QString & suggestedFilename )
+void BrowserRun::simpleSave( const KURL & url, const TQString & suggestedFilename )
{
simpleSave (url, suggestedFilename, 0);
}
-void BrowserRun::simpleSave( const KURL & url, const QString & suggestedFilename,
- QWidget* window )
+void BrowserRun::simpleSave( const KURL & url, const TQString & suggestedFilename,
+ TQWidget* window )
{
// DownloadManager <-> konqueror integration
// find if the integration is enabled
@@ -379,18 +379,18 @@ void BrowserRun::simpleSave( const KURL & url, const QString & suggestedFilename
{
KConfig cfg("konquerorrc", false, false);
cfg.setGroup("HTML Settings");
- QString downloadManger = cfg.readPathEntry("DownloadManager");
+ TQString downloadManger = cfg.readPathEntry("DownloadManager");
if (!downloadManger.isEmpty())
{
// then find the download manager location
kdDebug(1000) << "Using: "<<downloadManger <<" as Download Manager" <<endl;
- QString cmd=KStandardDirs::findExe(downloadManger);
+ TQString cmd=KStandardDirs::findExe(downloadManger);
if (cmd.isEmpty())
{
- QString errMsg=i18n("The Download Manager (%1) could not be found in your $PATH ").arg(downloadManger);
- QString errMsgEx= i18n("Try to reinstall it \n\nThe integration with Konqueror will be disabled!");
+ TQString errMsg=i18n("The Download Manager (%1) could not be found in your $PATH ").arg(downloadManger);
+ TQString errMsgEx= i18n("Try to reinstall it \n\nThe integration with Konqueror will be disabled!");
KMessageBox::detailedSorry(0,errMsg,errMsgEx);
- cfg.writePathEntry("DownloadManager",QString::null);
+ cfg.writePathEntry("DownloadManager",TQString::null);
cfg.sync ();
}
else
@@ -413,7 +413,7 @@ void BrowserRun::simpleSave( const KURL & url, const QString & suggestedFilename
}
// no download manager available, let's do it ourself
- KFileDialog *dlg = new KFileDialog( QString::null, QString::null /*all files*/,
+ KFileDialog *dlg = new KFileDialog( TQString::null, TQString::null /*all files*/,
window , "filedialog", true );
dlg->setOperationMode( KFileDialog::Saving );
dlg->setCaption(i18n("Save As"));
@@ -458,7 +458,7 @@ void BrowserRun::handleError( KIO::Job * job )
KRun::slotStatResult( job );
}
-void BrowserRun::redirectToError( int error, const QString& errorText )
+void BrowserRun::redirectToError( int error, const TQString& errorText )
{
/**
* To display this error in KHTMLPart instead of inside a dialog box,
@@ -467,12 +467,12 @@ void BrowserRun::redirectToError( int error, const QString& errorText )
*
* The format of the error:/ URL is error:/?query#url,
* where two variables are passed in the query:
- * error = int kio error code, errText = QString error text from kio
+ * error = int kio error code, errText = TQString error text from kio
* The sub-url is the URL that we were trying to open.
*/
- KURL newURL(QString("error:/?error=%1&errText=%2")
+ KURL newURL(TQString("error:/?error=%1&errText=%2")
.arg( error ).arg( KURL::encode_string(errorText) ), 106 );
- m_strURL.setPass( QString::null ); // don't put the password in the error URL
+ m_strURL.setPass( TQString::null ); // don't put the password in the error URL
KURL::List lst;
lst << newURL << m_strURL;
@@ -496,13 +496,13 @@ void BrowserRun::slotCopyToTempFileResult(KIO::Job *job)
m_timer.start( 0, true );
}
-bool BrowserRun::isTextExecutable( const QString &serviceType )
+bool BrowserRun::isTextExecutable( const TQString &serviceType )
{
return ( serviceType == "application/x-desktop" ||
serviceType == "application/x-shellscript" );
}
-bool BrowserRun::isExecutable( const QString &serviceType )
+bool BrowserRun::isExecutable( const TQString &serviceType )
{
return KRun::isExecutable( serviceType );
}
@@ -512,7 +512,7 @@ bool BrowserRun::hideErrorDialog() const
return d->m_bHideErrorDialog;
}
-QString BrowserRun::contentDisposition() const {
+TQString BrowserRun::contentDisposition() const {
return d->contentDisposition;
}
diff --git a/kparts/browserrun.h b/kparts/browserrun.h
index 228eb96a0..79a7386c6 100644
--- a/kparts/browserrun.h
+++ b/kparts/browserrun.h
@@ -53,7 +53,7 @@ namespace KParts {
* Always pass false for @p trustedSource, except for local directory views.
*/
BrowserRun( const KURL& url, const KParts::URLArgs& args,
- KParts::ReadOnlyPart *part, QWidget *window,
+ KParts::ReadOnlyPart *part, TQWidget *window,
bool removeReferrer, bool trustedSource );
// BIC: merge with above constructor
@@ -69,7 +69,7 @@ namespace KParts {
*
*/
BrowserRun( const KURL& url, const KParts::URLArgs& args,
- KParts::ReadOnlyPart *part, QWidget *window,
+ KParts::ReadOnlyPart *part, TQWidget *window,
bool removeReferrer, bool trustedSource, bool hideErrorDialog );
virtual ~BrowserRun();
@@ -90,15 +90,15 @@ namespace KParts {
/**
* @return Suggested filename given by the server (e.g. HTTP content-disposition filename)
*/
- QString suggestedFilename() const { return m_suggestedFilename; }
+ TQString suggestedFilename() const { return m_suggestedFilename; }
/**
* @return Suggested disposition by the server (e.g. HTTP content-disposition)
* @since 3.5.2
*/
- QString contentDisposition() const;
+ TQString contentDisposition() const;
- bool serverSuggestsSave() const { return contentDisposition() == QString::fromLatin1("attachment"); }
+ bool serverSuggestsSave() const { return contentDisposition() == TQString::fromLatin1("attachment"); }
enum AskSaveResult { Save, Open, Cancel };
/**
@@ -109,7 +109,7 @@ namespace KParts {
* @param suggestedFilename optional filename suggested by the server
* @return Save, Open or Cancel.
*/
- static AskSaveResult askSave( const KURL & url, KService::Ptr offer, const QString& mimeType, const QString & suggestedFilename = QString::null );
+ static AskSaveResult askSave( const KURL & url, KService::Ptr offer, const TQString& mimeType, const TQString & suggestedFilename = TQString::null );
enum AskEmbedOrSaveFlags { InlineDisposition = 0, AttachmentDisposition = 1 };
/**
@@ -121,23 +121,23 @@ namespace KParts {
* @param flags set to AttachmentDisposition if suggested by the server
* @return Save, Open or Cancel.
*/
- static AskSaveResult askEmbedOrSave( const KURL & url, const QString& mimeType, const QString & suggestedFilename = QString::null, int flags = 0 );
+ static AskSaveResult askEmbedOrSave( const KURL & url, const TQString& mimeType, const TQString & suggestedFilename = TQString::null, int flags = 0 );
// virtual so that KHTML can implement differently (HTML cache)
- virtual void save( const KURL & url, const QString & suggestedFilename );
+ virtual void save( const KURL & url, const TQString & suggestedFilename );
// static so that it can be called from other classes
- static void simpleSave( const KURL & url, const QString & suggestedFilename,
- QWidget* window );
+ static void simpleSave( const KURL & url, const TQString & suggestedFilename,
+ TQWidget* window );
/** BIC: Combine with the above function for KDE 4.0. */
- static void simpleSave( const KURL & url, const QString & suggestedFilename );
+ static void simpleSave( const KURL & url, const TQString & suggestedFilename );
- static bool allowExecution( const QString &serviceType, const KURL &url );
+ static bool allowExecution( const TQString &serviceType, const KURL &url );
- /** BIC: Obsoleted by KRun::isExecutable( const QString &serviceType ); */
- static bool isExecutable( const QString &serviceType );
- static bool isTextExecutable( const QString &serviceType );
+ /** BIC: Obsoleted by KRun::isExecutable( const TQString &serviceType ); */
+ static bool isExecutable( const TQString &serviceType );
+ static bool isTextExecutable( const TQString &serviceType );
protected:
/**
@@ -166,26 +166,26 @@ namespace KParts {
/**
* Helper for foundMimeType: call this if the mimetype couldn't be embedded
*/
- NonEmbeddableResult handleNonEmbeddable( const QString& mimeType );
+ NonEmbeddableResult handleNonEmbeddable( const TQString& mimeType );
protected slots:
void slotBrowserScanFinished(KIO::Job *job);
- void slotBrowserMimetype(KIO::Job *job, const QString &type);
+ void slotBrowserMimetype(KIO::Job *job, const TQString &type);
void slotCopyToTempFileResult(KIO::Job *job);
virtual void slotStatResult( KIO::Job *job );
protected:
KParts::URLArgs m_args;
KParts::ReadOnlyPart *m_part; // QGuardedPtr?
- QGuardedPtr<QWidget> m_window;
+ TQGuardedPtr<TQWidget> m_window;
// Suggested filename given by the server (e.g. HTTP content-disposition)
// When set, we should really be saving instead of embedding
- QString m_suggestedFilename;
- QString m_sMimeType;
+ TQString m_suggestedFilename;
+ TQString m_sMimeType;
bool m_bRemoveReferrer;
bool m_bTrustedSource;
private:
- void redirectToError( int error, const QString& errorText );
+ void redirectToError( int error, const TQString& errorText );
class BrowserRunPrivate;
BrowserRunPrivate* d;
diff --git a/kparts/componentfactory.h b/kparts/componentfactory.h
index 01616d89f..7e9de4280 100644
--- a/kparts/componentfactory.h
+++ b/kparts/componentfactory.h
@@ -4,7 +4,7 @@
#include <kparts/factory.h>
#include <kparts/part.h>
#include <ktrader.h>
-#include <qmetaobject.h>
+#include <tqmetaobject.h>
namespace KParts
{
@@ -50,19 +50,19 @@ namespace KParts
* \endcode
*
* @param factory The factory to ask for the creation of the component
- * @param parent The parent object (see QObject constructor)
- * @param name The name of the object to create (see QObject constructor)
+ * @param parent The parent object (see TQObject constructor)
+ * @param name The name of the object to create (see TQObject constructor)
* @param args A list of string arguments, passed to the factory and possibly
* to the component (see KLibFactory)
* @return A pointer to the newly created object or a null pointer if the
* factory was unable to create an object of the given type.
*/
template <class T>
- static T *createInstanceFromFactory( KLibFactory *factory, QObject *parent = 0,
+ static T *createInstanceFromFactory( KLibFactory *factory, TQObject *parent = 0,
const char *name = 0,
- const QStringList &args = QStringList() )
+ const TQStringList &args = TQStringList() )
{
- QObject *object = factory->create( parent, name,
+ TQObject *object = factory->create( parent, name,
T::staticMetaObject()->className(),
args );
@@ -84,8 +84,8 @@ namespace KParts
* @param factory The factory to ask for the creation of the component
* @param parentWidget the parent widget for the part
* @param widgetName the name of the part's widget
- * @param parent The parent object (see QObject constructor)
- * @param name The name of the object to create (see QObject constructor)
+ * @param parent The parent object (see TQObject constructor)
+ * @param name The name of the object to create (see TQObject constructor)
* @param args A list of string arguments, passed to the factory and possibly
* to the component (see KLibFactory)
* @return A pointer to the newly created object or a null pointer if the
@@ -93,11 +93,11 @@ namespace KParts
*/
template <class T>
static T *createPartInstanceFromFactory( KParts::Factory *factory,
- QWidget *parentWidget = 0,
+ TQWidget *parentWidget = 0,
const char *widgetName = 0,
- QObject *parent = 0,
+ TQObject *parent = 0,
const char *name = 0,
- const QStringList &args = QStringList() )
+ const TQStringList &args = TQStringList() )
{
KParts::Part *object = factory->createPart( parentWidget, widgetName,
parent, name,
@@ -115,8 +115,8 @@ namespace KParts
* factory to create an instance of the given template type.
*
* @param libraryName The library to open
- * @param parent The parent object (see QObject constructor)
- * @param name The name of the object to create (see QObject constructor)
+ * @param parent The parent object (see TQObject constructor)
+ * @param name The name of the object to create (see TQObject constructor)
* @param args A list of string arguments, passed to the factory and possibly
* to the component (see KLibFactory)
* @param error
@@ -124,9 +124,9 @@ namespace KParts
* factory was unable to create an object of the given type.
*/
template <class T>
- static T *createInstanceFromLibrary( const char *libraryName, QObject *parent = 0,
+ static T *createInstanceFromLibrary( const char *libraryName, TQObject *parent = 0,
const char *name = 0,
- const QStringList &args = QStringList(),
+ const TQStringList &args = TQStringList(),
int *error = 0 )
{
KLibrary *library = KLibLoader::self()->library( libraryName );
@@ -156,11 +156,11 @@ namespace KParts
template <class T>
static T *createPartInstanceFromLibrary( const char *libraryName,
- QWidget *parentWidget = 0,
+ TQWidget *parentWidget = 0,
const char *widgetName = 0,
- QObject *parent = 0,
+ TQObject *parent = 0,
const char *name = 0,
- const QStringList &args = QStringList(),
+ const TQStringList &args = TQStringList(),
int *error = 0 )
{
KLibrary *library = KLibLoader::self()->library( libraryName );
@@ -199,12 +199,12 @@ namespace KParts
template <class T>
static T *createInstanceFromService( const KService::Ptr &service,
- QObject *parent = 0,
+ TQObject *parent = 0,
const char *name = 0,
- const QStringList &args = QStringList(),
+ const TQStringList &args = TQStringList(),
int *error = 0 )
{
- QString library = service->library();
+ TQString library = service->library();
if ( library.isEmpty() )
{
if ( error )
@@ -218,14 +218,14 @@ namespace KParts
template <class T>
static T *createPartInstanceFromService( const KService::Ptr &service,
- QWidget *parentWidget = 0,
+ TQWidget *parentWidget = 0,
const char *widgetName = 0,
- QObject *parent = 0,
+ TQObject *parent = 0,
const char *name = 0,
- const QStringList &args = QStringList(),
+ const TQStringList &args = TQStringList(),
int *error = 0 )
{
- QString library = service->library();
+ TQString library = service->library();
if ( library.isEmpty() )
{
if ( error )
@@ -239,9 +239,9 @@ namespace KParts
template <class T, class ServiceIterator>
static T *createInstanceFromServices( ServiceIterator begin, ServiceIterator end,
- QObject *parent = 0,
+ TQObject *parent = 0,
const char *name = 0,
- const QStringList &args = QStringList(),
+ const TQStringList &args = TQStringList(),
int *error = 0 )
{
for (; begin != end; ++begin )
@@ -267,11 +267,11 @@ namespace KParts
template <class T, class ServiceIterator>
static T *createPartInstanceFromServices( ServiceIterator begin,
ServiceIterator end,
- QWidget *parentWidget = 0,
+ TQWidget *parentWidget = 0,
const char *widgetName = 0,
- QObject *parent = 0,
+ TQObject *parent = 0,
const char *name = 0,
- const QStringList &args = QStringList(),
+ const TQStringList &args = TQStringList(),
int *error = 0 )
{
for (; begin != end; ++begin )
@@ -300,7 +300,7 @@ namespace KParts
*
* Example:
* \code
- * KMyAppPlugin* plugin = KParts::ComponentFactory::createInstanceFromQuery<KMyAppPlugin>( serviceType, QString::null, parentObject );
+ * KMyAppPlugin* plugin = KParts::ComponentFactory::createInstanceFromQuery<KMyAppPlugin>( serviceType, TQString::null, parentObject );
* if ( plugin ) {
* ....
* }
@@ -318,11 +318,11 @@ namespace KParts
* factory was unable to create an object of the given type.
*/
template <class T>
- static T *createInstanceFromQuery( const QString &serviceType,
- const QString &constraint = QString::null,
- QObject *parent = 0,
+ static T *createInstanceFromQuery( const TQString &serviceType,
+ const TQString &constraint = TQString::null,
+ TQObject *parent = 0,
const char *name = 0,
- const QStringList &args = QStringList(),
+ const TQStringList &args = TQStringList(),
int *error = 0 )
{
KTrader::OfferList offers = KTrader::self()->query( serviceType, constraint );
@@ -344,12 +344,12 @@ namespace KParts
* You can use this method to create a generic viewer - that can display any
* kind of file, provided that there is a ReadOnlyPart installed for it - in 5 lines:
* \code
- * // Given the following: KURL url, QWidget* parentWidget and QObject* parentObject.
- * QString mimetype = KMimeType::findByURL( url )->name();
- * KParts::ReadOnlyPart* part = KParts::ComponentFactory::createPartInstanceFromQuery<KParts::ReadOnlyPart>( mimetype, QString::null, parentWidget, 0, parentObject, 0 );
+ * // Given the following: KURL url, TQWidget* parentWidget and TQObject* parentObject.
+ * TQString mimetype = KMimeType::findByURL( url )->name();
+ * KParts::ReadOnlyPart* part = KParts::ComponentFactory::createPartInstanceFromQuery<KParts::ReadOnlyPart>( mimetype, TQString::null, parentWidget, 0, parentObject, 0 );
* if ( part ) {
* part->openURL( url );
- * part->widget()->show(); // also insert the widget into a layout, or simply use a QVBox as parentWidget
+ * part->widget()->show(); // also insert the widget into a layout, or simply use a TQVBox as parentWidget
* }
* \endcode
*
@@ -367,16 +367,16 @@ namespace KParts
* factory was unable to create an object of the given type.
*/
template <class T>
- static T *createPartInstanceFromQuery( const QString &serviceType,
- const QString &constraint,
- QWidget *parentWidget = 0,
+ static T *createPartInstanceFromQuery( const TQString &serviceType,
+ const TQString &constraint,
+ TQWidget *parentWidget = 0,
const char *widgetName = 0,
- QObject *parent = 0,
+ TQObject *parent = 0,
const char *name = 0,
- const QStringList &args = QStringList(),
+ const TQStringList &args = TQStringList(),
int *error = 0 )
{
- KTrader::OfferList offers = KTrader::self()->query( serviceType, QString::fromLatin1("KParts/ReadOnlyPart"), constraint, QString::null );
+ KTrader::OfferList offers = KTrader::self()->query( serviceType, TQString::fromLatin1("KParts/ReadOnlyPart"), constraint, TQString::null );
if ( offers.isEmpty() )
{
if ( error )
diff --git a/kparts/dockmainwindow.cpp b/kparts/dockmainwindow.cpp
index 07455ee72..b5370e2c0 100644
--- a/kparts/dockmainwindow.cpp
+++ b/kparts/dockmainwindow.cpp
@@ -28,7 +28,7 @@
#include <kinstance.h>
#include <khelpmenu.h>
#include <kstandarddirs.h>
-#include <qapplication.h>
+#include <tqapplication.h>
#include <kdebug.h>
#include <kxmlguifactory.h>
@@ -52,13 +52,13 @@ public:
{
}
- QGuardedPtr<Part> m_activePart;
+ TQGuardedPtr<Part> m_activePart;
bool m_bShellGUIActivated;
KHelpMenu *m_helpMenu;
};
}
-DockMainWindow::DockMainWindow( QWidget* parent, const char *name, WFlags f )
+DockMainWindow::DockMainWindow( TQWidget* parent, const char *name, WFlags f )
: KDockMainWindow( parent, name, f )
{
d = new DockMainWindowPrivate();
@@ -72,27 +72,27 @@ DockMainWindow::~DockMainWindow()
void DockMainWindow::createGUI( Part * part )
{
- kdDebug(1000) << QString("DockMainWindow::createGUI for %1").arg(part?part->name():"0L") << endl;
+ kdDebug(1000) << TQString("DockMainWindow::createGUI for %1").arg(part?part->name():"0L") << endl;
KXMLGUIFactory *factory = guiFactory();
setUpdatesEnabled( false );
- QPtrList<Plugin> plugins;
+ TQPtrList<Plugin> plugins;
if ( d->m_activePart )
{
- kdDebug(1000) << QString("deactivating GUI for %1").arg(d->m_activePart->name()) << endl;
+ kdDebug(1000) << TQString("deactivating GUI for %1").arg(d->m_activePart->name()) << endl;
GUIActivateEvent ev( false );
- QApplication::sendEvent( d->m_activePart, &ev );
+ TQApplication::sendEvent( d->m_activePart, &ev );
factory->removeClient( d->m_activePart );
- disconnect( d->m_activePart, SIGNAL( setWindowCaption( const QString & ) ),
- this, SLOT( setCaption( const QString & ) ) );
- disconnect( d->m_activePart, SIGNAL( setStatusBarText( const QString & ) ),
- this, SLOT( slotSetStatusBarText( const QString & ) ) );
+ disconnect( d->m_activePart, TQT_SIGNAL( setWindowCaption( const TQString & ) ),
+ this, TQT_SLOT( setCaption( const TQString & ) ) );
+ disconnect( d->m_activePart, TQT_SIGNAL( setStatusBarText( const TQString & ) ),
+ this, TQT_SLOT( slotSetStatusBarText( const TQString & ) ) );
}
if ( !d->m_bShellGUIActivated )
@@ -105,15 +105,15 @@ void DockMainWindow::createGUI( Part * part )
if ( part )
{
// do this before sending the activate event
- connect( part, SIGNAL( setWindowCaption( const QString & ) ),
- this, SLOT( setCaption( const QString & ) ) );
- connect( part, SIGNAL( setStatusBarText( const QString & ) ),
- this, SLOT( slotSetStatusBarText( const QString & ) ) );
+ connect( part, TQT_SIGNAL( setWindowCaption( const TQString & ) ),
+ this, TQT_SLOT( setCaption( const TQString & ) ) );
+ connect( part, TQT_SIGNAL( setStatusBarText( const TQString & ) ),
+ this, TQT_SLOT( slotSetStatusBarText( const TQString & ) ) );
factory->addClient( part );
GUIActivateEvent ev( true );
- QApplication::sendEvent( part, &ev );
+ TQApplication::sendEvent( part, &ev );
}
@@ -122,7 +122,7 @@ void DockMainWindow::createGUI( Part * part )
d->m_activePart = part;
}
-void DockMainWindow::slotSetStatusBarText( const QString & text )
+void DockMainWindow::slotSetStatusBarText( const TQString & text )
{
statusBar()->message( text );
}
@@ -137,18 +137,18 @@ void DockMainWindow::createShellGUI( bool create )
if ( isHelpMenuEnabled() )
d->m_helpMenu = new KHelpMenu( this, instance()->aboutData(), true, actionCollection() );
- QString f = xmlFile();
+ TQString f = xmlFile();
setXMLFile( locate( "config", "ui/ui_standards.rc", instance() ) );
if ( !f.isEmpty() )
setXMLFile( f, true );
else
{
- QString auto_file( instance()->instanceName() + "ui.rc" );
+ TQString auto_file( instance()->instanceName() + "ui.rc" );
setXMLFile( auto_file, true );
}
GUIActivateEvent ev( true );
- QApplication::sendEvent( this, &ev );
+ TQApplication::sendEvent( this, &ev );
guiFactory()->addClient( this );
@@ -156,7 +156,7 @@ void DockMainWindow::createShellGUI( bool create )
else
{
GUIActivateEvent ev( false );
- QApplication::sendEvent( this, &ev );
+ TQApplication::sendEvent( this, &ev );
guiFactory()->removeClient( this );
}
diff --git a/kparts/dockmainwindow.h b/kparts/dockmainwindow.h
index d048b31e9..f35678145 100644
--- a/kparts/dockmainwindow.h
+++ b/kparts/dockmainwindow.h
@@ -21,7 +21,7 @@
#ifndef __DOCKMAINWINDOW_H
#define __DOCKMAINWINDOW_H
-#include <qptrlist.h>
+#include <tqptrlist.h>
#include <kaction.h>
#include <kdockwidget.h>
@@ -51,7 +51,7 @@ class KPARTS_EXPORT DockMainWindow : public KDockMainWindow, virtual public Part
/**
* Constructor, same signature as KDockMainWindow.
*/
- DockMainWindow( QWidget* parent = 0L, const char *name = 0L, WFlags f = WDestructiveClose );
+ DockMainWindow( TQWidget* parent = 0L, const char *name = 0L, WFlags f = WDestructiveClose );
/**
* Destructor.
*/
@@ -74,7 +74,7 @@ protected slots:
* Reimplement if your dock-mainwindow has a complex statusbar
* (with several items)
*/
- virtual void slotSetStatusBarText( const QString & );
+ virtual void slotSetStatusBarText( const TQString & );
protected:
virtual void createShellGUI( bool create = true );
diff --git a/kparts/event.cpp b/kparts/event.cpp
index 3f783aad1..4f0efd617 100644
--- a/kparts/event.cpp
+++ b/kparts/event.cpp
@@ -25,7 +25,7 @@ using namespace KParts;
#define KPARTS_EVENT_MAGIC 42
Event::Event( const char *eventName )
- : QCustomEvent( (QEvent::Type)(QEvent::User + KPARTS_EVENT_MAGIC), (void *)eventName )
+ : TQCustomEvent( (TQEvent::Type)(TQEvent::User + KPARTS_EVENT_MAGIC), (void *)eventName )
{
}
@@ -37,20 +37,20 @@ const char *Event::eventName() const
return (const char *)data();
}
-bool Event::test( const QEvent *event )
+bool Event::test( const TQEvent *event )
{
if ( !event )
return false;
- return ( event->type() == (QEvent::Type)(QEvent::User + KPARTS_EVENT_MAGIC ) );
+ return ( event->type() == (TQEvent::Type)(TQEvent::User + KPARTS_EVENT_MAGIC ) );
}
-bool Event::test( const QEvent *event, const char *name )
+bool Event::test( const TQEvent *event, const char *name )
{
if ( !test( event ) )
return false;
- return ( strcmp( name, (const char *)((QCustomEvent *)event)->data() ) == 0 );
+ return ( strcmp( name, (const char *)((TQCustomEvent *)event)->data() ) == 0 );
}
const char *GUIActivateEvent::s_strGUIActivateEvent = "KParts/GUIActivate";
diff --git a/kparts/event.h b/kparts/event.h
index 27c1aaf6f..d64dbe974 100644
--- a/kparts/event.h
+++ b/kparts/event.h
@@ -20,7 +20,7 @@
#ifndef __kparts_event_h__
#define __kparts_event_h__
-#include <qevent.h>
+#include <tqevent.h>
#include <kdelibs_export.h>
@@ -40,8 +40,8 @@ public:
virtual const char *eventName() const;
- static bool test( const QEvent *event );
- static bool test( const QEvent *event, const char *name );
+ static bool test( const TQEvent *event );
+ static bool test( const TQEvent *event, const char *name );
};
/**
@@ -58,7 +58,7 @@ public:
bool activated() const { return m_bActivated; }
- static bool test( const QEvent *event ) { return Event::test( event, s_strGUIActivateEvent ); }
+ static bool test( const TQEvent *event ) { return Event::test( event, s_strGUIActivateEvent ); }
private:
static const char *s_strGUIActivateEvent;
@@ -76,20 +76,20 @@ private:
class KPARTS_EXPORT PartActivateEvent : public Event
{
public:
- PartActivateEvent( bool activated, Part *part, QWidget *widget ) : Event( s_strPartActivateEvent ), m_bActivated( activated ), m_part( part ), m_widget( widget ) {}
+ PartActivateEvent( bool activated, Part *part, TQWidget *widget ) : Event( s_strPartActivateEvent ), m_bActivated( activated ), m_part( part ), m_widget( widget ) {}
bool activated() const { return m_bActivated; }
Part *part() const { return m_part; }
- QWidget *widget() const { return m_widget; }
+ TQWidget *widget() const { return m_widget; }
- static bool test( const QEvent *event ) { return Event::test( event, s_strPartActivateEvent ); }
+ static bool test( const TQEvent *event ) { return Event::test( event, s_strPartActivateEvent ); }
private:
static const char *s_strPartActivateEvent;
bool m_bActivated;
Part *m_part;
- QWidget *m_widget;
+ TQWidget *m_widget;
};
/**
@@ -99,20 +99,20 @@ private:
class KPARTS_EXPORT PartSelectEvent : public Event
{
public:
- PartSelectEvent( bool selected, Part *part, QWidget *widget ) : Event( s_strPartSelectEvent ), m_bSelected( selected ), m_part( part ), m_widget( widget ) {}
+ PartSelectEvent( bool selected, Part *part, TQWidget *widget ) : Event( s_strPartSelectEvent ), m_bSelected( selected ), m_part( part ), m_widget( widget ) {}
bool selected() const { return m_bSelected; }
Part *part() const { return m_part; }
- QWidget *widget() const { return m_widget; }
+ TQWidget *widget() const { return m_widget; }
- static bool test( const QEvent *event ) { return Event::test( event, s_strPartSelectEvent ); }
+ static bool test( const TQEvent *event ) { return Event::test( event, s_strPartSelectEvent ); }
private:
static const char *s_strPartSelectEvent;
bool m_bSelected;
Part *m_part;
- QWidget *m_widget;
+ TQWidget *m_widget;
};
} // namespace
diff --git a/kparts/factory.cpp b/kparts/factory.cpp
index ec99e35bc..9be2f4f92 100644
--- a/kparts/factory.cpp
+++ b/kparts/factory.cpp
@@ -21,7 +21,7 @@
#include "factory.h"
#include "part.h"
-#include <qwidget.h>
+#include <tqwidget.h>
#include <klocale.h>
#include <kglobal.h>
@@ -30,7 +30,7 @@
using namespace KParts;
-Factory::Factory( QObject *parent, const char *name )
+Factory::Factory( TQObject *parent, const char *name )
: KLibFactory( parent, name )
{
}
@@ -39,7 +39,7 @@ Factory::~Factory()
{
}
-Part *Factory::createPart( QWidget *parentWidget, const char *widgetName, QObject *parent, const char *name, const char *classname, const QStringList &args )
+Part *Factory::createPart( TQWidget *parentWidget, const char *widgetName, TQObject *parent, const char *name, const char *classname, const TQStringList &args )
{
Part* part = createPartObject( parentWidget, widgetName, parent, name, classname, args );
if ( part )
@@ -55,7 +55,7 @@ const KInstance *Factory::partInstance()
return params.instance;
}
-const KInstance *Factory::partInstanceFromLibrary( const QCString &libraryName )
+const KInstance *Factory::partInstanceFromLibrary( const TQCString &libraryName )
{
KLibrary *library = KLibLoader::self()->library( libraryName );
if ( !library )
@@ -69,14 +69,14 @@ const KInstance *Factory::partInstanceFromLibrary( const QCString &libraryName )
return pfactory->partInstance();
}
-Part *Factory::createPartObject( QWidget *, const char *, QObject *, const char *, const char *, const QStringList & )
+Part *Factory::createPartObject( TQWidget *, const char *, TQObject *, const char *, const char *, const TQStringList & )
{
return 0;
}
-QObject *Factory::createObject( QObject *parent, const char *name, const char *classname, const QStringList &args )
+TQObject *Factory::createObject( TQObject *parent, const char *name, const char *classname, const TQStringList &args )
{
assert( !parent || parent->isWidgetType() );
- return createPart( static_cast<QWidget *>( parent ), name, parent, name, classname, args );
+ return createPart( static_cast<TQWidget *>( parent ), name, parent, name, classname, args );
}
#include "factory.moc"
diff --git a/kparts/factory.h b/kparts/factory.h
index 808ad8851..18fb4d41a 100644
--- a/kparts/factory.h
+++ b/kparts/factory.h
@@ -41,13 +41,13 @@ class KPARTS_EXPORT Factory : public KLibFactory
{
Q_OBJECT
public:
- Factory( QObject *parent = 0, const char *name = 0 );
+ Factory( TQObject *parent = 0, const char *name = 0 );
virtual ~Factory();
/**
* Creates a part.
*
- * The QStringList can be used to pass additional arguments to the part.
+ * The TQStringList can be used to pass additional arguments to the part.
* If the part needs additional arguments, it should take them as
* name="value" pairs. This is the way additional arguments will get passed
* to the part from eg. khtml. You can for example embed the part into HTML
@@ -61,7 +61,7 @@ public:
* This could result in a call to
* \code
* createPart( parentWidget, name, parentObject, parentName, "KParts::Part",
- * QStringList("name1="value1"", "name2="value2") );
+ * TQStringList("name1="value1"", "name2="value2") );
* \endcode
*
* @returns the newly created part.
@@ -71,7 +71,7 @@ public:
* important for reference counting, and allows unloading the
* library automatically once all its objects have been destroyed.
*/
- Part *createPart( QWidget *parentWidget = 0, const char *widgetName = 0, QObject *parent = 0, const char *name = 0, const char *classname = "KParts::Part", const QStringList &args = QStringList() );
+ Part *createPart( TQWidget *parentWidget = 0, const char *widgetName = 0, TQObject *parent = 0, const char *name = 0, const char *classname = "KParts::Part", const TQStringList &args = TQStringList() );
/**
* If you have a part contained in a shared library you might want to query
@@ -88,14 +88,14 @@ public:
*
* @param libraryName name of the library to query the instance from
*/
- static const KInstance *partInstanceFromLibrary( const QCString &libraryName );
+ static const KInstance *partInstanceFromLibrary( const TQCString &libraryName );
protected:
/**
* Reimplement this method in your implementation to create the Part.
*
- * The QStringList can be used to pass additional arguments to the part.
+ * The TQStringList can be used to pass additional arguments to the part.
* If the part needs additional arguments, it should take them as
* name="value" pairs. This is the way additional arguments will get passed
* to the part from eg. khtml. You can for example emebed the part into HTML
@@ -109,17 +109,17 @@ protected:
* This could result in a call to
* \code
* createPart( parentWidget, name, parentObject, parentName, "Kparts::Part",
- * QStringList("name1="value1"", "name2="value2") );
+ * TQStringList("name1="value1"", "name2="value2") );
* \endcode
*
* @returns the newly created part.
*/
- virtual Part *createPartObject( QWidget *parentWidget = 0, const char *widgetName = 0, QObject *parent = 0, const char *name = 0, const char *classname = "KParts::Part", const QStringList &args = QStringList() ) = 0;
+ virtual Part *createPartObject( TQWidget *parentWidget = 0, const char *widgetName = 0, TQObject *parent = 0, const char *name = 0, const char *classname = "KParts::Part", const TQStringList &args = TQStringList() ) = 0;
/**
* Reimplemented from KLibFactory. Calls createPart()
*/
- virtual QObject *createObject( QObject *parent = 0, const char *name = 0, const char *classname = "QObject", const QStringList &args = QStringList() );
+ virtual TQObject *createObject( TQObject *parent = 0, const char *name = 0, const char *classname = "TQObject", const TQStringList &args = TQStringList() );
/** This 'enum' along with the structure below is NOT part of the public API.
* It's going to disappear in KDE 4.0 and is likely to change inbetween.
diff --git a/kparts/genericfactory.h b/kparts/genericfactory.h
index 324edfb18..950214ee5 100644
--- a/kparts/genericfactory.h
+++ b/kparts/genericfactory.h
@@ -66,7 +66,7 @@ namespace KParts
*
* The template argument has to inherit from KParts::Part and has to implement two methods:
* 1) There needs to be a public constructor with the following signature:
- * MyPart( QWidget *parentWidget, const char *widgetName, QObject *parent, const char *name, const QStringList& args )
+ * MyPart( TQWidget *parentWidget, const char *widgetName, TQObject *parent, const char *name, const TQStringList& args )
*
* 2) It needs to provide one static method to create a KAboutData object per
* request, holding information about the component's name, its authors, license, etc.
@@ -97,10 +97,10 @@ namespace KParts
public:
GenericFactory() { }
- virtual KParts::Part *createPartObject( QWidget *parentWidget, const char *widgetName,
- QObject *parent, const char *name,
+ virtual KParts::Part *createPartObject( TQWidget *parentWidget, const char *widgetName,
+ TQObject *parent, const char *name,
const char *className,
- const QStringList &args )
+ const TQStringList &args )
{
T *part = KDEPrivate::ConcreteFactory<T>::create( parentWidget,
widgetName,
@@ -125,12 +125,12 @@ namespace KParts
public:
GenericFactory() { }
- virtual KParts::Part *createPartObject( QWidget *parentWidget, const char *widgetName,
- QObject *parent, const char *name,
+ virtual KParts::Part *createPartObject( TQWidget *parentWidget, const char *widgetName,
+ TQObject *parent, const char *name,
const char *className,
- const QStringList &args )
+ const TQStringList &args )
{
- QObject *object = KDEPrivate::MultiFactory< KTypeList<T1, T2> >::create( parentWidget,
+ TQObject *object = KDEPrivate::MultiFactory< KTypeList<T1, T2> >::create( parentWidget,
widgetName,
parent, name,
className,
diff --git a/kparts/historyprovider.cpp b/kparts/historyprovider.cpp
index d55a96b66..416a109f6 100644
--- a/kparts/historyprovider.cpp
+++ b/kparts/historyprovider.cpp
@@ -17,14 +17,14 @@
Boston, MA 02110-1301, USA.
*/
-#include <qdict.h>
+#include <tqdict.h>
#include <kapplication.h>
#include "historyprovider.h"
using namespace KParts;
-template class QDict<void>;
+template class TQDict<void>;
HistoryProvider * HistoryProvider::s_self = 0L;
@@ -34,7 +34,7 @@ public:
HistoryProviderPrivate()
: dict( 1009 ) {}
- QDict<void> dict;
+ TQDict<void> dict;
};
HistoryProvider * HistoryProvider::self()
@@ -44,8 +44,8 @@ HistoryProvider * HistoryProvider::self()
return s_self;
}
-HistoryProvider::HistoryProvider( QObject *parent, const char *name )
- : QObject( parent, name )
+HistoryProvider::HistoryProvider( TQObject *parent, const char *name )
+ : TQObject( parent, name )
{
if ( !s_self )
s_self = this;
@@ -61,19 +61,19 @@ HistoryProvider::~HistoryProvider()
s_self = 0;
}
-bool HistoryProvider::contains( const QString& item ) const
+bool HistoryProvider::contains( const TQString& item ) const
{
return (bool) d->dict.find( item );
}
-void HistoryProvider::insert( const QString& item )
+void HistoryProvider::insert( const TQString& item )
{
// no need to allocate memory, we only want to have fast lookup, no mapping
d->dict.replace( item, (void*) 1 );
emit inserted( item );
}
-void HistoryProvider::remove( const QString& item )
+void HistoryProvider::remove( const TQString& item )
{
(void) d->dict.remove( item );
}
diff --git a/kparts/historyprovider.h b/kparts/historyprovider.h
index de0b4bf2b..40bf36aa7 100644
--- a/kparts/historyprovider.h
+++ b/kparts/historyprovider.h
@@ -20,8 +20,8 @@
#ifndef KHISTORYPROVIDER_H
#define KHISTORYPROVIDER_H
-#include <qdict.h>
-#include <qobject.h>
+#include <tqdict.h>
+#include <tqobject.h>
#include <kdelibs_export.h>
@@ -48,7 +48,7 @@ public:
/**
* Creates a KHistoryProvider with an optional parent and name
*/
- HistoryProvider( QObject *parent = 0L, const char *name = 0 );
+ HistoryProvider( TQObject *parent = 0L, const char *name = 0 );
/**
* Destroys the provider.
@@ -58,17 +58,17 @@ public:
/**
* @returns true if @p item is present in the history.
*/
- virtual bool contains( const QString& item ) const;
+ virtual bool contains( const TQString& item ) const;
/**
* Inserts @p item into the history.
*/
- virtual void insert( const QString& item );
+ virtual void insert( const TQString& item );
/**
* Removes @p item from the history.
*/
- virtual void remove( const QString& item );
+ virtual void remove( const TQString& item );
/**
* Clears the history. The cleared() signal is emitted after clearing.
@@ -87,12 +87,12 @@ signals:
* history has changed. Put those items that were added or removed from the
* history into @p items.
*/
- void updated( const QStringList& items );
+ void updated( const TQStringList& items );
/**
* Emitted after the item has been inserted
*/
- void inserted( const QString& item );
+ void inserted( const TQString& item );
private:
static HistoryProvider *s_self;
diff --git a/kparts/mainwindow.cpp b/kparts/mainwindow.cpp
index 234188a73..ee286fd15 100644
--- a/kparts/mainwindow.cpp
+++ b/kparts/mainwindow.cpp
@@ -26,7 +26,7 @@
#include <kstatusbar.h>
#include <khelpmenu.h>
#include <kstandarddirs.h>
-#include <qapplication.h>
+#include <tqapplication.h>
#include <kxmlguifactory.h>
#include <kaccel.h>
@@ -51,13 +51,13 @@ public:
{
}
- QGuardedPtr<Part> m_activePart;
+ TQGuardedPtr<Part> m_activePart;
bool m_bShellGUIActivated;
KHelpMenu *m_helpMenu;
};
}
-MainWindow::MainWindow( QWidget* parent, const char *name, WFlags f )
+MainWindow::MainWindow( TQWidget* parent, const char *name, WFlags f )
: KMainWindow( parent, name, f )
{
d = new MainWindowPrivate();
@@ -71,7 +71,7 @@ MainWindow::MainWindow( const char *name, WFlags f )
PartBase::setPartObject( this );
}
-MainWindow::MainWindow( int cflags, QWidget* parent, const char *name, WFlags f )
+MainWindow::MainWindow( int cflags, TQWidget* parent, const char *name, WFlags f )
: KMainWindow( cflags, parent, name, f )
{
d = new MainWindowPrivate();
@@ -95,7 +95,7 @@ void MainWindow::createGUI( Part * part )
setUpdatesEnabled( false );
- QPtrList<Plugin> plugins;
+ TQPtrList<Plugin> plugins;
if ( d->m_activePart )
{
@@ -103,14 +103,14 @@ void MainWindow::createGUI( Part * part )
<< " " << d->m_activePart->name() << endl;
GUIActivateEvent ev( false );
- QApplication::sendEvent( d->m_activePart, &ev );
+ TQApplication::sendEvent( d->m_activePart, &ev );
factory->removeClient( d->m_activePart );
- disconnect( d->m_activePart, SIGNAL( setWindowCaption( const QString & ) ),
- this, SLOT( setCaption( const QString & ) ) );
- disconnect( d->m_activePart, SIGNAL( setStatusBarText( const QString & ) ),
- this, SLOT( slotSetStatusBarText( const QString & ) ) );
+ disconnect( d->m_activePart, TQT_SIGNAL( setWindowCaption( const TQString & ) ),
+ this, TQT_SLOT( setCaption( const TQString & ) ) );
+ disconnect( d->m_activePart, TQT_SIGNAL( setStatusBarText( const TQString & ) ),
+ this, TQT_SLOT( slotSetStatusBarText( const TQString & ) ) );
}
if ( !d->m_bShellGUIActivated )
@@ -123,15 +123,15 @@ void MainWindow::createGUI( Part * part )
if ( part )
{
// do this before sending the activate event
- connect( part, SIGNAL( setWindowCaption( const QString & ) ),
- this, SLOT( setCaption( const QString & ) ) );
- connect( part, SIGNAL( setStatusBarText( const QString & ) ),
- this, SLOT( slotSetStatusBarText( const QString & ) ) );
+ connect( part, TQT_SIGNAL( setWindowCaption( const TQString & ) ),
+ this, TQT_SLOT( setCaption( const TQString & ) ) );
+ connect( part, TQT_SIGNAL( setStatusBarText( const TQString & ) ),
+ this, TQT_SLOT( slotSetStatusBarText( const TQString & ) ) );
factory->addClient( part );
GUIActivateEvent ev( true );
- QApplication::sendEvent( part, &ev );
+ TQApplication::sendEvent( part, &ev );
if ( autoSaveSettings() )
applyMainWindowSettings( KGlobal::config(), autoSaveGroup() );
@@ -142,7 +142,7 @@ void MainWindow::createGUI( Part * part )
d->m_activePart = part;
}
-void MainWindow::slotSetStatusBarText( const QString & text )
+void MainWindow::slotSetStatusBarText( const TQString & text )
{
statusBar()->message( text );
}
@@ -157,25 +157,25 @@ void MainWindow::createShellGUI( bool create )
if ( isHelpMenuEnabled() && !d->m_helpMenu )
d->m_helpMenu = new KHelpMenu( this, instance()->aboutData(), true, actionCollection() );
- QString f = xmlFile();
+ TQString f = xmlFile();
setXMLFile( locate( "config", "ui/ui_standards.rc", instance() ) );
if ( !f.isEmpty() )
setXMLFile( f, true );
else
{
- QString auto_file( instance()->instanceName() + "ui.rc" );
+ TQString auto_file( instance()->instanceName() + "ui.rc" );
setXMLFile( auto_file, true );
}
GUIActivateEvent ev( true );
- QApplication::sendEvent( this, &ev );
+ TQApplication::sendEvent( this, &ev );
guiFactory()->addClient( this );
}
else
{
GUIActivateEvent ev( false );
- QApplication::sendEvent( this, &ev );
+ TQApplication::sendEvent( this, &ev );
guiFactory()->removeClient( this );
}
diff --git a/kparts/mainwindow.h b/kparts/mainwindow.h
index e0848563a..aeb3e2793 100644
--- a/kparts/mainwindow.h
+++ b/kparts/mainwindow.h
@@ -20,7 +20,7 @@
#ifndef __MAINWINDOW_H
#define __MAINWINDOW_H
-#include <qptrlist.h>
+#include <tqptrlist.h>
#include <kaction.h>
#include <kmainwindow.h>
@@ -51,7 +51,7 @@ class KPARTS_EXPORT MainWindow : public KMainWindow, virtual public PartBase
/**
* Constructor, same signature as KMainWindow.
*/
- MainWindow( QWidget* parent, const char *name = 0L, WFlags f = WType_TopLevel | WDestructiveClose );
+ MainWindow( TQWidget* parent, const char *name = 0L, WFlags f = WType_TopLevel | WDestructiveClose );
/**
* Compatibility Constructor
*/
@@ -60,7 +60,7 @@ class KPARTS_EXPORT MainWindow : public KMainWindow, virtual public PartBase
* Constructor with creation flags, see KMainWindow.
* @since 3.2
*/
- MainWindow( int cflags, QWidget* parent, const char *name = 0L, WFlags f = WType_TopLevel | WDestructiveClose );
+ MainWindow( int cflags, TQWidget* parent, const char *name = 0L, WFlags f = WType_TopLevel | WDestructiveClose );
/**
* Destructor.
*/
@@ -85,7 +85,7 @@ protected slots:
* Reimplement if your mainwindow has a complex statusbar
* (with several items)
*/
- virtual void slotSetStatusBarText( const QString & );
+ virtual void slotSetStatusBarText( const TQString & );
/**
* Rebuilds the GUI after KEditToolbar changed the toolbar layout.
diff --git a/kparts/part.cpp b/kparts/part.cpp
index 35e320ae6..fcd426abf 100644
--- a/kparts/part.cpp
+++ b/kparts/part.cpp
@@ -24,13 +24,13 @@
#include <kparts/mainwindow.h>
#include <kparts/partmanager.h>
-#include <qapplication.h>
-#include <qfile.h>
-#include <qpoint.h>
-#include <qpointarray.h>
-#include <qpainter.h>
-#include <qtextstream.h>
-#include <qfileinfo.h>
+#include <tqapplication.h>
+#include <tqfile.h>
+#include <tqpoint.h>
+#include <tqpointarray.h>
+#include <tqpainter.h>
+#include <tqtextstream.h>
+#include <tqfileinfo.h>
#include <kinstance.h>
#include <klocale.h>
@@ -46,7 +46,7 @@
#include <assert.h>
#include <kdebug.h>
-template class QPtrList<KXMLGUIClient>;
+template class TQPtrList<KXMLGUIClient>;
using namespace KParts;
@@ -92,12 +92,12 @@ PartBase::~PartBase()
delete d;
}
-void PartBase::setPartObject( QObject *obj )
+void PartBase::setPartObject( TQObject *obj )
{
m_obj = obj;
}
-QObject *PartBase::partObject() const
+TQObject *PartBase::partObject() const
{
return m_obj;
}
@@ -114,12 +114,12 @@ void PartBase::setInstance( KInstance *inst, bool bLoadPlugins )
// install 'instancename'data resource type
KGlobal::dirs()->addResourceType( inst->instanceName() + "data",
KStandardDirs::kde_default( "data" )
- + QString::fromLatin1( inst->instanceName() ) + '/' );
+ + TQString::fromLatin1( inst->instanceName() ) + '/' );
if ( bLoadPlugins )
loadPlugins( m_obj, this, instance() );
}
-void PartBase::loadPlugins( QObject *parent, KXMLGUIClient *parentGUIClient, KInstance *instance )
+void PartBase::loadPlugins( TQObject *parent, KXMLGUIClient *parentGUIClient, KInstance *instance )
{
if( d->m_pluginLoadingMode != DoNotLoadPlugins )
Plugin::loadPlugins( parent, parentGUIClient, instance, d->m_pluginLoadingMode == LoadPlugins );
@@ -130,8 +130,8 @@ void PartBase::setPluginLoadingMode( PluginLoadingMode loadingMode )
d->m_pluginLoadingMode = loadingMode;
}
-Part::Part( QObject *parent, const char* name )
- : QObject( parent, name )
+Part::Part( TQObject *parent, const char* name )
+ : TQObject( parent, name )
{
d = new PartPrivate;
m_widget = 0L;
@@ -146,8 +146,8 @@ Part::~Part()
if ( m_widget )
{
// We need to disconnect first, to avoid calling it !
- disconnect( m_widget, SIGNAL( destroyed() ),
- this, SLOT( slotWidgetDestroyed() ) );
+ disconnect( m_widget, TQT_SIGNAL( destroyed() ),
+ this, TQT_SLOT( slotWidgetDestroyed() ) );
}
if ( m_manager )
@@ -156,19 +156,19 @@ Part::~Part()
if ( m_widget )
{
kdDebug(1000) << "deleting widget " << m_widget << " " << m_widget->name() << endl;
- delete (QWidget*) m_widget;
+ delete (TQWidget*) m_widget;
}
delete d;
}
-void Part::embed( QWidget * parentWidget )
+void Part::embed( TQWidget * parentWidget )
{
if ( widget() )
- widget()->reparent( parentWidget, 0, QPoint( 0, 0 ), true );
+ widget()->reparent( parentWidget, 0, TQPoint( 0, 0 ), true );
}
-QWidget *Part::widget()
+TQWidget *Part::widget()
{
return m_widget;
}
@@ -183,20 +183,20 @@ PartManager *Part::manager() const
return m_manager;
}
-Part *Part::hitTest( QWidget *widget, const QPoint & )
+Part *Part::hitTest( TQWidget *widget, const TQPoint & )
{
- if ( (QWidget *)m_widget != widget )
+ if ( (TQWidget *)m_widget != widget )
return 0L;
return this;
}
-void Part::setWidget( QWidget *widget )
+void Part::setWidget( TQWidget *widget )
{
assert ( !m_widget ); // otherwise we get two connects
m_widget = widget;
- connect( m_widget, SIGNAL( destroyed() ),
- this, SLOT( slotWidgetDestroyed() ) );
+ connect( m_widget, TQT_SIGNAL( destroyed() ),
+ this, TQT_SLOT( slotWidgetDestroyed() ) );
// Tell the actionCollection() which widget its
// action shortcuts should be connected to.
@@ -218,7 +218,7 @@ bool Part::isSelectable() const
return d->m_bSelectable;
}
-void Part::customEvent( QCustomEvent *event )
+void Part::customEvent( TQCustomEvent *event )
{
if ( PartActivateEvent::test( event ) )
{
@@ -238,7 +238,7 @@ void Part::customEvent( QCustomEvent *event )
return;
}
- QObject::customEvent( event );
+ TQObject::customEvent( event );
}
void Part::partActivateEvent( PartActivateEvent * )
@@ -253,7 +253,7 @@ void Part::guiActivateEvent( GUIActivateEvent * )
{
}
-QWidget *Part::hostContainer( const QString &containerName )
+TQWidget *Part::hostContainer( const TQString &containerName )
{
if ( !factory() )
return 0L;
@@ -292,7 +292,7 @@ public:
KIO::FileCopyJob * m_job;
KIO::FileCopyJob * m_uploadJob;
KURL m_originalURL; // for saveAs
- QString m_originalFilePath; // for saveAs
+ TQString m_originalFilePath; // for saveAs
bool m_showProgressInfo : 1;
bool m_saveOk : 1;
bool m_waitForSave : 1;
@@ -301,7 +301,7 @@ public:
}
-ReadOnlyPart::ReadOnlyPart( QObject *parent, const char *name )
+ReadOnlyPart::ReadOnlyPart( TQObject *parent, const char *name )
: Part( parent, name ), m_bTemp( false )
{
d = new ReadOnlyPartPrivate;
@@ -353,13 +353,13 @@ bool ReadOnlyPart::openURL( const KURL &url )
{
m_bTemp = true;
// Use same extension as remote file. This is important for mimetype-determination (e.g. koffice)
- QString fileName = url.fileName();
- QFileInfo fileInfo(fileName);
- QString ext = fileInfo.extension();
- QString extension;
+ TQString fileName = url.fileName();
+ TQFileInfo fileInfo(fileName);
+ TQString ext = fileInfo.extension();
+ TQString extension;
if ( !ext.isEmpty() && url.query().isNull() ) // not if the URL has a query, e.g. cgi.pl?something
extension = "."+ext; // keep the '.'
- KTempFile tempFile( QString::null, extension );
+ KTempFile tempFile( TQString::null, extension );
m_file = tempFile.name();
KURL destURL;
@@ -367,7 +367,7 @@ bool ReadOnlyPart::openURL( const KURL &url )
d->m_job = KIO::file_copy( m_url, destURL, 0600, true, false, d->m_showProgressInfo );
d->m_job->setWindow( widget() ? widget()->topLevelWidget() : 0 );
emit started( d->m_job );
- connect( d->m_job, SIGNAL( result( KIO::Job * ) ), this, SLOT( slotJobFinished ( KIO::Job * ) ) );
+ connect( d->m_job, TQT_SIGNAL( result( KIO::Job * ) ), this, TQT_SLOT( slotJobFinished ( KIO::Job * ) ) );
return true;
}
}
@@ -388,7 +388,7 @@ bool ReadOnlyPart::closeURL()
if ( m_bTemp )
{
- unlink( QFile::encodeName(m_file) );
+ unlink( TQFile::encodeName(m_file) );
m_bTemp = false;
}
// It always succeeds for a read-only part,
@@ -424,7 +424,7 @@ void ReadOnlyPart::guiActivateEvent( GUIActivateEvent * event )
}
}
-bool ReadOnlyPart::openStream( const QString& mimeType, const KURL& url )
+bool ReadOnlyPart::openStream( const TQString& mimeType, const KURL& url )
{
if ( !closeURL() )
return false;
@@ -432,7 +432,7 @@ bool ReadOnlyPart::openStream( const QString& mimeType, const KURL& url )
return doOpenStream( mimeType );
}
-bool ReadOnlyPart::writeStream( const QByteArray& data )
+bool ReadOnlyPart::writeStream( const TQByteArray& data )
{
return doWriteStream( data );
}
@@ -444,7 +444,7 @@ bool ReadOnlyPart::closeStream()
//////////////////////////////////////////////////
-ReadWritePart::ReadWritePart( QObject *parent, const char *name )
+ReadWritePart::ReadWritePart( TQObject *parent, const char *name )
: ReadOnlyPart( parent, name ), m_bModified( false ), m_bClosing( false )
{
m_bReadWrite = true;
@@ -485,7 +485,7 @@ bool ReadWritePart::queryClose()
if ( !isReadWrite() || !isModified() )
return true;
- QString docName = url().fileName();
+ TQString docName = url().fileName();
if (docName.isEmpty()) docName = i18n( "Untitled" );
int res = KMessageBox::warningYesNoCancel( widget(),
@@ -547,7 +547,7 @@ bool ReadWritePart::save()
if( saveFile() )
return saveToURL();
else
- emit canceled(QString::null);
+ emit canceled(TQString::null);
return false;
}
@@ -572,7 +572,7 @@ bool ReadWritePart::saveAs( const KURL & kurl )
m_file = d->m_originalFilePath;
d->m_duringSaveAs = false;
d->m_originalURL = KURL();
- d->m_originalFilePath = QString::null;
+ d->m_originalFilePath = TQString::null;
}
return result;
@@ -586,7 +586,7 @@ void ReadWritePart::prepareSaving()
{
if ( m_bTemp ) // get rid of a possible temp file first
{ // (happens if previous url was remote)
- unlink( QFile::encodeName(m_file) );
+ unlink( TQFile::encodeName(m_file) );
m_bTemp = false;
}
m_file = m_url.path();
@@ -615,31 +615,31 @@ bool ReadWritePart::saveToURL()
d->m_saveOk = true;
d->m_duringSaveAs = false;
d->m_originalURL = KURL();
- d->m_originalFilePath = QString::null;
+ d->m_originalFilePath = TQString::null;
return true; // Nothing to do
}
else
{
if (d->m_uploadJob)
{
- unlink(QFile::encodeName(d->m_uploadJob->srcURL().path()));
+ unlink(TQFile::encodeName(d->m_uploadJob->srcURL().path()));
d->m_uploadJob->kill();
d->m_uploadJob = 0;
}
KTempFile tempFile;
- QString uploadFile = tempFile.name();
+ TQString uploadFile = tempFile.name();
KURL uploadUrl;
uploadUrl.setPath( uploadFile );
tempFile.unlink();
// Create hardlink
- if (::link(QFile::encodeName(m_file), QFile::encodeName(uploadFile)) != 0)
+ if (::link(TQFile::encodeName(m_file), TQFile::encodeName(uploadFile)) != 0)
{
// Uh oh, some error happened.
return false;
}
d->m_uploadJob = KIO::file_move( uploadUrl, m_url, -1, true /*overwrite*/ );
d->m_uploadJob->setWindow( widget() ? widget()->topLevelWidget() : 0 );
- connect( d->m_uploadJob, SIGNAL( result( KIO::Job * ) ), this, SLOT( slotUploadFinished (KIO::Job *) ) );
+ connect( d->m_uploadJob, TQT_SIGNAL( result( KIO::Job * ) ), this, TQT_SLOT( slotUploadFinished (KIO::Job *) ) );
return true;
}
}
@@ -648,8 +648,8 @@ void ReadWritePart::slotUploadFinished( KIO::Job * )
{
if (d->m_uploadJob->error())
{
- unlink(QFile::encodeName(d->m_uploadJob->srcURL().path()));
- QString error = d->m_uploadJob->errorString();
+ unlink(TQFile::encodeName(d->m_uploadJob->srcURL().path()));
+ TQString error = d->m_uploadJob->errorString();
d->m_uploadJob = 0;
if (d->m_duringSaveAs) {
m_url = d->m_originalURL;
@@ -671,7 +671,7 @@ void ReadWritePart::slotUploadFinished( KIO::Job * )
}
d->m_duringSaveAs = false;
d->m_originalURL = KURL();
- d->m_originalFilePath = QString::null;
+ d->m_originalFilePath = TQString::null;
if (d->m_waitForSave)
{
qApp->exit_loop();
@@ -679,8 +679,8 @@ void ReadWritePart::slotUploadFinished( KIO::Job * )
}
// Trolls: Nothing to see here, please step away.
-void qt_enter_modal( QWidget *widget );
-void qt_leave_modal( QWidget *widget );
+void qt_enter_modal( TQWidget *widget );
+void qt_leave_modal( TQWidget *widget );
bool ReadWritePart::waitSaveComplete()
{
@@ -689,8 +689,8 @@ bool ReadWritePart::waitSaveComplete()
d->m_waitForSave = true;
- QWidget dummy(0,0,WType_Dialog | WShowModal);
- dummy.setFocusPolicy( QWidget::NoFocus );
+ TQWidget dummy(0,0,WType_Dialog | WShowModal);
+ dummy.setFocusPolicy( TQWidget::NoFocus );
qt_enter_modal(&dummy);
qApp->enter_loop();
qt_leave_modal(&dummy);
diff --git a/kparts/part.h b/kparts/part.h
index 100d486da..36e2ca241 100644
--- a/kparts/part.h
+++ b/kparts/part.h
@@ -20,9 +20,9 @@
#ifndef _KPART_H
#define _KPART_H
-#include <qstring.h>
-#include <qdom.h>
-#include <qguardedptr.h>
+#include <tqstring.h>
+#include <tqdom.h>
+#include <tqguardedptr.h>
#include <kurl.h>
#include <kxmlguiclient.h>
@@ -74,8 +74,8 @@ public:
*
* @internal
*/
- void setPartObject( QObject *object );
- QObject *partObject() const;
+ void setPartObject( TQObject *object );
+ TQObject *partObject() const;
protected:
/**
@@ -129,8 +129,8 @@ protected:
* \code
* if( factory() )
* {
- * QPtrList<KParts::Plugin> plugins = KParts::Plugin::pluginObjects( this );
- * QPtrListIterator<KParts::Plugin> it( plugins );
+ * TQPtrList<KParts::Plugin> plugins = KParts::Plugin::pluginObjects( this );
+ * TQPtrListIterator<KParts::Plugin> it( plugins );
* KParts::Plugin * plugin;
* while( ( plugin = it.current() ) != 0 )
* {
@@ -140,7 +140,7 @@ protected:
* }
* \endcode
*/
- void loadPlugins( QObject *parent, KXMLGUIClient *parentGUIClient, KInstance *instance );
+ void loadPlugins( TQObject *parent, KXMLGUIClient *parentGUIClient, KInstance *instance );
/**
* For a KParts::Part: call this before setInstance().
@@ -150,7 +150,7 @@ protected:
private:
PartBasePrivate *d;
- QObject *m_obj;
+ TQObject *m_obj;
};
/**
@@ -163,9 +163,9 @@ private:
*
* <b>About the widget:</b>\n
*
- * Note that KParts::Part does not inherit QWidget.
+ * Note that KParts::Part does not inherit TQWidget.
* This is due to the fact that the "visual representation"
- * will probably not be a mere QWidget, but an elaborate one.
+ * will probably not be a mere TQWidget, but an elaborate one.
* That's why when implementing your KParts::Part (or derived)
* you should call KParts::Part::setWidget() in your constructor.
*
@@ -178,7 +178,7 @@ private:
* framework for a "viewer" part and for an "editor"-like part.
* Use Part directly only if your part doesn't fit into those.
*/
-class KPARTS_EXPORT Part : public QObject, public PartBase
+class KPARTS_EXPORT Part : public TQObject, public PartBase
{
Q_OBJECT
@@ -190,7 +190,7 @@ public:
* @param parent Parent object of the part.
* @param name QT-internal name of the part.
*/
- Part( QObject *parent = 0, const char* name = 0 );
+ Part( TQObject *parent = 0, const char* name = 0 );
/**
* Destructor.
@@ -201,19 +201,19 @@ public:
* Embed this part into a host widget.
*
* You don't need to do this if you created the widget with the
- * correct parent widget - this is just a QWidget::reparent().
+ * correct parent widget - this is just a TQWidget::reparent().
* Note that the Part is still the holder
- * of the QWidget, meaning that if you delete the Part,
+ * of the TQWidget, meaning that if you delete the Part,
* then the widget gets destroyed as well, and vice-versa.
* This method is not recommended since creating the widget with the correct
* parent is simpler anyway.
*/
- virtual void embed( QWidget * parentWidget );
+ virtual void embed( TQWidget * parentWidget );
/**
* @return The widget defined by this part, set by setWidget().
*/
- virtual QWidget *widget();
+ virtual TQWidget *widget();
/**
* @internal
@@ -234,7 +234,7 @@ public:
* @param widget the part widget being clicked - usually the same as widget(), except in koffice.
* @param globalPos the mouse coordinates in global coordinates
*/
- virtual Part *hitTest( QWidget *widget, const QPoint &globalPos );
+ virtual Part *hitTest( TQWidget *widget, const TQPoint &globalPos );
/**
* @param selectable Indicates whether the part is selectable or not.
@@ -251,12 +251,12 @@ signals:
* Emitted by the part, to set the caption of the window(s)
* hosting this part
*/
- void setWindowCaption( const QString & caption );
+ void setWindowCaption( const TQString & caption );
/**
* Emited by the part, to set a text in the statusbar of the window(s)
* hosting this part
*/
- void setStatusBarText( const QString & text );
+ void setStatusBarText( const TQString & text );
protected:
@@ -265,12 +265,12 @@ protected:
*
* Call this in the Part-inherited class constructor.
*/
- virtual void setWidget( QWidget * widget );
+ virtual void setWidget( TQWidget * widget );
/**
* @internal
*/
- virtual void customEvent( QCustomEvent *event );
+ virtual void customEvent( TQCustomEvent *event );
/**
* Convenience method which is called when the Part received a PartActivateEvent .
@@ -299,13 +299,13 @@ protected:
* Convenience method for KXMLGUIFactory::container.
* @return a container widget owned by the Part's GUI.
*/
- QWidget *hostContainer( const QString &containerName );
+ TQWidget *hostContainer( const TQString &containerName );
private slots:
void slotWidgetDestroyed();
private:
- QGuardedPtr<QWidget> m_widget;
+ TQGuardedPtr<TQWidget> m_widget;
PartManager * m_manager;
@@ -344,7 +344,7 @@ public:
* Constructor
* See also Part for the setXXX methods to call.
*/
- ReadOnlyPart( QObject *parent = 0, const char *name = 0 );
+ ReadOnlyPart( TQObject *parent = 0, const char *name = 0 );
/**
* Destructor
@@ -410,7 +410,7 @@ public:
* every ReadOnlyPart has a URL (see url()), so this simply sets it.
* @return true if the part supports progressive loading and accepts data, false otherwise.
*/
- bool openStream( const QString& mimeType, const KURL& url );
+ bool openStream( const TQString& mimeType, const KURL& url );
/**
* Send some data to the part. openStream must have been called previously,
@@ -418,7 +418,7 @@ public:
* @return true if the data was accepted by the part. If false is returned,
* the application should stop sending data, and doesn't have to call closeStream.
*/
- bool writeStream( const QByteArray& data );
+ bool writeStream( const TQByteArray& data );
/**
* Terminate the sending of data to the part.
@@ -434,14 +434,14 @@ private: // Makes no sense for inherited classes to call those. But make it prot
* Parts which implement progress loading should check the @p mimeType
* parameter, and return true if they can accept a data stream of that type.
*/
- virtual bool doOpenStream( const QString& /*mimeType*/ ) { return false; }
+ virtual bool doOpenStream( const TQString& /*mimeType*/ ) { return false; }
/**
* Receive some data from the hosting application.
* In this method the part should attempt to display the data progressively.
* With some data types (text, html...) closeStream might never actually be called,
* in the case of continuous streams. This can't happen with e.g. images.
*/
- virtual bool doWriteStream( const QByteArray& /*data*/ ) { return false; }
+ virtual bool doWriteStream( const TQByteArray& /*data*/ ) { return false; }
/**
* This is called by closeStream(), to indicate that all the data has been sent.
* Parts should ensure that all of the data is displayed at this point.
@@ -479,7 +479,7 @@ signals:
* Emit this if loading is canceled by the user or by an error.
* @param errMsg the error message, empty if the user canceled the loading voluntarily.
*/
- void canceled( const QString &errMsg );
+ void canceled( const TQString &errMsg );
protected slots:
void slotJobFinished( KIO::Job * job );
@@ -516,7 +516,7 @@ protected:
/**
* Local file - the only one the part implementation should deal with.
*/
- QString m_file;
+ TQString m_file;
/**
* If @p true, @p m_file is a temporary file that needs to be deleted later.
*/
@@ -549,7 +549,7 @@ public:
* Constructor.
* See parent constructor for instructions.
*/
- ReadWritePart( QObject *parent = 0, const char *name = 0 );
+ ReadWritePart( TQObject *parent = 0, const char *name = 0 );
/**
* Destructor.
* Applications using a ReadWritePart should make sure, before
diff --git a/kparts/partmanager.cpp b/kparts/partmanager.cpp
index 2925b601e..57d2073b5 100644
--- a/kparts/partmanager.cpp
+++ b/kparts/partmanager.cpp
@@ -25,13 +25,13 @@
#include <kglobal.h>
#include <kdebug.h>
-#include <qapplication.h>
+#include <tqapplication.h>
//#define DEBUG_PARTMANAGER
using namespace KParts;
-template class QPtrList<Part>;
+template class TQPtrList<Part>;
namespace KParts {
@@ -52,11 +52,11 @@ public:
~PartManagerPrivate()
{
}
- void setReason( QEvent* ev ) {
+ void setReason( TQEvent* ev ) {
switch( ev->type() ) {
- case QEvent::MouseButtonPress:
- case QEvent::MouseButtonDblClick: {
- QMouseEvent* mev = static_cast<QMouseEvent *>( ev );
+ case TQEvent::MouseButtonPress:
+ case TQEvent::MouseButtonDblClick: {
+ TQMouseEvent* mev = static_cast<TQMouseEvent *>( ev );
m_reason = mev->button() == Qt::LeftButton
? PartManager::ReasonLeftClick
: ( mev->button() == Qt::MidButton
@@ -64,8 +64,8 @@ public:
: PartManager::ReasonRightClick );
break;
}
- case QEvent::FocusIn:
- m_reason = static_cast<QFocusEvent *>( ev )->reason();
+ case TQEvent::FocusIn:
+ m_reason = static_cast<TQFocusEvent *>( ev )->reason();
break;
default:
kdWarning(1000) << "PartManagerPrivate::setReason got unexpected ev type " << ev->type() << endl;
@@ -74,16 +74,16 @@ public:
}
Part * m_activePart;
- QWidget *m_activeWidget;
+ TQWidget *m_activeWidget;
- QPtrList<Part> m_parts;
+ TQPtrList<Part> m_parts;
PartManager::SelectionPolicy m_policy;
Part *m_selectedPart;
- QWidget *m_selectedWidget;
+ TQWidget *m_selectedWidget;
- QPtrList<QWidget> m_managedTopLevelWidgets;
+ TQPtrList<TQWidget> m_managedTopLevelWidgets;
short int m_activationButtonMask;
bool m_bIgnoreScrollBars;
bool m_bAllowNestedParts;
@@ -92,8 +92,8 @@ public:
}
-PartManager::PartManager( QWidget * parent, const char * name )
- : QObject( parent, name )
+PartManager::PartManager( TQWidget * parent, const char * name )
+ : TQObject( parent, name )
{
d = new PartManagerPrivate;
@@ -104,8 +104,8 @@ PartManager::PartManager( QWidget * parent, const char * name )
addManagedTopLevelWidget( parent );
}
-PartManager::PartManager( QWidget *topLevel, QObject *parent, const char *name )
- : QObject( parent, name )
+PartManager::PartManager( TQWidget *topLevel, TQObject *parent, const char *name )
+ : TQObject( parent, name )
{
d = new PartManagerPrivate;
@@ -118,12 +118,12 @@ PartManager::PartManager( QWidget *topLevel, QObject *parent, const char *name )
PartManager::~PartManager()
{
- for ( QPtrListIterator<QWidget> it( d->m_managedTopLevelWidgets );
+ for ( TQPtrListIterator<TQWidget> it( d->m_managedTopLevelWidgets );
it.current(); ++it )
- disconnect( it.current(), SIGNAL( destroyed() ),
- this, SLOT( slotManagedTopLevelWidgetDestroyed() ) );
+ disconnect( it.current(), TQT_SIGNAL( destroyed() ),
+ this, TQT_SLOT( slotManagedTopLevelWidgetDestroyed() ) );
- for ( QPtrListIterator<Part> it( d->m_parts ); it.current(); ++it )
+ for ( TQPtrListIterator<Part> it( d->m_parts ); it.current(); ++it )
{
it.current()->setManager( 0 );
}
@@ -173,27 +173,27 @@ short int PartManager::activationButtonMask() const
return d->m_activationButtonMask;
}
-bool PartManager::eventFilter( QObject *obj, QEvent *ev )
+bool PartManager::eventFilter( TQObject *obj, TQEvent *ev )
{
- if ( ev->type() != QEvent::MouseButtonPress &&
- ev->type() != QEvent::MouseButtonDblClick &&
- ev->type() != QEvent::FocusIn )
+ if ( ev->type() != TQEvent::MouseButtonPress &&
+ ev->type() != TQEvent::MouseButtonDblClick &&
+ ev->type() != TQEvent::FocusIn )
return false;
if ( !obj->isWidgetType() )
return false;
- QWidget *w = static_cast<QWidget *>( obj );
+ TQWidget *w = static_cast<TQWidget *>( obj );
if ( ( w->testWFlags( WType_Dialog ) && w->isModal() ) ||
w->testWFlags( WType_Popup ) || w->testWFlags( WStyle_Tool ) )
return false;
- QMouseEvent* mev = 0L;
- if ( ev->type() == QEvent::MouseButtonPress || ev->type() == QEvent::MouseButtonDblClick )
+ TQMouseEvent* mev = 0L;
+ if ( ev->type() == TQEvent::MouseButtonPress || ev->type() == TQEvent::MouseButtonDblClick )
{
- mev = static_cast<QMouseEvent *>( ev );
+ mev = static_cast<TQMouseEvent *>( ev );
#ifdef DEBUG_PARTMANAGER
kdDebug(1000) << "PartManager::eventFilter button: " << mev->button() << " " << "d->m_activationButtonMask=" << d->m_activationButtonMask << endl;
#endif
@@ -204,12 +204,12 @@ bool PartManager::eventFilter( QObject *obj, QEvent *ev )
Part * part;
while ( w )
{
- QPoint pos;
+ TQPoint pos;
if ( !d->m_managedTopLevelWidgets.containsRef( w->topLevelWidget() ) )
return false;
- if ( d->m_bIgnoreScrollBars && w->inherits( "QScrollBar" ) )
+ if ( d->m_bIgnoreScrollBars && w->inherits( "TQScrollBar" ) )
return false;
if ( mev ) // mouse press or mouse double-click event
@@ -220,15 +220,15 @@ bool PartManager::eventFilter( QObject *obj, QEvent *ev )
part = findPartFromWidget( w );
#ifdef DEBUG_PARTMANAGER
- QCString evType = ( ev->type() == QEvent::MouseButtonPress ) ? "MouseButtonPress"
- : ( ev->type() == QEvent::MouseButtonDblClick ) ? "MouseButtonDblClick"
- : ( ev->type() == QEvent::FocusIn ) ? "FocusIn" : "OTHER! ERROR!";
+ TQCString evType = ( ev->type() == TQEvent::MouseButtonPress ) ? "MouseButtonPress"
+ : ( ev->type() == TQEvent::MouseButtonDblClick ) ? "MouseButtonDblClick"
+ : ( ev->type() == TQEvent::FocusIn ) ? "FocusIn" : "OTHER! ERROR!";
#endif
if ( part ) // We found a part whose widget is w
{
if ( d->m_policy == PartManager::TriState )
{
- if ( ev->type() == QEvent::MouseButtonDblClick )
+ if ( ev->type() == TQEvent::MouseButtonDblClick )
{
if ( part == d->m_activePart && w == d->m_activeWidget )
return false;
@@ -294,7 +294,7 @@ bool PartManager::eventFilter( QObject *obj, QEvent *ev )
w->testWFlags( WType_Popup ) || w->testWFlags( WStyle_Tool ) ) )
{
#ifdef DEBUG_PARTMANAGER
- kdDebug(1000) << QString("No part made active although %1/%2 got event - loop aborted").arg(obj->name()).arg(obj->className()) << endl;
+ kdDebug(1000) << TQString("No part made active although %1/%2 got event - loop aborted").arg(obj->name()).arg(obj->className()) << endl;
#endif
return false;
}
@@ -302,14 +302,14 @@ bool PartManager::eventFilter( QObject *obj, QEvent *ev )
}
#ifdef DEBUG_PARTMANAGER
- kdDebug(1000) << QString("No part made active although %1/%2 got event").arg(obj->name()).arg(obj->className()) << endl;
+ kdDebug(1000) << TQString("No part made active although %1/%2 got event").arg(obj->name()).arg(obj->className()) << endl;
#endif
return false;
}
-Part * PartManager::findPartFromWidget( QWidget * widget, const QPoint &pos )
+Part * PartManager::findPartFromWidget( TQWidget * widget, const TQPoint &pos )
{
- QPtrListIterator<Part> it ( d->m_parts );
+ TQPtrListIterator<Part> it ( d->m_parts );
for ( ; it.current() ; ++it )
{
Part *part = it.current()->hitTest( widget, pos );
@@ -319,9 +319,9 @@ Part * PartManager::findPartFromWidget( QWidget * widget, const QPoint &pos )
return 0L;
}
-Part * PartManager::findPartFromWidget( QWidget * widget )
+Part * PartManager::findPartFromWidget( TQWidget * widget )
{
- QPtrListIterator<Part> it ( d->m_parts );
+ TQPtrListIterator<Part> it ( d->m_parts );
for ( ; it.current() ; ++it )
{
if ( widget == it.current()->widget() )
@@ -352,11 +352,11 @@ void PartManager::addPart( Part *part, bool setActive )
}
// Prevent focus problems
- if ( part->widget() && part->widget()->focusPolicy() == QWidget::NoFocus )
+ if ( part->widget() && part->widget()->focusPolicy() == TQWidget::NoFocus )
{
kdWarning(1000) << "Part '" << part->name() << "' has a widget " << part->widget()->name() << " with a focus policy of NoFocus. It should have at least a ClickFocus policy, for part activation to work well." << endl;
}
- if ( part->widget() && part->widget()->focusPolicy() == QWidget::TabFocus )
+ if ( part->widget() && part->widget()->focusPolicy() == TQWidget::TabFocus )
{
kdWarning(1000) << "Part '" << part->name() << "' has a widget " << part->widget()->name() << " with a focus policy of TabFocus. It should have at least a ClickFocus policy, for part activation to work well." << endl;
}
@@ -370,12 +370,12 @@ void PartManager::removePart( Part *part )
{
if ( d->m_parts.findRef( part ) == -1 )
{
- kdFatal(1000) << QString("Can't remove part %1, not in KPartManager's list.").arg(part->name()) << endl;
+ kdFatal(1000) << TQString("Can't remove part %1, not in KPartManager's list.").arg(part->name()) << endl;
return;
}
//Warning. The part could be already deleted
- //kdDebug(1000) << QString("Part %1 removed").arg(part->name()) << endl;
+ //kdDebug(1000) << TQString("Part %1 removed").arg(part->name()) << endl;
int nb = d->m_parts.count();
bool ok = d->m_parts.removeRef( part );
Q_ASSERT( ok );
@@ -396,7 +396,7 @@ void PartManager::replacePart( Part * oldPart, Part * newPart, bool setActive )
// This methods does exactly removePart + addPart but without calling setActivePart(0) in between
if ( d->m_parts.findRef( oldPart ) == -1 )
{
- kdFatal(1000) << QString("Can't remove part %1, not in KPartManager's list.").arg(oldPart->name()) << endl;
+ kdFatal(1000) << TQString("Can't remove part %1, not in KPartManager's list.").arg(oldPart->name()) << endl;
return;
}
@@ -408,7 +408,7 @@ void PartManager::replacePart( Part * oldPart, Part * newPart, bool setActive )
addPart( newPart, setActive );
}
-void PartManager::setActivePart( Part *part, QWidget *widget )
+void PartManager::setActivePart( Part *part, TQWidget *widget )
{
if ( part && d->m_parts.findRef( part ) == -1 )
{
@@ -420,7 +420,7 @@ void PartManager::setActivePart( Part *part, QWidget *widget )
//tree recursively (Simon)
if ( part && !d->m_bAllowNestedParts )
{
- QObject *parentPart = part->parent(); // ### this relies on people using KParts::Factory!
+ TQObject *parentPart = part->parent(); // ### this relies on people using KParts::Factory!
if ( parentPart && parentPart->inherits( "KParts::Part" ) )
{
KParts::Part *parPart = static_cast<KParts::Part *>( parentPart );
@@ -440,7 +440,7 @@ void PartManager::setActivePart( Part *part, QWidget *widget )
return;
KParts::Part *oldActivePart = d->m_activePart;
- QWidget *oldActiveWidget = d->m_activeWidget;
+ TQWidget *oldActiveWidget = d->m_activeWidget;
setSelectedPart( 0L );
@@ -450,15 +450,15 @@ void PartManager::setActivePart( Part *part, QWidget *widget )
if ( oldActivePart )
{
KParts::Part *savedActivePart = part;
- QWidget *savedActiveWidget = widget;
+ TQWidget *savedActiveWidget = widget;
PartActivateEvent ev( false, oldActivePart, oldActiveWidget );
- QApplication::sendEvent( oldActivePart, &ev );
+ TQApplication::sendEvent( oldActivePart, &ev );
if ( oldActiveWidget )
{
- disconnect( oldActiveWidget, SIGNAL( destroyed() ),
- this, SLOT( slotWidgetDestroyed() ) );
- QApplication::sendEvent( oldActiveWidget, &ev );
+ disconnect( oldActiveWidget, TQT_SIGNAL( destroyed() ),
+ this, TQT_SLOT( slotWidgetDestroyed() ) );
+ TQApplication::sendEvent( oldActiveWidget, &ev );
}
d->m_activePart = savedActivePart;
@@ -471,12 +471,12 @@ void PartManager::setActivePart( Part *part, QWidget *widget )
d->m_activeWidget = part->widget();
PartActivateEvent ev( true, d->m_activePart, d->m_activeWidget );
- QApplication::sendEvent( d->m_activePart, &ev );
+ TQApplication::sendEvent( d->m_activePart, &ev );
if ( d->m_activeWidget )
{
- connect( d->m_activeWidget, SIGNAL( destroyed() ),
- this, SLOT( slotWidgetDestroyed() ) );
- QApplication::sendEvent( d->m_activeWidget, &ev );
+ connect( d->m_activeWidget, TQT_SIGNAL( destroyed() ),
+ this, TQT_SLOT( slotWidgetDestroyed() ) );
+ TQApplication::sendEvent( d->m_activeWidget, &ev );
}
}
// Set the new active instance in KGlobal
@@ -497,18 +497,18 @@ Part *PartManager::activePart() const
return d->m_activePart;
}
-QWidget *PartManager::activeWidget() const
+TQWidget *PartManager::activeWidget() const
{
return d->m_activeWidget;
}
-void PartManager::setSelectedPart( Part *part, QWidget *widget )
+void PartManager::setSelectedPart( Part *part, TQWidget *widget )
{
if ( part == d->m_selectedPart && widget == d->m_selectedWidget )
return;
Part *oldPart = d->m_selectedPart;
- QWidget *oldWidget = d->m_selectedWidget;
+ TQWidget *oldWidget = d->m_selectedWidget;
d->m_selectedPart = part;
d->m_selectedWidget = widget;
@@ -519,15 +519,15 @@ void PartManager::setSelectedPart( Part *part, QWidget *widget )
if ( oldPart )
{
PartSelectEvent ev( false, oldPart, oldWidget );
- QApplication::sendEvent( oldPart, &ev );
- QApplication::sendEvent( oldWidget, &ev );
+ TQApplication::sendEvent( oldPart, &ev );
+ TQApplication::sendEvent( oldWidget, &ev );
}
if ( d->m_selectedPart )
{
PartSelectEvent ev( true, d->m_selectedPart, d->m_selectedWidget );
- QApplication::sendEvent( d->m_selectedPart, &ev );
- QApplication::sendEvent( d->m_selectedWidget, &ev );
+ TQApplication::sendEvent( d->m_selectedPart, &ev );
+ TQApplication::sendEvent( d->m_selectedWidget, &ev );
}
}
@@ -536,7 +536,7 @@ Part *PartManager::selectedPart() const
return d->m_selectedPart;
}
-QWidget *PartManager::selectedWidget() const
+TQWidget *PartManager::selectedWidget() const
{
return d->m_selectedWidget;
}
@@ -550,17 +550,17 @@ void PartManager::slotObjectDestroyed()
void PartManager::slotWidgetDestroyed()
{
kdDebug(1000) << "KPartsManager::slotWidgetDestroyed()" << endl;
- if ( static_cast<const QWidget *>( sender() ) == d->m_activeWidget )
+ if ( static_cast<const TQWidget *>( sender() ) == d->m_activeWidget )
setActivePart( 0L ); //do not remove the part because if the part's widget dies, then the
//part will delete itself anyway, invoking removePart() in its destructor
}
-const QPtrList<Part> *PartManager::parts() const
+const TQPtrList<Part> *PartManager::parts() const
{
return &d->m_parts;
}
-void PartManager::addManagedTopLevelWidget( const QWidget *topLevel )
+void PartManager::addManagedTopLevelWidget( const TQWidget *topLevel )
{
if ( !topLevel->isTopLevel() )
return;
@@ -569,11 +569,11 @@ void PartManager::addManagedTopLevelWidget( const QWidget *topLevel )
return;
d->m_managedTopLevelWidgets.append( topLevel );
- connect( topLevel, SIGNAL( destroyed() ),
- this, SLOT( slotManagedTopLevelWidgetDestroyed() ) );
+ connect( topLevel, TQT_SIGNAL( destroyed() ),
+ this, TQT_SLOT( slotManagedTopLevelWidgetDestroyed() ) );
}
-void PartManager::removeManagedTopLevelWidget( const QWidget *topLevel )
+void PartManager::removeManagedTopLevelWidget( const TQWidget *topLevel )
{
if ( !topLevel->isTopLevel() )
return;
@@ -586,7 +586,7 @@ void PartManager::removeManagedTopLevelWidget( const QWidget *topLevel )
void PartManager::slotManagedTopLevelWidgetDestroyed()
{
- const QWidget *widget = static_cast<const QWidget *>( sender() );
+ const TQWidget *widget = static_cast<const TQWidget *>( sender() );
removeManagedTopLevelWidget( widget );
}
diff --git a/kparts/partmanager.h b/kparts/partmanager.h
index 95e70895c..a9b150a67 100644
--- a/kparts/partmanager.h
+++ b/kparts/partmanager.h
@@ -21,9 +21,9 @@
#ifndef __kpartmanager_h__
#define __kpartmanager_h__
-#include <qobject.h>
-#include <qwidget.h>
-#include <qptrlist.h>
+#include <tqobject.h>
+#include <tqwidget.h>
+#include <tqptrlist.h>
#include <kdelibs_export.h>
@@ -59,7 +59,7 @@ public:
enum SelectionPolicy { Direct, TriState };
/**
- * This extends QFocusEvent::Reason with the non-focus-event reasons for partmanager to activate a part.
+ * This extends TQFocusEvent::Reason with the non-focus-event reasons for partmanager to activate a part.
* To test for "any focusin reason", use < ReasonLeftClick.
* NoReason usually means: explicit activation with @ref setActivePart.
* @since 3.3
@@ -74,17 +74,17 @@ public:
* events
* @param name The object's name, if any.
*/
- PartManager( QWidget * parent, const char * name = 0L );
+ PartManager( TQWidget * parent, const char * name = 0L );
/**
* Constructs a part manager.
*
* @param topLevel The toplevel widget (window / dialog ) the
* partmanager should monitor for activation/selection
* events
- * @param parent The parent QObject.
+ * @param parent The parent TQObject.
* @param name The object's name, if any.
*/
- PartManager( QWidget * topLevel, QObject *parent, const char *name = 0 );
+ PartManager( TQWidget * topLevel, TQObject *parent, const char *name = 0 );
virtual ~PartManager();
/**
@@ -142,7 +142,7 @@ public:
/**
* @internal
*/
- virtual bool eventFilter( QObject *obj, QEvent *ev );
+ virtual bool eventFilter( TQObject *obj, TQEvent *ev );
/**
* Adds a part to the manager.
@@ -175,7 +175,7 @@ public:
* @p widget can be used to specify which widget was responsible for the activation.
* This is important if you have multiple views for a document/part, like in KOffice.
*/
- virtual void setActivePart( Part *part, QWidget *widget = 0L );
+ virtual void setActivePart( Part *part, TQWidget *widget = 0L );
/**
* Returns the active part.
@@ -185,7 +185,7 @@ public:
/**
* Returns the active widget of the current active part (see activePart()).
*/
- virtual QWidget *activeWidget() const;
+ virtual TQWidget *activeWidget() const;
/**
* Sets the selected part.
@@ -195,7 +195,7 @@ public:
* @p widget can be used to specify which widget was responsible for the selection.
* This is important if you have multiple views for a document/part, like in KOffice.
*/
- virtual void setSelectedPart( Part *part, QWidget *widget = 0L );
+ virtual void setSelectedPart( Part *part, TQWidget *widget = 0L );
/**
* Returns the current selected part.
@@ -205,12 +205,12 @@ public:
/**
* Returns the selected widget of the current selected part (see selectedPart()).
*/
- virtual QWidget *selectedWidget() const;
+ virtual TQWidget *selectedWidget() const;
/**
* Returns the list of parts being managed by the partmanager.
*/
- const QPtrList<Part> *parts() const;
+ const TQPtrList<Part> *parts() const;
/**
* Adds the @p topLevel widget to the list of managed toplevel widgets.
@@ -219,12 +219,12 @@ public:
* constructor. Sometimes however (like for example when using the KDE dockwidget
* library), it is necessary to extend this.
*/
- void addManagedTopLevelWidget( const QWidget *topLevel );
+ void addManagedTopLevelWidget( const TQWidget *topLevel );
/**
* Removes the @p topLevel widget from the list of managed toplevel widgets.
* @see addManagedTopLevelWidget
*/
- void removeManagedTopLevelWidget( const QWidget *topLevel );
+ void removeManagedTopLevelWidget( const TQWidget *topLevel );
/**
* @return the reason for the last activePartChanged signal emitted.
@@ -274,8 +274,8 @@ protected slots:
*/
void slotManagedTopLevelWidgetDestroyed();
private:
- Part * findPartFromWidget( QWidget * widget, const QPoint &pos );
- Part * findPartFromWidget( QWidget * widget );
+ Part * findPartFromWidget( TQWidget * widget, const TQPoint &pos );
+ Part * findPartFromWidget( TQWidget * widget );
protected:
virtual void virtual_hook( int id, void* data );
diff --git a/kparts/plugin.cpp b/kparts/plugin.cpp
index f0764fd0f..c9b0d2e36 100644
--- a/kparts/plugin.cpp
+++ b/kparts/plugin.cpp
@@ -25,9 +25,9 @@
#include <assert.h>
-#include <qfile.h>
-#include <qobjectlist.h>
-#include <qfileinfo.h>
+#include <tqfile.h>
+#include <tqobjectlist.h>
+#include <tqfileinfo.h>
#include <klibloader.h>
#include <kinstance.h>
@@ -46,11 +46,11 @@ public:
PluginPrivate() : m_parentInstance( 0 ) {}
const KInstance *m_parentInstance;
- QString m_library; // filename of the library
+ TQString m_library; // filename of the library
};
-Plugin::Plugin( QObject* parent, const char* name )
- : QObject( parent, name )
+Plugin::Plugin( TQObject* parent, const char* name )
+ : TQObject( parent, name )
{
//kdDebug() << className() << endl;
d = new PluginPrivate();
@@ -61,65 +61,65 @@ Plugin::~Plugin()
delete d;
}
-QString Plugin::xmlFile() const
+TQString Plugin::xmlFile() const
{
- QString path = KXMLGUIClient::xmlFile();
+ TQString path = KXMLGUIClient::xmlFile();
if ( !d->m_parentInstance || ( path.length() > 0 && path[ 0 ] == '/' ) )
return path;
- QString absPath = locate( "data", QString::fromLatin1( d->m_parentInstance->instanceName() ) + '/' + path );
+ TQString absPath = locate( "data", TQString::fromLatin1( d->m_parentInstance->instanceName() ) + '/' + path );
assert( !absPath.isEmpty() );
return absPath;
}
-QString Plugin::localXMLFile() const
+TQString Plugin::localXMLFile() const
{
- QString path = KXMLGUIClient::xmlFile();
+ TQString path = KXMLGUIClient::xmlFile();
if ( !d->m_parentInstance || ( path.length() > 0 && path[ 0 ] == '/' ) )
return path;
- QString absPath = locateLocal( "data", QString::fromLatin1( d->m_parentInstance->instanceName() ) + '/' + path );
+ TQString absPath = locateLocal( "data", TQString::fromLatin1( d->m_parentInstance->instanceName() ) + '/' + path );
assert( !absPath.isEmpty() );
return absPath;
}
//static
-QValueList<Plugin::PluginInfo> Plugin::pluginInfos( const KInstance * instance )
+TQValueList<Plugin::PluginInfo> Plugin::pluginInfos( const KInstance * instance )
{
if ( !instance )
kdError(1000) << "No instance ???" << endl;
- QValueList<PluginInfo> plugins;
+ TQValueList<PluginInfo> plugins;
// KDE4: change * into *.rc and remove test for .desktop from the for loop below.
- const QStringList pluginDocs = instance->dirs()->findAllResources(
+ const TQStringList pluginDocs = instance->dirs()->findAllResources(
"data", instance->instanceName()+"/kpartplugins/*", true, false );
- QMap<QString,QStringList> sortedPlugins;
+ TQMap<TQString,TQStringList> sortedPlugins;
- QStringList::ConstIterator pIt = pluginDocs.begin();
- QStringList::ConstIterator pEnd = pluginDocs.end();
+ TQStringList::ConstIterator pIt = pluginDocs.begin();
+ TQStringList::ConstIterator pEnd = pluginDocs.end();
for (; pIt != pEnd; ++pIt )
{
- QFileInfo fInfo( *pIt );
- if ( fInfo.extension() == QString::fromLatin1( "desktop" ) )
+ TQFileInfo fInfo( *pIt );
+ if ( fInfo.extension() == TQString::fromLatin1( "desktop" ) )
continue;
- QMap<QString,QStringList>::Iterator mapIt = sortedPlugins.find( fInfo.fileName() );
+ TQMap<TQString,TQStringList>::Iterator mapIt = sortedPlugins.find( fInfo.fileName() );
if ( mapIt == sortedPlugins.end() )
- mapIt = sortedPlugins.insert( fInfo.fileName(), QStringList() );
+ mapIt = sortedPlugins.insert( fInfo.fileName(), TQStringList() );
mapIt.data().append( *pIt );
}
- QMap<QString,QStringList>::ConstIterator mapIt = sortedPlugins.begin();
- QMap<QString,QStringList>::ConstIterator mapEnd = sortedPlugins.end();
+ TQMap<TQString,TQStringList>::ConstIterator mapIt = sortedPlugins.begin();
+ TQMap<TQString,TQStringList>::ConstIterator mapEnd = sortedPlugins.end();
for (; mapIt != mapEnd; ++mapIt )
{
PluginInfo info;
- QString doc;
+ TQString doc;
info.m_absXMLFileName = KXMLGUIClient::findMostRecentXMLFile( mapIt.data(), doc );
if ( info.m_absXMLFileName.isEmpty() )
continue;
@@ -138,23 +138,23 @@ QValueList<Plugin::PluginInfo> Plugin::pluginInfos( const KInstance * instance )
return plugins;
}
-void Plugin::loadPlugins( QObject *parent, const KInstance *instance )
+void Plugin::loadPlugins( TQObject *parent, const KInstance *instance )
{
loadPlugins( parent, pluginInfos( instance ), instance );
}
-void Plugin::loadPlugins( QObject *parent, const QValueList<PluginInfo> &pluginInfos, const KInstance *instance )
+void Plugin::loadPlugins( TQObject *parent, const TQValueList<PluginInfo> &pluginInfos, const KInstance *instance )
{
- QValueList<PluginInfo>::ConstIterator pIt = pluginInfos.begin();
- QValueList<PluginInfo>::ConstIterator pEnd = pluginInfos.end();
+ TQValueList<PluginInfo>::ConstIterator pIt = pluginInfos.begin();
+ TQValueList<PluginInfo>::ConstIterator pEnd = pluginInfos.end();
for (; pIt != pEnd; ++pIt )
{
- QString library = (*pIt).m_document.documentElement().attribute( "library" );
+ TQString library = (*pIt).m_document.documentElement().attribute( "library" );
if ( library.isEmpty() || hasPlugin( parent, library ) )
continue;
- Plugin *plugin = loadPlugin( parent, QFile::encodeName(library) );
+ Plugin *plugin = loadPlugin( parent, TQFile::encodeName(library) );
if ( plugin )
{
@@ -167,13 +167,13 @@ void Plugin::loadPlugins( QObject *parent, const QValueList<PluginInfo> &pluginI
}
-void Plugin::loadPlugins( QObject *parent, const QValueList<PluginInfo> &pluginInfos )
+void Plugin::loadPlugins( TQObject *parent, const TQValueList<PluginInfo> &pluginInfos )
{
loadPlugins(parent, pluginInfos, 0);
}
// static
-Plugin* Plugin::loadPlugin( QObject * parent, const char* libname )
+Plugin* Plugin::loadPlugin( TQObject * parent, const char* libname )
{
Plugin* plugin = ComponentFactory::createInstanceFromLibrary<Plugin>( libname, parent, libname );
if ( !plugin )
@@ -182,16 +182,16 @@ Plugin* Plugin::loadPlugin( QObject * parent, const char* libname )
return plugin;
}
-QPtrList<KParts::Plugin> Plugin::pluginObjects( QObject *parent )
+TQPtrList<KParts::Plugin> Plugin::pluginObjects( TQObject *parent )
{
- QPtrList<KParts::Plugin> objects;
+ TQPtrList<KParts::Plugin> objects;
if (!parent )
return objects;
- QObjectList *plugins = parent->queryList( "KParts::Plugin", 0, false, false );
+ TQObjectList *plugins = parent->queryList( "KParts::Plugin", 0, false, false );
- QObjectListIt it( *plugins );
+ TQObjectListIt it( *plugins );
for ( ; it.current() ; ++it )
{
objects.append( static_cast<Plugin *>( it.current() ) );
@@ -202,10 +202,10 @@ QPtrList<KParts::Plugin> Plugin::pluginObjects( QObject *parent )
return objects;
}
-bool Plugin::hasPlugin( QObject* parent, const QString& library )
+bool Plugin::hasPlugin( TQObject* parent, const TQString& library )
{
- QObjectList *plugins = parent->queryList( "KParts::Plugin", 0, false, false );
- QObjectListIt it( *plugins );
+ TQObjectList *plugins = parent->queryList( "KParts::Plugin", 0, false, false );
+ TQObjectListIt it( *plugins );
for ( ; it.current() ; ++it )
{
if ( static_cast<Plugin *>( it.current() )->d->m_library == library )
@@ -224,22 +224,22 @@ void Plugin::setInstance( KInstance *instance )
KXMLGUIClient::setInstance( instance );
}
-void Plugin::loadPlugins( QObject *parent, KXMLGUIClient* parentGUIClient, KInstance* instance, bool enableNewPluginsByDefault )
+void Plugin::loadPlugins( TQObject *parent, KXMLGUIClient* parentGUIClient, KInstance* instance, bool enableNewPluginsByDefault )
{
KConfigGroup cfgGroup( instance->config(), "KParts Plugins" );
- QValueList<PluginInfo> plugins = pluginInfos( instance );
- QValueList<PluginInfo>::ConstIterator pIt = plugins.begin();
- QValueList<PluginInfo>::ConstIterator pEnd = plugins.end();
+ TQValueList<PluginInfo> plugins = pluginInfos( instance );
+ TQValueList<PluginInfo>::ConstIterator pIt = plugins.begin();
+ TQValueList<PluginInfo>::ConstIterator pEnd = plugins.end();
for (; pIt != pEnd; ++pIt )
{
- QDomElement docElem = (*pIt).m_document.documentElement();
- QString library = docElem.attribute( "library" );
+ TQDomElement docElem = (*pIt).m_document.documentElement();
+ TQString library = docElem.attribute( "library" );
if ( library.isEmpty() )
continue;
// Check configuration
- const QString name = docElem.attribute( "name" );
+ const TQString name = docElem.attribute( "name" );
bool pluginEnabled = enableNewPluginsByDefault;
if ( cfgGroup.hasKey( name + "Enabled" ) )
@@ -248,11 +248,11 @@ void Plugin::loadPlugins( QObject *parent, KXMLGUIClient* parentGUIClient, KInst
}
else
{ // no user-setting, load plugin default setting
- QString relPath = QString( instance->instanceName() ) + "/" + (*pIt).m_relXMLFileName;
+ TQString relPath = TQString( instance->instanceName() ) + "/" + (*pIt).m_relXMLFileName;
relPath.truncate( relPath.findRev( '.' ) ); // remove extension
relPath += ".desktop";
//kdDebug(1000) << "looking for " << relPath << endl;
- const QString desktopfile = instance->dirs()->findResource( "data", relPath );
+ const TQString desktopfile = instance->dirs()->findResource( "data", relPath );
if( !desktopfile.isEmpty() )
{
//kdDebug(1000) << "loadPlugins found desktop file for " << name << ": " << desktopfile << endl;
@@ -268,8 +268,8 @@ void Plugin::loadPlugins( QObject *parent, KXMLGUIClient* parentGUIClient, KInst
}
// search through already present plugins
- QObjectList *pluginList = parent->queryList( "KParts::Plugin", 0, false, false );
- QObjectListIt it( *pluginList );
+ TQObjectList *pluginList = parent->queryList( "KParts::Plugin", 0, false, false );
+ TQObjectListIt it( *pluginList );
bool pluginFound = false;
for ( ; it.current() ; ++it )
{
@@ -298,7 +298,7 @@ void Plugin::loadPlugins( QObject *parent, KXMLGUIClient* parentGUIClient, KInst
continue;
kdDebug( 1000 ) << "load plugin " << name << endl;
- Plugin *plugin = loadPlugin( parent, QFile::encodeName(library) );
+ Plugin *plugin = loadPlugin( parent, TQFile::encodeName(library) );
if ( plugin )
{
diff --git a/kparts/plugin.h b/kparts/plugin.h
index 4ede5768d..829687c6e 100644
--- a/kparts/plugin.h
+++ b/kparts/plugin.h
@@ -20,7 +20,7 @@
#ifndef PLUGIN_H
#define PLUGIN_H
-#include <qobject.h>
+#include <tqobject.h>
#include <kaction.h>
#include <kxmlguiclient.h>
@@ -46,7 +46,7 @@ namespace KParts
* You should also install a "plugin info" .desktop file with the same name.
* \see PluginInfo
*/
-class KPARTS_EXPORT Plugin : public QObject, virtual public KXMLGUIClient
+class KPARTS_EXPORT Plugin : public TQObject, virtual public KXMLGUIClient
{
Q_OBJECT
public:
@@ -55,15 +55,15 @@ public:
*/
struct PluginInfo
{
- QString m_relXMLFileName; ///< relative filename, i.e. kpartplugins/name
- QString m_absXMLFileName; ///< full path of most recent filename matching the relative filename
- QDomDocument m_document;
+ TQString m_relXMLFileName; ///< relative filename, i.e. kpartplugins/name
+ TQString m_absXMLFileName; ///< full path of most recent filename matching the relative filename
+ TQDomDocument m_document;
};
/**
* Construct a new KParts plugin.
*/
- Plugin( QObject* parent = 0, const char* name = 0 );
+ Plugin( TQObject* parent = 0, const char* name = 0 );
/**
* Destructor.
*/
@@ -72,12 +72,12 @@ public:
/**
* Reimplemented for internal reasons
*/
- virtual QString xmlFile() const;
+ virtual TQString xmlFile() const;
/**
* Reimplemented for internal reasons
*/
- virtual QString localXMLFile() const;
+ virtual TQString localXMLFile() const;
/**
* Load the plugin libraries from the directories appropriate
@@ -86,7 +86,7 @@ public:
* It is recommended to use the last loadPlugins method instead,
* to support enabling and disabling of plugins.
*/
- static void loadPlugins( QObject *parent, const KInstance * instance );
+ static void loadPlugins( TQObject *parent, const KInstance * instance );
/**
* Load the plugin libraries specified by the list @p docs and make the
@@ -95,7 +95,7 @@ public:
* It is recommended to use the last loadPlugins method instead,
* to support enabling and disabling of plugins.
*/
- static void loadPlugins( QObject *parent, const QValueList<PluginInfo> &pluginInfos );
+ static void loadPlugins( TQObject *parent, const TQValueList<PluginInfo> &pluginInfos );
/**
* Load the plugin libraries specified by the list @p pluginInfos, make the
@@ -104,7 +104,7 @@ public:
* It is recommended to use the last loadPlugins method instead,
* to support enabling and disabling of plugins.
*/
- static void loadPlugins( QObject *parent, const QValueList<PluginInfo> &pluginInfos, const KInstance * instance );
+ static void loadPlugins( TQObject *parent, const TQValueList<PluginInfo> &pluginInfos, const KInstance * instance );
/**
* Load the plugin libraries for the given @p instance, make the
@@ -129,8 +129,8 @@ public:
* \code
* if( factory() )
* {
- * QPtrList<KParts::Plugin> plugins = KParts::Plugin::pluginObjects( this );
- * QPtrListIterator<KParts::Plugin> it( plugins );
+ * TQPtrList<KParts::Plugin> plugins = KParts::Plugin::pluginObjects( this );
+ * TQPtrListIterator<KParts::Plugin> it( plugins );
* KParts::Plugin * plugin;
* while( ( plugin = it.current() ) != 0 )
* {
@@ -140,34 +140,34 @@ public:
* }
* \endcode
*/
- static void loadPlugins( QObject *parent, KXMLGUIClient* parentGUIClient, KInstance* instance, bool enableNewPluginsByDefault = true );
+ static void loadPlugins( TQObject *parent, KXMLGUIClient* parentGUIClient, KInstance* instance, bool enableNewPluginsByDefault = true );
/**
* Returns a list of plugin objects loaded for @p parent. This
* functions basically calls the queryList method of
- * QObject to retrieve the list of child objects inheriting
+ * TQObject to retrieve the list of child objects inheriting
* KParts::Plugin .
**/
- static QPtrList<Plugin> pluginObjects( QObject *parent );
+ static TQPtrList<Plugin> pluginObjects( TQObject *parent );
protected:
/**
* Look for plugins in the @p instance's "data" directory (+"/kpartplugins")
*
- * @return A list of QDomDocument s, containing the parsed xml documents returned by plugins.
+ * @return A list of TQDomDocument s, containing the parsed xml documents returned by plugins.
*/
- static QValueList<Plugin::PluginInfo> pluginInfos( const KInstance * instance );
+ static TQValueList<Plugin::PluginInfo> pluginInfos( const KInstance * instance );
/**
* @internal
* @return The plugin created from the library @p libname
*/
- static Plugin* loadPlugin( QObject * parent, const char* libname );
+ static Plugin* loadPlugin( TQObject * parent, const char* libname );
virtual void setInstance( KInstance *instance );
private:
- static bool hasPlugin( QObject* parent, const QString& library );
+ static bool hasPlugin( TQObject* parent, const TQString& library );
class PluginPrivate;
PluginPrivate *d;
};
diff --git a/kparts/statusbarextension.cpp b/kparts/statusbarextension.cpp
index bd4e09b61..6b0ee3cb2 100644
--- a/kparts/statusbarextension.cpp
+++ b/kparts/statusbarextension.cpp
@@ -20,8 +20,8 @@
#include "statusbarextension.h"
-#include <qvaluelist.h>
-#include <qobjectlist.h>
+#include <tqvaluelist.h>
+#include <tqobjectlist.h>
#include <kstatusbar.h>
#include <kmainwindow.h>
@@ -41,11 +41,11 @@ class KParts::StatusBarItem {
StatusBarItem() // for QValueList
: m_widget(0), m_visible(false)
{}
- StatusBarItem( QWidget * widget, int stretch, bool permanent )
+ StatusBarItem( TQWidget * widget, int stretch, bool permanent )
: m_widget(widget), m_stretch(stretch), m_permanent(permanent), m_visible(false)
{}
- QWidget * widget() const { return m_widget; }
+ TQWidget * widget() const { return m_widget; }
void ensureItemShown( KStatusBar * sb )
{
@@ -66,7 +66,7 @@ class KParts::StatusBarItem {
}
}
private:
- QWidget * m_widget;
+ TQWidget * m_widget;
int m_stretch;
bool m_permanent;
bool m_visible; // true when the item has been added to the statusbar
@@ -76,7 +76,7 @@ class KParts::StatusBarItem {
StatusBarExtension::StatusBarExtension(KParts::ReadOnlyPart *parent, const char* name)
- : QObject(parent, name), m_statusBar(0), d(0)
+ : TQObject(parent, name), m_statusBar(0), d(0)
{
parent->installEventFilter(this);
}
@@ -86,15 +86,15 @@ StatusBarExtension::~StatusBarExtension()
}
-StatusBarExtension *StatusBarExtension::childObject( QObject *obj )
+StatusBarExtension *StatusBarExtension::childObject( TQObject *obj )
{
if ( !obj || !obj->children() )
return 0L;
// we try to do it on our own, in hope that we are faster than
// queryList, which looks kind of big :-)
- const QObjectList *children = obj->children();
- QObjectListIt it( *children );
+ const TQObjectList *children = obj->children();
+ TQObjectListIt it( *children );
for (; it.current(); ++it )
if ( it.current()->inherits( "KParts::StatusBarExtension" ) )
return static_cast<KParts::StatusBarExtension *>( it.current() );
@@ -102,27 +102,27 @@ StatusBarExtension *StatusBarExtension::childObject( QObject *obj )
return 0L;
}
-bool StatusBarExtension::eventFilter(QObject * watched, QEvent* ev)
+bool StatusBarExtension::eventFilter(TQObject * watched, TQEvent* ev)
{
if ( !GUIActivateEvent::test( ev ) ||
!watched->inherits("KParts::ReadOnlyPart") )
- return QObject::eventFilter(watched, ev);
+ return TQObject::eventFilter(watched, ev);
KStatusBar * sb = statusBar();
if ( !sb )
- return QObject::eventFilter(watched, ev);
+ return TQObject::eventFilter(watched, ev);
GUIActivateEvent *gae = static_cast<GUIActivateEvent*>(ev);
if ( gae->activated() )
{
- QValueListIterator<StatusBarItem> it = m_statusBarItems.begin();
+ TQValueListIterator<StatusBarItem> it = m_statusBarItems.begin();
for ( ; it != m_statusBarItems.end() ; ++it )
(*it).ensureItemShown( sb );
}
else
{
- QValueListIterator<StatusBarItem> it = m_statusBarItems.begin();
+ TQValueListIterator<StatusBarItem> it = m_statusBarItems.begin();
for ( ; it != m_statusBarItems.end() ; ++it )
(*it).ensureItemHidden( sb );
}
@@ -134,7 +134,7 @@ bool StatusBarExtension::eventFilter(QObject * watched, QEvent* ev)
KStatusBar * StatusBarExtension::statusBar() const
{
if ( !m_statusBar ) {
- QWidget* w = static_cast<KParts::ReadOnlyPart*>(parent())->widget();
+ TQWidget* w = static_cast<KParts::ReadOnlyPart*>(parent())->widget();
KMainWindow* mw = dynamic_cast<KMainWindow *>( w->topLevelWidget() );
if ( mw )
m_statusBar = mw->statusBar();
@@ -147,20 +147,20 @@ void StatusBarExtension::setStatusBar( KStatusBar* status )
m_statusBar = status;
}
-void StatusBarExtension::addStatusBarItem( QWidget * widget, int stretch, bool permanent )
+void StatusBarExtension::addStatusBarItem( TQWidget * widget, int stretch, bool permanent )
{
m_statusBarItems.append( StatusBarItem( widget, stretch, permanent ) );
- QValueListIterator<StatusBarItem> it = m_statusBarItems.fromLast();
+ TQValueListIterator<StatusBarItem> it = m_statusBarItems.fromLast();
KStatusBar * sb = statusBar();
Q_ASSERT(sb);
if (sb)
(*it).ensureItemShown( sb );
}
-void StatusBarExtension::removeStatusBarItem( QWidget * widget )
+void StatusBarExtension::removeStatusBarItem( TQWidget * widget )
{
KStatusBar * sb = statusBar();
- QValueListIterator<StatusBarItem> it = m_statusBarItems.begin();
+ TQValueListIterator<StatusBarItem> it = m_statusBarItems.begin();
for ( ; it != m_statusBarItems.end() ; ++it )
if ( (*it).widget() == widget )
{
diff --git a/kparts/statusbarextension.h b/kparts/statusbarextension.h
index e6fc0064b..f176f53d2 100644
--- a/kparts/statusbarextension.h
+++ b/kparts/statusbarextension.h
@@ -21,8 +21,8 @@
#ifndef KPARTS_STATUSBAREXTENSION_H
#define KPARTS_STATUSBAREXTENSION_H
-#include <qwidget.h>
-#include <qvaluelist.h>
+#include <tqwidget.h>
+#include <tqvaluelist.h>
#include <kdelibs_export.h>
@@ -63,7 +63,7 @@ namespace KParts
* If you use this method instead of using statusBar() directly,
* this extension will take care of removing the items when the parts GUI
* is deactivated and will re-add them when it is reactivated.
- * The parameters are the same as QStatusBar::addWidget().
+ * The parameters are the same as TQStatusBar::addWidget().
*
* Note that you can't use KStatusBar methods (inserting text items by id)
* but you can create a KStatusBarLabel with a dummy id instead, and use
@@ -71,7 +71,7 @@ namespace KParts
*
* @param widget the widget to add
* @param stretch the stretch factor. 0 for a minimum size.
- * @param permanent passed to QStatusBar::addWidget as the "permanent" bool.
+ * @param permanent passed to TQStatusBar::addWidget as the "permanent" bool.
* Note that the item isn't really permanent though, it goes away when
* the part is unactivated. This simply controls where temporary messages
* hide the @p widget, and whether it's added to the left or to the right side.
@@ -79,12 +79,12 @@ namespace KParts
* IMPORTANT: do NOT add any items immediately after constructing the extension.
* Give the application time to set the statusbar in the extension if necessary.
*/
- void addStatusBarItem( QWidget * widget, int stretch, bool permanent );
+ void addStatusBarItem( TQWidget * widget, int stretch, bool permanent );
/**
* Remove a @p widget from the statusbar for this part.
*/
- void removeStatusBarItem( QWidget * widget );
+ void removeStatusBarItem( TQWidget * widget );
/**
* @return the statusbar of the KMainWindow in which this part is currently embedded.
@@ -105,14 +105,14 @@ namespace KParts
* Queries @p obj for a child object which inherits from this
* BrowserExtension class. Convenience method.
*/
- static StatusBarExtension *childObject( QObject *obj );
+ static StatusBarExtension *childObject( TQObject *obj );
/** @internal */
- virtual bool eventFilter( QObject *watched, QEvent* ev );
+ virtual bool eventFilter( TQObject *watched, TQEvent* ev );
private:
- QValueList<StatusBarItem> m_statusBarItems; // Our statusbar items
+ TQValueList<StatusBarItem> m_statusBarItems; // Our statusbar items
mutable KStatusBar* m_statusBar;
// for future extensions
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: