##// END OF EJS Templates
Adds designer plugin stub
Michal Klocek -
r1201:f0af86b6db21
parent child
Show More
@@ -0,0 +1,13
1 TARGET=qtcommercialchartdesigner
2
3 !include( ../plugins.pri ) {
4 error( "Couldn't find the plugins.pri file!" )
5 }
6
7 CONFIG += designer
8 HEADERS = qchartsplugin.h
9 SOURCES = qchartsplugin.cpp
10 RESOURCES = qchartsplugin.qrc
11
12 target.path = $$[QT_INSTALL_PLUGINS]/designer
13 INSTALLS += target No newline at end of file
1 NO CONTENT: new file 100644, binary diff hidden
@@ -0,0 +1,58
1 #include "qchartsplugin.h"
2 #include "qchartview.h"
3 #include <QtPlugin>
4
5 QTCOMMERCIALCHART_USE_NAMESPACE
6
7 QChartsPlugin::QChartsPlugin(QObject *parent) :
8 QObject(parent)
9 {
10 // TODO Auto-generated constructor stub
11 }
12
13 QChartsPlugin::~QChartsPlugin()
14 {
15 // TODO Auto-generated destructor stub
16 }
17
18 QString QChartsPlugin::name() const
19 {
20 return "QCharts";
21 }
22
23 QString QChartsPlugin::includeFile() const
24 {
25 return "<qchartview.h>";
26 }
27
28 QString QChartsPlugin::group() const
29 {
30 return tr("QCharts Widgets");
31 }
32
33 QIcon QChartsPlugin::icon() const
34 {
35 return QIcon(":/images/qcharts.png");
36 }
37
38 QString QChartsPlugin::toolTip() const
39 {
40 return tr("An qcharts widget");
41 }
42
43 QString QChartsPlugin::whatsThis() const
44 {
45 return tr("This widget is presents QCharts view widget");
46 }
47
48 bool QChartsPlugin::isContainer() const
49 {
50 return false;
51 }
52
53 QWidget* QChartsPlugin::createWidget(QWidget *parent)
54 {
55 return new QChartView(new QChart(), parent);
56 }
57
58 Q_EXPORT_PLUGIN2(qtcommercialchart, QChartsPlugin)
@@ -0,0 +1,24
1 #ifndef QCHARTSPLUGIN_H_
2 #define QCHARTSPLUGIN_H_
3
4 #include <QDesignerCustomWidgetInterface>
5
6 class QChartsPlugin: public QObject,public QDesignerCustomWidgetInterface
7 {
8 Q_OBJECT
9 Q_INTERFACES(QDesignerCustomWidgetInterface)
10 public:
11 QChartsPlugin(QObject *parent = 0);
12 ~QChartsPlugin();
13
14 QString name() const;
15 QString includeFile() const;
16 QString group() const;
17 QIcon icon() const;
18 QString toolTip() const;
19 QString whatsThis() const;
20 bool isContainer() const;
21 QWidget *createWidget(QWidget *parent);
22 };
23
24 #endif /* QCHARTSPLUGIN_H_ */
@@ -0,0 +1,6
1 <!DOCTYPE RCC>
2 <RCC version="1.0">
3 <qresource prefix="/images">
4 <file>qcharts.png</file>
5 </qresource>
6 </RCC>
@@ -5,8 +5,6 QT += declarative
5 5 error( "Couldn't find the plugins.pri file!" )
6 6 }
7 7
8 DESTDIR = $$CHART_BUILD_PLUGIN_DIR
9
10 8 contains(QT_MAJOR_VERSION, 5) {
11 9 # TODO: QtQuick2 not supported by the implementation currently
12 10 DEFINES += QTQUICK2
@@ -6,7 +6,7 TEMPLATE = lib
6 6
7 7 CONFIG+= plugin
8 8
9 DESTDIR = $$CHART_BUILD_BIN_DIR
9 DESTDIR = $$CHART_BUILD_PLUGIN_DIR
10 10 OBJECTS_DIR = $$CHART_BUILD_DIR/plugins/$$TARGET
11 11 MOC_DIR = $$CHART_BUILD_DIR/plugins/$$TARGET
12 12 UI_DIR = $$CHART_BUILD_DIR/plugins/$$TARGET
@@ -4,4 +4,5
4 4
5 5 TEMPLATE = subdirs
6 6 SUBDIRS += \
7 declarative No newline at end of file
7 declarative \
8 designer No newline at end of file
General Comments 0
You need to be logged in to leave comments. Login now