@@ -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 |
|
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> |
@@ -1,49 +1,47 | |||||
1 | TARGET = qtcommercialchartqml |
|
1 | TARGET = qtcommercialchartqml | |
2 | QT += declarative |
|
2 | QT += declarative | |
3 |
|
3 | |||
4 | !include( ../plugins.pri ) { |
|
4 | !include( ../plugins.pri ) { | |
5 | error( "Couldn't find the plugins.pri file!" ) |
|
5 | error( "Couldn't find the plugins.pri file!" ) | |
6 | } |
|
6 | } | |
7 |
|
7 | |||
8 | DESTDIR = $$CHART_BUILD_PLUGIN_DIR |
|
|||
9 |
|
||||
10 | contains(QT_MAJOR_VERSION, 5) { |
|
8 | contains(QT_MAJOR_VERSION, 5) { | |
11 | # TODO: QtQuick2 not supported by the implementation currently |
|
9 | # TODO: QtQuick2 not supported by the implementation currently | |
12 | DEFINES += QTQUICK2 |
|
10 | DEFINES += QTQUICK2 | |
13 | } |
|
11 | } | |
14 |
|
12 | |||
15 | SOURCES += \ |
|
13 | SOURCES += \ | |
16 | plugin.cpp \ |
|
14 | plugin.cpp \ | |
17 | declarativechart.cpp \ |
|
15 | declarativechart.cpp \ | |
18 | declarativexypoint.cpp \ |
|
16 | declarativexypoint.cpp \ | |
19 | declarativexyseries.cpp \ |
|
17 | declarativexyseries.cpp \ | |
20 | declarativelineseries.cpp \ |
|
18 | declarativelineseries.cpp \ | |
21 | declarativesplineseries.cpp \ |
|
19 | declarativesplineseries.cpp \ | |
22 | declarativeareaseries.cpp \ |
|
20 | declarativeareaseries.cpp \ | |
23 | declarativescatterseries.cpp \ |
|
21 | declarativescatterseries.cpp \ | |
24 | declarativepieseries.cpp \ |
|
22 | declarativepieseries.cpp \ | |
25 | declarativebarseries.cpp \ |
|
23 | declarativebarseries.cpp \ | |
26 | declarativemodel.cpp |
|
24 | declarativemodel.cpp | |
27 |
|
25 | |||
28 | HEADERS += \ |
|
26 | HEADERS += \ | |
29 | declarativechart.h \ |
|
27 | declarativechart.h \ | |
30 | declarativexypoint.h \ |
|
28 | declarativexypoint.h \ | |
31 | declarativexyseries.h \ |
|
29 | declarativexyseries.h \ | |
32 | declarativelineseries.h \ |
|
30 | declarativelineseries.h \ | |
33 | declarativesplineseries.h \ |
|
31 | declarativesplineseries.h \ | |
34 | declarativeareaseries.h \ |
|
32 | declarativeareaseries.h \ | |
35 | declarativescatterseries.h \ |
|
33 | declarativescatterseries.h \ | |
36 | declarativepieseries.h \ |
|
34 | declarativepieseries.h \ | |
37 | declarativebarseries.h \ |
|
35 | declarativebarseries.h \ | |
38 | declarativemodel.h |
|
36 | declarativemodel.h | |
39 |
|
37 | |||
40 | TARGETPATH = QtCommercial/Chart |
|
38 | TARGETPATH = QtCommercial/Chart | |
41 | target.path = $$[QT_INSTALL_IMPORTS]/$$TARGETPATH |
|
39 | target.path = $$[QT_INSTALL_IMPORTS]/$$TARGETPATH | |
42 | qmldir.files += $$PWD/qmldir |
|
40 | qmldir.files += $$PWD/qmldir | |
43 | qmldir.path += $$[QT_INSTALL_IMPORTS]/$$TARGETPATH |
|
41 | qmldir.path += $$[QT_INSTALL_IMPORTS]/$$TARGETPATH | |
44 | INSTALLS += target qmldir |
|
42 | INSTALLS += target qmldir | |
45 |
|
43 | |||
46 | FILE = $$PWD/qmldir |
|
44 | FILE = $$PWD/qmldir | |
47 | win32:{FILE = $$replace(FILE, "/","\\")} |
|
45 | win32:{FILE = $$replace(FILE, "/","\\")} | |
48 | QMAKE_POST_LINK += $$QMAKE_COPY $$FILE $$CHART_BUILD_PLUGIN_DIR |
|
46 | QMAKE_POST_LINK += $$QMAKE_COPY $$FILE $$CHART_BUILD_PLUGIN_DIR | |
49 | !system_build:mac: QMAKE_POST_LINK += " & $$MAC_POST_LINK_PREFIX $$MAC_PLUGINS_BIN_DIR" |
|
47 | !system_build:mac: QMAKE_POST_LINK += " & $$MAC_POST_LINK_PREFIX $$MAC_PLUGINS_BIN_DIR" |
@@ -1,13 +1,13 | |||||
1 | !include( ../config.pri ) { |
|
1 | !include( ../config.pri ) { | |
2 | error( "Couldn't find the config.pri file!" ) |
|
2 | error( "Couldn't find the config.pri file!" ) | |
3 | } |
|
3 | } | |
4 |
|
4 | |||
5 | TEMPLATE = lib |
|
5 | TEMPLATE = lib | |
6 |
|
6 | |||
7 | CONFIG+= plugin |
|
7 | CONFIG+= plugin | |
8 |
|
8 | |||
9 |
DESTDIR = $$CHART_BUILD_ |
|
9 | DESTDIR = $$CHART_BUILD_PLUGIN_DIR | |
10 | OBJECTS_DIR = $$CHART_BUILD_DIR/plugins/$$TARGET |
|
10 | OBJECTS_DIR = $$CHART_BUILD_DIR/plugins/$$TARGET | |
11 | MOC_DIR = $$CHART_BUILD_DIR/plugins/$$TARGET |
|
11 | MOC_DIR = $$CHART_BUILD_DIR/plugins/$$TARGET | |
12 | UI_DIR = $$CHART_BUILD_DIR/plugins/$$TARGET |
|
12 | UI_DIR = $$CHART_BUILD_DIR/plugins/$$TARGET | |
13 | RCC_DIR = $$CHART_BUILD_DIR/plugins/$$TARGET |
|
13 | RCC_DIR = $$CHART_BUILD_DIR/plugins/$$TARGET |
@@ -1,7 +1,8 | |||||
1 | !include( ../config.pri ) { |
|
1 | !include( ../config.pri ) { | |
2 | error( "Couldn't find the config.pri file!" ) |
|
2 | error( "Couldn't find the config.pri file!" ) | |
3 | } |
|
3 | } | |
4 |
|
4 | |||
5 | TEMPLATE = subdirs |
|
5 | TEMPLATE = subdirs | |
6 | SUBDIRS += \ |
|
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