@ -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 " , T QString ( " 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 " ) ;
T QString _unspecified = tr2i18n ( " Not Specified " ) ;
T QString 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_ tq mask.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 = T QColor ( 0 , 0 , 0 ) ;
m_fontTooltipFontDefault = T QFont ( " Arial " , 8 , T QFont: : Normal ) ;
m_fontAppNameColorDefault = T QColor ( 0 , 0 , 0 ) ;
m_fontAppNameFontDefault = T QFont ( " Arial " , 8 , T QFont: : Normal ) ;
m_fontAppCommentColorDefault = T QColor ( 128 , 125 , 0 ) ;
m_fontAppCommentFontDefault = T QFont ( " Arial " , 8 , T QFont: : Normal ) ;
m_fontIndexColorDefault = T QColor ( 0 , 0 , 0 ) ;
m_fontIndexFontDefault = T QFont ( " Arial " , 8 , T QFont: : Normal ) ;
m_userNameColorDefault = T QColor ( 255 , 255 , 255 ) ;
m_userNameFontDefault = T QFont ( " Arial " , 10 , T QFont: : Bold ) ;
m_sepNameColorDefault = T QColor ( 0 , 0 , 0 ) ;
m_sepNameFontDefault = T QFont ( " Arial " , 8 , T QFont: : Bold ) ;
m_pluginNameColorDefault = T QColor ( 0 , 0 , 0 ) ;
m_pluginNameFontDefault = T QFont ( " Arial " , 8 , T QFont: : Normal ) ;
m_lineColorDefault = T QColor ( 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 tq layout 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 ( T QString & themePath , T QString & themeName )
{
setThemeInfoDefault ( ) ;
QFileInfo * info_theme = new QFileInfo ( themePath + themeName + " / " + m_KbfxThemesVersion ) ;
T QFileInfo * info_theme = new T QFileInfo ( 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 ( T QString: : tq fromLatin1 ( " kbfxrc " ) ) ;
KConfig * conf = confskel - > config ( ) ;
QString __default = KGlobal : : iconLoader ( ) - > iconPath ( " kbfx " , ( int ) KIcon : : Desktop , FALSE ) ;
T QString __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 ( T QString & themePath , T QString & 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 " ) ;
T QString _abs_path = " " ;
T QFileInfo * info = new T QFileInfo ( themePath + themeName + " /kbfxfontrc " ) ;
T QFileInfo * info_theme = new T QFileInfo ( 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 ( T QString & themePath , T QString & themeName , bool user_rc )
{
/* if a new version use default theme layout */
/* if a new version use default theme tq layout */
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 = T QPixmap: : T QPixmap ( KbfxPlasmaPixmapProvider : : PixmapPath ( " on " , themePath , themeName ) ) ;
KbfxOffImg = T QPixmap: : T QPixmap ( KbfxPlasmaPixmapProvider : : PixmapPath ( " off " , themePath , themeName ) ) ;
/* use theme's default dude image if any */
KConfigSkeleton * confskel = new KConfigSkeleton ( QString: : fromLatin1 ( " kbfxrc " ) ) ;
KConfigSkeleton * confskel = new KConfigSkeleton ( T QString: : tq fromLatin1 ( " kbfxrc " ) ) ;
KConfig * conf = confskel - > config ( ) ;
QString __default = KGlobal : : iconLoader ( ) - > iconPath ( " kbfx " , ( int ) KIcon : : Desktop , FALSE ) ;
T QString __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_ tq mask" , 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 + " /kbfx layoutrc" ) ;
QFileInfo * info_theme = new QFileInfo ( KbfxThemeRcDestination + " / " + themeName + " _layoutrc " ) ;
KConfig * layoutconfig = 0 ;
/* get some theme tq layout settings from theme file or from theme section */
T QString _abs_path = " " ;
T QFileInfo * info = new T QFileInfo ( themePath + themeName + " /kbfx tq layoutrc" ) ;
T QFileInfo * info_theme = new T QFileInfo ( KbfxThemeRcDestination + " / " + themeName + " _layoutrc " ) ;
KConfig * tq layoutconfig = 0 ;
/* if theme kbfx layoutrc exists, make its configuration as default values - prefer users' configuration */
/* if theme kbfx tq layoutrc 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: "
tq layoutconfig = new KConfig ( _abs_path ) ;
tq layoutconfig- > setGroup ( " KbfxButton " ) ;
m_KbfxNormalButtonPath = tq layoutconfig- > readEntry ( " Normal " , m_KbfxNormalButtonPathDefault ) ;
m_KbfxHoverButtonPath = tq layoutconfig- > readEntry ( " Hover " , m_KbfxHoverButtonPathDefault ) ;
m_KbfxPressedButtonPath = tq layoutconfig- > readEntry ( " Press " , m_KbfxPressedButtonPathDefault ) ;
m_fadeTime = tq layoutconfig- > readNumEntry ( " FadeTime " , m_fadeTimeDefault ) ;
tq layoutconfig- > setGroup ( " ToolTip " ) ;
m_ToolTipAvatar = tq layoutconfig- > readEntry ( " Avatar " , m_ToolTipAvatarDefault ) ;
m_SpinxTooltipDudebox = tq layoutconfig- > readEntry ( " Dudebox " , m_SpinxTooltipDudeboxDefault ) ;
m_SpinxTooltipMask = tq layoutconfig- > readEntry ( " Mask " , m_SpinxTooltipMaskDefault ) ;
m_SpinxTooltipWindow = tq layoutconfig- > readEntry ( " Window " , m_SpinxTooltipWindowDefault ) ;
m_SpinxTooltipLogo = tq layoutconfig- > readEntry ( " Logo " , m_SpinxTooltipLogoDefault ) ;
tq layoutconfig- > setGroup ( " TopBar " ) ;
m_facePos_x = tq layoutconfig- > readNumEntry ( " DudeX " , m_facePos_xDefault ) ;
m_facePos_y = tq layoutconfig- > readNumEntry ( " DudeY " , m_facePos_yDefault ) ;
m_faceIconX = tq layoutconfig- > readNumEntry ( " FaceX " , m_faceIconXDefault ) ;
m_faceIconY = tq layoutconfig- > readNumEntry ( " FaceY " , m_faceIconYDefault ) ;
m_faceIconH = tq layoutconfig- > readNumEntry ( " FaceH " , m_faceIconHDefault ) ;
m_faceIconW = tq layoutconfig- > readNumEntry ( " FaceW " , m_faceIconWDefault ) ;
m_userNamePos_x = tq layoutconfig- > readNumEntry ( " UserNameX " , m_userNamePos_xDefault ) ;
m_userNamePos_y = tq layoutconfig- > readNumEntry ( " UserNameY " , m_userNamePos_yDefault ) ;
m_faceBoxHideText = tq layoutconfig- > readBoolEntry ( " DisableUserName " , m_faceBoxHideTextDefault ) ;
m_topBar_h = tq layoutconfig- > readNumEntry ( " Height " , m_topBar_hDefault ) ;
m_topBar_w = tq layoutconfig- > readNumEntry ( " Width " , m_topBar_wDefault ) ;
m_topBar_x = tq layoutconfig- > readNumEntry ( " X " , m_topBar_xDefault ) ;
m_topBar_y = tq layoutconfig- > readNumEntry ( " Y " , m_topBar_yDefault ) ;
tq layoutconfig- > setGroup ( " BottomBar " ) ;
m_botBar_h = tq layoutconfig- > readNumEntry ( " Height " , m_botBar_hDefault ) ;
m_botBar_w = tq layoutconfig- > readNumEntry ( " Width " , m_botBar_wDefault ) ;
m_botBar_x = tq layoutconfig- > readNumEntry ( " X " , m_botBar_xDefault ) ;
m_botBar_y = tq layoutconfig- > readNumEntry ( " Y " , m_botBar_yDefault ) ;
tq layoutconfig- > setGroup ( " Scrollbars " ) ;
m_scrollBarBotX = tq layoutconfig- > readNumEntry ( " ScrollBarBotX " , m_scrollBarBotXDefault ) ;
m_scrollBarBotY = tq layoutconfig- > readNumEntry ( " ScrollBarBotY " , m_scrollBarBotYDefault ) ;
m_scrollBarTopX = tq layoutconfig- > readNumEntry ( " ScrollBarTopX " , m_scrollBarTopXDefault ) ;
m_scrollBarTopY = tq layoutconfig- > readNumEntry ( " ScrollBarTopY " , m_scrollBarTopYDefault ) ;
tq layoutconfig- > setGroup ( " ListBox " ) ;
m_listBox_h = tq layoutconfig- > readNumEntry ( " Height " , m_listBox_hDefault ) ;
m_listBox_w = tq layoutconfig- > readNumEntry ( " Width " , m_listBox_wDefault ) ;
m_listBox_x = tq layoutconfig- > readNumEntry ( " X " , m_listBox_xDefault ) ;
m_listBox_y = tq layoutconfig- > readNumEntry ( " Y " , m_listBox_yDefault ) ;
tq layoutconfig- > setGroup ( " SearchBox " ) ;
m_searchBox_h = tq layoutconfig- > readNumEntry ( " Height " , m_searchBox_hDefault ) ;
m_searchBox_w = tq layoutconfig- > readNumEntry ( " Width " , m_searchBox_wDefault ) ;
m_searchBox_x = tq layoutconfig- > readNumEntry ( " X " , m_searchBox_xDefault ) ;
m_searchBox_y = tq layoutconfig- > readNumEntry ( " Y " , m_searchBox_yDefault ) ;
m_searchBox_static = tq layoutconfig- > readBoolEntry ( " FixedPos " , m_searchBox_staticDefault ) ;
tq layoutconfig- > setGroup ( " ItemView " ) ;
m_itemView_h = tq layoutconfig- > readNumEntry ( " Height " , m_itemView_hDefault ) ;
m_itemView_w = tq layoutconfig- > readNumEntry ( " Width " , m_itemView_wDefault ) ;
m_itemView_x = tq layoutconfig- > readNumEntry ( " X " , m_itemView_xDefault ) ;
m_itemView_y = tq layoutconfig- > readNumEntry ( " Y " , m_itemView_yDefault ) ;
tq layoutconfig- > setGroup ( " ToolBar " ) ;
m_toolBarButtonNormalSize = tq layoutconfig- > readNumEntry ( " ButtonNormalSize " , m_toolBarButtonNormalSizeDefault ) ;
m_toolBarButtonExpandSize = tq layoutconfig- > readNumEntry ( " ButtonPressedSize " , m_toolBarButtonExpandSizeDefault ) ;
tq layoutconfig- > setGroup ( " MainMenu " ) ;
m_userMenuHeight = tq layoutconfig- > readNumEntry ( " UserMenuHeight " , m_userMenuHeightDefault ) ;
m_userMenuWidth = tq layoutconfig- > readNumEntry ( " UserMenuWidth " , m_userMenuWidthDefault ) ;
m_startHidden = tq layoutconfig- > readBoolEntry ( " ContractedMenu " , m_startHiddenDefault ) ;
tq layoutconfig- > setGroup ( " ItemProperties " ) ;
m_noComments = tq layoutconfig- > readBoolEntry ( " NoComments " , m_noCommentsDefault ) ;
m_commentMargine = tq layoutconfig- > readNumEntry ( " CommentMargin " , m_commentMargineDefault ) ;
m_iconSize = tq layoutconfig- > readNumEntry ( " IconSize " , m_iconSizeDefault ) ;
kdDebug ( ) < < " Read default tq layout 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 tq layoutconfig;
}
void KbfxConfig : : write ( )
{
if ( m_KbfxDeleteOldConf & & KbfxRcPath ! = QString: : null )
if ( m_KbfxDeleteOldConf & & KbfxRcPath ! = TQString( ) )
{
QFile: : remove ( KbfxRcPath ) ;
T QFile: : remove ( KbfxRcPath ) ;
kdDebug ( ) < < " Deleting general RC file: " < < KbfxRcPath < < endl ;
}
KConfigSkeleton * confskel = new KConfigSkeleton ( QString: : fromLatin1 ( " kbfxrc " ) ) ;
KConfigSkeleton * confskel = new KConfigSkeleton ( T QString: : tq fromLatin1 ( " 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 ( T QString & 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 ( T QString & 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 tq layout theme configuration from theme name */
KConfig * tq layoutconfig = new KConfig ( KbfxThemeRcDestination + " / " + themeName + " _layoutrc " ) ;
tq layoutconfig- > setGroup ( " KbfxButton " ) ;
tq layoutconfig- > writeEntry ( " Normal " , m_KbfxNormalButtonPath ) ;
tq layoutconfig- > writeEntry ( " Hover " , m_KbfxHoverButtonPath ) ;
tq layoutconfig- > writeEntry ( " Press " , m_KbfxPressedButtonPath ) ;
tq layoutconfig- > writeEntry ( " FadeTime " , m_fadeTime ) ;
tq layoutconfig- > setGroup ( " ToolTip " ) ;
tq layoutconfig- > writeEntry ( " Avatar " , m_ToolTipAvatar ) ;
tq layoutconfig- > writeEntry ( " Dudebox " , m_SpinxTooltipDudebox ) ;
tq layoutconfig- > writeEntry ( " Mask " , m_SpinxTooltipMask ) ;
tq layoutconfig- > writeEntry ( " Window " , m_SpinxTooltipWindow ) ;
tq layoutconfig- > writeEntry ( " Logo " , m_SpinxTooltipLogo ) ;
tq layoutconfig- > setGroup ( " TopBar " ) ;
tq layoutconfig- > writeEntry ( " DudeX " , m_facePos_x ) ;
tq layoutconfig- > writeEntry ( " DudeY " , m_facePos_y ) ;
tq layoutconfig- > writeEntry ( " FaceX " , m_faceIconX ) ;
tq layoutconfig- > writeEntry ( " FaceY " , m_faceIconY ) ;
tq layoutconfig- > writeEntry ( " FaceH " , m_faceIconH ) ;
tq layoutconfig- > writeEntry ( " FaceW " , m_faceIconW ) ;
tq layoutconfig- > writeEntry ( " UserNameX " , m_userNamePos_x ) ;
tq layoutconfig- > writeEntry ( " UserNameY " , m_userNamePos_y ) ;
tq layoutconfig- > writeEntry ( " DisableUserName " , m_faceBoxHideText ) ;
tq layoutconfig- > writeEntry ( " Height " , m_topBar_h ) ;
tq layoutconfig- > writeEntry ( " Width " , m_topBar_w ) ;
tq layoutconfig- > writeEntry ( " X " , m_topBar_x ) ;
tq layoutconfig- > writeEntry ( " Y " , m_topBar_y ) ;
tq layoutconfig- > setGroup ( " BottomBar " ) ;
tq layoutconfig- > writeEntry ( " Height " , m_botBar_h ) ;
tq layoutconfig- > writeEntry ( " Width " , m_botBar_w ) ;
tq layoutconfig- > writeEntry ( " X " , m_botBar_x ) ;
tq layoutconfig- > writeEntry ( " Y " , m_botBar_y ) ;
tq layoutconfig- > setGroup ( " Scrollbars " ) ;
tq layoutconfig- > writeEntry ( " ScrollBarBotX " , m_scrollBarBotX ) ;
tq layoutconfig- > writeEntry ( " ScrollBarBotY " , m_scrollBarBotY ) ;
tq layoutconfig- > writeEntry ( " ScrollBarTopX " , m_scrollBarTopX ) ;
tq layoutconfig- > writeEntry ( " ScrollBarTopY " , m_scrollBarTopY ) ;
tq layoutconfig- > setGroup ( " ListBox " ) ;
tq layoutconfig- > writeEntry ( " Height " , m_listBox_h ) ;
tq layoutconfig- > writeEntry ( " Width " , m_listBox_w ) ;
tq layoutconfig- > writeEntry ( " X " , m_listBox_x ) ;
tq layoutconfig- > writeEntry ( " Y " , m_listBox_y ) ;
tq layoutconfig- > setGroup ( " SearchBox " ) ;
tq layoutconfig- > writeEntry ( " Height " , m_searchBox_h ) ;
tq layoutconfig- > writeEntry ( " Width " , m_searchBox_w ) ;
tq layoutconfig- > writeEntry ( " X " , m_searchBox_x ) ;
tq layoutconfig- > writeEntry ( " Y " , m_searchBox_y ) ;
tq layoutconfig- > writeEntry ( " FixedPos " , m_searchBox_static ) ;
tq layoutconfig- > setGroup ( " ItemView " ) ;
tq layoutconfig- > writeEntry ( " Height " , m_itemView_h ) ;
tq layoutconfig- > writeEntry ( " Width " , m_itemView_w ) ;
tq layoutconfig- > writeEntry ( " X " , m_itemView_x ) ;
tq layoutconfig- > writeEntry ( " Y " , m_itemView_y ) ;
tq layoutconfig- > setGroup ( " ToolBar " ) ;
tq layoutconfig- > writeEntry ( " ButtonNormalSize " , m_toolBarButtonNormalSize ) ;
tq layoutconfig- > writeEntry ( " ButtonPressedSize " , m_toolBarButtonExpandSize ) ;
tq layoutconfig- > setGroup ( " MainMenu " ) ;
tq layoutconfig- > writeEntry ( " UserMenuHeight " , m_userMenuHeight ) ;
tq layoutconfig- > writeEntry ( " UserMenuWidth " , m_userMenuWidth ) ;
tq layoutconfig- > writeEntry ( " ContractedMenu " , m_startHidden ) ;
tq layoutconfig- > setGroup ( " ItemProperties " ) ;
tq layoutconfig- > writeEntry ( " NoComments " , m_noComments ) ;
tq layoutconfig- > writeEntry ( " CommentMargin " , m_commentMargine ) ;
tq layoutconfig- > writeEntry ( " IconSize " , m_iconSize ) ;
tq layoutconfig- > sync ( ) ;
delete tq layoutconfig;
}
void KbfxConfig : : checkValues ( )