1 //=========================================== 2 // Lumina-DE source code 3 // Copyright (c) 2015, Ken Moore 4 // Available under the 3-clause BSD license 5 // See the LICENSE file for full details 6 //=========================================== 7 #ifndef _LUMINA_PLAIN_TEXT_EDITOR_COLOR_DIALOG_H 8 #define _LUMINA_PLAIN_TEXT_EDITOR_COLOR_DIALOG_H 9 10 #include <QDialog> 11 #include <QSettings> 12 #include <QWidget> 13 #include <QCloseEvent> 14 15 namespace Ui{ 16 class ColorDialog; 17 }; 18 19 class ColorDialog : public QDialog{ 20 Q_OBJECT 21 private: 22 Ui::ColorDialog *ui; 23 QSettings *settings; 24 25 public: 26 ColorDialog(QSettings *set, QWidget *parent); ~ColorDialog()27 ~ColorDialog(){} 28 29 void LoadColors(); 30 31 public slots: 32 void updateIcons(); 33 34 private slots: 35 void saveColors(); 36 void changeColor(); 37 38 signals: 39 void colorsChanged(); 40 41 protected: closeEvent(QCloseEvent *)42 void closeEvent(QCloseEvent*){ 43 //Make sure this window never actually closes until the app is finished 44 this->hide(); 45 } 46 }; 47 48 #endif 49