00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #ifndef __icons_h__
00013 #define __icons_h__
00014
00015 #include <tqcolor.h>
00016 #include <tqimage.h>
00017 #include <tqvaluelist.h>
00018
00019 #include <kcmodule.h>
00020 #include <kdialogbase.h>
00021 #include <ksimpleconfig.h>
00022
00023 class TQCheckBox;
00024 class TQColor;
00025 class TQComboBox;
00026 class TQGridLayout;
00027 class TQGroupBox;
00028 class TQIconView;
00029 class TQLabel;
00030 class TQListBox;
00031 class TQListView;
00032 class TQPushButton;
00033 class TQSlider;
00034 class TQTabWidget;
00035 class TQWidget;
00036
00037 class KColorButton;
00038 class KConfig;
00039 class KIconEffect;
00040 class KIconLoader;
00041 class KIconTheme;
00042
00043 struct Effect
00044 {
00045 int type;
00046 float value;
00047 TQColor color;
00048 TQColor color2;
00049 bool transparant;
00050 };
00051
00052
00056 class KIconConfig: public KCModule
00057 {
00058 Q_OBJECT
00059
00060 public:
00061 KIconConfig(TQWidget *parent, const char *name=0);
00062 ~KIconConfig();
00063
00064 virtual void load();
00065 virtual void load( bool useDefaults );
00066 virtual void save();
00067 virtual void defaults();
00068 void preview();
00069
00070 private slots:
00071 void slotEffectSetup0() { EffectSetup(0); }
00072 void slotEffectSetup1() { EffectSetup(1); }
00073 void slotEffectSetup2() { EffectSetup(2); }
00074
00075 void slotUsage(int index);
00076 void slotSize(int index);
00077 void slotDPCheck(bool check);
00078 void slotAnimatedCheck(bool check);
00079 void slotRoundedCheck(bool check);
00080 void slotActiveEffect(bool check);
00081 void QLSizeLockedChanged(bool checked);
00082
00083 private:
00084 void preview(int i);
00085 void EffectSetup(int state);
00086 TQPushButton *addPreviewIcon(int i, const TQString &str, TQWidget *parent, TQGridLayout *lay);
00087 void init();
00088 void initDefaults();
00089 void read();
00090 void apply();
00091
00092
00093 bool mbDP[6], mbChanged[6], mbAnimated[6];
00094 int mSizes[6];
00095 TQValueList<int> mAvSizes[6];
00096
00097 Effect mEffects[6][3];
00098 Effect mDefaultEffect[3];
00099
00100 int mUsage;
00101 TQString mTheme, mExample;
00102 TQStringList mGroups, mStates;
00103 int mSysTraySize;
00104 int mQuickLaunchSize;
00105
00106 KIconEffect *mpEffect;
00107 KIconTheme *mpTheme;
00108 KIconLoader *mpLoader;
00109 KConfig *mpConfig;
00110 KSimpleConfig *mpSystrayConfig;
00111 KSimpleConfig *mpKickerConfig;
00112
00113 typedef TQLabel *QLabelPtr;
00114 QLabelPtr mpPreview[3];
00115
00116 TQListBox *mpUsageList;
00117 TQComboBox *mpSizeBox;
00118 TQCheckBox *mpDPCheck, *wordWrapCB, *underlineCB, *mpAnimatedCheck, *mpRoundedCheck, *mpActiveEffectCheck;
00119 TQTabWidget *m_pTabWidget;
00120 TQWidget *m_pTab1;
00121 TQPushButton *mPreviewButton1, *mPreviewButton2, *mPreviewButton3;
00122 };
00123
00124 class KIconEffectSetupDialog: public KDialogBase
00125 {
00126 Q_OBJECT
00127
00128 public:
00129 KIconEffectSetupDialog(const Effect &, const Effect &,
00130 const TQString &, const TQImage &,
00131 TQWidget *parent=0L, char *name=0L);
00132 ~KIconEffectSetupDialog();
00133 Effect effect() { return mEffect; }
00134
00135 protected:
00136 void preview();
00137 void init();
00138
00139 protected slots:
00140 void slotEffectValue(int value);
00141 void slotEffectColor(const TQColor &col);
00142 void slotEffectColor2(const TQColor &col);
00143 void slotEffectType(int type);
00144 void slotSTCheck(bool b);
00145 void slotDefault();
00146
00147 private:
00148 KIconEffect *mpEffect;
00149 TQListBox *mpEffectBox;
00150 TQCheckBox *mpSTCheck;
00151 TQSlider *mpEffectSlider;
00152 KColorButton *mpEColButton;
00153 KColorButton *mpECol2Button;
00154 Effect mEffect;
00155 Effect mDefaultEffect;
00156 TQImage mExample;
00157 TQGroupBox *mpEffectGroup;
00158 TQLabel *mpPreview, *mpEffectLabel, *mpEffectColor, *mpEffectColor2;
00159 };
00160
00161 #endif