summaryrefslogtreecommitdiff
path: root/muse_qt4_evolution/awl/awlplugin.h
blob: 79b180fde36830400a066667c79eb7307dba29ff (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
//=============================================================================
//  Awl
//  Audio Widget Library
//  $Id:$
//
//  Copyright (C) 2002-2006 by Werner Schweer and others
//
//  This program is free software; you can redistribute it and/or modify
//  it under the terms of the GNU General Public License version 2.
//
//  This program is distributed in the hope that it will be useful,
//  but WITHOUT ANY WARRANTY; without even the implied warranty of
//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//  GNU General Public License for more details.
//
//  You should have received a copy of the GNU General Public License
//  along with this program; if not, write to the Free Software
//  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
//=============================================================================

#ifndef __AWLPLUGIN_H__
#define __AWLPLUGIN_H__

#include <QtDesigner/QDesignerCustomWidgetInterface>

//---------------------------------------------------------
//   AwlPlugin
//---------------------------------------------------------

class AwlPlugin : public QDesignerCustomWidgetInterface {
	Q_INTERFACES(QDesignerCustomWidgetInterface)
      bool m_initialized;

   public:
    	AwlPlugin() : m_initialized(false) { }
	bool isContainer() const     { return false;         }
    	bool isInitialized() const   { return m_initialized; }
    	QIcon icon() const           { return QIcon();       }
    	virtual QString codeTemplate() const { return QString();     }
    	QString whatsThis() const    { return QString();     }
    	QString toolTip() const      { return QString();     }
    	QString group() const        { return "MusE Awl Widgets"; }
	void initialize(QDesignerFormEditorInterface *) {
		if (m_initialized)
			return;
		m_initialized = true;
		}
      };

//---------------------------------------------------------
//   KnobPlugin
//---------------------------------------------------------

class KnobPlugin : public QObject, public AwlPlugin {
      Q_OBJECT

   public:
     	KnobPlugin(QObject* parent = 0) : QObject(parent) {}
      QString includeFile() const { return QString("awl/knob.h"); }
      QString name() const        { return "Awl::Knob"; }
      QWidget* createWidget(QWidget* parent);
      };

//---------------------------------------------------------
//   VolKnobPlugin
//---------------------------------------------------------

class VolKnobPlugin : public QObject, public AwlPlugin {
      Q_OBJECT

   public:
     	VolKnobPlugin(QObject* parent = 0) : QObject(parent) {}
      QString includeFile() const { return "awl/volknob.h"; }
      QString name() const { return "Awl::VolKnob"; }
      QWidget* createWidget(QWidget* parent);
      };

//---------------------------------------------------------
//   SliderPlugin
//---------------------------------------------------------

class SliderPlugin : public QObject, public AwlPlugin {
      Q_OBJECT

   public:
     	SliderPlugin(QObject* parent = 0) : QObject(parent) {}
      QString includeFile() const { return "awl/slider.h"; }
      QString name() const { return "Awl::Slider"; }
      QWidget* createWidget(QWidget* parent);
      };

//---------------------------------------------------------
//   VolSliderPlugin
//---------------------------------------------------------

class VolSliderPlugin : public QObject, public AwlPlugin {
      Q_OBJECT

   public:
     	VolSliderPlugin(QObject* parent = 0) : QObject(parent) {}
      QString includeFile() const { return "awl/volslider.h"; }
      QString name() const { return "Awl::VolSlider"; }
      QWidget* createWidget(QWidget* parent);
      };

//---------------------------------------------------------
//   MeterSliderPlugin
//---------------------------------------------------------

class MeterSliderPlugin : public QObject, public AwlPlugin {
      Q_OBJECT

   public:
     	MeterSliderPlugin(QObject* parent = 0) : QObject(parent) {}
      QString includeFile() const { return "awl/mslider.h"; }
      QString name() const { return "Awl::MeterSlider"; }
      QWidget* createWidget(QWidget* parent);
      };

//---------------------------------------------------------
//   PosEditPlugin
//---------------------------------------------------------

class PosEditPlugin : public QObject, public AwlPlugin {
      Q_OBJECT

   public:
     	PosEditPlugin(QObject* parent = 0) : QObject(parent) {}
      QString includeFile() const { return "awl/posedit.h"; }
      QString name() const { return "Awl::PosEdit"; }
      QWidget* createWidget(QWidget* parent);
      };

//---------------------------------------------------------
//   PosLabelPlugin
//---------------------------------------------------------

class PosLabelPlugin : public QObject, public AwlPlugin {
      Q_OBJECT

   public:
     	PosLabelPlugin(QObject* parent = 0) : QObject(parent) {}
      QString includeFile() const { return "awl/poslabel.h"; }
      QString name() const { return "Awl::PosLabel"; }
      QWidget* createWidget(QWidget* parent);
      };

//---------------------------------------------------------
//   TempoEditPlugin
//---------------------------------------------------------

class TempoEditPlugin : public QObject, public AwlPlugin {
      Q_OBJECT

   public:
     	TempoEditPlugin(QObject* parent = 0) : QObject(parent) {}
      QString includeFile() const { return "awl/tempoedit.h"; }
      QString name() const { return "Awl::TempoEdit"; }
      QWidget* createWidget(QWidget* parent);
      };

//---------------------------------------------------------
//   TempoLabelPlugin
//---------------------------------------------------------

class TempoLabelPlugin : public QObject, public AwlPlugin {
      Q_OBJECT

   public:
     	TempoLabelPlugin(QObject* parent = 0) : QObject(parent) {}
      QString includeFile() const { return "awl/tempolabel.h"; }
      QString name() const { return "Awl::TempoLabel"; }
      QWidget* createWidget(QWidget* parent);
      };

//---------------------------------------------------------
//   CheckBoxPlugin
//---------------------------------------------------------

class CheckBoxPlugin : public QObject, public AwlPlugin {
      Q_OBJECT

   public:
     	CheckBoxPlugin(QObject* parent = 0) : QObject(parent) {}
      QString includeFile() const { return "awl/checkbox.h"; }
      QString name() const { return "Awl::CheckBox"; }
      QWidget* createWidget(QWidget* parent);
      };

//---------------------------------------------------------
//   ComboBoxPlugin
//---------------------------------------------------------

class ComboBoxPlugin : public QObject, public AwlPlugin {
      Q_OBJECT

   public:
     	ComboBoxPlugin(QObject* parent = 0) : QObject(parent) {}
      QString includeFile() const { return "awl/combobox.h"; }
      QString name() const { return "Awl::ComboBox"; }
      QWidget* createWidget(QWidget* parent);
      };

//---------------------------------------------------------
//   FloatEntryPlugin
//---------------------------------------------------------

class FloatEntryPlugin : public QObject, public AwlPlugin {
      Q_OBJECT

   public:
     	FloatEntryPlugin(QObject* parent = 0) : QObject(parent) {}
      QString includeFile() const { return "awl/floatentry.h"; }
      QString name() const { return "Awl::FloatEntry"; }
      QWidget* createWidget(QWidget* parent);
      };

//---------------------------------------------------------
//   PanKnobPlugin
//---------------------------------------------------------

class PanKnobPlugin : public QObject, public AwlPlugin {
      Q_OBJECT

   public:
     	PanKnobPlugin(QObject* parent = 0) : QObject(parent) {}
      QString includeFile() const { return "awl/panknob.h"; }
      QString name() const { return "Awl::PanKnob"; }
      QWidget* createWidget(QWidget* parent);
      };

//---------------------------------------------------------
//   MidiPanKnobPlugin
//---------------------------------------------------------

class MidiPanKnobPlugin : public QObject, public AwlPlugin {
      Q_OBJECT

   public:
     	MidiPanKnobPlugin(QObject* parent = 0) : QObject(parent) {}
      QString includeFile() const { return "awl/midipanknob.h"; }
      QString name() const { return "Awl::MidiPanKnob"; }
      QWidget* createWidget(QWidget* parent);
      };

//---------------------------------------------------------
//   DrawbarPlugin
//---------------------------------------------------------

class DrawbarPlugin : public QObject, public AwlPlugin {
      Q_OBJECT

   public:
     	DrawbarPlugin(QObject* parent = 0) : QObject(parent) {}
      QString includeFile() const { return "awl/drawbar.h"; }
      QString name() const { return "Awl::Drawbar"; }
      QWidget* createWidget(QWidget* parent);
      };

//---------------------------------------------------------
//   AwlPlugins
//---------------------------------------------------------

class AwlPlugins : public QObject, public QDesignerCustomWidgetCollectionInterface {
      Q_OBJECT
      Q_INTERFACES(QDesignerCustomWidgetCollectionInterface)

   public:
      QList<QDesignerCustomWidgetInterface*> customWidgets() const;
      };

#endif