00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef __THEMEPAGE_H
00020 #define __THEMEPAGE_H
00021
00022 #include <tqdict.h>
00023
00024
00025 class KListView;
00026 class TQString;
00027 class PreviewWidget;
00028 class TQStringList;
00029 class TQListViewItem;
00030 class TQPushButton;
00031
00032 struct ThemeInfo;
00033
00034
00035 class ThemePage : public QWidget
00036 {
00037 Q_OBJECT
00038
00039 public:
00040 ThemePage( TQWidget* parent = 0, const char* name = 0 );
00041 ~ThemePage();
00042
00043
00044 void save();
00045 void load();
00046 void load( bool useDefaults );
00047 void defaults();
00048
00049 signals:
00050 void changed( bool );
00051
00052 private slots:
00053 void selectionChanged( TQListViewItem * );
00054 void installClicked();
00055 void removeClicked();
00056
00057 private:
00058 bool installThemes( const TQString &file );
00059 void insertTheme( const TQString & );
00060 const TQStringList getThemeBaseDirs() const;
00061 bool isCursorTheme( const TQString &theme, const int depth = 0 ) const;
00062 void insertThemes();
00063 TQPixmap createIcon( const TQString &, const TQString & ) const;
00064
00065 KListView *listview;
00066 PreviewWidget *preview;
00067 TQPushButton *installButton, *removeButton;
00068 TQString selectedTheme;
00069 TQString currentTheme;
00070 TQStringList themeDirs;
00071 TQDict<ThemeInfo> themeInfo;
00072 };
00073
00074 #endif // __THEMEPAGE_H
00075
00076