00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef KSTYLEPAGE_H
00019 #define KSTYLEPAGE_H
00020
00021 #include <tqcolor.h>
00022 #include "kstylepagedlg.h"
00023
00027 class TQListViewItem;
00028
00029 class KStylePage : public KStylePageDlg {
00030 Q_OBJECT
00031
00032 public:
00033 KStylePage(TQWidget *parent=0, const char *name=0);
00034 ~KStylePage();
00035 void save(bool curSettings=true);
00037 void setDefaults();
00039 void switchPrevStyle();
00040
00041 private:
00042 TQString origStyle;
00043 TQString origKWinStyle;
00044 TQString origIcons;
00045 TQString defaultKWinStyle;
00046 TQString currentStyle;
00047 KConfig* ckwin;
00048 struct colorSet {
00049 TQString colorFile, bgMode;
00050 int contrast;
00051 TQColor usrCol1, usrCol2;
00052 TQColor foreground;
00053 TQColor background;
00054 TQColor windowForeground;
00055 TQColor windowBackground;
00056 TQColor selectForeground;
00057 TQColor selectBackground;
00058 TQColor buttonForeground;
00059 TQColor buttonBackground;
00060 TQColor linkColor;
00061 TQColor visitedLinkColor;
00062 TQColor activeForeground;
00063 TQColor inactiveForeground;
00064 TQColor activeBackground;
00065 TQColor inactiveBackground;
00066 TQColor activeBlend;
00067 TQColor inactiveBlend;
00068 TQColor activeTitleBtnBg;
00069 TQColor inactiveTitleBtnBg;
00070 TQColor alternateBackground;
00071 } usrColors, currentColors;
00072
00073 TQColor widget;
00074 TQColor kde34Blue;
00075 TQColor inactiveBackground;
00076 TQColor activeBackground;
00077 TQColor button;
00078 TQColor link;
00079 TQColor visitedLink;
00080 TQColor activeBlend;
00081 TQColor activeTitleBtnBg;
00082 TQColor inactiveTitleBtnBg;
00083 TQColor inactiveForeground;
00084 TQColor alternateBackground;
00085
00086 TQListViewItem * kde;
00087 TQListViewItem * classic;
00088 TQListViewItem * keramik;
00089 TQListViewItem * cde;
00090 TQListViewItem * win;
00091 TQListViewItem * platinum;
00092
00093 TQStyle *appliedStyle;
00094
00095
00096 bool kde_hc_exist, kde_def_exist, kde_keramik_exist, kde_light_exist,
00097 cde_exist, win_exist, platinum_exist, kde_plastik_exist;
00098
00099
00100 bool kwin_keramik_exist, kwin_default_exist, kwin_system_exist,
00101 kwin_win_exist, kwin_cde_exist, kwin_quartz_exist, kwin_plastik_exist;
00102
00103
00104 bool icon_crystalsvg_exist, icon_kdeclassic_exist, icon_Locolor_exist;
00105
00106 public slots:
00108 void presetStyle(const TQString& style);
00109
00110 private:
00111 void saveColors(bool curSettings=true);
00112 void saveStyle(bool curSettings=true);
00113 void saveKWin(bool curSettings=true);
00114 void saveIcons(bool curSettings=true);
00115 void getAvailability();
00116 void getUserDefaults();
00117 void initColors();
00118 void liveUpdate();
00119 void getColors(colorSet *set, bool colorfile );
00120 void setStyleRecursive(TQWidget* w, TQPalette &, TQStyle* s);
00121 void changeCurrentStyle();
00122 TQPalette createPalette();
00123
00124 private slots:
00125 void slotCurrentChanged();
00126 };
00127
00128 #endif