MuseScore  3.4
Music composition and notation
awlplugin.h
Go to the documentation of this file.
1 //=============================================================================
2 // Awl
3 // Audio Widget Library
4 //
5 // Copyright (C) 2002-2006 by Werner Schweer and others
6 //
7 // This program is free software; you can redistribute it and/or modify
8 // it under the terms of the GNU General Public License version 2.
9 //
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
14 //
15 // You should have received a copy of the GNU General Public License
16 // along with this program; if not, write to the Free Software
17 // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18 //=============================================================================
19 
20 #ifndef __AWLPLUGIN_H__
21 #define __AWLPLUGIN_H__
22 
23 #include <QtUiPlugin/QDesignerCustomWidgetInterface>
24 
25 //---------------------------------------------------------
26 // AwlPlugin
27 //---------------------------------------------------------
28 
29 class AwlPlugin : public QDesignerCustomWidgetInterface {
30  Q_INTERFACES(QDesignerCustomWidgetInterface)
31  bool m_initialized;
32 
33  public:
34  AwlPlugin() : m_initialized(false) { }
35  bool isContainer() const { return false; }
36  bool isInitialized() const { return m_initialized; }
37  QIcon icon() const { return QIcon(); }
38  virtual QString codeTemplate() const { return QString(); }
39  QString whatsThis() const { return QString(); }
40  QString toolTip() const { return QString(); }
41  QString group() const { return "MusE Awl Widgets"; }
42  void initialize(QDesignerFormEditorInterface *) {
43  if (m_initialized)
44  return;
45  m_initialized = true;
46  }
47  };
48 
49 //---------------------------------------------------------
50 // KnobPlugin
51 //---------------------------------------------------------
52 
53 class KnobPlugin : public QObject, public AwlPlugin {
54  Q_OBJECT
55 
56  public:
57  KnobPlugin(QObject* parent = 0) : QObject(parent) {}
58  QString includeFile() const { return QString("awl/knob.h"); }
59  QString name() const { return "Awl::Knob"; }
60  QWidget* createWidget(QWidget* parent);
61  };
62 
63 //---------------------------------------------------------
64 // VolKnobPlugin
65 //---------------------------------------------------------
66 
67 class VolKnobPlugin : public QObject, public AwlPlugin {
68  Q_OBJECT
69 
70  public:
71  VolKnobPlugin(QObject* parent = 0) : QObject(parent) {}
72  QString includeFile() const { return "awl/volknob.h"; }
73  QString name() const { return "Awl::VolKnob"; }
74  QWidget* createWidget(QWidget* parent);
75  };
76 
77 //---------------------------------------------------------
78 // PanKnobPlugin
79 //---------------------------------------------------------
80 
81 class PanKnobPlugin : public QObject, public AwlPlugin {
82  Q_OBJECT
83 
84  public:
85  PanKnobPlugin(QObject* parent = 0) : QObject(parent) {}
86  QString includeFile() const { return "awl/panknob.h"; }
87  QString name() const { return "Awl::PanKnob"; }
88  QWidget* createWidget(QWidget* parent);
89  };
90 
91 //---------------------------------------------------------
92 // MidiPanKnobPlugin
93 //---------------------------------------------------------
94 
95 class MidiPanKnobPlugin : public QObject, public AwlPlugin {
96  Q_OBJECT
97 
98  public:
99  MidiPanKnobPlugin(QObject* parent = 0) : QObject(parent) {}
100  QString includeFile() const { return "awl/midipanknob.h"; }
101  QString name() const { return "Awl::MidiPanKnob"; }
102  QWidget* createWidget(QWidget* parent);
103  };
104 
105 //---------------------------------------------------------
106 // ColorLabelPlugin
107 //---------------------------------------------------------
108 
109 class ColorLabelPlugin : public QObject, public AwlPlugin {
110  Q_OBJECT
111 
112  public:
113  ColorLabelPlugin(QObject* parent = 0) : QObject(parent) {}
114  QString includeFile() const { return "awl/colorlabel.h"; }
115  QString name() const { return "Awl::ColorLabel"; }
116  QWidget* createWidget(QWidget* parent);
117  };
118 
119 //---------------------------------------------------------
120 // SliderPlugin
121 //---------------------------------------------------------
122 
123 class SliderPlugin : public QObject, public AwlPlugin {
124  Q_OBJECT
125 
126  public:
127  SliderPlugin(QObject* parent = 0) : QObject(parent) {}
128  QString includeFile() const { return "awl/slider.h"; }
129  QString name() const { return "Awl::Slider"; }
130  QWidget* createWidget(QWidget* parent);
131  };
132 
133 //---------------------------------------------------------
134 // VolSliderPlugin
135 //---------------------------------------------------------
136 
137 class VolSliderPlugin : public QObject, public AwlPlugin {
138  Q_OBJECT
139 
140  public:
141  VolSliderPlugin(QObject* parent = 0) : QObject(parent) {}
142  QString includeFile() const { return "awl/volslider.h"; }
143  QString name() const { return "Awl::VolSlider"; }
144  QWidget* createWidget(QWidget* parent);
145  };
146 
147 //---------------------------------------------------------
148 // MeterSliderPlugin
149 //---------------------------------------------------------
150 
151 class MeterSliderPlugin : public QObject, public AwlPlugin {
152  Q_OBJECT
153 
154  public:
155  MeterSliderPlugin(QObject* parent = 0) : QObject(parent) {}
156  QString includeFile() const { return "awl/mslider.h"; }
157  QString name() const { return "Awl::MeterSlider"; }
158  QWidget* createWidget(QWidget* parent);
159  };
160 
161 //---------------------------------------------------------
162 // DenominatorSpinBox
163 //---------------------------------------------------------
164 
165 class DenominatorSpinBoxPlugin : public QObject, public AwlPlugin {
166  Q_OBJECT
167 
168  public:
169  DenominatorSpinBoxPlugin(QObject* parent = 0) : QObject(parent) {}
170  QString includeFile() const { return "awl/denomspinbox.h"; }
171  QString name() const { return "Awl::DenominatorSpinBox"; }
172  QWidget* createWidget(QWidget* parent);
173  };
174 
175 //---------------------------------------------------------
176 // PitchLabelPlugin
177 //---------------------------------------------------------
178 
179 class PitchLabelPlugin : public QObject, public AwlPlugin {
180  Q_OBJECT
181 
182  public:
183  PitchLabelPlugin(QObject* parent = 0) : QObject(parent) {}
184  QString includeFile() const { return "awl/pitchlabel.h"; }
185  QString name() const { return "Awl::PitchLabel"; }
186  QWidget* createWidget(QWidget* parent);
187  };
188 
189 //---------------------------------------------------------
190 // PitchEditPlugin
191 //---------------------------------------------------------
192 
193 class PitchEditPlugin : public QObject, public AwlPlugin {
194  Q_OBJECT
195 
196  public:
197  PitchEditPlugin(QObject* parent = 0) : QObject(parent) {}
198  QString includeFile() const { return "awl/pitchedit.h"; }
199  QString name() const { return "Awl::PitchEdit"; }
200  QWidget* createWidget(QWidget* parent);
201  };
202 
203 //---------------------------------------------------------
204 // AwlPlugins
205 //---------------------------------------------------------
206 
207 class AwlPlugins : public QObject, public QDesignerCustomWidgetCollectionInterface {
208  Q_OBJECT
209  Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QDesignerCustomWidgetCollectionInterface")
210  Q_INTERFACES(QDesignerCustomWidgetCollectionInterface)
211 
212  public:
213  QList<QDesignerCustomWidgetInterface*> customWidgets() const;
214  };
215 
216 
217 #endif
218 
Definition: awlplugin.h:95
Definition: awlplugin.h:81
Definition: awlplugin.h:29
Definition: awlplugin.h:67
QString includeFile() const
Definition: awlplugin.h:100
QString includeFile() const
Definition: awlplugin.h:58
VolSliderPlugin(QObject *parent=0)
Definition: awlplugin.h:141
QString includeFile() const
Definition: awlplugin.h:198
QIcon icon() const
Definition: awlplugin.h:37
KnobPlugin(QObject *parent=0)
Definition: awlplugin.h:57
AwlPlugin()
Definition: awlplugin.h:34
VolKnobPlugin(QObject *parent=0)
Definition: awlplugin.h:71
bool isInitialized() const
Definition: awlplugin.h:36
PitchEditPlugin(QObject *parent=0)
Definition: awlplugin.h:197
QString name() const
Definition: awlplugin.h:185
virtual QString codeTemplate() const
Definition: awlplugin.h:38
Definition: awlplugin.h:207
QString includeFile() const
Definition: awlplugin.h:72
Definition: awlplugin.h:165
bool isContainer() const
Definition: awlplugin.h:35
PitchLabelPlugin(QObject *parent=0)
Definition: awlplugin.h:183
Q_INTERFACES(QDesignerCustomWidgetInterface) bool m_initialized
ColorLabelPlugin(QObject *parent=0)
Definition: awlplugin.h:113
QString includeFile() const
Definition: awlplugin.h:114
QString includeFile() const
Definition: awlplugin.h:128
QString name() const
Definition: awlplugin.h:101
Definition: awlplugin.h:179
Definition: awlplugin.h:109
QString includeFile() const
Definition: awlplugin.h:184
Definition: awlplugin.h:193
QString includeFile() const
Definition: awlplugin.h:142
void initialize(QDesignerFormEditorInterface *)
Definition: awlplugin.h:42
MeterSliderPlugin(QObject *parent=0)
Definition: awlplugin.h:155
QString includeFile() const
Definition: awlplugin.h:86
Definition: awlplugin.h:123
QString whatsThis() const
Definition: awlplugin.h:39
QString name() const
Definition: awlplugin.h:143
QString name() const
Definition: awlplugin.h:59
QString name() const
Definition: awlplugin.h:73
QString toolTip() const
Definition: awlplugin.h:40
DenominatorSpinBoxPlugin(QObject *parent=0)
Definition: awlplugin.h:169
Definition: awlplugin.h:53
QString name() const
Definition: awlplugin.h:87
SliderPlugin(QObject *parent=0)
Definition: awlplugin.h:127
QString name() const
Definition: awlplugin.h:115
QString group() const
Definition: awlplugin.h:41
QString name() const
Definition: awlplugin.h:157
QString includeFile() const
Definition: awlplugin.h:156
Definition: awlplugin.h:137
MidiPanKnobPlugin(QObject *parent=0)
Definition: awlplugin.h:99
Definition: awlplugin.h:151
QString name() const
Definition: awlplugin.h:129
QString includeFile() const
Definition: awlplugin.h:170
QString name() const
Definition: awlplugin.h:199
PanKnobPlugin(QObject *parent=0)
Definition: awlplugin.h:85
QString name() const
Definition: awlplugin.h:171