Chris@1285: /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */ Chris@1285: Chris@1285: /* Chris@1285: Sonic Visualiser Chris@1285: An audio file viewer and annotation editor. Chris@1285: Centre for Digital Music, Queen Mary, University of London. Chris@1285: Chris@1285: This program is free software; you can redistribute it and/or Chris@1285: modify it under the terms of the GNU General Public License as Chris@1285: published by the Free Software Foundation; either version 2 of the Chris@1285: License, or (at your option) any later version. See the file Chris@1285: COPYING included with this distribution for more information. Chris@1285: */ Chris@1285: Chris@1285: #ifndef SV_PLUGIN_PATH_CONFIGURATOR_H Chris@1285: #define SV_PLUGIN_PATH_CONFIGURATOR_H Chris@1285: Chris@1285: #include Chris@1285: #include Chris@1285: Chris@1286: class QLabel; Chris@1286: class QWidget; Chris@1287: class QListWidget; Chris@1288: class QPushButton; Chris@1288: class QGridLayout; Chris@1289: class QComboBox; Chris@1290: class QCheckBox; Chris@1286: Chris@1285: class PluginPathConfigurator : public QFrame Chris@1285: { Chris@1285: Q_OBJECT Chris@1285: Chris@1285: public: Chris@1285: PluginPathConfigurator(QWidget *parent = 0); Chris@1285: ~PluginPathConfigurator(); Chris@1285: Chris@1289: // Text used to identify a plugin type to the user. Chris@1289: // e.g. "LADSPA", "Vamp", or potentially transliterations thereof Chris@1289: typedef QString PluginTypeLabel; Chris@1289: Chris@1289: struct PathConfig { Chris@1289: QStringList directories; Chris@1289: QString envVariable; // e.g. "LADSPA_PATH" etc Chris@1290: bool useEnvVariable; // true if env variable overrides directories list Chris@1289: }; Chris@1289: Chris@1289: typedef std::map Paths; Chris@1289: Chris@1289: void setPaths(Paths paths); Chris@1289: Paths getPaths() const; Chris@1285: Chris@1285: signals: Chris@1289: void pathsChanged(const Paths &paths); Chris@1285: Chris@1285: private slots: Chris@1285: void upClicked(); Chris@1285: void downClicked(); Chris@1291: void addClicked(); Chris@1285: void deleteClicked(); Chris@1290: void resetClicked(); Chris@1289: void currentTypeChanged(QString); Chris@1288: void currentLocationChanged(int); Chris@1290: void envOverrideChanged(int); Chris@1285: Chris@1285: private: Chris@1285: QGridLayout *m_layout; Chris@1289: QLabel *m_header; Chris@1289: QComboBox *m_pluginTypeSelector; Chris@1287: QListWidget *m_list; Chris@1288: QPushButton *m_up; Chris@1288: QPushButton *m_down; Chris@1291: QPushButton *m_add; Chris@1288: QPushButton *m_delete; Chris@1290: QPushButton *m_reset; Chris@1290: QCheckBox *m_envOverride; Chris@1285: Chris@1289: Paths m_paths; Chris@1290: Paths m_originalPaths; Chris@1285: Chris@1289: void populate(); Chris@1289: void populateFor(QString type, int makeCurrent); Chris@1285: }; Chris@1285: Chris@1285: #endif Chris@1285: Chris@1285: