comparison widgets/PluginPathConfigurator.h @ 1290:050eca637c19 plugin-path-config

More work on plugin path configuration layout &c
author Chris Cannam
date Wed, 23 May 2018 11:52:19 +0100
parents ed04d3666d33
children b5c71304286e
comparison
equal deleted inserted replaced
1289:ed04d3666d33 1290:050eca637c19
22 class QWidget; 22 class QWidget;
23 class QListWidget; 23 class QListWidget;
24 class QPushButton; 24 class QPushButton;
25 class QGridLayout; 25 class QGridLayout;
26 class QComboBox; 26 class QComboBox;
27 class QCheckBox;
27 28
28 class PluginPathConfigurator : public QFrame 29 class PluginPathConfigurator : public QFrame
29 { 30 {
30 Q_OBJECT 31 Q_OBJECT
31 32
38 typedef QString PluginTypeLabel; 39 typedef QString PluginTypeLabel;
39 40
40 struct PathConfig { 41 struct PathConfig {
41 QStringList directories; 42 QStringList directories;
42 QString envVariable; // e.g. "LADSPA_PATH" etc 43 QString envVariable; // e.g. "LADSPA_PATH" etc
44 bool useEnvVariable; // true if env variable overrides directories list
43 }; 45 };
44 46
45 typedef std::map<PluginTypeLabel, PathConfig> Paths; 47 typedef std::map<PluginTypeLabel, PathConfig> Paths;
46 48
47 void setPaths(Paths paths); 49 void setPaths(Paths paths);
52 54
53 private slots: 55 private slots:
54 void upClicked(); 56 void upClicked();
55 void downClicked(); 57 void downClicked();
56 void deleteClicked(); 58 void deleteClicked();
59 void resetClicked();
57 void currentTypeChanged(QString); 60 void currentTypeChanged(QString);
58 void currentLocationChanged(int); 61 void currentLocationChanged(int);
62 void envOverrideChanged(int);
59 63
60 private: 64 private:
61 QGridLayout *m_layout; 65 QGridLayout *m_layout;
62 QLabel *m_header; 66 QLabel *m_header;
63 QComboBox *m_pluginTypeSelector; 67 QComboBox *m_pluginTypeSelector;
64 QListWidget *m_list; 68 QListWidget *m_list;
65 QPushButton *m_up; 69 QPushButton *m_up;
66 QPushButton *m_down; 70 QPushButton *m_down;
67 QPushButton *m_delete; 71 QPushButton *m_delete;
72 QPushButton *m_reset;
73 QCheckBox *m_envOverride;
68 74
69 Paths m_paths; 75 Paths m_paths;
76 Paths m_originalPaths;
70 77
71 void populate(); 78 void populate();
72 void populateFor(QString type, int makeCurrent); 79 void populateFor(QString type, int makeCurrent);
73 }; 80 };
74 81