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_CONFIGDIALOG_H_ 7 #define MUMBLE_MUMBLE_CONFIGDIALOG_H_ 8 9 #include "ConfigWidget.h" 10 #include "Settings.h" 11 12 #include "ui_ConfigDialog.h" 13 14 class ConfigDialog : public QDialog, public Ui::ConfigDialog { 15 private: 16 Q_OBJECT 17 Q_DISABLE_COPY(ConfigDialog) 18 protected: 19 QHash<ConfigWidget *, QWidget *> qhPages; 20 QMap<unsigned int, ConfigWidget *> qmWidgets; 21 QMap<QListWidgetItem *, ConfigWidget *> qmIconWidgets; 22 void updateListView(); 23 void addPage(ConfigWidget *aw, unsigned int idx); 24 Settings s; 25 26 public: 27 ConfigDialog(QWidget *p = NULL); 28 ~ConfigDialog() Q_DECL_OVERRIDE; 29 public slots: 30 void on_pageButtonBox_clicked(QAbstractButton *); 31 void on_dialogButtonBox_clicked(QAbstractButton *); 32 void on_qlwIcons_currentItemChanged(QListWidgetItem *current, QListWidgetItem *previous); 33 void apply(); 34 void accept() Q_DECL_OVERRIDE; 35 }; 36 37 #endif 38