From 47c8a359c5276062c4bc17f0e82410f29081b502 Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 31 Jul 2010 19:48:06 +0000 Subject: Trinity Qt initial conversion git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1157648 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kopete/libkopete/kopeteprefs.cpp | 92 ++++++++++++++++++++-------------------- 1 file changed, 46 insertions(+), 46 deletions(-) (limited to 'kopete/libkopete/kopeteprefs.cpp') diff --git a/kopete/libkopete/kopeteprefs.cpp b/kopete/libkopete/kopeteprefs.cpp index e1148260..2c974f7f 100644 --- a/kopete/libkopete/kopeteprefs.cpp +++ b/kopete/libkopete/kopeteprefs.cpp @@ -16,9 +16,9 @@ #include "kopeteprefs.h" -#include -#include -#include +#include +#include +#include #include #include @@ -37,7 +37,7 @@ KopetePrefs *KopetePrefs::prefs() return s_prefs; } -KopetePrefs::KopetePrefs() : QObject( kapp, "KopetePrefs" ) +KopetePrefs::KopetePrefs() : TQObject( kapp, "KopetePrefs" ) { config = KGlobal::config(); load(); @@ -82,7 +82,7 @@ void KopetePrefs::load() mChatViewBufferSize = config->readNumEntry("ChatView BufferSize", 250); - QColor tmpColor = KGlobalSettings::highlightColor(); + TQColor tmpColor = KGlobalSettings::highlightColor(); mHighlightBackground = config->readColorEntry("Highlight Background Color", &tmpColor); tmpColor = KGlobalSettings::highlightedTextColor(); mHighlightForeground = config->readColorEntry("Highlight Foreground Color", &tmpColor); @@ -90,7 +90,7 @@ void KopetePrefs::load() mBgOverride = config->readBoolEntry("ChatView Override Background", false); mFgOverride = config->readBoolEntry("ChatView Override Foreground", false); mRtfOverride = config->readBoolEntry("ChatView Override RTF", false); - mInterfacePreference = config->readEntry("View Plugin", QString::fromLatin1("kopete_chatwindow") ); + mInterfacePreference = config->readEntry("View Plugin", TQString::fromLatin1("kopete_chatwindow") ); tmpColor = KGlobalSettings::textColor(); mTextColor = config->readColorEntry("Text Color", &tmpColor ); tmpColor = KGlobalSettings::baseColor(); @@ -112,31 +112,31 @@ void KopetePrefs::load() if(mToolTipContents.empty()) { mToolTipContents - << QString::fromLatin1("FormattedName") - << QString::fromLatin1("userInfo") - << QString::fromLatin1("server") - << QString::fromLatin1("channels") - << QString::fromLatin1("FormattedIdleTime") - << QString::fromLatin1("channelMembers") - << QString::fromLatin1("channelTopic") - << QString::fromLatin1("emailAddress") - << QString::fromLatin1("homePage") - << QString::fromLatin1("onlineSince") - << QString::fromLatin1("lastOnline") - << QString::fromLatin1("awayMessage"); + << TQString::fromLatin1("FormattedName") + << TQString::fromLatin1("userInfo") + << TQString::fromLatin1("server") + << TQString::fromLatin1("channels") + << TQString::fromLatin1("FormattedIdleTime") + << TQString::fromLatin1("channelMembers") + << TQString::fromLatin1("channelTopic") + << TQString::fromLatin1("emailAddress") + << TQString::fromLatin1("homePage") + << TQString::fromLatin1("onlineSince") + << TQString::fromLatin1("lastOnline") + << TQString::fromLatin1("awayMessage"); } config->setGroup("ContactList"); int n = metaObject()->findProperty( "contactListDisplayMode" ); - QString value = config->readEntry("DisplayMode",QString::fromLatin1("Default")); + TQString value = config->readEntry("DisplayMode",TQString::fromLatin1("Default")); mContactListDisplayMode = (ContactDisplayMode)metaObject()->property( n )->keyToValue( value.latin1() ); n = metaObject()->findProperty( "contactListIconMode" ); value = config->readEntry("IconMode", - QString::fromLatin1("IconDefault")); + TQString::fromLatin1("IconDefault")); mContactListIconMode = (IconDisplayMode) metaObject()->property( n )->keyToValue( value.latin1() ); mContactListIndentContacts = config->readBoolEntry("IndentContacts", false); mContactListUseCustomFonts = config->readBoolEntry("UseCustomFonts", false); - QFont font = KGlobalSettings::generalFont(); + TQFont font = KGlobalSettings::generalFont(); mContactListNormalFont = config->readFontEntry("NormalFont", &font); if ( font.pixelSize() != -1 ) font.setPixelSize( (font.pixelSize() * 3) / 4 ); @@ -273,7 +273,7 @@ void KopetePrefs::save() mStyleVariantChanged = false; } -void KopetePrefs::setIconTheme(const QString &value) +void KopetePrefs::setIconTheme(const TQString &value) { if( mIconTheme != value ) { @@ -414,51 +414,51 @@ void KopetePrefs::setSoundIfAway(bool value) mSoundIfAway = value; } -void KopetePrefs::setStylePath(const QString &stylePath) +void KopetePrefs::setStylePath(const TQString &stylePath) { if(mStylePath != stylePath) mStylePathChanged = true; _setStylePath(stylePath); } -void KopetePrefs::_setStylePath(const QString &stylePath) +void KopetePrefs::_setStylePath(const TQString &stylePath) { mStylePath = stylePath; // Fallback to default style if the directory doesn't exist // or the value is empty. - if( !QFile::exists(stylePath) || stylePath.isEmpty() ) + if( !TQFile::exists(stylePath) || stylePath.isEmpty() ) { - QString fallback; - fallback = QString(QString::fromLatin1("styles/%1/")).arg(QString::fromLatin1(KOPETE_DEFAULT_CHATSTYLE)); + TQString fallback; + fallback = TQString(TQString::fromLatin1("styles/%1/")).arg(TQString::fromLatin1(KOPETE_DEFAULT_CHATSTYLE)); mStylePath = locate("appdata", fallback); } } -void KopetePrefs::setStyleVariant(const QString &variantPath) +void KopetePrefs::setStyleVariant(const TQString &variantPath) { if(mStyleVariant != variantPath) mStyleVariantChanged = true; mStyleVariant = variantPath; } -void KopetePrefs::setFontFace( const QFont &value ) +void KopetePrefs::setFontFace( const TQFont &value ) { if( value != mFontFace ) mWindowAppearanceChanged = true; mFontFace = value; } -void KopetePrefs::setTextColor( const QColor &value ) +void KopetePrefs::setTextColor( const TQColor &value ) { if( value != mTextColor ) mWindowAppearanceChanged = true; mTextColor = value; } -void KopetePrefs::setBgColor( const QColor &value ) +void KopetePrefs::setBgColor( const TQColor &value ) { if( value != mBgColor ) mWindowAppearanceChanged = true; mBgColor = value; } -void KopetePrefs::setLinkColor( const QColor &value ) +void KopetePrefs::setLinkColor( const TQColor &value ) { if( value != mLinkColor ) mWindowAppearanceChanged = true; mLinkColor = value; @@ -479,7 +479,7 @@ void KopetePrefs::setMaxContactNameLength( int value ) mMaxContactNameLength = value; } -void KopetePrefs::setInterfacePreference(const QString &value) +void KopetePrefs::setInterfacePreference(const TQString &value) { mInterfacePreference = value; } @@ -489,13 +489,13 @@ void KopetePrefs::setChatViewBufferSize( int value ) mChatViewBufferSize = value; } -void KopetePrefs::setHighlightBackground(const QColor &value) +void KopetePrefs::setHighlightBackground(const TQColor &value) { if( value != mHighlightBackground ) mWindowAppearanceChanged = true; mHighlightBackground = value; } -void KopetePrefs::setHighlightForeground(const QColor &value) +void KopetePrefs::setHighlightForeground(const TQColor &value) { if( value != mHighlightForeground ) mWindowAppearanceChanged = true; mHighlightForeground = value; @@ -531,20 +531,20 @@ void KopetePrefs::setShowTray(bool value) } -QString KopetePrefs::fileContents(const QString &path) +TQString KopetePrefs::fileContents(const TQString &path) { - QString contents; - QFile file( path ); + TQString contents; + TQFile file( path ); if ( file.open( IO_ReadOnly ) ) { - QTextStream stream( &file ); + TQTextStream stream( &file ); contents = stream.read(); file.close(); } return contents; } -void KopetePrefs::setIdleContactColor(const QColor &value) +void KopetePrefs::setIdleContactColor(const TQColor &value) { if( value != mIdleContactColor ) mContactListAppearanceChanged = true; mIdleContactColor = value; @@ -555,7 +555,7 @@ void KopetePrefs::setRichText(bool value) mRichText=value; } -void KopetePrefs::setToolTipContents(const QStringList &value) +void KopetePrefs::setToolTipContents(const TQStringList &value) { mToolTipContents=value; } @@ -584,23 +584,23 @@ void KopetePrefs::setContactListUseCustomFonts( bool v ) mContactListUseCustomFonts = v; } -void KopetePrefs::setContactListCustomNormalFont( const QFont & v ) +void KopetePrefs::setContactListCustomNormalFont( const TQFont & v ) { if( v != mContactListNormalFont ) mContactListAppearanceChanged = true; mContactListNormalFont = v; } -void KopetePrefs::setContactListCustomSmallFont( const QFont & v ) +void KopetePrefs::setContactListCustomSmallFont( const TQFont & v ) { if( v != mContactListSmallFont ) mContactListAppearanceChanged = true; mContactListSmallFont = v; } -QFont KopetePrefs::contactListSmallFont() const +TQFont KopetePrefs::contactListSmallFont() const { if ( mContactListUseCustomFonts ) return contactListCustomSmallFont(); - QFont smallFont = KGlobalSettings::generalFont(); + TQFont smallFont = KGlobalSettings::generalFont(); if ( smallFont.pixelSize() != -1 ) smallFont.setPixelSize( (smallFont.pixelSize() * 3) / 4 ); else @@ -608,7 +608,7 @@ QFont KopetePrefs::contactListSmallFont() const return smallFont; } -void KopetePrefs::setContactListGroupNameColor( const QColor & v ) +void KopetePrefs::setContactListGroupNameColor( const TQColor & v ) { if( v != mContactListGroupNameColor ) mContactListAppearanceChanged = true; mContactListGroupNameColor = v; -- cgit v1.2.1