@@ -1,58 +1,58 | |||||
1 | #include "qchartsplugin.h" |
|
1 | #include "qchartsplugin.h" | |
2 | #include "qchartview.h" |
|
2 | #include "qchartview.h" | |
3 | #include <QtPlugin> |
|
3 | #include <QtPlugin> | |
4 |
|
4 | |||
5 | QTCOMMERCIALCHART_USE_NAMESPACE |
|
5 | QTCOMMERCIALCHART_USE_NAMESPACE | |
6 |
|
6 | |||
7 | QChartsPlugin::QChartsPlugin(QObject *parent) : |
|
7 | QChartsPlugin::QChartsPlugin(QObject *parent) : | |
8 | QObject(parent) |
|
8 | QObject(parent) | |
9 | { |
|
9 | { | |
10 | // TODO Auto-generated constructor stub |
|
10 | // TODO Auto-generated constructor stub | |
11 | } |
|
11 | } | |
12 |
|
12 | |||
13 | QChartsPlugin::~QChartsPlugin() |
|
13 | QChartsPlugin::~QChartsPlugin() | |
14 | { |
|
14 | { | |
15 | // TODO Auto-generated destructor stub |
|
15 | // TODO Auto-generated destructor stub | |
16 | } |
|
16 | } | |
17 |
|
17 | |||
18 | QString QChartsPlugin::name() const |
|
18 | QString QChartsPlugin::name() const | |
19 | { |
|
19 | { | |
20 | return "QChartView"; |
|
20 | return "QChartView"; | |
21 | } |
|
21 | } | |
22 |
|
22 | |||
23 | QString QChartsPlugin::includeFile() const |
|
23 | QString QChartsPlugin::includeFile() const | |
24 | { |
|
24 | { | |
25 | return "<qchartview.h>"; |
|
25 | return "<qchartview.h>"; | |
26 | } |
|
26 | } | |
27 |
|
27 | |||
28 | QString QChartsPlugin::group() const |
|
28 | QString QChartsPlugin::group() const | |
29 | { |
|
29 | { | |
30 | return tr("QCharts Widgets"); |
|
30 | return tr("QCharts Widgets"); | |
31 | } |
|
31 | } | |
32 |
|
32 | |||
33 | QIcon QChartsPlugin::icon() const |
|
33 | QIcon QChartsPlugin::icon() const | |
34 | { |
|
34 | { | |
35 | return QIcon(":/images/qcharts.png"); |
|
35 | return QIcon(":/images/qcharts.png"); | |
36 | } |
|
36 | } | |
37 |
|
37 | |||
38 | QString QChartsPlugin::toolTip() const |
|
38 | QString QChartsPlugin::toolTip() const | |
39 | { |
|
39 | { | |
40 | return tr("An qcharts widget"); |
|
40 | return tr("An qcharts view widget"); | |
41 | } |
|
41 | } | |
42 |
|
42 | |||
43 | QString QChartsPlugin::whatsThis() const |
|
43 | QString QChartsPlugin::whatsThis() const | |
44 | { |
|
44 | { | |
45 |
return tr("This widget is presents QChart |
|
45 | return tr("This widget is presents QChartView widget"); | |
46 | } |
|
46 | } | |
47 |
|
47 | |||
48 | bool QChartsPlugin::isContainer() const |
|
48 | bool QChartsPlugin::isContainer() const | |
49 | { |
|
49 | { | |
50 | return false; |
|
50 | return false; | |
51 | } |
|
51 | } | |
52 |
|
52 | |||
53 | QWidget* QChartsPlugin::createWidget(QWidget *parent) |
|
53 | QWidget* QChartsPlugin::createWidget(QWidget *parent) | |
54 | { |
|
54 | { | |
55 | return new QChartView(new QChart(), parent); |
|
55 | return new QChartView(new QChart(), parent); | |
56 | } |
|
56 | } | |
57 |
|
57 | |||
58 | Q_EXPORT_PLUGIN2(qtcommercialchart, QChartsPlugin) |
|
58 | Q_EXPORT_PLUGIN2(qtcommercialchart, QChartsPlugin) |
General Comments 0
You need to be logged in to leave comments.
Login now