themesdlg.h

00001 /*
00002  * Copyright (C) 2005 Petri Damstén <petri.damsten@iki.fi>
00003  *
00004  * This file is part of SuperKaramba.
00005  *
00006  *  SuperKaramba is free software; you can redistribute it and/or modify
00007  *  it under the terms of the GNU General Public License as published by
00008  *  the Free Software Foundation; either version 2 of the License, or
00009  *  (at your option) any later version.
00010  *
00011  *  SuperKaramba is distributed in the hope that it will be useful,
00012  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  *  GNU General Public License for more details.
00015  *
00016  *  You should have received a copy of the GNU General Public License
00017  *  along with SuperKaramba; if not, write to the Free Software
00018  *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
00019  ****************************************************************************/
00020 
00021 #ifndef THEMESDLG_H
00022 #define THEMESDLG_H
00023 
00024 #include <themes_layout.h>
00025 #include "karambaapp.h"
00026 
00027 #ifdef HAVE_CONFIG_H
00028   #include <config.h>
00029 #endif
00030 
00034 #ifdef HAVE_KNEWSTUFF
00035 class SKNewStuff;
00036 #endif
00037 class ThemeFile;
00038 class KArchiveDirectory;
00039 
00040 class ThemesDlg : public ThemesLayout
00041 {
00042     Q_OBJECT
00043 
00044   public:
00045     ThemesDlg(QWidget *parent = 0, const char *name = 0);
00046     ~ThemesDlg();
00047 
00048     int addTheme(const QString &appId, const QString &file);
00049     void removeTheme(const QString &appId, const QString &file, int instance);
00050     int addThemeToList(const QString &file);
00051     void addSkzThemeToDialog(const QString &file);
00052     void addThemeToDialog(const KArchiveDirectory *archiveDir, const QString& destDir);
00053     void writeNewStuffConfig(const QString &file);
00054     void configSanityCheck();
00055     bool isDownloaded(const QString &path);
00056     void saveUserAddedThemes();
00057     QStringList runningThemes();
00058 
00059   protected slots:
00060     virtual void addToDesktop();
00061     virtual void selectionChanged(int);
00062     virtual void openLocalTheme();
00063     virtual void getNewStuff();
00064     virtual void search(const QString& text);
00065     virtual void uninstall();
00066 
00067   protected:
00068     static bool filter(int index, QWidget* widget, void* data);
00069     void populateListbox();
00070     int themeIndex(QString file);
00071     QStringList themes();
00072 
00073 #ifdef HAVE_KNEWSTUFF
00074   private:
00075     SKNewStuff *mNewStuff;
00076     QStringList m_newStuffStatus;
00077 #endif
00078 };
00079 
00080 #endif
KDE Home | KDE Accessibility Home | Description of Access Keys