1 // Copyright 2005-2019 The Mumble Developers. All rights reserved. 2 // Use of this source code is governed by a BSD-style license 3 // that can be found in the LICENSE file at the root of the 4 // Mumble source tree or at <https://www.mumble.info/LICENSE>. 5 6 #ifndef MUMBLE_MUMBLE_LOOKCONFIG_H_ 7 #define MUMBLE_MUMBLE_LOOKCONFIG_H_ 8 9 #include "ConfigDialog.h" 10 #include "ThemeInfo.h" 11 12 #include "ui_LookConfig.h" 13 14 class QFileSystemWatcher; 15 class QTimer; 16 17 class LookConfig : public ConfigWidget, Ui::LookConfig { 18 private: 19 Q_OBJECT 20 Q_DISABLE_COPY(LookConfig) 21 public: 22 LookConfig(Settings &st); 23 virtual QString title() const Q_DECL_OVERRIDE; 24 virtual QIcon icon() const Q_DECL_OVERRIDE; 25 26 public slots: 27 void accept() const Q_DECL_OVERRIDE; 28 void save() const Q_DECL_OVERRIDE; 29 void load(const Settings &r) Q_DECL_OVERRIDE; 30 void themeDirectoryChanged(); 31 private: 32 /// Reload themes combobox and select given configuredStyle in it 33 void reloadThemes(const boost::optional<ThemeInfo::StyleInfo> configuredStyle); 34 35 /// Timer to prevent change event floods from triggering theme reloads 36 QTimer *m_themeDirectoryDebouncer; 37 /// Watcher to keep theme list up to date with user theme directory 38 QFileSystemWatcher* m_themeDirectoryWatcher; 39 }; 40 41 #endif 42