diff options
Diffstat (limited to 'kopete/kopete/config/appearance/appearanceconfig.cpp')
-rw-r--r-- | kopete/kopete/config/appearance/appearanceconfig.cpp | 290 |
1 files changed, 145 insertions, 145 deletions
diff --git a/kopete/kopete/config/appearance/appearanceconfig.cpp b/kopete/kopete/config/appearance/appearanceconfig.cpp index d83b0801..2f7a5eaf 100644 --- a/kopete/kopete/config/appearance/appearanceconfig.cpp +++ b/kopete/kopete/config/appearance/appearanceconfig.cpp @@ -29,13 +29,13 @@ #include "tooltipeditdialog.h" #include "emoticonseditdialog.h" -#include <qcheckbox.h> -#include <qdir.h> -#include <qlayout.h> -#include <qhbuttongroup.h> -#include <qspinbox.h> -#include <qslider.h> -#include <qlabel.h> +#include <tqcheckbox.h> +#include <tqdir.h> +#include <tqlayout.h> +#include <tqhbuttongroup.h> +#include <tqspinbox.h> +#include <tqslider.h> +#include <tqlabel.h> #include <kdeversion.h> #include <kinputdialog.h> @@ -84,9 +84,9 @@ #include "kopeteemoticons.h" #include "kopeteglobal.h" -#include <qtabwidget.h> +#include <tqtabwidget.h> -typedef KGenericFactory<AppearanceConfig, QWidget> KopeteAppearanceConfigFactory; +typedef KGenericFactory<AppearanceConfig, TQWidget> KopeteAppearanceConfigFactory; K_EXPORT_COMPONENT_FACTORY( kcm_kopete_appearanceconfig, KopeteAppearanceConfigFactory( "kcm_kopete_appearanceconfig" ) ) class FakeProtocol; @@ -102,7 +102,7 @@ public: styleChanged(false) {} - QTabWidget *mAppearanceTabCtl; + TQTabWidget *mAppearanceTabCtl; ChatMessagePart *preview; AppearanceConfig_Emoticons *mPrfsEmoticons; @@ -111,7 +111,7 @@ public: AppearanceConfig_ContactList *mPrfsContactList; // value is the style path - QMap<QListBoxItem*,QString> styleItemMap; + TQMap<TQListBoxItem*,TQString> styleItemMap; ChatWindowStyle::StyleVariants currentVariantMap; ChatWindowStyle *currentStyle; bool loading; @@ -130,16 +130,16 @@ public: class KopeteStyleNewStuff : public KNewStuff { public: - KopeteStyleNewStuff(const QString &type, QWidget *parentWidget = 0) + KopeteStyleNewStuff(const TQString &type, TQWidget *parentWidget = 0) : KNewStuff( type, parentWidget) {} - bool createUploadFile(const QString &) + bool createUploadFile(const TQString &) { return false; } - bool install(const QString &styleFilename) + bool install(const TQString &styleFilename) { int styleInstallReturn = 0; styleInstallReturn = ChatWindowStyleManager::self()->installStyle( styleFilename ); @@ -179,59 +179,59 @@ public: }; // TODO: Someday, this configuration dialog must(not should) use KConfigXT -AppearanceConfig::AppearanceConfig(QWidget *parent, const char* /*name*/, const QStringList &args ) +AppearanceConfig::AppearanceConfig(TQWidget *parent, const char* /*name*/, const TQStringList &args ) : KCModule( KopeteAppearanceConfigFactory::instance(), parent, args ) { d = new Private; - (new QVBoxLayout(this))->setAutoAdd(true); - d->mAppearanceTabCtl = new QTabWidget(this, "mAppearanceTabCtl"); + (new TQVBoxLayout(this))->setAutoAdd(true); + d->mAppearanceTabCtl = new TQTabWidget(this, "mAppearanceTabCtl"); KConfig *config = KGlobal::config(); config->setGroup( "ChatWindowSettings" ); // "Emoticons" TAB ========================================================== d->mPrfsEmoticons = new AppearanceConfig_Emoticons(d->mAppearanceTabCtl); - connect(d->mPrfsEmoticons->chkUseEmoticons, SIGNAL(toggled(bool)), - this, SLOT(emitChanged())); - connect(d->mPrfsEmoticons->chkRequireSpaces, SIGNAL(toggled(bool)), - this, SLOT(emitChanged())); - connect(d->mPrfsEmoticons->icon_theme_list, SIGNAL(selectionChanged()), - this, SLOT(slotSelectedEmoticonsThemeChanged())); - connect(d->mPrfsEmoticons->btnInstallTheme, SIGNAL(clicked()), - this, SLOT(installEmoticonTheme())); - - connect(d->mPrfsEmoticons->btnGetThemes, SIGNAL(clicked()), - this, SLOT(slotGetEmoticonThemes())); - connect(d->mPrfsEmoticons->btnRemoveTheme, SIGNAL(clicked()), - this, SLOT(removeSelectedEmoticonTheme())); - connect(d->mPrfsEmoticons->btnEditThemes, SIGNAL(clicked()), - this, SLOT(editSelectedEmoticonTheme())); + connect(d->mPrfsEmoticons->chkUseEmoticons, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(emitChanged())); + connect(d->mPrfsEmoticons->chkRequireSpaces, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(emitChanged())); + connect(d->mPrfsEmoticons->icon_theme_list, TQT_SIGNAL(selectionChanged()), + this, TQT_SLOT(slotSelectedEmoticonsThemeChanged())); + connect(d->mPrfsEmoticons->btnInstallTheme, TQT_SIGNAL(clicked()), + this, TQT_SLOT(installEmoticonTheme())); + + connect(d->mPrfsEmoticons->btnGetThemes, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotGetEmoticonThemes())); + connect(d->mPrfsEmoticons->btnRemoveTheme, TQT_SIGNAL(clicked()), + this, TQT_SLOT(removeSelectedEmoticonTheme())); + connect(d->mPrfsEmoticons->btnEditThemes, TQT_SIGNAL(clicked()), + this, TQT_SLOT(editSelectedEmoticonTheme())); d->mAppearanceTabCtl->addTab(d->mPrfsEmoticons, i18n("&Emoticons")); // "Chat Window" TAB ======================================================== d->mPrfsChatWindow = new AppearanceConfig_ChatWindow(d->mAppearanceTabCtl); - connect(d->mPrfsChatWindow->styleList, SIGNAL(selectionChanged(QListBoxItem *)), - this, SLOT(slotChatStyleSelected())); - connect(d->mPrfsChatWindow->variantList, SIGNAL(activated(const QString&)), - this, SLOT(slotChatStyleVariantSelected(const QString &))); - connect(d->mPrfsChatWindow->deleteButton, SIGNAL(clicked()), - this, SLOT(slotDeleteChatStyle())); - connect(d->mPrfsChatWindow->installButton, SIGNAL(clicked()), - this, SLOT(slotInstallChatStyle())); - connect(d->mPrfsChatWindow->btnGetStyles, SIGNAL(clicked()), - this, SLOT(slotGetChatStyles())); - connect(d->mPrfsChatWindow->groupConsecutiveMessages, SIGNAL(toggled(bool)), - this, SLOT(emitChanged())); + connect(d->mPrfsChatWindow->styleList, TQT_SIGNAL(selectionChanged(TQListBoxItem *)), + this, TQT_SLOT(slotChatStyleSelected())); + connect(d->mPrfsChatWindow->variantList, TQT_SIGNAL(activated(const TQString&)), + this, TQT_SLOT(slotChatStyleVariantSelected(const TQString &))); + connect(d->mPrfsChatWindow->deleteButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotDeleteChatStyle())); + connect(d->mPrfsChatWindow->installButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotInstallChatStyle())); + connect(d->mPrfsChatWindow->btnGetStyles, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotGetChatStyles())); + connect(d->mPrfsChatWindow->groupConsecutiveMessages, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(emitChanged())); // Show the available styles when the Manager has finish to load the styles. - connect(ChatWindowStyleManager::self(), SIGNAL(loadStylesFinished()), this, SLOT(slotLoadChatStyles())); + connect(ChatWindowStyleManager::self(), TQT_SIGNAL(loadStylesFinished()), this, TQT_SLOT(slotLoadChatStyles())); - d->mPrfsChatWindow->htmlFrame->setFrameStyle(QFrame::WinPanel | QFrame::Sunken); + d->mPrfsChatWindow->htmlFrame->setFrameStyle(TQFrame::WinPanel | TQFrame::Sunken); // Create the fake Chat Session createPreviewChatSession(); - QVBoxLayout *l = new QVBoxLayout(d->mPrfsChatWindow->htmlFrame); + TQVBoxLayout *l = new TQVBoxLayout(d->mPrfsChatWindow->htmlFrame); d->preview = new ChatMessagePart(d->previewChatSession, d->mPrfsChatWindow->htmlFrame, "preview"); d->preview->setJScriptEnabled(false); d->preview->setJavaEnabled(false); @@ -242,7 +242,7 @@ AppearanceConfig::AppearanceConfig(QWidget *parent, const char* /*name*/, const htmlWidget->setMarginHeight(4); htmlWidget->setFocusPolicy(NoFocus); htmlWidget->setSizePolicy( - QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding)); + TQSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding)); l->addWidget(htmlWidget); // Add the preview message to the ChatMessagePart createPreviewMessages(); @@ -251,28 +251,28 @@ AppearanceConfig::AppearanceConfig(QWidget *parent, const char* /*name*/, const // "Contact List" TAB ======================================================= d->mPrfsContactList = new AppearanceConfig_ContactList(d->mAppearanceTabCtl); - connect(d->mPrfsContactList->mTreeContactList, SIGNAL(toggled(bool)), - this, SLOT(emitChanged())); - connect(d->mPrfsContactList->mSortByGroup, SIGNAL(toggled(bool)), - this, SLOT(emitChanged())); - connect(d->mPrfsContactList->mEditTooltips, SIGNAL(clicked()), - this, SLOT(slotEditTooltips())); - connect(d->mPrfsContactList->mIndentContacts, SIGNAL(toggled(bool)), - this, SLOT(emitChanged())); - connect(d->mPrfsContactList->mDisplayMode, SIGNAL(clicked(int)), - this, SLOT(emitChanged())); - connect(d->mPrfsContactList->mIconMode, SIGNAL(toggled(bool)), - this, SLOT(emitChanged())); - connect(d->mPrfsContactList->mAnimateChanges, SIGNAL(toggled(bool)), - this, SLOT(emitChanged())); - connect(d->mPrfsContactList->mFadeVisibility, SIGNAL(toggled(bool)), - this, SLOT(emitChanged())); - connect(d->mPrfsContactList->mFoldVisibility, SIGNAL(toggled(bool)), - this, SLOT(emitChanged())); - connect(d->mPrfsContactList->mAutoHide, SIGNAL(toggled(bool)), - this, SLOT(emitChanged())); - connect(d->mPrfsContactList->mAutoHideTimeout, SIGNAL(valueChanged(int)), - this, SLOT(emitChanged())); + connect(d->mPrfsContactList->mTreeContactList, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(emitChanged())); + connect(d->mPrfsContactList->mSortByGroup, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(emitChanged())); + connect(d->mPrfsContactList->mEditTooltips, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotEditTooltips())); + connect(d->mPrfsContactList->mIndentContacts, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(emitChanged())); + connect(d->mPrfsContactList->mDisplayMode, TQT_SIGNAL(clicked(int)), + this, TQT_SLOT(emitChanged())); + connect(d->mPrfsContactList->mIconMode, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(emitChanged())); + connect(d->mPrfsContactList->mAnimateChanges, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(emitChanged())); + connect(d->mPrfsContactList->mFadeVisibility, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(emitChanged())); + connect(d->mPrfsContactList->mFoldVisibility, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(emitChanged())); + connect(d->mPrfsContactList->mAutoHide, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(emitChanged())); + connect(d->mPrfsContactList->mAutoHideTimeout, TQT_SIGNAL(valueChanged(int)), + this, TQT_SLOT(emitChanged())); // don't enable the checkbox if XRender is not available #ifdef HAVE_XRENDER @@ -285,37 +285,37 @@ AppearanceConfig::AppearanceConfig(QWidget *parent, const char* /*name*/, const // "Colors and Fonts" TAB =================================================== d->mPrfsColors = new AppearanceConfig_Colors(d->mAppearanceTabCtl); - connect(d->mPrfsColors->foregroundColor, SIGNAL(changed(const QColor &)), - this, SLOT(slotHighlightChanged())); - connect(d->mPrfsColors->backgroundColor, SIGNAL(changed(const QColor &)), - this, SLOT(slotHighlightChanged())); - connect(d->mPrfsColors->fontFace, SIGNAL(fontSelected(const QFont &)), - this, SLOT(slotChangeFont())); - connect(d->mPrfsColors->textColor, SIGNAL(changed(const QColor &)), - this, SLOT(slotUpdateChatPreview())); - connect(d->mPrfsColors->bgColor, SIGNAL(changed(const QColor &)), - this, SLOT(slotUpdateChatPreview())); - connect(d->mPrfsColors->linkColor, SIGNAL(changed(const QColor &)), - this, SLOT(slotUpdateChatPreview())); - connect(d->mPrfsColors->mGreyIdleMetaContacts, SIGNAL(toggled(bool)), - this, SLOT(emitChanged())); - connect(d->mPrfsColors->idleContactColor, SIGNAL(changed(const QColor &)), - this, SLOT(emitChanged())); - connect(d->mPrfsColors->mUseCustomFonts, SIGNAL(toggled(bool)), - this, SLOT(emitChanged())); - connect(d->mPrfsColors->mSmallFont, SIGNAL(fontSelected(const QFont &)), - this, SLOT(emitChanged())); - connect(d->mPrfsColors->mNormalFont, SIGNAL(fontSelected(const QFont &)), - this, SLOT(emitChanged())); - connect(d->mPrfsColors->mGroupNameColor, SIGNAL(changed(const QColor &)), - this, SLOT(emitChanged())); - - connect(d->mPrfsColors->mBgOverride, SIGNAL(toggled(bool)), - this, SLOT(emitChanged())); - connect(d->mPrfsColors->mFgOverride, SIGNAL(toggled(bool)), - this, SLOT(emitChanged())); - connect(d->mPrfsColors->mRtfOverride, SIGNAL(toggled(bool)), - this, SLOT(emitChanged())); + connect(d->mPrfsColors->foregroundColor, TQT_SIGNAL(changed(const TQColor &)), + this, TQT_SLOT(slotHighlightChanged())); + connect(d->mPrfsColors->backgroundColor, TQT_SIGNAL(changed(const TQColor &)), + this, TQT_SLOT(slotHighlightChanged())); + connect(d->mPrfsColors->fontFace, TQT_SIGNAL(fontSelected(const TQFont &)), + this, TQT_SLOT(slotChangeFont())); + connect(d->mPrfsColors->textColor, TQT_SIGNAL(changed(const TQColor &)), + this, TQT_SLOT(slotUpdateChatPreview())); + connect(d->mPrfsColors->bgColor, TQT_SIGNAL(changed(const TQColor &)), + this, TQT_SLOT(slotUpdateChatPreview())); + connect(d->mPrfsColors->linkColor, TQT_SIGNAL(changed(const TQColor &)), + this, TQT_SLOT(slotUpdateChatPreview())); + connect(d->mPrfsColors->mGreyIdleMetaContacts, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(emitChanged())); + connect(d->mPrfsColors->idleContactColor, TQT_SIGNAL(changed(const TQColor &)), + this, TQT_SLOT(emitChanged())); + connect(d->mPrfsColors->mUseCustomFonts, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(emitChanged())); + connect(d->mPrfsColors->mSmallFont, TQT_SIGNAL(fontSelected(const TQFont &)), + this, TQT_SLOT(emitChanged())); + connect(d->mPrfsColors->mNormalFont, TQT_SIGNAL(fontSelected(const TQFont &)), + this, TQT_SLOT(emitChanged())); + connect(d->mPrfsColors->mGroupNameColor, TQT_SIGNAL(changed(const TQColor &)), + this, TQT_SLOT(emitChanged())); + + connect(d->mPrfsColors->mBgOverride, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(emitChanged())); + connect(d->mPrfsColors->mFgOverride, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(emitChanged())); + connect(d->mPrfsColors->mRtfOverride, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(emitChanged())); d->mAppearanceTabCtl->addTab(d->mPrfsColors, i18n("Colors && Fonts")); @@ -331,8 +331,8 @@ AppearanceConfig::~AppearanceConfig() void AppearanceConfig::updateEmoticonsButton(bool _b) { - QString themeName = d->mPrfsEmoticons->icon_theme_list->currentText(); - QFileInfo fileInf(KGlobal::dirs()->findResource("emoticons", themeName+"/")); + TQString themeName = d->mPrfsEmoticons->icon_theme_list->currentText(); + TQFileInfo fileInf(KGlobal::dirs()->findResource("emoticons", themeName+"/")); d->mPrfsEmoticons->btnRemoveTheme->setEnabled( _b && fileInf.isWritable()); d->mPrfsEmoticons->btnGetThemes->setEnabled( false ); } @@ -499,28 +499,28 @@ void AppearanceConfig::updateEmoticonlist() d->mPrfsEmoticons->icon_theme_list->clear(); // Wipe out old list // Get a list of directories in our icon theme dir - QStringList themeDirs = KGlobal::dirs()->findDirs("emoticons", ""); + TQStringList themeDirs = KGlobal::dirs()->findDirs("emoticons", ""); // loop adding themes from all dirs into theme-list for(unsigned int x = 0;x < themeDirs.count();x++) { - QDir themeQDir(themeDirs[x]); - themeQDir.setFilter( QDir::Dirs ); // only scan for subdirs - themeQDir.setSorting( QDir::Name ); // I guess name is as good as any + TQDir themeQDir(themeDirs[x]); + themeQDir.setFilter( TQDir::Dirs ); // only scan for subdirs + themeQDir.setSorting( TQDir::Name ); // I guess name is as good as any for(unsigned int y = 0; y < themeQDir.count(); y++) { - QStringList themes = themeQDir.entryList(QDir::Dirs, QDir::Name); + TQStringList themes = themeQDir.entryList(TQDir::Dirs, TQDir::Name); // We don't care for '.' and '..' if ( themeQDir[y] != "." && themeQDir[y] != ".." ) { // Add ourselves to the list, using our directory name FIXME: use the first emoticon of the theme. - QPixmap previewPixmap = QPixmap(locate("emoticons", themeQDir[y]+"/smile.png")); + TQPixmap previewPixmap = TQPixmap(locate("emoticons", themeQDir[y]+"/smile.png")); d->mPrfsEmoticons->icon_theme_list->insertItem(previewPixmap,themeQDir[y]); } } } // Where is that theme in our big-list-o-themes? - QListBoxItem *item = d->mPrfsEmoticons->icon_theme_list->findItem( p->iconTheme() ); + TQListBoxItem *item = d->mPrfsEmoticons->icon_theme_list->findItem( p->iconTheme() ); if (item) // found it... make it the currently selected theme d->mPrfsEmoticons->icon_theme_list->setCurrentItem( item ); @@ -530,18 +530,18 @@ void AppearanceConfig::updateEmoticonlist() void AppearanceConfig::slotSelectedEmoticonsThemeChanged() { - QString themeName = d->mPrfsEmoticons->icon_theme_list->currentText(); - QFileInfo fileInf(KGlobal::dirs()->findResource("emoticons", themeName+"/")); + TQString themeName = d->mPrfsEmoticons->icon_theme_list->currentText(); + TQFileInfo fileInf(KGlobal::dirs()->findResource("emoticons", themeName+"/")); d->mPrfsEmoticons->btnRemoveTheme->setEnabled( fileInf.isWritable() ); Kopete::Emoticons emoticons( themeName ); - QStringList smileys = emoticons.emoticonAndPicList().keys(); - QString newContentText = "<qt>"; + TQStringList smileys = emoticons.emoticonAndPicList().keys(); + TQString newContentText = "<qt>"; - for(QStringList::Iterator it = smileys.begin(); it != smileys.end(); ++it ) - newContentText += QString::fromLatin1("<img src=\"%1\"> ").arg(*it); + for(TQStringList::Iterator it = smileys.begin(); it != smileys.end(); ++it ) + newContentText += TQString::fromLatin1("<img src=\"%1\"> ").arg(*it); - newContentText += QString::fromLatin1("</qt>"); + newContentText += TQString::fromLatin1("</qt>"); d->mPrfsEmoticons->icon_theme_preview->setText(newContentText); emitChanged(); } @@ -563,7 +563,7 @@ void AppearanceConfig::slotChangeFont() void AppearanceConfig::slotChatStyleSelected() { // Retrieve variant list. - QString stylePath = d->styleItemMap[d->mPrfsChatWindow->styleList->selectedItem()]; + TQString stylePath = d->styleItemMap[d->mPrfsChatWindow->styleList->selectedItem()]; d->currentStyle = ChatWindowStyleManager::self()->getStyleFromPool( stylePath ); if(d->currentStyle) @@ -603,7 +603,7 @@ void AppearanceConfig::slotChatStyleSelected() } } -void AppearanceConfig::slotChatStyleVariantSelected(const QString &variantName) +void AppearanceConfig::slotChatStyleVariantSelected(const TQString &variantName) { // kdDebug(14000) << k_funcinfo << variantName << endl; // kdDebug(14000) << k_funcinfo << d->currentVariantMap[variantName] << endl; @@ -615,11 +615,11 @@ void AppearanceConfig::slotChatStyleVariantSelected(const QString &variantName) void AppearanceConfig::slotInstallChatStyle() { - KURL styleToInstall = KFileDialog::getOpenURL( QString::null, QString::fromUtf8("application/x-zip application/x-tgz application/x-tbz"), this, i18n("Choose Chat Window style to install.") ); + KURL styleToInstall = KFileDialog::getOpenURL( TQString::null, TQString::fromUtf8("application/x-zip application/x-tgz application/x-tbz"), this, i18n("Choose Chat Window style to install.") ); if( !styleToInstall.isEmpty() ) { - QString stylePath; + TQString stylePath; if( KIO::NetAccess::download( styleToInstall, stylePath, this ) ) { int styleInstallReturn = 0; @@ -660,14 +660,14 @@ void AppearanceConfig::slotInstallChatStyle() void AppearanceConfig::slotDeleteChatStyle() { - QString styleName = d->mPrfsChatWindow->styleList->selectedItem()->text(); - QString stylePathToDelete = d->styleItemMap[d->mPrfsChatWindow->styleList->selectedItem()]; + TQString styleName = d->mPrfsChatWindow->styleList->selectedItem()->text(); + TQString stylePathToDelete = d->styleItemMap[d->mPrfsChatWindow->styleList->selectedItem()]; if( ChatWindowStyleManager::self()->removeStyle(stylePathToDelete) ) { KMessageBox::queuedMessageBox(this, KMessageBox::Information, i18n("It's the deleted style name", "The style %1 was successfully deleted.").arg(styleName)); // Get the first item in the stye List. - QString stylePath = (*d->styleItemMap.begin()); + TQString stylePath = (*d->styleItemMap.begin()); d->currentStyle = ChatWindowStyleManager::self()->getStyleFromPool(stylePath); emitChanged(); } @@ -686,7 +686,7 @@ void AppearanceConfig::slotGetChatStyles() downloadDialog->setType( "kopete/chatstyle" ); // you have to do this by hand when providing your own Engine KNS::ProviderLoader *provider = new KNS::ProviderLoader( this ); - QObject::connect( provider, SIGNAL( providersLoaded(Provider::List*) ), downloadDialog, SLOT( slotProviders (Provider::List *) ) ); + TQObject::connect( provider, TQT_SIGNAL( providersLoaded(Provider::List*) ), downloadDialog, TQT_SLOT( slotProviders (Provider::List *) ) ); provider->load( "kopete/chatstyle", "http://download.kde.org/khotnewstuff/kopetestyles12-providers.xml" ); downloadDialog->exec(); } @@ -696,7 +696,7 @@ void AppearanceConfig::slotGetChatStyles() class FakeContact : public Kopete::Contact { public: - FakeContact (Kopete::Account *account, const QString &id, Kopete::MetaContact *mc ) : Kopete::Contact( account, id, mc ) {} + FakeContact (Kopete::Account *account, const TQString &id, Kopete::MetaContact *mc ) : Kopete::Contact( account, id, mc ) {} virtual Kopete::ChatSession *manager(Kopete::Contact::CanCreateFlags /*c*/) { return 0L; } virtual void slotUserInfo() {}; }; @@ -705,29 +705,29 @@ public: class FakeProtocol : public Kopete::Protocol { public: -FakeProtocol( KInstance *instance, QObject *parent, const char *name ) : Kopete::Protocol(instance, parent, name){} -Kopete::Account* createNewAccount( const QString &/*accountId*/ ){return 0L;} -AddContactPage* createAddContactWidget( QWidget */*parent*/, Kopete::Account */*account*/){return 0L;} -KopeteEditAccountWidget* createEditAccountWidget( Kopete::Account */*account*/, QWidget */*parent */){return 0L;} +FakeProtocol( KInstance *instance, TQObject *parent, const char *name ) : Kopete::Protocol(instance, parent, name){} +Kopete::Account* createNewAccount( const TQString &/*accountId*/ ){return 0L;} +AddContactPage* createAddContactWidget( TQWidget */*parent*/, Kopete::Account */*account*/){return 0L;} +KopeteEditAccountWidget* createEditAccountWidget( Kopete::Account */*account*/, TQWidget */*parent */){return 0L;} }; // This is for style preview. class FakeAccount : public Kopete::Account { public: -FakeAccount(Kopete::Protocol *parent, const QString &accountID, const char *name) : Kopete::Account(parent, accountID, name){} +FakeAccount(Kopete::Protocol *parent, const TQString &accountID, const char *name) : Kopete::Account(parent, accountID, name){} ~FakeAccount() {} -bool createContact( const QString &/*contactId*/, Kopete::MetaContact */*parentContact*/ ){return true;} +bool createContact( const TQString &/*contactId*/, Kopete::MetaContact */*parentContact*/ ){return true;} void connect( const Kopete::OnlineStatus& /*initialStatus*/){} void disconnect(){} -void setOnlineStatus( const Kopete::OnlineStatus& /*status*/ , const QString &/*reason*/){} +void setOnlineStatus( const Kopete::OnlineStatus& /*status*/ , const TQString &/*reason*/){} }; void AppearanceConfig::createPreviewChatSession() { - d->previewProtocol = new FakeProtocol( new KInstance(QCString("kopete-preview-chatwindowstyle")), 0L, "kopete-preview-chatwindowstyle"); - d->previewAccount = new FakeAccount(d->previewProtocol, QString("previewaccount"), 0); + d->previewProtocol = new FakeProtocol( new KInstance(TQCString("kopete-preview-chatwindowstyle")), 0L, "kopete-preview-chatwindowstyle"); + d->previewAccount = new FakeAccount(d->previewProtocol, TQString("previewaccount"), 0); // Create fake meta/contacts d->myselfMetaContact = new Kopete::MetaContact(); @@ -757,11 +757,11 @@ void AppearanceConfig::createPreviewMessages() Kopete::Message msgOut2( d->myself, d->jack, i18n( "Ok, a outgoing consecutive message." ), Kopete::Message::Outbound ); Kopete::Message msgCol( d->jack, d->myself, i18n( "Here is an incoming colored message" ), Kopete::Message::Inbound ); - msgCol.setFg( QColor( "DodgerBlue" ) ); - msgCol.setBg( QColor( "LightSteelBlue" ) ); + msgCol.setFg( TQColor( "DodgerBlue" ) ); + msgCol.setBg( TQColor( "LightSteelBlue" ) ); Kopete::Message msgInt( d->jack, d->myself, i18n( "This is an internal message" ), Kopete::Message::Internal ); Kopete::Message msgAct( d->jack, d->myself, i18n( "performed an action" ), Kopete::Message::Inbound, - Kopete::Message::PlainText, QString::null, Kopete::Message::TypeAction ); + Kopete::Message::PlainText, TQString::null, Kopete::Message::TypeAction ); Kopete::Message msgHigh( d->jack, d->myself, i18n( "This is a highlighted message" ), Kopete::Message::Inbound ); msgHigh.setImportance( Kopete::Message::Highlight ); // This is a UTF-8 string btw. @@ -801,7 +801,7 @@ void AppearanceConfig::emitChanged() void AppearanceConfig::installEmoticonTheme() { - KURL themeURL = KURLRequesterDlg::getURL(QString::null, this, + KURL themeURL = KURLRequesterDlg::getURL(TQString::null, this, i18n("Drag or Type Emoticon Theme URL")); if ( themeURL.isEmpty() ) return; @@ -820,13 +820,13 @@ void AppearanceConfig::installEmoticonTheme() void AppearanceConfig::removeSelectedEmoticonTheme() { - QListBoxItem *selected = d->mPrfsEmoticons->icon_theme_list->selectedItem(); + TQListBoxItem *selected = d->mPrfsEmoticons->icon_theme_list->selectedItem(); if(selected==0) return; - QString themeName = selected->text(); + TQString themeName = selected->text(); - QString question=i18n("<qt>Are you sure you want to remove the " + TQString question=i18n("<qt>Are you sure you want to remove the " "<strong>%1</strong> emoticon theme?<br>" "<br>" "This will delete the files installed by this theme.</qt>"). @@ -864,18 +864,18 @@ void AppearanceConfig::slotGetEmoticonThemes() void AppearanceConfig::slotEditTooltips() { TooltipEditDialog *dlg = new TooltipEditDialog(this); - connect(dlg, SIGNAL(changed(bool)), this, SIGNAL(changed(bool))); + connect(dlg, TQT_SIGNAL(changed(bool)), this, TQT_SIGNAL(changed(bool))); dlg->exec(); delete dlg; } void AppearanceConfig::editSelectedEmoticonTheme() { - QListBoxItem *selected = d->mPrfsEmoticons->icon_theme_list->selectedItem(); + TQListBoxItem *selected = d->mPrfsEmoticons->icon_theme_list->selectedItem(); if(selected==0) return; - QString themeName = selected->text(); + TQString themeName = selected->text(); EmoticonsEditDialog *dlg = new EmoticonsEditDialog(this, themeName); dlg->exec(); |