diff options
Diffstat (limited to 'kopete/kopete/chatwindow/kopetechatwindowstylemanager.cpp')
-rw-r--r-- | kopete/kopete/chatwindow/kopetechatwindowstylemanager.cpp | 68 |
1 files changed, 34 insertions, 34 deletions
diff --git a/kopete/kopete/chatwindow/kopetechatwindowstylemanager.cpp b/kopete/kopete/chatwindow/kopetechatwindowstylemanager.cpp index 71032ea3..cb3291e7 100644 --- a/kopete/kopete/chatwindow/kopetechatwindowstylemanager.cpp +++ b/kopete/kopete/chatwindow/kopetechatwindowstylemanager.cpp @@ -18,7 +18,7 @@ #include "kopetechatwindowstylemanager.h" // Qt includes -#include <qvaluestack.h> +#include <tqvaluestack.h> // KDE includes #include <kstandarddirs.h> @@ -51,7 +51,7 @@ public: styleDirLister->deleteLater(); } - QMap<QString, ChatWindowStyle*>::Iterator styleIt, styleItEnd = stylePool.end(); + TQMap<TQString, ChatWindowStyle*>::Iterator styleIt, styleItEnd = stylePool.end(); for(styleIt = stylePool.begin(); styleIt != styleItEnd; ++styleIt) { delete styleIt.data(); @@ -62,9 +62,9 @@ public: StyleList availableStyles; // key = style path, value = ChatWindowStyle instance - QMap<QString, ChatWindowStyle*> stylePool; + TQMap<TQString, ChatWindowStyle*> stylePool; - QValueStack<KURL> styleDirs; + TQValueStack<KURL> styleDirs; }; static KStaticDeleter<ChatWindowStyleManager> ChatWindowStyleManagerstaticDeleter; @@ -81,8 +81,8 @@ ChatWindowStyleManager *ChatWindowStyleManager::self() return s_self; } -ChatWindowStyleManager::ChatWindowStyleManager(QObject *parent, const char *name) - : QObject(parent, name), d(new Private()) +ChatWindowStyleManager::ChatWindowStyleManager(TQObject *parent, const char *name) + : TQObject(parent, name), d(new Private()) { kdDebug(14000) << k_funcinfo << endl; loadStyles(); @@ -96,12 +96,12 @@ ChatWindowStyleManager::~ChatWindowStyleManager() void ChatWindowStyleManager::loadStyles() { - QStringList chatStyles = KGlobal::dirs()->findDirs( "appdata", QString::fromUtf8( "styles" ) ); - QString localStyleDir( locateLocal( "appdata", QString::fromUtf8("styles/"),true) ); + TQStringList chatStyles = KGlobal::dirs()->findDirs( "appdata", TQString::fromUtf8( "styles" ) ); + TQString localStyleDir( locateLocal( "appdata", TQString::fromUtf8("styles/"),true) ); if( !chatStyles.contains(localStyleDir)) chatStyles<<localStyleDir; - QStringList::const_iterator it; + TQStringList::const_iterator it; for(it = chatStyles.constBegin(); it != chatStyles.constEnd(); ++it) { kdDebug(14000) << k_funcinfo << *it << endl; @@ -111,8 +111,8 @@ void ChatWindowStyleManager::loadStyles() d->styleDirLister = new KDirLister(this); d->styleDirLister->setDirOnlyMode(true); - connect(d->styleDirLister, SIGNAL(newItems(const KFileItemList &)), this, SLOT(slotNewStyles(const KFileItemList &))); - connect(d->styleDirLister, SIGNAL(completed()), this, SLOT(slotDirectoryFinished())); + connect(d->styleDirLister, TQT_SIGNAL(newItems(const KFileItemList &)), this, TQT_SLOT(slotNewStyles(const KFileItemList &))); + connect(d->styleDirLister, TQT_SIGNAL(completed()), this, TQT_SLOT(slotDirectoryFinished())); if( !d->styleDirs.isEmpty() ) d->styleDirLister->openURL(d->styleDirs.pop(), true); @@ -123,9 +123,9 @@ ChatWindowStyleManager::StyleList ChatWindowStyleManager::getAvailableStyles() return d->availableStyles; } -int ChatWindowStyleManager::installStyle(const QString &styleBundlePath) +int ChatWindowStyleManager::installStyle(const TQString &styleBundlePath) { - QString localStyleDir( locateLocal( "appdata", QString::fromUtf8("styles/") ) ); + TQString localStyleDir( locateLocal( "appdata", TQString::fromUtf8("styles/") ) ); KArchiveEntry *currentEntry = 0L; KArchiveDirectory* currentDir = 0L; @@ -137,7 +137,7 @@ int ChatWindowStyleManager::installStyle(const QString &styleBundlePath) } // Find mimetype for current bundle. ZIP and KTar need separate constructor - QString currentBundleMimeType = KMimeType::findByPath(styleBundlePath, 0, false)->name(); + TQString currentBundleMimeType = KMimeType::findByPath(styleBundlePath, 0, false)->name(); if(currentBundleMimeType == "application/x-zip") { archive = new KZip(styleBundlePath); @@ -167,9 +167,9 @@ int ChatWindowStyleManager::installStyle(const QString &styleBundlePath) // main.css, Footer.html, Header.html, Status.html files in Contents/Ressources. // So for a style bundle to be valid, it must have a result greather than 8, because we test for 8 required entry. int validResult = 0; - QStringList entries = rootDir->entries(); + TQStringList entries = rootDir->entries(); // Will be reused later. - QStringList::Iterator entriesIt, entriesItEnd = entries.end(); + TQStringList::Iterator entriesIt, entriesItEnd = entries.end(); for(entriesIt = entries.begin(); entriesIt != entries.end(); ++entriesIt) { currentEntry = const_cast<KArchiveEntry*>(rootDir->entry(*entriesIt)); @@ -179,52 +179,52 @@ int ChatWindowStyleManager::installStyle(const QString &styleBundlePath) currentDir = dynamic_cast<KArchiveDirectory*>( currentEntry ); if (currentDir) { - if( currentDir->entry(QString::fromUtf8("Contents")) ) + if( currentDir->entry(TQString::fromUtf8("Contents")) ) { // kdDebug() << k_funcinfo << "Contents found" << endl; validResult += 1; } - if( currentDir->entry(QString::fromUtf8("Contents/Resources")) ) + if( currentDir->entry(TQString::fromUtf8("Contents/Resources")) ) { // kdDebug() << k_funcinfo << "Contents/Resources found" << endl; validResult += 1; } - if( currentDir->entry(QString::fromUtf8("Contents/Resources/Incoming")) ) + if( currentDir->entry(TQString::fromUtf8("Contents/Resources/Incoming")) ) { // kdDebug() << k_funcinfo << "Contents/Resources/Incoming found" << endl; validResult += 1; } - if( currentDir->entry(QString::fromUtf8("Contents/Resources/Outgoing")) ) + if( currentDir->entry(TQString::fromUtf8("Contents/Resources/Outgoing")) ) { // kdDebug() << k_funcinfo << "Contents/Resources/Outgoing found" << endl; validResult += 1; } - if( currentDir->entry(QString::fromUtf8("Contents/Resources/main.css")) ) + if( currentDir->entry(TQString::fromUtf8("Contents/Resources/main.css")) ) { // kdDebug() << k_funcinfo << "Contents/Resources/main.css found" << endl; validResult += 1; } - if( currentDir->entry(QString::fromUtf8("Contents/Resources/Footer.html")) ) + if( currentDir->entry(TQString::fromUtf8("Contents/Resources/Footer.html")) ) { // kdDebug() << k_funcinfo << "Contents/Resources/Footer.html found" << endl; validResult += 1; } - if( currentDir->entry(QString::fromUtf8("Contents/Resources/Status.html")) ) + if( currentDir->entry(TQString::fromUtf8("Contents/Resources/Status.html")) ) { // kdDebug() << k_funcinfo << "Contents/Resources/Status.html found" << endl; validResult += 1; } - if( currentDir->entry(QString::fromUtf8("Contents/Resources/Header.html")) ) + if( currentDir->entry(TQString::fromUtf8("Contents/Resources/Header.html")) ) { // kdDebug() << k_funcinfo << "Contents/Resources/Header.html found" << endl; validResult += 1; } - if( currentDir->entry(QString::fromUtf8("Contents/Resources/Incoming/Content.html")) ) + if( currentDir->entry(TQString::fromUtf8("Contents/Resources/Incoming/Content.html")) ) { // kdDebug() << k_funcinfo << "Contents/Resources/Incoming/Content.html found" << endl; validResult += 1; } - if( currentDir->entry(QString::fromUtf8("Contents/Resources/Outgoing/Content.html")) ) + if( currentDir->entry(TQString::fromUtf8("Contents/Resources/Outgoing/Content.html")) ) { // kdDebug() << k_funcinfo << "Contents/Resources/Outgoing/Content.html found" << endl; validResult += 1; @@ -232,7 +232,7 @@ int ChatWindowStyleManager::installStyle(const QString &styleBundlePath) } } } -// kdDebug() << k_funcinfo << "Valid result: " << QString::number(validResult) << endl; +// kdDebug() << k_funcinfo << "Valid result: " << TQString::number(validResult) << endl; // The archive is a valid style bundle. if(validResult >= 8) { @@ -243,7 +243,7 @@ int ChatWindowStyleManager::installStyle(const QString &styleBundlePath) if(currentEntry && currentEntry->isDirectory()) { // Ignore this MacOS X "garbage" directory in zip. - if(currentEntry->name() == QString::fromUtf8("__MACOSX")) + if(currentEntry->name() == TQString::fromUtf8("__MACOSX")) { continue; } @@ -284,13 +284,13 @@ int ChatWindowStyleManager::installStyle(const QString &styleBundlePath) return StyleUnknow; } -bool ChatWindowStyleManager::removeStyle(const QString &stylePath) +bool ChatWindowStyleManager::removeStyle(const TQString &stylePath) { // Find for the current style in avaiableStyles map. KURL urlStyle(stylePath); - QString styleName=urlStyle.fileName(); + TQString styleName=urlStyle.fileName(); StyleList::Iterator foundStyle = d->availableStyles.find(styleName); - // QMap iterator return end() if it found no item. + // TQMap iterator return end() if it found no item. if(foundStyle != d->availableStyles.end()) { d->availableStyles.remove(foundStyle); @@ -312,7 +312,7 @@ bool ChatWindowStyleManager::removeStyle(const QString &stylePath) } } -ChatWindowStyle *ChatWindowStyleManager::getStyleFromPool(const QString &stylePath) +ChatWindowStyle *ChatWindowStyleManager::getStyleFromPool(const TQString &stylePath) { if( d->stylePool.contains(stylePath) ) { @@ -344,11 +344,11 @@ ChatWindowStyle *ChatWindowStyleManager::getStyleFromPool(const QString &stylePa void ChatWindowStyleManager::slotNewStyles(const KFileItemList &dirList) { KFileItem *item; - QPtrListIterator<KFileItem> it( dirList ); + TQPtrListIterator<KFileItem> it( dirList ); while( (item = it.current()) != 0 ) { // Ignore data dir(from deprecated XSLT themes) - if( !item->url().fileName().contains(QString::fromUtf8("data")) ) + if( !item->url().fileName().contains(TQString::fromUtf8("data")) ) { kdDebug(14000) << k_funcinfo << "Listing: " << item->url().fileName() << endl; // If the style path is already in the pool, that's mean the style was updated on disk |