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
|
//=============================================================================
// 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 <QtUiPlugin/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);
};
//---------------------------------------------------------
// 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);
};
//---------------------------------------------------------
// ColorLabelPlugin
//---------------------------------------------------------
class ColorLabelPlugin : public QObject, public AwlPlugin {
Q_OBJECT
public:
ColorLabelPlugin(QObject* parent = 0) : QObject(parent) {}
QString includeFile() const { return "awl/colorlabel.h"; }
QString name() const { return "Awl::ColorLabel"; }
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);
};
//---------------------------------------------------------
// DenominatorSpinBox
//---------------------------------------------------------
class DenominatorSpinBoxPlugin : public QObject, public AwlPlugin {
Q_OBJECT
public:
DenominatorSpinBoxPlugin(QObject* parent = 0) : QObject(parent) {}
QString includeFile() const { return "awl/denomspinbox.h"; }
QString name() const { return "Awl::DenominatorSpinBox"; }
QWidget* createWidget(QWidget* parent);
};
//---------------------------------------------------------
// PitchLabelPlugin
//---------------------------------------------------------
class PitchLabelPlugin : public QObject, public AwlPlugin {
Q_OBJECT
public:
PitchLabelPlugin(QObject* parent = 0) : QObject(parent) {}
QString includeFile() const { return "awl/pitchlabel.h"; }
QString name() const { return "Awl::PitchLabel"; }
QWidget* createWidget(QWidget* parent);
};
//---------------------------------------------------------
// PitchEditPlugin
//---------------------------------------------------------
class PitchEditPlugin : public QObject, public AwlPlugin {
Q_OBJECT
public:
PitchEditPlugin(QObject* parent = 0) : QObject(parent) {}
QString includeFile() const { return "awl/pitchedit.h"; }
QString name() const { return "Awl::PitchEdit"; }
QWidget* createWidget(QWidget* parent);
};
//---------------------------------------------------------
// AwlPlugins
//---------------------------------------------------------
class AwlPlugins : public QObject, public QDesignerCustomWidgetCollectionInterface {
Q_OBJECT
Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QDesignerCustomWidgetCollectionInterface")
Q_INTERFACES(QDesignerCustomWidgetCollectionInterface)
public:
QList<QDesignerCustomWidgetInterface*> customWidgets() const;
};
#endif
|