File indexing completed on 2024-05-12 03:49:11
0001 /* 0002 File : ThemeHandler.h 0003 Project : LabPlot 0004 Description : Widget for handling saving and loading of themes 0005 -------------------------------------------------------------------- 0006 SPDX-FileCopyrightText: 2016 Prakriti Bhardwaj <p_bhardwaj14@informatik.uni-kl.de> 0007 SPDX-FileCopyrightText: 2016 Alexander Semke <alexander.semke@web.de> 0008 SPDX-FileCopyrightText: 2018 Stefan Gerlach <stefan.gerlach@uni.kn> 0009 SPDX-License-Identifier: GPL-2.0-or-later 0010 */ 0011 0012 #ifndef THEMEHANDLER_H 0013 #define THEMEHANDLER_H 0014 0015 #include <QWidget> 0016 0017 class QPushButton; 0018 class KConfig; 0019 0020 class ThemeHandler : public QWidget { 0021 Q_OBJECT 0022 0023 public: 0024 explicit ThemeHandler(QWidget*); 0025 static QStringList themeList(); 0026 static QStringList themes(); 0027 static const QString themeFilePath(const QString&); 0028 0029 public Q_SLOTS: 0030 void setCurrentTheme(const QString&); 0031 0032 private: 0033 QList<QString> m_dirNames; 0034 QStringList m_themeList; 0035 QString m_currentTheme; 0036 QString m_currentLocalTheme; 0037 0038 QPushButton* m_pbLoadTheme; 0039 // QPushButton* m_pbSaveTheme; 0040 // QPushButton* pbPublishTheme; 0041 0042 private Q_SLOTS: 0043 void loadSelected(const QString&); 0044 void showPanel(); 0045 // void saveMenu(); 0046 // void saveNewSelected(const QString&); 0047 // void publishThemes(); 0048 0049 Q_SIGNALS: 0050 void loadThemeRequested(const QString&); 0051 void saveThemeRequested(KConfig&); 0052 void info(const QString&); 0053 void loadPreviewPanel(QStringList, QString); 0054 }; 0055 0056 #endif