1 //=========================================== 2 // Lumina Desktop Source Code 3 // Copyright (c) 2016, Ken Moore 4 // Available under the 3-clause BSD license 5 // See the LICENSE file for full details 6 //=========================================== 7 #ifndef _LUMINA_CONFIG_PAGE_FLUXBOX_KEYS_H 8 #define _LUMINA_CONFIG_PAGE_FLUXBOX_KEYS_H 9 #include "../globals.h" 10 #include "PageWidget.h" 11 12 namespace Ui{ 13 class page_fluxbox_keys; 14 }; 15 16 class page_fluxbox_keys : public PageWidget{ 17 Q_OBJECT 18 public: 19 page_fluxbox_keys(QWidget *parent); 20 ~page_fluxbox_keys(); 21 22 public slots: 23 void SaveSettings(); 24 void LoadSettings(int screennum); 25 void updateIcons(); 26 27 //Simplification function for widget connections settingChanged()28 virtual void settingChanged(){ 29 if(!loading){ emit HasPendingChanges(true); } 30 } 31 32 private: 33 Ui::page_fluxbox_keys *ui; 34 bool loading; 35 36 //Convert to/from fluxbox keyboard shortcuts 37 QString dispToFluxKeys(QString); 38 QString fluxToDispKeys(QString); 39 40 //Read/overwrite a text file 41 QStringList readFile(QString path); 42 bool overwriteFile(QString path, QStringList contents); 43 44 private slots: 45 void clearKeyBinding(); 46 void applyKeyBinding(); 47 void updateKeyConfig(); 48 void switchEditor(); 49 void togglesyntaxgroup(); 50 }; 51 #endif 52