Chris@1285
|
1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
|
Chris@1285
|
2
|
Chris@1285
|
3 /*
|
Chris@1285
|
4 Sonic Visualiser
|
Chris@1285
|
5 An audio file viewer and annotation editor.
|
Chris@1285
|
6 Centre for Digital Music, Queen Mary, University of London.
|
Chris@1285
|
7
|
Chris@1285
|
8 This program is free software; you can redistribute it and/or
|
Chris@1285
|
9 modify it under the terms of the GNU General Public License as
|
Chris@1285
|
10 published by the Free Software Foundation; either version 2 of the
|
Chris@1285
|
11 License, or (at your option) any later version. See the file
|
Chris@1285
|
12 COPYING included with this distribution for more information.
|
Chris@1285
|
13 */
|
Chris@1285
|
14
|
Chris@1285
|
15 #ifndef SV_PLUGIN_PATH_CONFIGURATOR_H
|
Chris@1285
|
16 #define SV_PLUGIN_PATH_CONFIGURATOR_H
|
Chris@1285
|
17
|
Chris@1285
|
18 #include <QFrame>
|
Chris@1285
|
19 #include <QStringList>
|
Chris@1285
|
20
|
Chris@1286
|
21 class QLabel;
|
Chris@1286
|
22 class QWidget;
|
Chris@1287
|
23 class QListWidget;
|
Chris@1288
|
24 class QPushButton;
|
Chris@1288
|
25 class QGridLayout;
|
Chris@1289
|
26 class QComboBox;
|
Chris@1286
|
27
|
Chris@1285
|
28 class PluginPathConfigurator : public QFrame
|
Chris@1285
|
29 {
|
Chris@1285
|
30 Q_OBJECT
|
Chris@1285
|
31
|
Chris@1285
|
32 public:
|
Chris@1285
|
33 PluginPathConfigurator(QWidget *parent = 0);
|
Chris@1285
|
34 ~PluginPathConfigurator();
|
Chris@1285
|
35
|
Chris@1289
|
36 // Text used to identify a plugin type to the user.
|
Chris@1289
|
37 // e.g. "LADSPA", "Vamp", or potentially transliterations thereof
|
Chris@1289
|
38 typedef QString PluginTypeLabel;
|
Chris@1289
|
39
|
Chris@1289
|
40 struct PathConfig {
|
Chris@1289
|
41 QStringList directories;
|
Chris@1289
|
42 QString envVariable; // e.g. "LADSPA_PATH" etc
|
Chris@1289
|
43 };
|
Chris@1289
|
44
|
Chris@1289
|
45 typedef std::map<PluginTypeLabel, PathConfig> Paths;
|
Chris@1289
|
46
|
Chris@1289
|
47 void setPaths(Paths paths);
|
Chris@1289
|
48 Paths getPaths() const;
|
Chris@1285
|
49
|
Chris@1285
|
50 signals:
|
Chris@1289
|
51 void pathsChanged(const Paths &paths);
|
Chris@1285
|
52
|
Chris@1285
|
53 private slots:
|
Chris@1285
|
54 void upClicked();
|
Chris@1285
|
55 void downClicked();
|
Chris@1285
|
56 void deleteClicked();
|
Chris@1289
|
57 void currentTypeChanged(QString);
|
Chris@1288
|
58 void currentLocationChanged(int);
|
Chris@1285
|
59
|
Chris@1285
|
60 private:
|
Chris@1285
|
61 QGridLayout *m_layout;
|
Chris@1289
|
62 QLabel *m_header;
|
Chris@1289
|
63 QComboBox *m_pluginTypeSelector;
|
Chris@1287
|
64 QListWidget *m_list;
|
Chris@1288
|
65 QPushButton *m_up;
|
Chris@1288
|
66 QPushButton *m_down;
|
Chris@1288
|
67 QPushButton *m_delete;
|
Chris@1285
|
68
|
Chris@1289
|
69 Paths m_paths;
|
Chris@1285
|
70
|
Chris@1289
|
71 void populate();
|
Chris@1289
|
72 void populateFor(QString type, int makeCurrent);
|
Chris@1285
|
73 };
|
Chris@1285
|
74
|
Chris@1285
|
75 #endif
|
Chris@1285
|
76
|
Chris@1285
|
77
|