-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathqvirtualpadplugin.cpp
59 lines (46 loc) · 1.83 KB
/
qvirtualpadplugin.cpp
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
#include "qvirtualpadplugin.h"
#include "qvirtualpad/qvirtualpad.h"
QVirtualPadPlugin::QVirtualPadPlugin(QObject *parent) : QObject(parent) {}
void QVirtualPadPlugin::initialize(QDesignerFormEditorInterface * /* core */) {
if (initialized)
return;
initialized = true;
}
bool QVirtualPadPlugin::isInitialized() const { return initialized; }
QWidget *QVirtualPadPlugin::createWidget(QWidget *parent) {
return new QVirtualPad(parent);
}
QString QVirtualPadPlugin::name() const { return QStringLiteral("QVirtualPad"); }
QString QVirtualPadPlugin::group() const {
return QStringLiteral("Custom widgets");
}
QIcon QVirtualPadPlugin::icon() const { return QIcon(QLatin1String(":/images/virtualpad.ico")); }
QString QVirtualPadPlugin::toolTip() const { return QString(); }
QString QVirtualPadPlugin::whatsThis() const { return QString(); }
bool QVirtualPadPlugin::isContainer() const { return false; }
QString QVirtualPadPlugin::domXml() const {
return "<ui language=\"c++\" displayname=\"Virtual Pad\">\n"
" <widget class=\"QVirtualPad\" name=\"virtualPad\">\n"
" <property name=\"geometry\">\n"
" <rect>\n"
" <x>0</x>\n"
" <y>0</y>\n"
" <width>300</width>\n"
" <height>300</height>\n"
" </rect>\n"
" </property>\n"
" <property name=\"toolTip\" >\n"
" <string>Virtual pad/joystick</string>\n"
" </property>\n"
" <property name=\"whatsThis\" >\n"
" <string>A virtual pad to use inside applications.</string>\n"
" </property>\n"
" </widget>\n"
"</ui>\n";
}
QString QVirtualPadPlugin::includeFile() const {
return QStringLiteral("qvirtualpad/qvirtualpad.h");
}
#if QT_VERSION < 0x050000
Q_EXPORT_PLUGIN2(qvirtualpadplugin, QVirtualPadPlugin)
#endif // QT_VERSION < 0x050000