-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathqgaugewidgetplugin.cpp
97 lines (80 loc) · 1.72 KB
/
qgaugewidgetplugin.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
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
#include "qgaugewidgetplugin.h"
#include "src/QGaugeWidget/qgaugewidget.h"
#include <QtPlugin>
#include <QString>
#include <QStringLiteral>
using namespace Qt::Literals::StringLiterals;
QGaugeWidgetPlugin::QGaugeWidgetPlugin(QObject *parent)
{
Q_UNUSED(parent)
}
bool QGaugeWidgetPlugin::isContainer() const
{
return false;
}
bool QGaugeWidgetPlugin::isInitialized() const
{
return m_initialized;
}
QIcon QGaugeWidgetPlugin::icon() const
{
return {};
}
QString QGaugeWidgetPlugin::domXml() const
{
return uR"(
<ui language="c++">
<widget class="QGaugeWidget" name="gaugeWidget">
)"
R"(
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>100</width>
<height>100</height>
</rect>
</property>
")
R"(
<property name="toolTip">
<string>Gauge Cluster Widget</string>
</property>
<property name="whatsThis">
<string>The gauge cluster widget provides a stylish way to display a percentage, temperature or raw value.</string>
</property>
</widget>
</ui>
)"_s;
}
QString QGaugeWidgetPlugin::name() const
{
return u"QGaugeWidget"_s;
}
QString QGaugeWidgetPlugin::toolTip() const
{
return {};
}
QString QGaugeWidgetPlugin::whatsThis() const
{
return {};
}
QString QGaugeWidgetPlugin::group() const
{
return u"DigialArtifex Widgets [Display]"_s;
}
QString QGaugeWidgetPlugin::includeFile() const
{
return u"DigitalArtifexWidgets/qgaugewidget.h"_s;
}
QWidget *QGaugeWidgetPlugin::createWidget(QWidget *parent)
{
return new QGaugeWidget(parent);
}
void QGaugeWidgetPlugin::initialize(QDesignerFormEditorInterface *core)
{
Q_UNUSED(core)
if (m_initialized)
return;
m_initialized = true;
}