drumstick 2.10.0
C++ MIDI libraries using Qt objects, idioms, and style.
vpiano-plugin.h
Go to the documentation of this file.
1/*
2 Virtual Piano Widget for Qt
3 Copyright (C) 2008-2024, Pedro Lopez-Cabanillas <plcl@users.sf.net>
4
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 3 of the License, or
8 (at your option) any later version.
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 along
16 with this program; If not, see <http://www.gnu.org/licenses/>.
17*/
18
19#ifndef VPIANOPLUGIN_H
20#define VPIANOPLUGIN_H
21
22#include <QDesignerCustomWidgetInterface>
23
35class PianoKeybdPlugin : public QObject,
37{
38 Q_OBJECT
39 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QDesignerCustomWidgetInterface")
41
42public:
43 explicit PianoKeybdPlugin(QObject *parent = nullptr);
44
45 bool isContainer() const override;
46 bool isInitialized() const override;
47 QIcon icon() const override;
48 QString domXml() const override;
49 QString group() const override;
50 QString includeFile() const override;
51 QString name() const override;
52 QString toolTip() const override;
53 QString whatsThis() const override;
54 QWidget *createWidget(QWidget *parent) override;
55 void initialize(QDesignerFormEditorInterface *core) override;
56
57private:
58 bool initialized = false;
59};
60
61#endif // VPIANOPLUGIN_H
The QDesignerCustomWidgetInterface class enables Qt Designer to access and construct custom widgets.
The QObject class is the base class of all Qt objects.