File indexing completed on 2024-04-28 15:14:03
0001 /*************************************************************************** 0002 File : ThemeHandler.h 0003 Project : LabPlot 0004 Description : Widget for handling saving and loading of themes 0005 -------------------------------------------------------------------- 0006 Copyright : (C) 2016 Prakriti Bhardwaj (p_bhardwaj14@informatik.uni-kl.de) 0007 Copyright : (C) 2016 Alexander Semke (alexander.semke@web.de) 0008 Copyright : (C) 2018 Stefan Gerlach (stefan.gerlach@uni.kn) 0009 0010 ***************************************************************************/ 0011 0012 /*************************************************************************** 0013 * * 0014 * This program is free software; you can redistribute it and/or modify * 0015 * it under the terms of the GNU General Public License as published by * 0016 * the Free Software Foundation; either version 2 of the License, or * 0017 * (at your option) any later version. * 0018 * * 0019 * This program is distributed in the hope that it will be useful, * 0020 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 0021 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 0022 * GNU General Public License for more details. * 0023 * * 0024 * You should have received a copy of the GNU General Public License * 0025 * along with this program; if not, write to the Free Software * 0026 * Foundation, Inc., 51 Franklin Street, Fifth Floor, * 0027 * Boston, MA 02110-1301 USA * 0028 * * 0029 ***************************************************************************/ 0030 0031 #ifndef THEMEHANDLER_H 0032 #define THEMEHANDLER_H 0033 0034 #include <QWidget> 0035 0036 class QPushButton; 0037 class KConfig; 0038 0039 class ThemeHandler : public QWidget { 0040 Q_OBJECT 0041 0042 public: 0043 explicit ThemeHandler(QWidget*); 0044 static QStringList themeList(); 0045 static QStringList themes(); 0046 static const QString themeFilePath(const QString&); 0047 0048 public slots: 0049 void setCurrentTheme(const QString&); 0050 0051 private: 0052 QList<QString> m_dirNames; 0053 QStringList m_themeList; 0054 QString m_currentTheme; 0055 QString m_currentLocalTheme; 0056 0057 QPushButton* m_pbLoadTheme; 0058 // QPushButton* m_pbSaveTheme; 0059 // QPushButton* pbPublishTheme; 0060 0061 private slots: 0062 void loadSelected(const QString&); 0063 void showPanel(); 0064 // void saveMenu(); 0065 // void saveNewSelected(const QString&); 0066 // void publishThemes(); 0067 0068 signals: 0069 void loadThemeRequested(const QString&); 0070 void saveThemeRequested(KConfig&); 0071 void info(const QString&); 0072 void loadPreviewPanel(QStringList, QString); 0073 }; 0074 0075 #endif