diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-05-05 22:07:15 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-05-05 22:07:15 +0000 |
commit | 421b60af92c83b889f8903c2898f2bd07186fcd8 (patch) | |
tree | ad873a24c9438baed4942fda795430a4c3dc9a9a /kbfxlib/common/kbfxconfig.cpp | |
parent | 39e896bddf25bf34cbf8be814d959181e2c1d1dd (diff) | |
download | kbfx-421b60af92c83b889f8903c2898f2bd07186fcd8.tar.gz kbfx-421b60af92c83b889f8903c2898f2bd07186fcd8.zip |
TQt4 port kbfx
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kbfx@1230544 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kbfxlib/common/kbfxconfig.cpp')
-rw-r--r-- | kbfxlib/common/kbfxconfig.cpp | 406 |
1 files changed, 203 insertions, 203 deletions
diff --git a/kbfxlib/common/kbfxconfig.cpp b/kbfxlib/common/kbfxconfig.cpp index 15c2590..0b256f2 100644 --- a/kbfxlib/common/kbfxconfig.cpp +++ b/kbfxlib/common/kbfxconfig.cpp @@ -26,11 +26,11 @@ KbfxConfig::KbfxConfig() /* set default configuration values */ /* KBFX internal settings */ - KbfxThemeRcDestination = KGlobal::dirs()->saveLocation ( "data", QString ( "kbfx/themerc/" ), TRUE ); + KbfxThemeRcDestination = KGlobal::dirs()->saveLocation ( "data", TQString ( "kbfx/themerc/" ), TRUE ); KbfxRcPath = KGlobal::dirs()->findResource ( "config", "kbfxrc" ); m_KbfxDeleteOldConf = FALSE; - QString _unspecified = tr2i18n ( "Not Specified" ); - QString path = locate ( "data", "kbfx/skins/default/bg.png" ); + TQString _unspecified = tr2i18n ( "Not Specified" ); + TQString path = locate ( "data", "kbfx/skins/default/bg.png" ); path.remove ( "default/bg.png" ); kdDebug() << "Configuration path skins: " + path << endl; @@ -63,7 +63,7 @@ KbfxConfig::KbfxConfig() m_ToolTipTextDefault = "Application menu"; m_ToolTipAvatarDefault = path + "default/butterfly.png"; m_SpinxTooltipDudeboxDefault = path + "default/tooltip_dudebox.png"; - m_SpinxTooltipMaskDefault = path + "default/tooltip_mask.png"; + m_SpinxTooltipMaskDefault = path + "default/tooltip_tqmask.png"; m_SpinxTooltipWindowDefault = path + "default/tooltip_window.png"; m_SpinxTooltipLogoDefault = path + "default/tooltip_logo.png"; @@ -140,21 +140,21 @@ KbfxConfig::KbfxConfig() m_iconSizeDefault = 32; /* set default fonts values */ - m_fontTooltipColorDefault = QColor ( 0,0,0 ); - m_fontTooltipFontDefault = QFont ( "Arial", 8, QFont::Normal ); - m_fontAppNameColorDefault = QColor ( 0,0,0 ); - m_fontAppNameFontDefault = QFont ( "Arial", 8, QFont::Normal ); - m_fontAppCommentColorDefault = QColor ( 128,125,0 ); - m_fontAppCommentFontDefault = QFont ( "Arial", 8, QFont::Normal ); - m_fontIndexColorDefault = QColor ( 0,0,0 ); - m_fontIndexFontDefault = QFont ( "Arial", 8, QFont::Normal ); - m_userNameColorDefault = QColor ( 255,255,255 ); - m_userNameFontDefault = QFont ( "Arial", 10, QFont::Bold ); - m_sepNameColorDefault = QColor ( 0,0,0 ); - m_sepNameFontDefault = QFont ( "Arial", 8, QFont::Bold ); - m_pluginNameColorDefault = QColor ( 0,0,0 ); - m_pluginNameFontDefault = QFont ( "Arial", 8, QFont::Normal ); - m_lineColorDefault = QColor ( 255,220,125 ); + m_fontTooltipColorDefault = TQColor ( 0,0,0 ); + m_fontTooltipFontDefault = TQFont ( "Arial", 8, TQFont::Normal ); + m_fontAppNameColorDefault = TQColor ( 0,0,0 ); + m_fontAppNameFontDefault = TQFont ( "Arial", 8, TQFont::Normal ); + m_fontAppCommentColorDefault = TQColor ( 128,125,0 ); + m_fontAppCommentFontDefault = TQFont ( "Arial", 8, TQFont::Normal ); + m_fontIndexColorDefault = TQColor ( 0,0,0 ); + m_fontIndexFontDefault = TQFont ( "Arial", 8, TQFont::Normal ); + m_userNameColorDefault = TQColor ( 255,255,255 ); + m_userNameFontDefault = TQFont ( "Arial", 10, TQFont::Bold ); + m_sepNameColorDefault = TQColor ( 0,0,0 ); + m_sepNameFontDefault = TQFont ( "Arial", 8, TQFont::Bold ); + m_pluginNameColorDefault = TQColor ( 0,0,0 ); + m_pluginNameFontDefault = TQFont ( "Arial", 8, TQFont::Normal ); + m_lineColorDefault = TQColor ( 255,220,125 ); m_fontHoverBoldDefault = FALSE; /* set default theme info values */ @@ -208,7 +208,7 @@ void KbfxConfig::setThemeInfoDefault() void KbfxConfig::setThemeDefault() { - /* set default theme layout configuration */ + /* set default theme tqlayout configuration */ m_KbfxNormalButtonPath = m_KbfxNormalButtonPathDefault; m_KbfxHoverButtonPath = m_KbfxHoverButtonPathDefault; m_KbfxPressedButtonPath = m_KbfxPressedButtonPathDefault; @@ -293,11 +293,11 @@ void KbfxConfig::setFontsDefault() m_fontHoverBold = m_fontHoverBoldDefault; } -void KbfxConfig::readThemeInfo ( QString &themePath, QString &themeName ) +void KbfxConfig::readThemeInfo ( TQString &themePath, TQString &themeName ) { setThemeInfoDefault(); - QFileInfo * info_theme = new QFileInfo ( themePath + themeName + "/" + m_KbfxThemesVersion ); + TQFileInfo * info_theme = new TQFileInfo ( themePath + themeName + "/" + m_KbfxThemesVersion ); KConfig * infoconfig = 0; if ( info_theme->exists() == TRUE ) @@ -325,11 +325,11 @@ void KbfxConfig::readThemeInfo ( QString &themePath, QString &themeName ) void KbfxConfig::read() { /* read general configuration */ - KConfigSkeleton *confskel = new KConfigSkeleton ( QString::fromLatin1 ( "kbfxrc" ) ); + KConfigSkeleton *confskel = new KConfigSkeleton ( TQString::tqfromLatin1 ( "kbfxrc" ) ); KConfig *conf = confskel->config(); - QString __default = KGlobal::iconLoader()->iconPath ( "kbfx", ( int ) KIcon::Desktop, FALSE ); + TQString __default = KGlobal::iconLoader()->iconPath ( "kbfx", ( int ) KIcon::Desktop, FALSE ); conf->setGroup ( "KbfxGeneral" ); m_KbfxGeneralVersion = conf->readNumEntry ( "Version", 0 ); @@ -400,7 +400,7 @@ void KbfxConfig::read() } } -void KbfxConfig::readFontrc ( QString & themePath, QString & themeName, bool user_rc ) +void KbfxConfig::readFontrc ( TQString & themePath, TQString & themeName, bool user_rc ) { setFontsDefault(); @@ -411,9 +411,9 @@ void KbfxConfig::readFontrc ( QString & themePath, QString & themeName, bool use themeName = m_SpinxThemeNameDefault; } /* get some font settings from theme file or from theme section */ - QString _abs_path = ""; - QFileInfo * info = new QFileInfo ( themePath + themeName + "/kbfxfontrc" ); - QFileInfo * info_theme = new QFileInfo ( KbfxThemeRcDestination + "/" + themeName + "_fontrc" ); + TQString _abs_path = ""; + TQFileInfo * info = new TQFileInfo ( themePath + themeName + "/kbfxfontrc" ); + TQFileInfo * info_theme = new TQFileInfo ( KbfxThemeRcDestination + "/" + themeName + "_fontrc" ); KConfig * fontconfig = 0; /* if theme kbfxfontrc exists, make its configuration as default values - prefer users' configuration */ @@ -485,9 +485,9 @@ void KbfxConfig::readFontrc ( QString & themePath, QString & themeName, bool use delete fontconfig; } -void KbfxConfig::readThemerc ( QString &themePath, QString &themeName, bool user_rc ) +void KbfxConfig::readThemerc ( TQString &themePath, TQString &themeName, bool user_rc ) { - /* if a new version use default theme layout */ + /* if a new version use default theme tqlayout */ if ( m_KbfxGeneralVersion < m_KbfxGeneralVersionDefault ) { themePath = m_SpinxThemeBasePathDefault; @@ -495,15 +495,15 @@ void KbfxConfig::readThemerc ( QString &themePath, QString &themeName, bool user } /* load theme's on and off buttons if any */ - KbfxOnImg = QPixmap::QPixmap ( KbfxPlasmaPixmapProvider::PixmapPath ( "on", themePath, themeName ) ); - KbfxOffImg = QPixmap::QPixmap ( KbfxPlasmaPixmapProvider::PixmapPath ( "off", themePath, themeName ) ); + KbfxOnImg = TQPixmap::TQPixmap ( KbfxPlasmaPixmapProvider::PixmapPath ( "on", themePath, themeName ) ); + KbfxOffImg = TQPixmap::TQPixmap ( KbfxPlasmaPixmapProvider::PixmapPath ( "off", themePath, themeName ) ); /* use theme's default dude image if any */ - KConfigSkeleton *confskel = new KConfigSkeleton ( QString::fromLatin1 ( "kbfxrc" ) ); + KConfigSkeleton *confskel = new KConfigSkeleton ( TQString::tqfromLatin1 ( "kbfxrc" ) ); KConfig *conf = confskel->config(); - QString __default = KGlobal::iconLoader()->iconPath ( "kbfx", ( int ) KIcon::Desktop, FALSE ); + TQString __default = KGlobal::iconLoader()->iconPath ( "kbfx", ( int ) KIcon::Desktop, FALSE ); - if ( m_SpinxDudeImageDefault == QString::null || !KStandardDirs::exists ( m_SpinxDudeImageDefault ) ) + if ( m_SpinxDudeImageDefault == TQString() || !KStandardDirs::exists ( m_SpinxDudeImageDefault ) ) { m_SpinxDudeImageDefault = KbfxPlasmaPixmapProvider::PixmapPath ( "menu_top_image_person", themePath, themeName ); } @@ -519,19 +519,19 @@ void KbfxConfig::readThemerc ( QString &themePath, QString &themeName, bool user /* load theme's default tooltip images if any */ m_ToolTipAvatarDefault = KbfxPlasmaPixmapProvider::PixmapPath ( "butterfly", themePath, themeName ); m_SpinxTooltipDudeboxDefault = KbfxPlasmaPixmapProvider::PixmapPath ( "tooltip_dudebox", themePath, themeName ); - m_SpinxTooltipMaskDefault = KbfxPlasmaPixmapProvider::PixmapPath ( "tooltip_mask", themePath, themeName ); + m_SpinxTooltipMaskDefault = KbfxPlasmaPixmapProvider::PixmapPath ( "tooltip_tqmask", themePath, themeName ); m_SpinxTooltipWindowDefault = KbfxPlasmaPixmapProvider::PixmapPath ( "tooltip_window", themePath, themeName ); m_SpinxTooltipLogoDefault = KbfxPlasmaPixmapProvider::PixmapPath ( "tooltip_logo", themePath, themeName ); setThemeDefault(); - /* get some theme layout settings from theme file or from theme section */ - QString _abs_path = ""; - QFileInfo * info = new QFileInfo ( themePath + themeName + "/kbfxlayoutrc" ); - QFileInfo * info_theme = new QFileInfo ( KbfxThemeRcDestination + "/" + themeName + "_layoutrc" ); - KConfig *layoutconfig = 0; + /* get some theme tqlayout settings from theme file or from theme section */ + TQString _abs_path = ""; + TQFileInfo * info = new TQFileInfo ( themePath + themeName + "/kbfxtqlayoutrc" ); + TQFileInfo * info_theme = new TQFileInfo ( KbfxThemeRcDestination + "/" + themeName + "_layoutrc" ); + KConfig *tqlayoutconfig = 0; - /* if theme kbfxlayoutrc exists, make its configuration as default values - prefer users' configuration */ + /* if theme kbfxtqlayoutrc exists, make its configuration as default values - prefer users' configuration */ if ( info_theme->exists() == TRUE || info->exists() == TRUE ) { if ( info_theme->exists() == TRUE && m_KbfxGeneralVersion >= m_KbfxGeneralVersionDefault && user_rc ) @@ -543,82 +543,82 @@ void KbfxConfig::readThemerc ( QString &themePath, QString &themeName, bool user _abs_path = info->absFilePath(); } - layoutconfig = new KConfig ( _abs_path ); - - layoutconfig->setGroup ( "KbfxButton" ); - m_KbfxNormalButtonPath = layoutconfig->readEntry ( "Normal", m_KbfxNormalButtonPathDefault ); - m_KbfxHoverButtonPath = layoutconfig->readEntry ( "Hover", m_KbfxHoverButtonPathDefault ); - m_KbfxPressedButtonPath = layoutconfig->readEntry ( "Press", m_KbfxPressedButtonPathDefault ); - m_fadeTime = layoutconfig->readNumEntry ( "FadeTime", m_fadeTimeDefault ); - - layoutconfig->setGroup ( "ToolTip" ); - m_ToolTipAvatar = layoutconfig->readEntry ( "Avatar", m_ToolTipAvatarDefault ); - m_SpinxTooltipDudebox = layoutconfig->readEntry ( "Dudebox", m_SpinxTooltipDudeboxDefault ); - m_SpinxTooltipMask = layoutconfig->readEntry ( "Mask", m_SpinxTooltipMaskDefault ); - m_SpinxTooltipWindow = layoutconfig->readEntry ( "Window", m_SpinxTooltipWindowDefault ); - m_SpinxTooltipLogo = layoutconfig->readEntry ( "Logo", m_SpinxTooltipLogoDefault ); - - layoutconfig->setGroup ( "TopBar" ); - m_facePos_x = layoutconfig->readNumEntry ( "DudeX", m_facePos_xDefault ); - m_facePos_y = layoutconfig->readNumEntry ( "DudeY", m_facePos_yDefault ); - m_faceIconX = layoutconfig->readNumEntry ( "FaceX",m_faceIconXDefault ); - m_faceIconY = layoutconfig->readNumEntry ( "FaceY",m_faceIconYDefault ); - m_faceIconH = layoutconfig->readNumEntry ( "FaceH",m_faceIconHDefault ); - m_faceIconW = layoutconfig->readNumEntry ( "FaceW",m_faceIconWDefault ); - m_userNamePos_x = layoutconfig->readNumEntry ( "UserNameX", m_userNamePos_xDefault ); - m_userNamePos_y = layoutconfig->readNumEntry ( "UserNameY", m_userNamePos_yDefault ); - m_faceBoxHideText= layoutconfig->readBoolEntry ( "DisableUserName", m_faceBoxHideTextDefault ); - m_topBar_h = layoutconfig->readNumEntry ( "Height", m_topBar_hDefault ); - m_topBar_w = layoutconfig->readNumEntry ( "Width", m_topBar_wDefault ); - m_topBar_x = layoutconfig->readNumEntry ( "X", m_topBar_xDefault ); - m_topBar_y = layoutconfig->readNumEntry ( "Y", m_topBar_yDefault ); - - layoutconfig->setGroup ( "BottomBar" ); - m_botBar_h = layoutconfig->readNumEntry ( "Height", m_botBar_hDefault ); - m_botBar_w = layoutconfig->readNumEntry ( "Width", m_botBar_wDefault ); - m_botBar_x = layoutconfig->readNumEntry ( "X", m_botBar_xDefault ); - m_botBar_y = layoutconfig->readNumEntry ( "Y", m_botBar_yDefault ); - - layoutconfig->setGroup ( "Scrollbars" ); - m_scrollBarBotX = layoutconfig->readNumEntry ( "ScrollBarBotX", m_scrollBarBotXDefault ); - m_scrollBarBotY = layoutconfig->readNumEntry ( "ScrollBarBotY", m_scrollBarBotYDefault ); - m_scrollBarTopX = layoutconfig->readNumEntry ( "ScrollBarTopX", m_scrollBarTopXDefault ); - m_scrollBarTopY = layoutconfig->readNumEntry ( "ScrollBarTopY", m_scrollBarTopYDefault ); - - layoutconfig->setGroup ( "ListBox" ); - m_listBox_h = layoutconfig->readNumEntry ( "Height", m_listBox_hDefault ); - m_listBox_w = layoutconfig->readNumEntry ( "Width", m_listBox_wDefault ); - m_listBox_x = layoutconfig->readNumEntry ( "X", m_listBox_xDefault ); - m_listBox_y = layoutconfig->readNumEntry ( "Y", m_listBox_yDefault ); - - layoutconfig->setGroup ( "SearchBox" ); - m_searchBox_h = layoutconfig->readNumEntry ( "Height", m_searchBox_hDefault ); - m_searchBox_w = layoutconfig->readNumEntry ( "Width", m_searchBox_wDefault ); - m_searchBox_x = layoutconfig->readNumEntry ( "X", m_searchBox_xDefault ); - m_searchBox_y = layoutconfig->readNumEntry ( "Y", m_searchBox_yDefault ); - m_searchBox_static = layoutconfig->readBoolEntry ( "FixedPos", m_searchBox_staticDefault ); - - layoutconfig->setGroup ( "ItemView" ); - m_itemView_h = layoutconfig->readNumEntry ( "Height", m_itemView_hDefault ); - m_itemView_w = layoutconfig->readNumEntry ( "Width", m_itemView_wDefault ); - m_itemView_x = layoutconfig->readNumEntry ( "X", m_itemView_xDefault ); - m_itemView_y = layoutconfig->readNumEntry ( "Y", m_itemView_yDefault ); - - layoutconfig->setGroup ( "ToolBar" ); - m_toolBarButtonNormalSize = layoutconfig->readNumEntry ( "ButtonNormalSize", m_toolBarButtonNormalSizeDefault ); - m_toolBarButtonExpandSize = layoutconfig->readNumEntry ( "ButtonPressedSize", m_toolBarButtonExpandSizeDefault ); - - layoutconfig->setGroup ( "MainMenu" ); - m_userMenuHeight = layoutconfig->readNumEntry ( "UserMenuHeight",m_userMenuHeightDefault ); - m_userMenuWidth = layoutconfig->readNumEntry ( "UserMenuWidth",m_userMenuWidthDefault ); - m_startHidden = layoutconfig->readBoolEntry ( "ContractedMenu", m_startHiddenDefault ); - - layoutconfig->setGroup ( "ItemProperties" ); - m_noComments = layoutconfig->readBoolEntry ( "NoComments",m_noCommentsDefault ); - m_commentMargine = layoutconfig->readNumEntry ( "CommentMargin",m_commentMargineDefault ); - m_iconSize = layoutconfig->readNumEntry ( "IconSize",m_iconSizeDefault ); - - kdDebug() << "Read default layout settings for theme: " + tqlayoutconfig = new KConfig ( _abs_path ); + + tqlayoutconfig->setGroup ( "KbfxButton" ); + m_KbfxNormalButtonPath = tqlayoutconfig->readEntry ( "Normal", m_KbfxNormalButtonPathDefault ); + m_KbfxHoverButtonPath = tqlayoutconfig->readEntry ( "Hover", m_KbfxHoverButtonPathDefault ); + m_KbfxPressedButtonPath = tqlayoutconfig->readEntry ( "Press", m_KbfxPressedButtonPathDefault ); + m_fadeTime = tqlayoutconfig->readNumEntry ( "FadeTime", m_fadeTimeDefault ); + + tqlayoutconfig->setGroup ( "ToolTip" ); + m_ToolTipAvatar = tqlayoutconfig->readEntry ( "Avatar", m_ToolTipAvatarDefault ); + m_SpinxTooltipDudebox = tqlayoutconfig->readEntry ( "Dudebox", m_SpinxTooltipDudeboxDefault ); + m_SpinxTooltipMask = tqlayoutconfig->readEntry ( "Mask", m_SpinxTooltipMaskDefault ); + m_SpinxTooltipWindow = tqlayoutconfig->readEntry ( "Window", m_SpinxTooltipWindowDefault ); + m_SpinxTooltipLogo = tqlayoutconfig->readEntry ( "Logo", m_SpinxTooltipLogoDefault ); + + tqlayoutconfig->setGroup ( "TopBar" ); + m_facePos_x = tqlayoutconfig->readNumEntry ( "DudeX", m_facePos_xDefault ); + m_facePos_y = tqlayoutconfig->readNumEntry ( "DudeY", m_facePos_yDefault ); + m_faceIconX = tqlayoutconfig->readNumEntry ( "FaceX",m_faceIconXDefault ); + m_faceIconY = tqlayoutconfig->readNumEntry ( "FaceY",m_faceIconYDefault ); + m_faceIconH = tqlayoutconfig->readNumEntry ( "FaceH",m_faceIconHDefault ); + m_faceIconW = tqlayoutconfig->readNumEntry ( "FaceW",m_faceIconWDefault ); + m_userNamePos_x = tqlayoutconfig->readNumEntry ( "UserNameX", m_userNamePos_xDefault ); + m_userNamePos_y = tqlayoutconfig->readNumEntry ( "UserNameY", m_userNamePos_yDefault ); + m_faceBoxHideText= tqlayoutconfig->readBoolEntry ( "DisableUserName", m_faceBoxHideTextDefault ); + m_topBar_h = tqlayoutconfig->readNumEntry ( "Height", m_topBar_hDefault ); + m_topBar_w = tqlayoutconfig->readNumEntry ( "Width", m_topBar_wDefault ); + m_topBar_x = tqlayoutconfig->readNumEntry ( "X", m_topBar_xDefault ); + m_topBar_y = tqlayoutconfig->readNumEntry ( "Y", m_topBar_yDefault ); + + tqlayoutconfig->setGroup ( "BottomBar" ); + m_botBar_h = tqlayoutconfig->readNumEntry ( "Height", m_botBar_hDefault ); + m_botBar_w = tqlayoutconfig->readNumEntry ( "Width", m_botBar_wDefault ); + m_botBar_x = tqlayoutconfig->readNumEntry ( "X", m_botBar_xDefault ); + m_botBar_y = tqlayoutconfig->readNumEntry ( "Y", m_botBar_yDefault ); + + tqlayoutconfig->setGroup ( "Scrollbars" ); + m_scrollBarBotX = tqlayoutconfig->readNumEntry ( "ScrollBarBotX", m_scrollBarBotXDefault ); + m_scrollBarBotY = tqlayoutconfig->readNumEntry ( "ScrollBarBotY", m_scrollBarBotYDefault ); + m_scrollBarTopX = tqlayoutconfig->readNumEntry ( "ScrollBarTopX", m_scrollBarTopXDefault ); + m_scrollBarTopY = tqlayoutconfig->readNumEntry ( "ScrollBarTopY", m_scrollBarTopYDefault ); + + tqlayoutconfig->setGroup ( "ListBox" ); + m_listBox_h = tqlayoutconfig->readNumEntry ( "Height", m_listBox_hDefault ); + m_listBox_w = tqlayoutconfig->readNumEntry ( "Width", m_listBox_wDefault ); + m_listBox_x = tqlayoutconfig->readNumEntry ( "X", m_listBox_xDefault ); + m_listBox_y = tqlayoutconfig->readNumEntry ( "Y", m_listBox_yDefault ); + + tqlayoutconfig->setGroup ( "SearchBox" ); + m_searchBox_h = tqlayoutconfig->readNumEntry ( "Height", m_searchBox_hDefault ); + m_searchBox_w = tqlayoutconfig->readNumEntry ( "Width", m_searchBox_wDefault ); + m_searchBox_x = tqlayoutconfig->readNumEntry ( "X", m_searchBox_xDefault ); + m_searchBox_y = tqlayoutconfig->readNumEntry ( "Y", m_searchBox_yDefault ); + m_searchBox_static = tqlayoutconfig->readBoolEntry ( "FixedPos", m_searchBox_staticDefault ); + + tqlayoutconfig->setGroup ( "ItemView" ); + m_itemView_h = tqlayoutconfig->readNumEntry ( "Height", m_itemView_hDefault ); + m_itemView_w = tqlayoutconfig->readNumEntry ( "Width", m_itemView_wDefault ); + m_itemView_x = tqlayoutconfig->readNumEntry ( "X", m_itemView_xDefault ); + m_itemView_y = tqlayoutconfig->readNumEntry ( "Y", m_itemView_yDefault ); + + tqlayoutconfig->setGroup ( "ToolBar" ); + m_toolBarButtonNormalSize = tqlayoutconfig->readNumEntry ( "ButtonNormalSize", m_toolBarButtonNormalSizeDefault ); + m_toolBarButtonExpandSize = tqlayoutconfig->readNumEntry ( "ButtonPressedSize", m_toolBarButtonExpandSizeDefault ); + + tqlayoutconfig->setGroup ( "MainMenu" ); + m_userMenuHeight = tqlayoutconfig->readNumEntry ( "UserMenuHeight",m_userMenuHeightDefault ); + m_userMenuWidth = tqlayoutconfig->readNumEntry ( "UserMenuWidth",m_userMenuWidthDefault ); + m_startHidden = tqlayoutconfig->readBoolEntry ( "ContractedMenu", m_startHiddenDefault ); + + tqlayoutconfig->setGroup ( "ItemProperties" ); + m_noComments = tqlayoutconfig->readBoolEntry ( "NoComments",m_noCommentsDefault ); + m_commentMargine = tqlayoutconfig->readNumEntry ( "CommentMargin",m_commentMargineDefault ); + m_iconSize = tqlayoutconfig->readNumEntry ( "IconSize",m_iconSizeDefault ); + + kdDebug() << "Read default tqlayout settings for theme: " << themeName << " from file: " << _abs_path @@ -691,18 +691,18 @@ void KbfxConfig::readThemerc ( QString &themePath, QString &themeName, bool user delete info; delete info_theme; - delete layoutconfig; + delete tqlayoutconfig; } void KbfxConfig::write() { - if ( m_KbfxDeleteOldConf && KbfxRcPath != QString::null ) + if ( m_KbfxDeleteOldConf && KbfxRcPath != TQString() ) { - QFile::remove ( KbfxRcPath ); + TQFile::remove ( KbfxRcPath ); kdDebug() << "Deleting general RC file: " << KbfxRcPath << endl; } - KConfigSkeleton *confskel = new KConfigSkeleton ( QString::fromLatin1 ( "kbfxrc" ) ); + KConfigSkeleton *confskel = new KConfigSkeleton ( TQString::tqfromLatin1 ( "kbfxrc" ) ); /* write general KBFX configuration options */ KConfig *conf = confskel->config(); @@ -743,7 +743,7 @@ void KbfxConfig::write() delete confskel; } -void KbfxConfig::writeFontrc ( QString & themeName ) +void KbfxConfig::writeFontrc ( TQString & themeName ) { /* write fonts KBFX configuration from theme name */ KConfig *fontconfig = new KConfig ( KbfxThemeRcDestination + "/" + themeName + "_fontrc" ); @@ -770,89 +770,89 @@ void KbfxConfig::writeFontrc ( QString & themeName ) delete fontconfig; } -void KbfxConfig::writeThemerc ( QString & themeName ) +void KbfxConfig::writeThemerc ( TQString & themeName ) { checkValues(); - /* write layout theme configuration from theme name */ - KConfig *layoutconfig = new KConfig ( KbfxThemeRcDestination + "/" + themeName + "_layoutrc" ); - - layoutconfig->setGroup ( "KbfxButton" ); - layoutconfig->writeEntry ( "Normal", m_KbfxNormalButtonPath ); - layoutconfig->writeEntry ( "Hover", m_KbfxHoverButtonPath ); - layoutconfig->writeEntry ( "Press", m_KbfxPressedButtonPath ); - layoutconfig->writeEntry ( "FadeTime", m_fadeTime ); - - layoutconfig->setGroup ( "ToolTip" ); - layoutconfig->writeEntry ( "Avatar", m_ToolTipAvatar ); - layoutconfig->writeEntry ( "Dudebox", m_SpinxTooltipDudebox ); - layoutconfig->writeEntry ( "Mask", m_SpinxTooltipMask ); - layoutconfig->writeEntry ( "Window", m_SpinxTooltipWindow ); - layoutconfig->writeEntry ( "Logo", m_SpinxTooltipLogo ); - - layoutconfig->setGroup ( "TopBar" ); - layoutconfig->writeEntry ( "DudeX", m_facePos_x ); - layoutconfig->writeEntry ( "DudeY", m_facePos_y ); - layoutconfig->writeEntry ( "FaceX",m_faceIconX ); - layoutconfig->writeEntry ( "FaceY",m_faceIconY ); - layoutconfig->writeEntry ( "FaceH",m_faceIconH ); - layoutconfig->writeEntry ( "FaceW",m_faceIconW ); - layoutconfig->writeEntry ( "UserNameX", m_userNamePos_x ); - layoutconfig->writeEntry ( "UserNameY", m_userNamePos_y ); - layoutconfig->writeEntry ( "DisableUserName", m_faceBoxHideText ); - layoutconfig->writeEntry ( "Height", m_topBar_h ); - layoutconfig->writeEntry ( "Width", m_topBar_w ); - layoutconfig->writeEntry ( "X", m_topBar_x ); - layoutconfig->writeEntry ( "Y", m_topBar_y ); - - layoutconfig->setGroup ( "BottomBar" ); - layoutconfig->writeEntry ( "Height", m_botBar_h ); - layoutconfig->writeEntry ( "Width", m_botBar_w ); - layoutconfig->writeEntry ( "X", m_botBar_x ); - layoutconfig->writeEntry ( "Y", m_botBar_y ); - - layoutconfig->setGroup ( "Scrollbars" ); - layoutconfig->writeEntry ( "ScrollBarBotX", m_scrollBarBotX ); - layoutconfig->writeEntry ( "ScrollBarBotY", m_scrollBarBotY ); - layoutconfig->writeEntry ( "ScrollBarTopX", m_scrollBarTopX ); - layoutconfig->writeEntry ( "ScrollBarTopY", m_scrollBarTopY ); - - layoutconfig->setGroup ( "ListBox" ); - layoutconfig->writeEntry ( "Height", m_listBox_h ); - layoutconfig->writeEntry ( "Width", m_listBox_w ); - layoutconfig->writeEntry ( "X", m_listBox_x ); - layoutconfig->writeEntry ( "Y", m_listBox_y ); - - layoutconfig->setGroup ( "SearchBox" ); - layoutconfig->writeEntry ( "Height", m_searchBox_h ); - layoutconfig->writeEntry ( "Width", m_searchBox_w ); - layoutconfig->writeEntry ( "X", m_searchBox_x ); - layoutconfig->writeEntry ( "Y", m_searchBox_y ); - layoutconfig->writeEntry ( "FixedPos", m_searchBox_static ); - - layoutconfig->setGroup ( "ItemView" ); - layoutconfig->writeEntry ( "Height", m_itemView_h ); - layoutconfig->writeEntry ( "Width", m_itemView_w ); - layoutconfig->writeEntry ( "X", m_itemView_x ); - layoutconfig->writeEntry ( "Y", m_itemView_y ); - - layoutconfig->setGroup ( "ToolBar" ); - layoutconfig->writeEntry ( "ButtonNormalSize", m_toolBarButtonNormalSize ); - layoutconfig->writeEntry ( "ButtonPressedSize", m_toolBarButtonExpandSize ); - - layoutconfig->setGroup ( "MainMenu" ); - layoutconfig->writeEntry ( "UserMenuHeight",m_userMenuHeight ); - layoutconfig->writeEntry ( "UserMenuWidth",m_userMenuWidth ); - layoutconfig->writeEntry ( "ContractedMenu", m_startHidden ); - - layoutconfig->setGroup ( "ItemProperties" ); - layoutconfig->writeEntry ( "NoComments",m_noComments ); - layoutconfig->writeEntry ( "CommentMargin",m_commentMargine ); - layoutconfig->writeEntry ( "IconSize",m_iconSize ); - - layoutconfig->sync(); - - delete layoutconfig; + /* write tqlayout theme configuration from theme name */ + KConfig *tqlayoutconfig = new KConfig ( KbfxThemeRcDestination + "/" + themeName + "_layoutrc" ); + + tqlayoutconfig->setGroup ( "KbfxButton" ); + tqlayoutconfig->writeEntry ( "Normal", m_KbfxNormalButtonPath ); + tqlayoutconfig->writeEntry ( "Hover", m_KbfxHoverButtonPath ); + tqlayoutconfig->writeEntry ( "Press", m_KbfxPressedButtonPath ); + tqlayoutconfig->writeEntry ( "FadeTime", m_fadeTime ); + + tqlayoutconfig->setGroup ( "ToolTip" ); + tqlayoutconfig->writeEntry ( "Avatar", m_ToolTipAvatar ); + tqlayoutconfig->writeEntry ( "Dudebox", m_SpinxTooltipDudebox ); + tqlayoutconfig->writeEntry ( "Mask", m_SpinxTooltipMask ); + tqlayoutconfig->writeEntry ( "Window", m_SpinxTooltipWindow ); + tqlayoutconfig->writeEntry ( "Logo", m_SpinxTooltipLogo ); + + tqlayoutconfig->setGroup ( "TopBar" ); + tqlayoutconfig->writeEntry ( "DudeX", m_facePos_x ); + tqlayoutconfig->writeEntry ( "DudeY", m_facePos_y ); + tqlayoutconfig->writeEntry ( "FaceX",m_faceIconX ); + tqlayoutconfig->writeEntry ( "FaceY",m_faceIconY ); + tqlayoutconfig->writeEntry ( "FaceH",m_faceIconH ); + tqlayoutconfig->writeEntry ( "FaceW",m_faceIconW ); + tqlayoutconfig->writeEntry ( "UserNameX", m_userNamePos_x ); + tqlayoutconfig->writeEntry ( "UserNameY", m_userNamePos_y ); + tqlayoutconfig->writeEntry ( "DisableUserName", m_faceBoxHideText ); + tqlayoutconfig->writeEntry ( "Height", m_topBar_h ); + tqlayoutconfig->writeEntry ( "Width", m_topBar_w ); + tqlayoutconfig->writeEntry ( "X", m_topBar_x ); + tqlayoutconfig->writeEntry ( "Y", m_topBar_y ); + + tqlayoutconfig->setGroup ( "BottomBar" ); + tqlayoutconfig->writeEntry ( "Height", m_botBar_h ); + tqlayoutconfig->writeEntry ( "Width", m_botBar_w ); + tqlayoutconfig->writeEntry ( "X", m_botBar_x ); + tqlayoutconfig->writeEntry ( "Y", m_botBar_y ); + + tqlayoutconfig->setGroup ( "Scrollbars" ); + tqlayoutconfig->writeEntry ( "ScrollBarBotX", m_scrollBarBotX ); + tqlayoutconfig->writeEntry ( "ScrollBarBotY", m_scrollBarBotY ); + tqlayoutconfig->writeEntry ( "ScrollBarTopX", m_scrollBarTopX ); + tqlayoutconfig->writeEntry ( "ScrollBarTopY", m_scrollBarTopY ); + + tqlayoutconfig->setGroup ( "ListBox" ); + tqlayoutconfig->writeEntry ( "Height", m_listBox_h ); + tqlayoutconfig->writeEntry ( "Width", m_listBox_w ); + tqlayoutconfig->writeEntry ( "X", m_listBox_x ); + tqlayoutconfig->writeEntry ( "Y", m_listBox_y ); + + tqlayoutconfig->setGroup ( "SearchBox" ); + tqlayoutconfig->writeEntry ( "Height", m_searchBox_h ); + tqlayoutconfig->writeEntry ( "Width", m_searchBox_w ); + tqlayoutconfig->writeEntry ( "X", m_searchBox_x ); + tqlayoutconfig->writeEntry ( "Y", m_searchBox_y ); + tqlayoutconfig->writeEntry ( "FixedPos", m_searchBox_static ); + + tqlayoutconfig->setGroup ( "ItemView" ); + tqlayoutconfig->writeEntry ( "Height", m_itemView_h ); + tqlayoutconfig->writeEntry ( "Width", m_itemView_w ); + tqlayoutconfig->writeEntry ( "X", m_itemView_x ); + tqlayoutconfig->writeEntry ( "Y", m_itemView_y ); + + tqlayoutconfig->setGroup ( "ToolBar" ); + tqlayoutconfig->writeEntry ( "ButtonNormalSize", m_toolBarButtonNormalSize ); + tqlayoutconfig->writeEntry ( "ButtonPressedSize", m_toolBarButtonExpandSize ); + + tqlayoutconfig->setGroup ( "MainMenu" ); + tqlayoutconfig->writeEntry ( "UserMenuHeight",m_userMenuHeight ); + tqlayoutconfig->writeEntry ( "UserMenuWidth",m_userMenuWidth ); + tqlayoutconfig->writeEntry ( "ContractedMenu", m_startHidden ); + + tqlayoutconfig->setGroup ( "ItemProperties" ); + tqlayoutconfig->writeEntry ( "NoComments",m_noComments ); + tqlayoutconfig->writeEntry ( "CommentMargin",m_commentMargine ); + tqlayoutconfig->writeEntry ( "IconSize",m_iconSize ); + + tqlayoutconfig->sync(); + + delete tqlayoutconfig; } void KbfxConfig::checkValues() |