00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef KTHEMEMANAGER_H
00020 #define KTHEMEMANAGER_H
00021
00022 #include <kcmodule.h>
00023 #include <krun.h>
00024 #include <kservice.h>
00025 #include <kurl.h>
00026
00027 #include "kthemedlg.h"
00028 #include "ktheme.h"
00029
00030 class TQString;
00031
00032 class KAboutData;
00033
00034 #define ORIGINAL_THEME "original" // no i18n() here!!!
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00062 class kthememanager: public KCModule
00063 {
00064 Q_OBJECT
00065 public:
00066 kthememanager( TQWidget *parent=0, const char *name=0 );
00067 virtual ~kthememanager();
00068
00072 virtual void load();
00073 virtual void load(bool useDefaults);
00077 virtual void save();
00081 virtual void defaults();
00082
00083 protected:
00084 void dragEnterEvent ( TQDragEnterEvent * ev );
00085 void dropEvent ( TQDropEvent * ev );
00086
00087 signals:
00091 void filesDropped(const KURL::List &urls);
00092
00093 private slots:
00097 void slotInstallTheme();
00098
00102 void slotRemoveTheme();
00103
00107 void slotCreateTheme();
00108
00112 void slotThemeChanged( TQListViewItem * item );
00113
00118 void slotFilesDropped( const KURL::List & urls );
00119 void updateButton();
00120
00121 private:
00125 void listThemes();
00126
00130 void addNewTheme( const KURL & url );
00131
00135 void init();
00136
00142 static float getThemeVersion( const TQString & themeName );
00143
00144 void queryLNFModules();
00145
00149 void updatePreview( const TQString & pixFile );
00150 bool themeExist(const TQString &_themeName);
00151 KThemeDlg * dlg;
00152
00153 KTheme * m_theme;
00154 KTheme * m_origTheme;
00155 };
00156
00157 #endif