1 //
2 // C++ Interface: ssplugingui
3 //
4 // Description:
5 //
6 //
7 // Author: Mathias Lundgren <lunar_shuttle@users.sf.net>, (C) 2004
8 //  Contributer: (C) Copyright 2011 Tim E. Real (terminator356 at users.sourceforge.net)
9 //
10 //  This program is free software; you can redistribute it and/or
11 //  modify it under the terms of the GNU General Public License
12 //  as published by the Free Software Foundation; version 2 of
13 //  the License, or (at your option) any later version.
14 //
15 //  This program is distributed in the hope that it will be useful,
16 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
17 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18 //  GNU General Public License for more details.
19 //
20 //  You should have received a copy of the GNU General Public License
21 //  along with this program; if not, write to the Free Software
22 //  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
23 //
24 //
25 // Copyright: See COPYING file that comes with this distribution
26 //
27 //
28 
29 #ifndef __SIMPLER_PLUGIN_GUI_H__
30 #define __SIMPLER_PLUGIN_GUI_H__
31 
32 #include <QTreeWidgetItem>
33 
34 #include "ui_simplepluginchooserbase.h"
35 #include "libsimpleplugin/simpler_plugin.h"
36 
37 namespace MusESimplePlugin {
38 
39 //-------------------------------
40 // SimplerPluginChooser
41 //-------------------------------
42 class SimplerPluginChooser : public QDialog, Ui::SimplePluginChooserBase
43 {
44    Q_OBJECT
45    private:
46       Plugin* selectedPlugin;
47 
48    protected:
49 
50    public:
51       SimplerPluginChooser(QWidget* parent);
52       static Plugin* getPlugin(QWidget* parent);
getSelectedPlugin()53       Plugin* getSelectedPlugin() { return selectedPlugin; }
54 
55    private slots:
56       void okPressed();
57       void cancelPressed();
58       void selectionChanged();
59       void doubleClicked(QTreeWidgetItem* item);
60 
61    private:
62       QTreeWidgetItem* selectedItem;
63       Plugin* findSelectedPlugin();
64 };
65 
66 } // namespace MusESimplePlugin
67 
68 #endif
69 
70