00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef BGADVANCED_H
00024 #define BGADVANCED_H
00025
00026 #include <tqdict.h>
00027 #include <tqlistview.h>
00028 #include <tqstringlist.h>
00029
00030 #include <kdialogbase.h>
00031
00032 class TQLineEdit;
00033 class TQSpinBox;
00034
00035 class BGAdvancedBase;
00036 class KBackgroundRenderer;
00037 class KBackgroundProgram;
00038
00039 class BGAdvancedDialog : public KDialogBase
00040 {
00041 Q_OBJECT
00042 public:
00043 BGAdvancedDialog(KBackgroundRenderer *_r, TQWidget *parent, bool m_multidesktop);
00044
00045 void setCacheSize(int s);
00046 int cacheSize();
00047 TQColor textColor();
00048 void setTextColor(const TQColor &color);
00049 TQColor textBackgroundColor();
00050 void setTextBackgroundColor(const TQColor &color);
00051 bool shadowEnabled();
00052 void setShadowEnabled(bool enabled);
00053 void setTextLines(int lines);
00054 int textLines() const;
00055 void setTextWidth(int width);
00056 int textWidth() const;
00057
00058 void updateUI();
00059
00060 void makeReadOnly();
00061
00062 TQString backgroundProgram() const;
00063 int backgroundMode() const;
00064
00065 public slots:
00066 void slotAdd();
00067 void slotRemove();
00068 void slotModify();
00069
00070 protected:
00071 void addProgram(const TQString &name);
00072 void removeProgram(const TQString &name);
00073 void selectProgram(const TQString &name);
00074
00075 protected slots:
00076 void slotProgramItemClicked(TQListViewItem *item);
00077 void slotProgramItemDoubleClicked(TQListViewItem *item);
00078 void slotProgramChanged();
00079 void slotEnableProgram(bool b);
00080
00081 private:
00082 KBackgroundRenderer *r;
00083
00084 BGAdvancedBase *dlg;
00085
00086 TQWidget *m_pMonitor;
00087 TQDict<TQListViewItem> m_programItems;
00088 TQString m_selectedProgram;
00089 int m_oldBackgroundMode;
00090 int m_backgroundMode;
00091 };
00092
00096 class KProgramEditDialog: public KDialogBase
00097 {
00098 Q_OBJECT
00099
00100 public:
00101 KProgramEditDialog(const TQString &program=TQString::null, TQWidget *parent=0L,
00102 char *name=0L);
00103
00105 TQString program()const;
00106
00107 public slots:
00108 void slotOk();
00109
00110 private:
00111 TQString m_Program;
00112 TQLineEdit *m_NameEdit, *m_CommentEdit;
00113 TQLineEdit *m_ExecEdit, *m_CommandEdit;
00114 TQLineEdit *m_PreviewEdit;
00115 TQSpinBox *m_RefreshEdit;
00116 KBackgroundProgram *m_Prog;
00117 };
00118
00119
00120 #endif
00121