@@ -1,126 +1,127 | |||||
1 | ##################### LIB ################################################# |
|
1 | ##################### LIB ################################################# | |
2 |
|
2 | |||
3 | LIBRARY_NAME = QtCommercialChart |
|
3 | LIBRARY_NAME = QtCommercialChart | |
|
4 | ios:CONFIG(iphonesimulator, iphonesimulator|iphoneos):LIBRARY_NAME = $$join(LIBRARY_NAME,,,_iphonesimulator) | |||
4 | CONFIG(debug, debug|release) { |
|
5 | CONFIG(debug, debug|release) { | |
5 | mac: LIBRARY_NAME = $$join(LIBRARY_NAME,,,_debug) |
|
6 | mac: LIBRARY_NAME = $$join(LIBRARY_NAME,,,_debug) | |
6 | win32: LIBRARY_NAME = $$join(LIBRARY_NAME,,,d) |
|
7 | win32: LIBRARY_NAME = $$join(LIBRARY_NAME,,,d) | |
7 | } |
|
8 | } | |
8 |
|
9 | |||
9 | LIBS += -l$$LIBRARY_NAME |
|
10 | LIBS += -l$$LIBRARY_NAME | |
10 |
|
11 | |||
11 | # This will undefine Q_DECL_EXPORT/Q_DECL_IMPORT at qchartglobal.h |
|
12 | # This will undefine Q_DECL_EXPORT/Q_DECL_IMPORT at qchartglobal.h | |
12 | # They should not be used for staticlib builds. |
|
13 | # They should not be used for staticlib builds. | |
13 | staticlib:DEFINES+=QTCOMMERCIALCHART_STATICLIB |
|
14 | static|staticlib:DEFINES+=QTCOMMERCIALCHART_STATICLIB | |
14 |
|
15 | |||
15 | #################### COVERAGE ################################################################# |
|
16 | #################### COVERAGE ################################################################# | |
16 | coverage: CONFIG += debug |
|
17 | coverage: CONFIG += debug | |
17 |
|
18 | |||
18 | ##################### SHADOW CONFIG ################################################# |
|
19 | ##################### SHADOW CONFIG ################################################# | |
19 |
|
20 | |||
20 | !contains($${PWD}, $${OUT_PWD}){ |
|
21 | !contains($${PWD}, $${OUT_PWD}){ | |
21 | search = "$$PWD:::" |
|
22 | search = "$$PWD:::" | |
22 | temp = $$split(search,"/") |
|
23 | temp = $$split(search,"/") | |
23 | temp = $$last(temp) |
|
24 | temp = $$last(temp) | |
24 | path = $$replace(search,$$temp,'') |
|
25 | path = $$replace(search,$$temp,'') | |
25 | temp = $$split(OUT_PWD,$$path) |
|
26 | temp = $$split(OUT_PWD,$$path) | |
26 | temp = $$split(temp,'/') |
|
27 | temp = $$split(temp,'/') | |
27 | temp = $$first(temp) |
|
28 | temp = $$first(temp) | |
28 | path = "$${path}$${temp}" |
|
29 | path = "$${path}$${temp}" | |
29 | SHADOW=$$path |
|
30 | SHADOW=$$path | |
30 | }else{ |
|
31 | }else{ | |
31 | SHADOW=$$PWD |
|
32 | SHADOW=$$PWD | |
32 | CONFIG-=development_build |
|
33 | CONFIG-=development_build | |
33 | } |
|
34 | } | |
34 |
|
35 | |||
35 | ##################### BUILD PATHS ################################################## |
|
36 | ##################### BUILD PATHS ################################################## | |
36 |
|
37 | |||
37 | CHART_BUILD_PUBLIC_HEADER_DIR = $$SHADOW/include |
|
38 | CHART_BUILD_PUBLIC_HEADER_DIR = $$SHADOW/include | |
38 | CHART_BUILD_PRIVATE_HEADER_DIR = $$CHART_BUILD_PUBLIC_HEADER_DIR/private |
|
39 | CHART_BUILD_PRIVATE_HEADER_DIR = $$CHART_BUILD_PUBLIC_HEADER_DIR/private | |
39 | CHART_BUILD_LIB_DIR = $$SHADOW/lib |
|
40 | CHART_BUILD_LIB_DIR = $$SHADOW/lib | |
40 | CHART_BUILD_DIR = $$SHADOW/build |
|
41 | CHART_BUILD_DIR = $$SHADOW/build | |
41 | CHART_BUILD_BIN_DIR = $$SHADOW/bin |
|
42 | CHART_BUILD_BIN_DIR = $$SHADOW/bin | |
42 | CHART_BUILD_QML_PLUGIN_DIR = $$CHART_BUILD_BIN_DIR |
|
43 | CHART_BUILD_QML_PLUGIN_DIR = $$CHART_BUILD_BIN_DIR | |
43 | CHART_BUILD_QML2_PLUGIN_DIR = $$CHART_BUILD_QML_PLUGIN_DIR |
|
44 | CHART_BUILD_QML2_PLUGIN_DIR = $$CHART_BUILD_QML_PLUGIN_DIR | |
44 | CHART_BUILD_DESIGNER_PLUGIN_DIR = $$CHART_BUILD_LIB_DIR |
|
45 | CHART_BUILD_DESIGNER_PLUGIN_DIR = $$CHART_BUILD_LIB_DIR | |
45 | CHART_BUILD_DOC_DIR = $$SHADOW/doc |
|
46 | CHART_BUILD_DOC_DIR = $$SHADOW/doc | |
46 |
|
47 | |||
47 | CONFIG(release,debug|release){ |
|
48 | CONFIG(release,debug|release){ | |
48 | CHART_BUILD_LIB_DIR = $$CHART_BUILD_LIB_DIR/release |
|
49 | CHART_BUILD_LIB_DIR = $$CHART_BUILD_LIB_DIR/release | |
49 | CHART_BUILD_BIN_DIR = $$CHART_BUILD_BIN_DIR/release |
|
50 | CHART_BUILD_BIN_DIR = $$CHART_BUILD_BIN_DIR/release | |
50 | CHART_BUILD_QML_PLUGIN_DIR = $$CHART_BUILD_QML_PLUGIN_DIR/release/imports/QtCommercial/Chart |
|
51 | CHART_BUILD_QML_PLUGIN_DIR = $$CHART_BUILD_QML_PLUGIN_DIR/release/imports/QtCommercial/Chart | |
51 | CHART_BUILD_QML2_PLUGIN_DIR = $$CHART_BUILD_QML2_PLUGIN_DIR/release/qml/QtCommercial/Chart |
|
52 | CHART_BUILD_QML2_PLUGIN_DIR = $$CHART_BUILD_QML2_PLUGIN_DIR/release/qml/QtCommercial/Chart | |
52 | CHART_BUILD_DESIGNER_PLUGIN_DIR = $$CHART_BUILD_LIB_DIR |
|
53 | CHART_BUILD_DESIGNER_PLUGIN_DIR = $$CHART_BUILD_LIB_DIR | |
53 | } |
|
54 | } | |
54 |
|
55 | |||
55 |
|
56 | |||
56 | CONFIG(debug,debug|release){ |
|
57 | CONFIG(debug,debug|release){ | |
57 | CHART_BUILD_LIB_DIR = $$CHART_BUILD_LIB_DIR/debug |
|
58 | CHART_BUILD_LIB_DIR = $$CHART_BUILD_LIB_DIR/debug | |
58 | CHART_BUILD_BIN_DIR = $$CHART_BUILD_BIN_DIR/debug |
|
59 | CHART_BUILD_BIN_DIR = $$CHART_BUILD_BIN_DIR/debug | |
59 | CHART_BUILD_QML_PLUGIN_DIR = $$CHART_BUILD_QML_PLUGIN_DIR/debug/imports/QtCommercial/Chart |
|
60 | CHART_BUILD_QML_PLUGIN_DIR = $$CHART_BUILD_QML_PLUGIN_DIR/debug/imports/QtCommercial/Chart | |
60 | CHART_BUILD_QML2_PLUGIN_DIR = $$CHART_BUILD_QML2_PLUGIN_DIR/debug/qml/QtCommercial/Chart |
|
61 | CHART_BUILD_QML2_PLUGIN_DIR = $$CHART_BUILD_QML2_PLUGIN_DIR/debug/qml/QtCommercial/Chart | |
61 | CHART_BUILD_DESIGNER_PLUGIN_DIR = $$CHART_BUILD_LIB_DIR |
|
62 | CHART_BUILD_DESIGNER_PLUGIN_DIR = $$CHART_BUILD_LIB_DIR | |
62 | } |
|
63 | } | |
63 | # Use own folders for debug and release builds |
|
64 | # Use own folders for debug and release builds | |
64 |
|
65 | |||
65 | CONFIG(debug, debug|release):CHART_BUILD_DIR = $$join(CHART_BUILD_DIR,,,/debug) |
|
66 | CONFIG(debug, debug|release):CHART_BUILD_DIR = $$join(CHART_BUILD_DIR,,,/debug) | |
66 | CONFIG(release, debug|release): CHART_BUILD_DIR = $$join(CHART_BUILD_DIR,,,/release) |
|
67 | CONFIG(release, debug|release): CHART_BUILD_DIR = $$join(CHART_BUILD_DIR,,,/release) | |
67 |
|
68 | |||
68 |
|
69 | |||
69 | contains(QMAKE_HOST.os, Windows) { |
|
70 | contains(QMAKE_HOST.os, Windows) { | |
70 | CHART_BUILD_PUBLIC_HEADER_DIR = $$replace(CHART_BUILD_PUBLIC_HEADER_DIR, "/","\\") |
|
71 | CHART_BUILD_PUBLIC_HEADER_DIR = $$replace(CHART_BUILD_PUBLIC_HEADER_DIR, "/","\\") | |
71 | CHART_BUILD_PRIVATE_HEADER_DIR = $$replace(CHART_BUILD_PRIVATE_HEADER_DIR, "/","\\") |
|
72 | CHART_BUILD_PRIVATE_HEADER_DIR = $$replace(CHART_BUILD_PRIVATE_HEADER_DIR, "/","\\") | |
72 | CHART_BUILD_BUILD_DIR = $$replace(CHART_BUILD_BUILD_DIR, "/","\\") |
|
73 | CHART_BUILD_BUILD_DIR = $$replace(CHART_BUILD_BUILD_DIR, "/","\\") | |
73 | CHART_BUILD_BIN_DIR = $$replace(CHART_BUILD_BIN_DIR, "/","\\") |
|
74 | CHART_BUILD_BIN_DIR = $$replace(CHART_BUILD_BIN_DIR, "/","\\") | |
74 | CHART_BUILD_QML_PLUGIN_DIR = $$replace(CHART_BUILD_QML_PLUGIN_DIR, "/","\\") |
|
75 | CHART_BUILD_QML_PLUGIN_DIR = $$replace(CHART_BUILD_QML_PLUGIN_DIR, "/","\\") | |
75 | CHART_BUILD_QML2_PLUGIN_DIR = $$replace(CHART_BUILD_QML2_PLUGIN_DIR, "/","\\") |
|
76 | CHART_BUILD_QML2_PLUGIN_DIR = $$replace(CHART_BUILD_QML2_PLUGIN_DIR, "/","\\") | |
76 | CHART_BUILD_DESIGNER_PLUGIN_DIR = $$replace(CHART_BUILD_DESIGNER_PLUGIN_DIR, "/","\\") |
|
77 | CHART_BUILD_DESIGNER_PLUGIN_DIR = $$replace(CHART_BUILD_DESIGNER_PLUGIN_DIR, "/","\\") | |
77 | CHART_BUILD_DOC_DIR = $$replace(CHART_BUILD_DOC_DIR, "/","\\") |
|
78 | CHART_BUILD_DOC_DIR = $$replace(CHART_BUILD_DOC_DIR, "/","\\") | |
78 | CHART_BUILD_LIB_DIR = $$replace(CHART_BUILD_LIB_DIR, "/","\\") |
|
79 | CHART_BUILD_LIB_DIR = $$replace(CHART_BUILD_LIB_DIR, "/","\\") | |
79 | } |
|
80 | } | |
80 |
|
81 | |||
81 | macx: { |
|
82 | macx:!ios { | |
82 | # Some Qt versions use an incompatible configuration on OSX which makes the build fail. |
|
83 | # Some Qt versions use an incompatible configuration on OSX which makes the build fail. | |
83 | # As a work-around, set the minimum OSX version to 10.5. |
|
84 | # As a work-around, set the minimum OSX version to 10.5. | |
84 | QMAKE_CXXFLAGS *= -mmacosx-version-min=10.5 |
|
85 | QMAKE_CXXFLAGS *= -mmacosx-version-min=10.5 | |
85 | QMAKE_LFLAGS *= -mmacosx-version-min=10.5 |
|
86 | QMAKE_LFLAGS *= -mmacosx-version-min=10.5 | |
86 | } |
|
87 | } | |
87 |
|
88 | |||
88 | linux-arm*: { |
|
89 | linux-arm*: { | |
89 | DEFINES+=QT_ON_ARM |
|
90 | DEFINES+=QT_ON_ARM | |
90 | } |
|
91 | } | |
91 |
|
92 | |||
92 | ##################### INCLUDES ############################################################ |
|
93 | ##################### INCLUDES ############################################################ | |
93 |
|
94 | |||
94 |
|
95 | |||
95 | INCLUDEPATH += $$CHART_BUILD_PUBLIC_HEADER_DIR $$[QT_INSTALL_HEADERS]/QtCommercialChart |
|
96 | INCLUDEPATH += $$CHART_BUILD_PUBLIC_HEADER_DIR $$[QT_INSTALL_HEADERS]/QtCommercialChart | |
96 |
|
97 | |||
97 | !exists($$CHART_BUILD_LIB_DIR) { |
|
98 | !exists($$CHART_BUILD_LIB_DIR) { | |
98 | system($$QMAKE_MKDIR $$CHART_BUILD_LIB_DIR) |
|
99 | system($$QMAKE_MKDIR $$CHART_BUILD_LIB_DIR) | |
99 | } |
|
100 | } | |
100 | !win32: { |
|
101 | !win32: { | |
101 | LIBS += -L$$CHART_BUILD_LIB_DIR -Wl,-rpath,$$CHART_BUILD_LIB_DIR |
|
102 | LIBS += -L$$CHART_BUILD_LIB_DIR -Wl,-rpath,$$CHART_BUILD_LIB_DIR | |
102 | } else { |
|
103 | } else { | |
103 | win32-msvc*: { |
|
104 | win32-msvc*: { | |
104 | # hack fix for error: |
|
105 | # hack fix for error: | |
105 | # "LINK : fatal error LNK1146: no argument specified with option '/LIBPATH:'" |
|
106 | # "LINK : fatal error LNK1146: no argument specified with option '/LIBPATH:'" | |
106 | QMAKE_LIBDIR += $$CHART_BUILD_LIB_DIR |
|
107 | QMAKE_LIBDIR += $$CHART_BUILD_LIB_DIR | |
107 | } else { |
|
108 | } else { | |
108 | LIBS += -L$$CHART_BUILD_LIB_DIR |
|
109 | LIBS += -L$$CHART_BUILD_LIB_DIR | |
109 | } |
|
110 | } | |
110 | } |
|
111 | } | |
111 | LIBS += -L$$[QT_INSTALL_LIBS] |
|
112 | LIBS += -L$$[QT_INSTALL_LIBS] | |
112 |
|
113 | |||
113 | ##################### DEVELOPMENT BUILD ################################################### |
|
114 | ##################### DEVELOPMENT BUILD ################################################### | |
114 |
|
115 | |||
115 | development_build: { |
|
116 | development_build: { | |
116 | DEFINES+=DEVELOPMENT_BUILD |
|
117 | DEFINES+=DEVELOPMENT_BUILD | |
117 | CONFIG+=debug_and_release |
|
118 | CONFIG+=debug_and_release | |
118 | CONFIG+=build_all |
|
119 | CONFIG+=build_all | |
119 | } |
|
120 | } | |
120 |
|
121 | |||
121 | ##################### UNIT TESTS ############################################################## |
|
122 | ##################### UNIT TESTS ############################################################## | |
122 |
|
123 | |||
123 | CONFIG(debug, debug|release) { |
|
124 | CONFIG(debug, debug|release) { | |
124 | DEFINES+=BUILD_PRIVATE_UNIT_TESTS |
|
125 | DEFINES+=BUILD_PRIVATE_UNIT_TESTS | |
125 | } |
|
126 | } | |
126 |
|
127 |
@@ -1,38 +1,39 | |||||
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 | DESTDIR = $$CHART_BUILD_BIN_DIR |
|
5 | DESTDIR = $$CHART_BUILD_BIN_DIR | |
|
6 | !ios { | |||
6 | OBJECTS_DIR = $$CHART_BUILD_DIR/demos/$$TARGET |
|
7 | OBJECTS_DIR = $$CHART_BUILD_DIR/demos/$$TARGET | |
7 | MOC_DIR = $$CHART_BUILD_DIR/demos/$$TARGET |
|
8 | MOC_DIR = $$CHART_BUILD_DIR/demos/$$TARGET | |
8 | UI_DIR = $$CHART_BUILD_DIR/demos/$$TARGET |
|
9 | UI_DIR = $$CHART_BUILD_DIR/demos/$$TARGET | |
9 | RCC_DIR = $$CHART_BUILD_DIR/demos/$$TARGET |
|
10 | RCC_DIR = $$CHART_BUILD_DIR/demos/$$TARGET | |
10 |
|
11 | } | ||
11 | TEMPLATE = app |
|
12 | TEMPLATE = app | |
12 | QT += core gui |
|
13 | QT += core gui | |
13 | greaterThan(QT_MAJOR_VERSION, 4): QT += widgets |
|
14 | greaterThan(QT_MAJOR_VERSION, 4): QT += widgets | |
14 |
|
15 | |||
15 | # staticlib config causes problems when building executables |
|
16 | # staticlib config causes problems when building executables | |
16 | staticlib: CONFIG-=staticlib |
|
17 | staticlib: CONFIG-=staticlib | |
17 |
|
18 | |||
18 | android { |
|
19 | android { | |
19 | # Workaround to fix android deployment, which seems to always look for target in |
|
20 | # Workaround to fix android deployment, which seems to always look for target in | |
20 | # OUT_PWD instead of DESTDIR. |
|
21 | # OUT_PWD instead of DESTDIR. | |
21 | COPY_PARAMETERS = "$$CHART_BUILD_BIN_DIR/lib$${TARGET}.so $$OUT_PWD/lib$${TARGET}.so" |
|
22 | COPY_PARAMETERS = "$$CHART_BUILD_BIN_DIR/lib$${TARGET}.so $$OUT_PWD/lib$${TARGET}.so" | |
22 | contains(QMAKE_HOST.os, Windows): COPY_PARAMETERS = $$replace(COPY_PARAMETERS, "/","\\") |
|
23 | contains(QMAKE_HOST.os, Windows): COPY_PARAMETERS = $$replace(COPY_PARAMETERS, "/","\\") | |
23 | QMAKE_POST_LINK += $$QMAKE_COPY $$COPY_PARAMETERS |
|
24 | QMAKE_POST_LINK += $$QMAKE_COPY $$COPY_PARAMETERS | |
24 |
|
25 | |||
25 | contains(TARGET, qml.*) { |
|
26 | contains(TARGET, qml.*) { | |
26 | charts_qmldir.files = $$CHART_BUILD_QML_PLUGIN_DIR/qmldir |
|
27 | charts_qmldir.files = $$CHART_BUILD_QML_PLUGIN_DIR/qmldir | |
27 | charts_qmldir.path = /assets/imports/QtCommercial/Chart |
|
28 | charts_qmldir.path = /assets/imports/QtCommercial/Chart | |
28 | charts_qmlplugin.files = $$CHART_BUILD_QML_PLUGIN_DIR/libqtcommercialchartqml.so |
|
29 | charts_qmlplugin.files = $$CHART_BUILD_QML_PLUGIN_DIR/libqtcommercialchartqml.so | |
29 | charts_qmlplugin.path = /libs/$$ANDROID_TARGET_ARCH |
|
30 | charts_qmlplugin.path = /libs/$$ANDROID_TARGET_ARCH | |
30 | INSTALLS += charts_qmldir charts_qmlplugin |
|
31 | INSTALLS += charts_qmldir charts_qmlplugin | |
31 | } else:contains(TARGET, quick2.*) { |
|
32 | } else:contains(TARGET, quick2.*) { | |
32 | charts_qmldir.files = $$CHART_BUILD_QML2_PLUGIN_DIR/qmldir |
|
33 | charts_qmldir.files = $$CHART_BUILD_QML2_PLUGIN_DIR/qmldir | |
33 | charts_qmldir.path = /assets/qml/QtCommercial/Chart |
|
34 | charts_qmldir.path = /assets/qml/QtCommercial/Chart | |
34 | charts_qmlplugin.files = $$CHART_BUILD_QML2_PLUGIN_DIR/libqtcommercialchartqml2.so |
|
35 | charts_qmlplugin.files = $$CHART_BUILD_QML2_PLUGIN_DIR/libqtcommercialchartqml2.so | |
35 | charts_qmlplugin.path = /libs/$$ANDROID_TARGET_ARCH |
|
36 | charts_qmlplugin.path = /libs/$$ANDROID_TARGET_ARCH | |
36 | INSTALLS += charts_qmldir charts_qmlplugin |
|
37 | INSTALLS += charts_qmldir charts_qmlplugin | |
37 | } |
|
38 | } | |
38 | } |
|
39 | } |
@@ -1,32 +1,33 | |||||
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 | DESTDIR = $$CHART_BUILD_BIN_DIR |
|
5 | DESTDIR = $$CHART_BUILD_BIN_DIR | |
|
6 | !ios { | |||
6 | OBJECTS_DIR = $$CHART_BUILD_DIR/examples/$$TARGET |
|
7 | OBJECTS_DIR = $$CHART_BUILD_DIR/examples/$$TARGET | |
7 | MOC_DIR = $$CHART_BUILD_DIR/examples/$$TARGET |
|
8 | MOC_DIR = $$CHART_BUILD_DIR/examples/$$TARGET | |
8 | UI_DIR = $$CHART_BUILD_DIR/examples/$$TARGET |
|
9 | UI_DIR = $$CHART_BUILD_DIR/examples/$$TARGET | |
9 | RCC_DIR = $$CHART_BUILD_DIR/examples/$$TARGET |
|
10 | RCC_DIR = $$CHART_BUILD_DIR/examples/$$TARGET | |
10 |
|
11 | } | ||
11 | TEMPLATE = app |
|
12 | TEMPLATE = app | |
12 | QT += core gui |
|
13 | QT += core gui | |
13 | greaterThan(QT_MAJOR_VERSION, 4): QT += widgets |
|
14 | greaterThan(QT_MAJOR_VERSION, 4): QT += widgets | |
14 |
|
15 | |||
15 | # staticlib config causes problems when building executables |
|
16 | # staticlib config causes problems when building executables | |
16 | staticlib: CONFIG-=staticlib |
|
17 | staticlib: CONFIG-=staticlib | |
17 |
|
18 | |||
18 | android { |
|
19 | android { | |
19 | # Workaround to fix android deployment, which seems to always look for target in |
|
20 | # Workaround to fix android deployment, which seems to always look for target in | |
20 | # OUT_PWD instead of DESTDIR. |
|
21 | # OUT_PWD instead of DESTDIR. | |
21 | COPY_PARAMETERS = "$$CHART_BUILD_BIN_DIR/lib$${TARGET}.so $$OUT_PWD/lib$${TARGET}.so" |
|
22 | COPY_PARAMETERS = "$$CHART_BUILD_BIN_DIR/lib$${TARGET}.so $$OUT_PWD/lib$${TARGET}.so" | |
22 | contains(QMAKE_HOST.os, Windows): COPY_PARAMETERS = $$replace(COPY_PARAMETERS, "/","\\") |
|
23 | contains(QMAKE_HOST.os, Windows): COPY_PARAMETERS = $$replace(COPY_PARAMETERS, "/","\\") | |
23 | QMAKE_POST_LINK += $$QMAKE_COPY $$COPY_PARAMETERS |
|
24 | QMAKE_POST_LINK += $$QMAKE_COPY $$COPY_PARAMETERS | |
24 |
|
25 | |||
25 | contains(TARGET, qml.*) { |
|
26 | contains(TARGET, qml.*) { | |
26 | charts_qmldir.files = $$CHART_BUILD_QML_PLUGIN_DIR/qmldir |
|
27 | charts_qmldir.files = $$CHART_BUILD_QML_PLUGIN_DIR/qmldir | |
27 | charts_qmldir.path = /assets/imports/QtCommercial/Chart |
|
28 | charts_qmldir.path = /assets/imports/QtCommercial/Chart | |
28 | charts_qmlplugin.files = $$CHART_BUILD_QML_PLUGIN_DIR/libqtcommercialchartqml.so |
|
29 | charts_qmlplugin.files = $$CHART_BUILD_QML_PLUGIN_DIR/libqtcommercialchartqml.so | |
29 | charts_qmlplugin.path = /libs/$$ANDROID_TARGET_ARCH |
|
30 | charts_qmlplugin.path = /libs/$$ANDROID_TARGET_ARCH | |
30 | INSTALLS += charts_qmldir charts_qmlplugin |
|
31 | INSTALLS += charts_qmldir charts_qmlplugin | |
31 | } |
|
32 | } | |
32 | } |
|
33 | } |
@@ -1,60 +1,60 | |||||
1 | !include( ../plugins.pri ) { |
|
1 | !include( ../plugins.pri ) { | |
2 | error( "Couldn't find the plugins.pri file!" ) |
|
2 | error( "Couldn't find the plugins.pri file!" ) | |
3 | } |
|
3 | } | |
4 |
|
4 | |||
5 | contains(DEFINES, CHARTS_FOR_QUICK2) { |
|
5 | contains(DEFINES, CHARTS_FOR_QUICK2) { | |
6 | DESTDIR = $$CHART_BUILD_QML2_PLUGIN_DIR |
|
6 | DESTDIR = $$CHART_BUILD_QML2_PLUGIN_DIR | |
7 | } else { |
|
7 | } else { | |
8 | DESTDIR = $$CHART_BUILD_QML_PLUGIN_DIR |
|
8 | DESTDIR = $$CHART_BUILD_QML_PLUGIN_DIR | |
9 | } |
|
9 | } | |
10 |
|
10 | |||
11 | INCLUDEPATH += $$CHART_BUILD_PRIVATE_HEADER_DIR |
|
11 | INCLUDEPATH += $$CHART_BUILD_PRIVATE_HEADER_DIR | |
12 |
|
12 | ios:CONFIG(iphonesimulator, iphonesimulator|iphoneos):TARGET = $$join(TARGET,,,_iphonesimulator) | ||
13 | CONFIG(debug, debug|release) { |
|
13 | CONFIG(debug, debug|release) { | |
14 | mac: TARGET = $$join(TARGET,,,_debug) |
|
14 | mac: TARGET = $$join(TARGET,,,_debug) | |
15 | win32: TARGET = $$join(TARGET,,,d) |
|
15 | win32: TARGET = $$join(TARGET,,,d) | |
16 | } |
|
16 | } | |
17 |
|
17 | |||
18 | SOURCES += \ |
|
18 | SOURCES += \ | |
19 | ../declarative/plugin.cpp \ |
|
19 | ../declarative/plugin.cpp \ | |
20 | ../declarative/declarativechart.cpp \ |
|
20 | ../declarative/declarativechart.cpp \ | |
21 | ../declarative/declarativexypoint.cpp \ |
|
21 | ../declarative/declarativexypoint.cpp \ | |
22 | ../declarative/declarativexyseries.cpp \ |
|
22 | ../declarative/declarativexyseries.cpp \ | |
23 | ../declarative/declarativelineseries.cpp \ |
|
23 | ../declarative/declarativelineseries.cpp \ | |
24 | ../declarative/declarativesplineseries.cpp \ |
|
24 | ../declarative/declarativesplineseries.cpp \ | |
25 | ../declarative/declarativeareaseries.cpp \ |
|
25 | ../declarative/declarativeareaseries.cpp \ | |
26 | ../declarative/declarativescatterseries.cpp \ |
|
26 | ../declarative/declarativescatterseries.cpp \ | |
27 | ../declarative/declarativepieseries.cpp \ |
|
27 | ../declarative/declarativepieseries.cpp \ | |
28 | ../declarative/declarativebarseries.cpp \ |
|
28 | ../declarative/declarativebarseries.cpp \ | |
29 | ../declarative/declarativecategoryaxis.cpp \ |
|
29 | ../declarative/declarativecategoryaxis.cpp \ | |
30 | ../declarative/declarativemargins.cpp \ |
|
30 | ../declarative/declarativemargins.cpp \ | |
31 | ../declarative/declarativeaxes.cpp \ |
|
31 | ../declarative/declarativeaxes.cpp \ | |
32 | ../declarative/declarativepolarchart.cpp \ |
|
32 | ../declarative/declarativepolarchart.cpp \ | |
33 | ../declarative/declarativeboxplotseries.cpp |
|
33 | ../declarative/declarativeboxplotseries.cpp | |
34 |
|
34 | |||
35 | HEADERS += \ |
|
35 | HEADERS += \ | |
36 | ../declarative/declarativechart.h \ |
|
36 | ../declarative/declarativechart.h \ | |
37 | ../declarative/declarativexypoint.h \ |
|
37 | ../declarative/declarativexypoint.h \ | |
38 | ../declarative/declarativexyseries.h \ |
|
38 | ../declarative/declarativexyseries.h \ | |
39 | ../declarative/declarativelineseries.h \ |
|
39 | ../declarative/declarativelineseries.h \ | |
40 | ../declarative/declarativesplineseries.h \ |
|
40 | ../declarative/declarativesplineseries.h \ | |
41 | ../declarative/declarativeareaseries.h \ |
|
41 | ../declarative/declarativeareaseries.h \ | |
42 | ../declarative/declarativescatterseries.h \ |
|
42 | ../declarative/declarativescatterseries.h \ | |
43 | ../declarative/declarativepieseries.h \ |
|
43 | ../declarative/declarativepieseries.h \ | |
44 | ../declarative/declarativebarseries.h \ |
|
44 | ../declarative/declarativebarseries.h \ | |
45 | ../declarative/declarativecategoryaxis.h \ |
|
45 | ../declarative/declarativecategoryaxis.h \ | |
46 | ../declarative/declarativemargins.h \ |
|
46 | ../declarative/declarativemargins.h \ | |
47 | ../declarative/declarativeaxes.h \ |
|
47 | ../declarative/declarativeaxes.h \ | |
48 | ../declarative/declarativepolarchart.h \ |
|
48 | ../declarative/declarativepolarchart.h \ | |
49 | ../declarative/shared_defines.h \ |
|
49 | ../declarative/shared_defines.h \ | |
50 | ../declarative/declarativeboxplotseries.h |
|
50 | ../declarative/declarativeboxplotseries.h | |
51 |
|
51 | |||
52 | TARGETPATH = QtCommercial/Chart |
|
52 | TARGETPATH = QtCommercial/Chart | |
53 | target.path = $$IMPORT_INSTALL_PATH/$$TARGETPATH |
|
53 | target.path = $$IMPORT_INSTALL_PATH/$$TARGETPATH | |
54 | qmldir.files += $$_PRO_FILE_PWD_/qmldir |
|
54 | qmldir.files += $$_PRO_FILE_PWD_/qmldir | |
55 | qmldir.path += $$IMPORT_INSTALL_PATH/$$TARGETPATH |
|
55 | qmldir.path += $$IMPORT_INSTALL_PATH/$$TARGETPATH | |
56 | INSTALLS += target qmldir |
|
56 | INSTALLS += target qmldir | |
57 |
|
57 | |||
58 | QMLDIR_FILE = $$_PRO_FILE_PWD_/qmldir |
|
58 | QMLDIR_FILE = $$_PRO_FILE_PWD_/qmldir | |
59 | contains(QMAKE_HOST.os, Windows): QMLDIR_FILE = $$replace(QMLDIR_FILE, "/","\\") |
|
59 | contains(QMAKE_HOST.os, Windows): QMLDIR_FILE = $$replace(QMLDIR_FILE, "/","\\") | |
60 | QMAKE_POST_LINK += $$QMAKE_COPY $$QMLDIR_FILE $$DESTDIR |
|
60 | QMAKE_POST_LINK += $$QMAKE_COPY $$QMLDIR_FILE $$DESTDIR |
@@ -1,252 +1,252 | |||||
1 | /**************************************************************************** |
|
1 | /**************************************************************************** | |
2 | ** |
|
2 | ** | |
3 | ** Copyright (C) 2013 Digia Plc |
|
3 | ** Copyright (C) 2013 Digia Plc | |
4 | ** All rights reserved. |
|
4 | ** All rights reserved. | |
5 | ** For any questions to Digia, please use contact form at http://qt.digia.com |
|
5 | ** For any questions to Digia, please use contact form at http://qt.digia.com | |
6 | ** |
|
6 | ** | |
7 | ** This file is part of the Qt Enterprise Charts Add-on. |
|
7 | ** This file is part of the Qt Enterprise Charts Add-on. | |
8 | ** |
|
8 | ** | |
9 | ** $QT_BEGIN_LICENSE$ |
|
9 | ** $QT_BEGIN_LICENSE$ | |
10 | ** Licensees holding valid Qt Enterprise licenses may use this file in |
|
10 | ** Licensees holding valid Qt Enterprise licenses may use this file in | |
11 | ** accordance with the Qt Enterprise License Agreement provided with the |
|
11 | ** accordance with the Qt Enterprise License Agreement provided with the | |
12 | ** Software or, alternatively, in accordance with the terms contained in |
|
12 | ** Software or, alternatively, in accordance with the terms contained in | |
13 | ** a written agreement between you and Digia. |
|
13 | ** a written agreement between you and Digia. | |
14 | ** |
|
14 | ** | |
15 | ** If you have questions regarding the use of this file, please use |
|
15 | ** If you have questions regarding the use of this file, please use | |
16 | ** contact form at http://qt.digia.com |
|
16 | ** contact form at http://qt.digia.com | |
17 | ** $QT_END_LICENSE$ |
|
17 | ** $QT_END_LICENSE$ | |
18 | ** |
|
18 | ** | |
19 | ****************************************************************************/ |
|
19 | ****************************************************************************/ | |
20 |
|
20 | |||
21 | #include "qchart.h" |
|
21 | #include "qchart.h" | |
22 | #include "qabstractaxis.h" |
|
22 | #include "qabstractaxis.h" | |
23 | #include "qvalueaxis.h" |
|
23 | #include "qvalueaxis.h" | |
24 | #include "qlogvalueaxis.h" |
|
24 | #include "qlogvalueaxis.h" | |
25 | #include "declarativecategoryaxis.h" |
|
25 | #include "declarativecategoryaxis.h" | |
26 | #include "qbarcategoryaxis.h" |
|
26 | #include "qbarcategoryaxis.h" | |
27 | #include "declarativechart.h" |
|
27 | #include "declarativechart.h" | |
28 | #include "declarativepolarchart.h" |
|
28 | #include "declarativepolarchart.h" | |
29 | #include "declarativexypoint.h" |
|
29 | #include "declarativexypoint.h" | |
30 | #include "declarativelineseries.h" |
|
30 | #include "declarativelineseries.h" | |
31 | #include "declarativesplineseries.h" |
|
31 | #include "declarativesplineseries.h" | |
32 | #include "declarativeareaseries.h" |
|
32 | #include "declarativeareaseries.h" | |
33 | #include "declarativescatterseries.h" |
|
33 | #include "declarativescatterseries.h" | |
34 | #include "declarativebarseries.h" |
|
34 | #include "declarativebarseries.h" | |
35 | #include "declarativeboxplotseries.h" |
|
35 | #include "declarativeboxplotseries.h" | |
36 | #include "declarativepieseries.h" |
|
36 | #include "declarativepieseries.h" | |
37 | #include "declarativeaxes.h" |
|
37 | #include "declarativeaxes.h" | |
38 | #include "qvxymodelmapper.h" |
|
38 | #include "qvxymodelmapper.h" | |
39 | #include "qhxymodelmapper.h" |
|
39 | #include "qhxymodelmapper.h" | |
40 | #include "qhpiemodelmapper.h" |
|
40 | #include "qhpiemodelmapper.h" | |
41 | #include "qvpiemodelmapper.h" |
|
41 | #include "qvpiemodelmapper.h" | |
42 | #include "qhbarmodelmapper.h" |
|
42 | #include "qhbarmodelmapper.h" | |
43 | #include "qvbarmodelmapper.h" |
|
43 | #include "qvbarmodelmapper.h" | |
44 | #include "declarativemargins.h" |
|
44 | #include "declarativemargins.h" | |
45 | #include "qarealegendmarker.h" |
|
45 | #include "qarealegendmarker.h" | |
46 | #include "qbarlegendmarker.h" |
|
46 | #include "qbarlegendmarker.h" | |
47 | #include "qpielegendmarker.h" |
|
47 | #include "qpielegendmarker.h" | |
48 | #include "qxylegendmarker.h" |
|
48 | #include "qxylegendmarker.h" | |
49 | #ifndef QT_ON_ARM |
|
49 | #ifndef QT_ON_ARM | |
50 | #include "qdatetimeaxis.h" |
|
50 | #include "qdatetimeaxis.h" | |
51 | #endif |
|
51 | #endif | |
52 | #include "shared_defines.h" |
|
52 | #include "shared_defines.h" | |
53 | #include <QAbstractItemModel> |
|
53 | #include <QAbstractItemModel> | |
54 | #ifdef CHARTS_FOR_QUICK2 |
|
54 | #ifdef CHARTS_FOR_QUICK2 | |
55 | #include <QtQml/QQmlExtensionPlugin> |
|
55 | #include <QtQml/QQmlExtensionPlugin> | |
56 | #else |
|
56 | #else | |
57 | #include <QtDeclarative/qdeclarativeextensionplugin.h> |
|
57 | #include <QtDeclarative/qdeclarativeextensionplugin.h> | |
58 | #include <QtDeclarative/qdeclarative.h> |
|
58 | #include <QtDeclarative/qdeclarative.h> | |
59 | #endif |
|
59 | #endif | |
60 |
|
60 | |||
61 | QTCOMMERCIALCHART_USE_NAMESPACE |
|
61 | QTCOMMERCIALCHART_USE_NAMESPACE | |
62 |
|
62 | |||
63 | Q_DECLARE_METATYPE(QList<QPieSlice *>) |
|
63 | Q_DECLARE_METATYPE(QList<QPieSlice *>) | |
64 | Q_DECLARE_METATYPE(QList<QBarSet *>) |
|
64 | Q_DECLARE_METATYPE(QList<QBarSet *>) | |
65 | Q_DECLARE_METATYPE(QList<QAbstractAxis *>) |
|
65 | Q_DECLARE_METATYPE(QList<QAbstractAxis *>) | |
66 |
|
66 | |||
67 | #if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)) |
|
67 | #if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)) | |
68 |
|
68 | |||
69 | Q_DECLARE_METATYPE(DeclarativeChart *) |
|
69 | Q_DECLARE_METATYPE(DeclarativeChart *) | |
70 | Q_DECLARE_METATYPE(DeclarativePolarChart *) |
|
70 | Q_DECLARE_METATYPE(DeclarativePolarChart *) | |
71 | Q_DECLARE_METATYPE(DeclarativeMargins *) |
|
71 | Q_DECLARE_METATYPE(DeclarativeMargins *) | |
72 | Q_DECLARE_METATYPE(DeclarativeAreaSeries *) |
|
72 | Q_DECLARE_METATYPE(DeclarativeAreaSeries *) | |
73 | Q_DECLARE_METATYPE(DeclarativeBarSeries *) |
|
73 | Q_DECLARE_METATYPE(DeclarativeBarSeries *) | |
74 | Q_DECLARE_METATYPE(DeclarativeBarSet *) |
|
74 | Q_DECLARE_METATYPE(DeclarativeBarSet *) | |
75 | Q_DECLARE_METATYPE(DeclarativeBoxPlotSeries *) |
|
75 | Q_DECLARE_METATYPE(DeclarativeBoxPlotSeries *) | |
76 | Q_DECLARE_METATYPE(DeclarativeBoxSet *) |
|
76 | Q_DECLARE_METATYPE(DeclarativeBoxSet *) | |
77 | Q_DECLARE_METATYPE(DeclarativeLineSeries *) |
|
77 | Q_DECLARE_METATYPE(DeclarativeLineSeries *) | |
78 | Q_DECLARE_METATYPE(DeclarativePieSeries *) |
|
78 | Q_DECLARE_METATYPE(DeclarativePieSeries *) | |
79 | Q_DECLARE_METATYPE(DeclarativeScatterSeries *) |
|
79 | Q_DECLARE_METATYPE(DeclarativeScatterSeries *) | |
80 | Q_DECLARE_METATYPE(DeclarativeSplineSeries *) |
|
80 | Q_DECLARE_METATYPE(DeclarativeSplineSeries *) | |
81 |
|
81 | |||
82 | Q_DECLARE_METATYPE(QAbstractAxis *) |
|
82 | Q_DECLARE_METATYPE(QAbstractAxis *) | |
83 | Q_DECLARE_METATYPE(QValueAxis *) |
|
83 | Q_DECLARE_METATYPE(QValueAxis *) | |
84 | Q_DECLARE_METATYPE(QBarCategoryAxis *) |
|
84 | Q_DECLARE_METATYPE(QBarCategoryAxis *) | |
85 | Q_DECLARE_METATYPE(QCategoryAxis *) |
|
85 | Q_DECLARE_METATYPE(QCategoryAxis *) | |
86 | Q_DECLARE_METATYPE(QDateTimeAxis *) |
|
86 | Q_DECLARE_METATYPE(QDateTimeAxis *) | |
87 | Q_DECLARE_METATYPE(QLogValueAxis *) |
|
87 | Q_DECLARE_METATYPE(QLogValueAxis *) | |
88 |
|
88 | |||
89 | Q_DECLARE_METATYPE(QLegend *) |
|
89 | Q_DECLARE_METATYPE(QLegend *) | |
90 | Q_DECLARE_METATYPE(QLegendMarker *) |
|
90 | Q_DECLARE_METATYPE(QLegendMarker *) | |
91 | Q_DECLARE_METATYPE(QAreaLegendMarker *) |
|
91 | Q_DECLARE_METATYPE(QAreaLegendMarker *) | |
92 | Q_DECLARE_METATYPE(QBarLegendMarker *) |
|
92 | Q_DECLARE_METATYPE(QBarLegendMarker *) | |
93 | Q_DECLARE_METATYPE(QPieLegendMarker *) |
|
93 | Q_DECLARE_METATYPE(QPieLegendMarker *) | |
94 |
|
94 | |||
95 | Q_DECLARE_METATYPE(QHPieModelMapper *) |
|
95 | Q_DECLARE_METATYPE(QHPieModelMapper *) | |
96 | Q_DECLARE_METATYPE(QHXYModelMapper *) |
|
96 | Q_DECLARE_METATYPE(QHXYModelMapper *) | |
97 | Q_DECLARE_METATYPE(QPieModelMapper *) |
|
97 | Q_DECLARE_METATYPE(QPieModelMapper *) | |
98 | Q_DECLARE_METATYPE(QHBarModelMapper *) |
|
98 | Q_DECLARE_METATYPE(QHBarModelMapper *) | |
99 | Q_DECLARE_METATYPE(QBarModelMapper *) |
|
99 | Q_DECLARE_METATYPE(QBarModelMapper *) | |
100 | Q_DECLARE_METATYPE(QVBarModelMapper *) |
|
100 | Q_DECLARE_METATYPE(QVBarModelMapper *) | |
101 | Q_DECLARE_METATYPE(QVPieModelMapper *) |
|
101 | Q_DECLARE_METATYPE(QVPieModelMapper *) | |
102 | Q_DECLARE_METATYPE(QVXYModelMapper *) |
|
102 | Q_DECLARE_METATYPE(QVXYModelMapper *) | |
103 | Q_DECLARE_METATYPE(QXYLegendMarker *) |
|
103 | Q_DECLARE_METATYPE(QXYLegendMarker *) | |
104 | Q_DECLARE_METATYPE(QXYModelMapper *) |
|
104 | Q_DECLARE_METATYPE(QXYModelMapper *) | |
105 |
|
105 | |||
106 | Q_DECLARE_METATYPE(QAbstractSeries *) |
|
106 | Q_DECLARE_METATYPE(QAbstractSeries *) | |
107 | Q_DECLARE_METATYPE(QXYSeries *) |
|
107 | Q_DECLARE_METATYPE(QXYSeries *) | |
108 | Q_DECLARE_METATYPE(QAbstractBarSeries *) |
|
108 | Q_DECLARE_METATYPE(QAbstractBarSeries *) | |
109 | Q_DECLARE_METATYPE(QBarSeries *) |
|
109 | Q_DECLARE_METATYPE(QBarSeries *) | |
110 | Q_DECLARE_METATYPE(QBarSet *) |
|
110 | Q_DECLARE_METATYPE(QBarSet *) | |
111 | Q_DECLARE_METATYPE(QAreaSeries *) |
|
111 | Q_DECLARE_METATYPE(QAreaSeries *) | |
112 | Q_DECLARE_METATYPE(QHorizontalBarSeries *) |
|
112 | Q_DECLARE_METATYPE(QHorizontalBarSeries *) | |
113 | Q_DECLARE_METATYPE(QHorizontalPercentBarSeries *) |
|
113 | Q_DECLARE_METATYPE(QHorizontalPercentBarSeries *) | |
114 | Q_DECLARE_METATYPE(QHorizontalStackedBarSeries *) |
|
114 | Q_DECLARE_METATYPE(QHorizontalStackedBarSeries *) | |
115 | Q_DECLARE_METATYPE(QLineSeries *) |
|
115 | Q_DECLARE_METATYPE(QLineSeries *) | |
116 | Q_DECLARE_METATYPE(QPercentBarSeries *) |
|
116 | Q_DECLARE_METATYPE(QPercentBarSeries *) | |
117 | Q_DECLARE_METATYPE(QPieSeries *) |
|
117 | Q_DECLARE_METATYPE(QPieSeries *) | |
118 | Q_DECLARE_METATYPE(QPieSlice *) |
|
118 | Q_DECLARE_METATYPE(QPieSlice *) | |
119 | Q_DECLARE_METATYPE(QScatterSeries *) |
|
119 | Q_DECLARE_METATYPE(QScatterSeries *) | |
120 | Q_DECLARE_METATYPE(QSplineSeries *) |
|
120 | Q_DECLARE_METATYPE(QSplineSeries *) | |
121 | Q_DECLARE_METATYPE(QStackedBarSeries *) |
|
121 | Q_DECLARE_METATYPE(QStackedBarSeries *) | |
122 |
|
122 | |||
123 | #endif |
|
123 | #endif | |
124 |
|
124 | |||
125 | QTCOMMERCIALCHART_BEGIN_NAMESPACE |
|
125 | QTCOMMERCIALCHART_BEGIN_NAMESPACE | |
126 |
|
126 | |||
127 | class ChartQmlPlugin : public QDECLARATIVE_EXTENSION_PLUGIN |
|
127 | class ChartQmlPlugin : public QDECLARATIVE_EXTENSION_PLUGIN | |
128 | { |
|
128 | { | |
129 | Q_OBJECT |
|
129 | Q_OBJECT | |
130 |
|
130 | |||
131 | #ifdef CHARTS_FOR_QUICK2 |
|
131 | #ifdef CHARTS_FOR_QUICK2 | |
132 | Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface") |
|
132 | Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface") | |
133 | #else |
|
133 | #else | |
134 | # if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)) |
|
134 | # if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)) | |
135 | Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QDeclarativeExtensionInterface") |
|
135 | Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QDeclarativeExtensionInterface") | |
136 | # endif |
|
136 | # endif | |
137 | #endif |
|
137 | #endif | |
138 |
|
138 | |||
139 | public: |
|
139 | public: | |
140 | virtual void registerTypes(const char *uri) |
|
140 | virtual void registerTypes(const char *uri) | |
141 | { |
|
141 | { | |
142 | Q_ASSERT(QLatin1String(uri) == QLatin1String("QtCommercial.Chart")); |
|
142 | Q_ASSERT(QLatin1String(uri) == QLatin1String("QtCommercial.Chart")); | |
143 |
|
143 | |||
144 | qRegisterMetaType<QList<QPieSlice *> >(); |
|
144 | qRegisterMetaType<QList<QPieSlice *> >(); | |
145 | qRegisterMetaType<QList<QBarSet *> >(); |
|
145 | qRegisterMetaType<QList<QBarSet *> >(); | |
146 | qRegisterMetaType<QList<QAbstractAxis *> >(); |
|
146 | qRegisterMetaType<QList<QAbstractAxis *> >(); | |
147 |
|
147 | |||
148 | // QtCommercial.Chart 1.0 |
|
148 | // QtCommercial.Chart 1.0 | |
149 | qmlRegisterType<DeclarativeChart>(uri, 1, 0, "ChartView"); |
|
149 | qmlRegisterType<DeclarativeChart>(uri, 1, 0, "ChartView"); | |
150 | qmlRegisterType<DeclarativeXYPoint>(uri, 1, 0, "XYPoint"); |
|
150 | qmlRegisterType<DeclarativeXYPoint>(uri, 1, 0, "XYPoint"); | |
151 | qmlRegisterType<DeclarativeScatterSeries>(uri, 1, 0, "ScatterSeries"); |
|
151 | qmlRegisterType<DeclarativeScatterSeries>(uri, 1, 0, "ScatterSeries"); | |
152 | qmlRegisterType<DeclarativeLineSeries>(uri, 1, 0, "LineSeries"); |
|
152 | qmlRegisterType<DeclarativeLineSeries>(uri, 1, 0, "LineSeries"); | |
153 | qmlRegisterType<DeclarativeSplineSeries>(uri, 1, 0, "SplineSeries"); |
|
153 | qmlRegisterType<DeclarativeSplineSeries>(uri, 1, 0, "SplineSeries"); | |
154 | qmlRegisterType<DeclarativeAreaSeries>(uri, 1, 0, "AreaSeries"); |
|
154 | qmlRegisterType<DeclarativeAreaSeries>(uri, 1, 0, "AreaSeries"); | |
155 | qmlRegisterType<DeclarativeBarSeries>(uri, 1, 0, "BarSeries"); |
|
155 | qmlRegisterType<DeclarativeBarSeries>(uri, 1, 0, "BarSeries"); | |
156 | qmlRegisterType<DeclarativeStackedBarSeries>(uri, 1, 0, "StackedBarSeries"); |
|
156 | qmlRegisterType<DeclarativeStackedBarSeries>(uri, 1, 0, "StackedBarSeries"); | |
157 | qmlRegisterType<DeclarativePercentBarSeries>(uri, 1, 0, "PercentBarSeries"); |
|
157 | qmlRegisterType<DeclarativePercentBarSeries>(uri, 1, 0, "PercentBarSeries"); | |
158 | qmlRegisterType<DeclarativePieSeries>(uri, 1, 0, "PieSeries"); |
|
158 | qmlRegisterType<DeclarativePieSeries>(uri, 1, 0, "PieSeries"); | |
159 | qmlRegisterType<QPieSlice>(uri, 1, 0, "PieSlice"); |
|
159 | qmlRegisterType<QPieSlice>(uri, 1, 0, "PieSlice"); | |
160 | qmlRegisterType<DeclarativeBarSet>(uri, 1, 0, "BarSet"); |
|
160 | qmlRegisterType<DeclarativeBarSet>(uri, 1, 0, "BarSet"); | |
161 | qmlRegisterType<QHXYModelMapper>(uri, 1, 0, "HXYModelMapper"); |
|
161 | qmlRegisterType<QHXYModelMapper>(uri, 1, 0, "HXYModelMapper"); | |
162 | qmlRegisterType<QVXYModelMapper>(uri, 1, 0, "VXYModelMapper"); |
|
162 | qmlRegisterType<QVXYModelMapper>(uri, 1, 0, "VXYModelMapper"); | |
163 | qmlRegisterType<QHPieModelMapper>(uri, 1, 0, "HPieModelMapper"); |
|
163 | qmlRegisterType<QHPieModelMapper>(uri, 1, 0, "HPieModelMapper"); | |
164 | qmlRegisterType<QVPieModelMapper>(uri, 1, 0, "VPieModelMapper"); |
|
164 | qmlRegisterType<QVPieModelMapper>(uri, 1, 0, "VPieModelMapper"); | |
165 | qmlRegisterType<QHBarModelMapper>(uri, 1, 0, "HBarModelMapper"); |
|
165 | qmlRegisterType<QHBarModelMapper>(uri, 1, 0, "HBarModelMapper"); | |
166 | qmlRegisterType<QVBarModelMapper>(uri, 1, 0, "VBarModelMapper"); |
|
166 | qmlRegisterType<QVBarModelMapper>(uri, 1, 0, "VBarModelMapper"); | |
167 | qmlRegisterType<QValueAxis>(uri, 1, 0, "ValuesAxis"); |
|
167 | qmlRegisterType<QValueAxis>(uri, 1, 0, "ValuesAxis"); | |
168 | qmlRegisterType<QBarCategoryAxis>(uri, 1, 0, "BarCategoriesAxis"); |
|
168 | qmlRegisterType<QBarCategoryAxis>(uri, 1, 0, "BarCategoriesAxis"); | |
169 | qmlRegisterUncreatableType<QLegend>(uri, 1, 0, "Legend", |
|
169 | qmlRegisterUncreatableType<QLegend>(uri, 1, 0, "Legend", | |
170 | QLatin1String("Trying to create uncreatable: Legend.")); |
|
170 | QLatin1String("Trying to create uncreatable: Legend.")); | |
171 | qmlRegisterUncreatableType<QXYSeries>(uri, 1, 0, "XYSeries", |
|
171 | qmlRegisterUncreatableType<QXYSeries>(uri, 1, 0, "XYSeries", | |
172 | QLatin1String("Trying to create uncreatable: XYSeries.")); |
|
172 | QLatin1String("Trying to create uncreatable: XYSeries.")); | |
173 | qmlRegisterUncreatableType<QAbstractItemModel>(uri, 1, 0, "AbstractItemModel", |
|
173 | qmlRegisterUncreatableType<QAbstractItemModel>(uri, 1, 0, "AbstractItemModel", | |
174 | QLatin1String("Trying to create uncreatable: AbstractItemModel.")); |
|
174 | QLatin1String("Trying to create uncreatable: AbstractItemModel.")); | |
175 | qmlRegisterUncreatableType<QXYModelMapper>(uri, 1, 0, "XYModelMapper", |
|
175 | qmlRegisterUncreatableType<QXYModelMapper>(uri, 1, 0, "XYModelMapper", | |
176 | QLatin1String("Trying to create uncreatable: XYModelMapper.")); |
|
176 | QLatin1String("Trying to create uncreatable: XYModelMapper.")); | |
177 | qmlRegisterUncreatableType<QPieModelMapper>(uri, 1, 0, "PieModelMapper", |
|
177 | qmlRegisterUncreatableType<QPieModelMapper>(uri, 1, 0, "PieModelMapper", | |
178 | QLatin1String("Trying to create uncreatable: PieModelMapper.")); |
|
178 | QLatin1String("Trying to create uncreatable: PieModelMapper.")); | |
179 | qmlRegisterUncreatableType<QBarModelMapper>(uri, 1, 0, "BarModelMapper", |
|
179 | qmlRegisterUncreatableType<QBarModelMapper>(uri, 1, 0, "BarModelMapper", | |
180 | QLatin1String("Trying to create uncreatable: BarModelMapper.")); |
|
180 | QLatin1String("Trying to create uncreatable: BarModelMapper.")); | |
181 | qmlRegisterUncreatableType<QAbstractSeries>(uri, 1, 0, "AbstractSeries", |
|
181 | qmlRegisterUncreatableType<QAbstractSeries>(uri, 1, 0, "AbstractSeries", | |
182 | QLatin1String("Trying to create uncreatable: AbstractSeries.")); |
|
182 | QLatin1String("Trying to create uncreatable: AbstractSeries.")); | |
183 | qmlRegisterUncreatableType<QAbstractBarSeries>(uri, 1, 0, "AbstractBarSeries", |
|
183 | qmlRegisterUncreatableType<QAbstractBarSeries>(uri, 1, 0, "AbstractBarSeries", | |
184 | QLatin1String("Trying to create uncreatable: AbstractBarSeries.")); |
|
184 | QLatin1String("Trying to create uncreatable: AbstractBarSeries.")); | |
185 | qmlRegisterUncreatableType<QAbstractAxis>(uri, 1, 0, "AbstractAxis", |
|
185 | qmlRegisterUncreatableType<QAbstractAxis>(uri, 1, 0, "AbstractAxis", | |
186 | QLatin1String("Trying to create uncreatable: AbstractAxis. Use specific types of axis instead.")); |
|
186 | QLatin1String("Trying to create uncreatable: AbstractAxis. Use specific types of axis instead.")); | |
187 | qmlRegisterUncreatableType<QBarSet>(uri, 1, 0, "BarSetBase", |
|
187 | qmlRegisterUncreatableType<QBarSet>(uri, 1, 0, "BarSetBase", | |
188 | QLatin1String("Trying to create uncreatable: BarsetBase.")); |
|
188 | QLatin1String("Trying to create uncreatable: BarsetBase.")); | |
189 | qmlRegisterUncreatableType<QPieSeries>(uri, 1, 0, "QPieSeries", |
|
189 | qmlRegisterUncreatableType<QPieSeries>(uri, 1, 0, "QPieSeries", | |
190 | QLatin1String("Trying to create uncreatable: QPieSeries. Use PieSeries instead.")); |
|
190 | QLatin1String("Trying to create uncreatable: QPieSeries. Use PieSeries instead.")); | |
191 | qmlRegisterUncreatableType<DeclarativeAxes>(uri, 1, 0, "DeclarativeAxes", |
|
191 | qmlRegisterUncreatableType<DeclarativeAxes>(uri, 1, 0, "DeclarativeAxes", | |
192 | QLatin1String("Trying to create uncreatable: DeclarativeAxes.")); |
|
192 | QLatin1String("Trying to create uncreatable: DeclarativeAxes.")); | |
193 |
|
193 | |||
194 | // QtCommercial.Chart 1.1 |
|
194 | // QtCommercial.Chart 1.1 | |
195 | qmlRegisterType<DeclarativeChart, 1>(uri, 1, 1, "ChartView"); |
|
195 | qmlRegisterType<DeclarativeChart, 1>(uri, 1, 1, "ChartView"); | |
196 | qmlRegisterType<DeclarativeScatterSeries, 1>(uri, 1, 1, "ScatterSeries"); |
|
196 | qmlRegisterType<DeclarativeScatterSeries, 1>(uri, 1, 1, "ScatterSeries"); | |
197 | qmlRegisterType<DeclarativeLineSeries, 1>(uri, 1, 1, "LineSeries"); |
|
197 | qmlRegisterType<DeclarativeLineSeries, 1>(uri, 1, 1, "LineSeries"); | |
198 | qmlRegisterType<DeclarativeSplineSeries, 1>(uri, 1, 1, "SplineSeries"); |
|
198 | qmlRegisterType<DeclarativeSplineSeries, 1>(uri, 1, 1, "SplineSeries"); | |
199 | qmlRegisterType<DeclarativeAreaSeries, 1>(uri, 1, 1, "AreaSeries"); |
|
199 | qmlRegisterType<DeclarativeAreaSeries, 1>(uri, 1, 1, "AreaSeries"); | |
200 | qmlRegisterType<DeclarativeBarSeries, 1>(uri, 1, 1, "BarSeries"); |
|
200 | qmlRegisterType<DeclarativeBarSeries, 1>(uri, 1, 1, "BarSeries"); | |
201 | qmlRegisterType<DeclarativeStackedBarSeries, 1>(uri, 1, 1, "StackedBarSeries"); |
|
201 | qmlRegisterType<DeclarativeStackedBarSeries, 1>(uri, 1, 1, "StackedBarSeries"); | |
202 | qmlRegisterType<DeclarativePercentBarSeries, 1>(uri, 1, 1, "PercentBarSeries"); |
|
202 | qmlRegisterType<DeclarativePercentBarSeries, 1>(uri, 1, 1, "PercentBarSeries"); | |
203 | qmlRegisterType<DeclarativeHorizontalBarSeries, 1>(uri, 1, 1, "HorizontalBarSeries"); |
|
203 | qmlRegisterType<DeclarativeHorizontalBarSeries, 1>(uri, 1, 1, "HorizontalBarSeries"); | |
204 | qmlRegisterType<DeclarativeHorizontalStackedBarSeries, 1>(uri, 1, 1, "HorizontalStackedBarSeries"); |
|
204 | qmlRegisterType<DeclarativeHorizontalStackedBarSeries, 1>(uri, 1, 1, "HorizontalStackedBarSeries"); | |
205 | qmlRegisterType<DeclarativeHorizontalPercentBarSeries, 1>(uri, 1, 1, "HorizontalPercentBarSeries"); |
|
205 | qmlRegisterType<DeclarativeHorizontalPercentBarSeries, 1>(uri, 1, 1, "HorizontalPercentBarSeries"); | |
206 | qmlRegisterType<DeclarativePieSeries>(uri, 1, 1, "PieSeries"); |
|
206 | qmlRegisterType<DeclarativePieSeries>(uri, 1, 1, "PieSeries"); | |
207 | qmlRegisterType<DeclarativeBarSet>(uri, 1, 1, "BarSet"); |
|
207 | qmlRegisterType<DeclarativeBarSet>(uri, 1, 1, "BarSet"); | |
208 | qmlRegisterType<QValueAxis>(uri, 1, 1, "ValueAxis"); |
|
208 | qmlRegisterType<QValueAxis>(uri, 1, 1, "ValueAxis"); | |
209 | #ifndef QT_ON_ARM |
|
209 | #ifndef QT_ON_ARM | |
210 | qmlRegisterType<QDateTimeAxis>(uri, 1, 1, "DateTimeAxis"); |
|
210 | qmlRegisterType<QDateTimeAxis>(uri, 1, 1, "DateTimeAxis"); | |
211 | #endif |
|
211 | #endif | |
212 | qmlRegisterType<DeclarativeCategoryAxis>(uri, 1, 1, "CategoryAxis"); |
|
212 | qmlRegisterType<DeclarativeCategoryAxis>(uri, 1, 1, "CategoryAxis"); | |
213 | qmlRegisterType<DeclarativeCategoryRange>(uri, 1, 1, "CategoryRange"); |
|
213 | qmlRegisterType<DeclarativeCategoryRange>(uri, 1, 1, "CategoryRange"); | |
214 | qmlRegisterType<QBarCategoryAxis>(uri, 1, 1, "BarCategoryAxis"); |
|
214 | qmlRegisterType<QBarCategoryAxis>(uri, 1, 1, "BarCategoryAxis"); | |
215 | qmlRegisterUncreatableType<DeclarativeMargins>(uri, 1, 1, "Margins", |
|
215 | qmlRegisterUncreatableType<DeclarativeMargins>(uri, 1, 1, "Margins", | |
216 | QLatin1String("Trying to create uncreatable: Margins.")); |
|
216 | QLatin1String("Trying to create uncreatable: Margins.")); | |
217 |
|
217 | |||
218 | // QtCommercial.Chart 1.2 |
|
218 | // QtCommercial.Chart 1.2 | |
219 | qmlRegisterType<DeclarativeChart, 2>(uri, 1, 2, "ChartView"); |
|
219 | qmlRegisterType<DeclarativeChart, 2>(uri, 1, 2, "ChartView"); | |
220 | qmlRegisterType<DeclarativeScatterSeries, 2>(uri, 1, 2, "ScatterSeries"); |
|
220 | qmlRegisterType<DeclarativeScatterSeries, 2>(uri, 1, 2, "ScatterSeries"); | |
221 | qmlRegisterType<DeclarativeLineSeries, 2>(uri, 1, 2, "LineSeries"); |
|
221 | qmlRegisterType<DeclarativeLineSeries, 2>(uri, 1, 2, "LineSeries"); | |
222 | qmlRegisterType<DeclarativeSplineSeries, 2>(uri, 1, 2, "SplineSeries"); |
|
222 | qmlRegisterType<DeclarativeSplineSeries, 2>(uri, 1, 2, "SplineSeries"); | |
223 | qmlRegisterType<DeclarativeAreaSeries, 2>(uri, 1, 2, "AreaSeries"); |
|
223 | qmlRegisterType<DeclarativeAreaSeries, 2>(uri, 1, 2, "AreaSeries"); | |
224 | qmlRegisterType<DeclarativeBarSeries, 2>(uri, 1, 2, "BarSeries"); |
|
224 | qmlRegisterType<DeclarativeBarSeries, 2>(uri, 1, 2, "BarSeries"); | |
225 | qmlRegisterType<DeclarativeStackedBarSeries, 2>(uri, 1, 2, "StackedBarSeries"); |
|
225 | qmlRegisterType<DeclarativeStackedBarSeries, 2>(uri, 1, 2, "StackedBarSeries"); | |
226 | qmlRegisterType<DeclarativePercentBarSeries, 2>(uri, 1, 2, "PercentBarSeries"); |
|
226 | qmlRegisterType<DeclarativePercentBarSeries, 2>(uri, 1, 2, "PercentBarSeries"); | |
227 | qmlRegisterType<DeclarativeHorizontalBarSeries, 2>(uri, 1, 2, "HorizontalBarSeries"); |
|
227 | qmlRegisterType<DeclarativeHorizontalBarSeries, 2>(uri, 1, 2, "HorizontalBarSeries"); | |
228 | qmlRegisterType<DeclarativeHorizontalStackedBarSeries, 2>(uri, 1, 2, "HorizontalStackedBarSeries"); |
|
228 | qmlRegisterType<DeclarativeHorizontalStackedBarSeries, 2>(uri, 1, 2, "HorizontalStackedBarSeries"); | |
229 | qmlRegisterType<DeclarativeHorizontalPercentBarSeries, 2>(uri, 1, 2, "HorizontalPercentBarSeries"); |
|
229 | qmlRegisterType<DeclarativeHorizontalPercentBarSeries, 2>(uri, 1, 2, "HorizontalPercentBarSeries"); | |
230 |
|
230 | |||
231 | // QtCommercial.Chart 1.3 |
|
231 | // QtCommercial.Chart 1.3 | |
232 | qmlRegisterType<DeclarativeChart, 3>(uri, 1, 3, "ChartView"); |
|
232 | qmlRegisterType<DeclarativeChart, 3>(uri, 1, 3, "ChartView"); | |
233 | qmlRegisterType<DeclarativePolarChart, 1>(uri, 1, 3, "PolarChartView"); |
|
233 | qmlRegisterType<DeclarativePolarChart, 1>(uri, 1, 3, "PolarChartView"); | |
234 | qmlRegisterType<DeclarativeSplineSeries, 3>(uri, 1, 3, "SplineSeries"); |
|
234 | qmlRegisterType<DeclarativeSplineSeries, 3>(uri, 1, 3, "SplineSeries"); | |
235 | qmlRegisterType<DeclarativeScatterSeries, 3>(uri, 1, 3, "ScatterSeries"); |
|
235 | qmlRegisterType<DeclarativeScatterSeries, 3>(uri, 1, 3, "ScatterSeries"); | |
236 | qmlRegisterType<DeclarativeLineSeries, 3>(uri, 1, 3, "LineSeries"); |
|
236 | qmlRegisterType<DeclarativeLineSeries, 3>(uri, 1, 3, "LineSeries"); | |
237 | qmlRegisterType<DeclarativeAreaSeries, 3>(uri, 1, 3, "AreaSeries"); |
|
237 | qmlRegisterType<DeclarativeAreaSeries, 3>(uri, 1, 3, "AreaSeries"); | |
238 | qmlRegisterType<QLogValueAxis>(uri, 1, 3, "LogValueAxis"); |
|
238 | qmlRegisterType<QLogValueAxis>(uri, 1, 3, "LogValueAxis"); | |
239 | qmlRegisterType<DeclarativeBoxPlotSeries>(uri, 1, 3, "BoxPlotSeries"); |
|
239 | qmlRegisterType<DeclarativeBoxPlotSeries>(uri, 1, 3, "BoxPlotSeries"); | |
240 | qmlRegisterType<DeclarativeBoxSet>(uri, 1, 3, "BoxSet"); |
|
240 | qmlRegisterType<DeclarativeBoxSet>(uri, 1, 3, "BoxSet"); | |
241 | } |
|
241 | } | |
242 | }; |
|
242 | }; | |
243 |
|
243 | |||
244 | #include "plugin.moc" |
|
|||
245 |
|
||||
246 | QTCOMMERCIALCHART_END_NAMESPACE |
|
244 | QTCOMMERCIALCHART_END_NAMESPACE | |
247 |
|
245 | |||
|
246 | #include "plugin.moc" | |||
|
247 | ||||
248 | QTCOMMERCIALCHART_USE_NAMESPACE |
|
248 | QTCOMMERCIALCHART_USE_NAMESPACE | |
249 |
|
249 | |||
250 | #if (QT_VERSION < QT_VERSION_CHECK(5, 0, 0)) |
|
250 | #if (QT_VERSION < QT_VERSION_CHECK(5, 0, 0)) | |
251 | Q_EXPORT_PLUGIN2(qtcommercialchartqml, QT_PREPEND_NAMESPACE(ChartQmlPlugin)) |
|
251 | Q_EXPORT_PLUGIN2(qtcommercialchartqml, QT_PREPEND_NAMESPACE(ChartQmlPlugin)) | |
252 | #endif |
|
252 | #endif |
@@ -1,2 +1,3 | |||||
1 | module QtCommercial.Chart |
|
1 | module QtCommercial.Chart | |
2 | plugin qtcommercialchartqml2 |
|
2 | plugin qtcommercialchartqml2 | |
|
3 | classname ChartQmlPlugin |
@@ -1,10 +1,11 | |||||
1 | TARGET = qtcommercialchartqml2 |
|
1 | TARGET = qtcommercialchartqml2 | |
2 | QT += quick qml widgets |
|
2 | QT += quick qml widgets | |
3 | IMPORT_INSTALL_PATH = $$[QT_INSTALL_QML] |
|
3 | IMPORT_INSTALL_PATH = $$[QT_INSTALL_QML] | |
4 | DEFINES += CHARTS_FOR_QUICK2 |
|
4 | DEFINES += CHARTS_FOR_QUICK2 | |
5 |
|
5 | |||
6 | !include(../declarative/declarative.pri) { |
|
6 | !include(../declarative/declarative.pri) { | |
7 | error( "Couldn't find the declarative.pri file!" ) |
|
7 | error( "Couldn't find the declarative.pri file!" ) | |
8 | } |
|
8 | } | |
9 | qmldir.files += plugins.qmltypes |
|
9 | qmldir.files += plugins.qmltypes | |
10 |
|
10 | TARGETPATH = QtCommercial.Chart | ||
|
11 | QMAKE_MOC_OPTIONS += -Muri=$$TARGETPATH |
@@ -1,266 +1,266 | |||||
1 | !include( ../config.pri ):error( "Couldn't find the config.pri file!" ) |
|
1 | !include( ../config.pri ):error( "Couldn't find the config.pri file!" ) | |
2 |
|
2 | |||
3 | ############################# BUILD CONFIG ###################################### |
|
3 | ############################# BUILD CONFIG ###################################### | |
4 |
|
4 | |||
5 | TARGET = $$LIBRARY_NAME |
|
5 | TARGET = $$LIBRARY_NAME | |
6 | DESTDIR = $$CHART_BUILD_LIB_DIR |
|
6 | DESTDIR = $$CHART_BUILD_LIB_DIR | |
7 | TEMPLATE = lib |
|
7 | TEMPLATE = lib | |
8 | QT = core gui |
|
8 | QT = core gui | |
9 | greaterThan(QT_MAJOR_VERSION, 4): QT += widgets |
|
9 | greaterThan(QT_MAJOR_VERSION, 4): QT += widgets | |
10 | DEFINES += QTCOMMERCIALCHART_LIBRARY |
|
10 | DEFINES += QTCOMMERCIALCHART_LIBRARY | |
11 | win32:CONFIG += create_prl |
|
11 | win32:CONFIG += create_prl | |
12 | # treat warnings as errors |
|
12 | # treat warnings as errors | |
13 | win32-msvc*: { |
|
13 | win32-msvc*: { | |
14 | QMAKE_CXXFLAGS += /WX |
|
14 | QMAKE_CXXFLAGS += /WX | |
15 | } else { |
|
15 | } else { | |
16 | # QMAKE_CXXFLAGS += -Werror |
|
16 | # QMAKE_CXXFLAGS += -Werror | |
17 | } |
|
17 | } | |
18 |
|
18 | |||
19 | unix:!qnx:!android { |
|
19 | unix:!qnx:!android { | |
20 | QMAKE_CXXFLAGS += -fvisibility=hidden -fvisibility-inlines-hidden |
|
20 | QMAKE_CXXFLAGS += -fvisibility=hidden -fvisibility-inlines-hidden | |
21 | } |
|
21 | } | |
22 |
|
22 | |||
23 | ############################# DEPEDENCES ######################################## |
|
23 | ############################# DEPEDENCES ######################################## | |
24 |
|
24 | |||
25 | win32-msvc*: LIBS += User32.lib |
|
25 | win32-msvc*: LIBS += User32.lib | |
26 | LIBS -= -l$$LIBRARY_NAME |
|
26 | LIBS -= -l$$LIBRARY_NAME | |
27 | INCLUDEPATH += ../include . |
|
27 | INCLUDEPATH += ../include . | |
28 |
|
28 | |||
29 | ############################# SOURCES ########################################## |
|
29 | ############################# SOURCES ########################################## | |
30 |
|
30 | |||
31 | SOURCES += \ |
|
31 | SOURCES += \ | |
32 | $$PWD/chartdataset.cpp \ |
|
32 | $$PWD/chartdataset.cpp \ | |
33 | $$PWD/chartpresenter.cpp \ |
|
33 | $$PWD/chartpresenter.cpp \ | |
34 | $$PWD/chartthememanager.cpp \ |
|
34 | $$PWD/chartthememanager.cpp \ | |
35 | $$PWD/qchart.cpp \ |
|
35 | $$PWD/qchart.cpp \ | |
36 | $$PWD/qchartview.cpp \ |
|
36 | $$PWD/qchartview.cpp \ | |
37 | $$PWD/qabstractseries.cpp \ |
|
37 | $$PWD/qabstractseries.cpp \ | |
38 | $$PWD/chartbackground.cpp \ |
|
38 | $$PWD/chartbackground.cpp \ | |
39 | $$PWD/chartelement.cpp \ |
|
39 | $$PWD/chartelement.cpp \ | |
40 | $$PWD/chartitem.cpp \ |
|
40 | $$PWD/chartitem.cpp \ | |
41 | $$PWD/scroller.cpp \ |
|
41 | $$PWD/scroller.cpp \ | |
42 | $$PWD/charttitle.cpp \ |
|
42 | $$PWD/charttitle.cpp \ | |
43 | $$PWD/qpolarchart.cpp |
|
43 | $$PWD/qpolarchart.cpp | |
44 | PRIVATE_HEADERS += \ |
|
44 | PRIVATE_HEADERS += \ | |
45 | $$PWD/chartdataset_p.h \ |
|
45 | $$PWD/chartdataset_p.h \ | |
46 | $$PWD/chartitem_p.h \ |
|
46 | $$PWD/chartitem_p.h \ | |
47 | $$PWD/chartpresenter_p.h \ |
|
47 | $$PWD/chartpresenter_p.h \ | |
48 | $$PWD/chartthememanager_p.h \ |
|
48 | $$PWD/chartthememanager_p.h \ | |
49 | $$PWD/chartbackground_p.h \ |
|
49 | $$PWD/chartbackground_p.h \ | |
50 | $$PWD/chartelement_p.h \ |
|
50 | $$PWD/chartelement_p.h \ | |
51 | $$PWD/chartconfig_p.h \ |
|
51 | $$PWD/chartconfig_p.h \ | |
52 | $$PWD/qchart_p.h \ |
|
52 | $$PWD/qchart_p.h \ | |
53 | $$PWD/qchartview_p.h \ |
|
53 | $$PWD/qchartview_p.h \ | |
54 | $$PWD/scroller_p.h \ |
|
54 | $$PWD/scroller_p.h \ | |
55 | $$PWD/qabstractseries_p.h \ |
|
55 | $$PWD/qabstractseries_p.h \ | |
56 | $$PWD/charttitle_p.h \ |
|
56 | $$PWD/charttitle_p.h \ | |
57 | $$PWD/charthelpers_p.h |
|
57 | $$PWD/charthelpers_p.h | |
58 | PUBLIC_HEADERS += \ |
|
58 | PUBLIC_HEADERS += \ | |
59 | $$PWD/qchart.h \ |
|
59 | $$PWD/qchart.h \ | |
60 | $$PWD/qchartglobal.h \ |
|
60 | $$PWD/qchartglobal.h \ | |
61 | $$PWD/qabstractseries.h \ |
|
61 | $$PWD/qabstractseries.h \ | |
62 | $$PWD/qchartview.h \ |
|
62 | $$PWD/qchartview.h \ | |
63 | $$PWD/chartsnamespace.h \ |
|
63 | $$PWD/chartsnamespace.h \ | |
64 | $$PWD/qpolarchart.h |
|
64 | $$PWD/qpolarchart.h | |
65 |
|
65 | |||
66 | include(animations/animations.pri) |
|
66 | include(animations/animations.pri) | |
67 | include(areachart/areachart.pri) |
|
67 | include(areachart/areachart.pri) | |
68 | include(axis/axis.pri) |
|
68 | include(axis/axis.pri) | |
69 | include(domain/domain.pri) |
|
69 | include(domain/domain.pri) | |
70 | include(barchart/barchart.pri) |
|
70 | include(barchart/barchart.pri) | |
71 | include(legend/legend.pri) |
|
71 | include(legend/legend.pri) | |
72 | include(linechart/linechart.pri) |
|
72 | include(linechart/linechart.pri) | |
73 | include(piechart/piechart.pri) |
|
73 | include(piechart/piechart.pri) | |
74 | include(scatterchart/scatter.pri) |
|
74 | include(scatterchart/scatter.pri) | |
75 | include(splinechart/splinechart.pri) |
|
75 | include(splinechart/splinechart.pri) | |
76 | include(themes/themes.pri) |
|
76 | include(themes/themes.pri) | |
77 | include(xychart/xychart.pri) |
|
77 | include(xychart/xychart.pri) | |
78 | include(layout/layout.pri) |
|
78 | include(layout/layout.pri) | |
79 | include(boxplotchart/boxplotchart.pri) |
|
79 | include(boxplotchart/boxplotchart.pri) | |
80 |
|
80 | |||
81 | HEADERS += $$PUBLIC_HEADERS |
|
81 | HEADERS += $$PUBLIC_HEADERS | |
82 | HEADERS += $$PRIVATE_HEADERS |
|
82 | HEADERS += $$PRIVATE_HEADERS | |
83 | HEADERS += $$THEMES |
|
83 | HEADERS += $$THEMES | |
84 |
|
84 | |||
85 | ############################# BUILD PATH ########################################## |
|
85 | ############################# BUILD PATH ########################################## | |
86 |
|
86 | |||
87 | OBJECTS_DIR = $$CHART_BUILD_DIR/lib |
|
87 | OBJECTS_DIR = $$CHART_BUILD_DIR/lib | |
88 | MOC_DIR = $$CHART_BUILD_DIR/lib |
|
88 | MOC_DIR = $$CHART_BUILD_DIR/lib | |
89 | UI_DIR = $$CHART_BUILD_DIR/lib |
|
89 | UI_DIR = $$CHART_BUILD_DIR/lib | |
90 | RCC_DIR = $$CHART_BUILD_DIR/lib |
|
90 | RCC_DIR = $$CHART_BUILD_DIR/lib | |
91 |
|
91 | |||
92 | ############################# PUBLIC HEADERS GENERATOR ########################################## |
|
92 | ############################# PUBLIC HEADERS GENERATOR ########################################## | |
93 |
|
93 | |||
94 | !exists($$CHART_BUILD_PUBLIC_HEADER_DIR/QChartGlobal) |
|
94 | !exists($$CHART_BUILD_PUBLIC_HEADER_DIR/QChartGlobal) | |
95 | { |
|
95 | { | |
96 | system($$QMAKE_MKDIR $$CHART_BUILD_PUBLIC_HEADER_DIR) |
|
96 | system($$QMAKE_MKDIR $$CHART_BUILD_PUBLIC_HEADER_DIR) | |
97 | contains(QMAKE_HOST.os, Windows) { |
|
97 | contains(QMAKE_HOST.os, Windows) { | |
98 | command = "echo $${LITERAL_HASH}include \"qchartglobal.h\" > $$CHART_BUILD_PUBLIC_HEADER_DIR/QChartGlobal" |
|
98 | command = "echo $${LITERAL_HASH}include \"qchartglobal.h\" > $$CHART_BUILD_PUBLIC_HEADER_DIR/QChartGlobal" | |
99 | }else{ |
|
99 | }else{ | |
100 | command = "echo \"$${LITERAL_HASH}include \\\"qchartglobal.h\\\"\" > $$CHART_BUILD_PUBLIC_HEADER_DIR/QChartGlobal" |
|
100 | command = "echo \"$${LITERAL_HASH}include \\\"qchartglobal.h\\\"\" > $$CHART_BUILD_PUBLIC_HEADER_DIR/QChartGlobal" | |
101 | } |
|
101 | } | |
102 | PUBLIC_QT_HEADERS += $$CHART_BUILD_PUBLIC_HEADER_DIR/QChartGlobal |
|
102 | PUBLIC_QT_HEADERS += $$CHART_BUILD_PUBLIC_HEADER_DIR/QChartGlobal | |
103 | system($$command) |
|
103 | system($$command) | |
104 | } |
|
104 | } | |
105 |
|
105 | |||
106 | for(file, PUBLIC_HEADERS) { |
|
106 | for(file, PUBLIC_HEADERS) { | |
107 | name = $$split(file,'/') |
|
107 | name = $$split(file,'/') | |
108 | last_name = $$last(name) |
|
108 | last_name = $$last(name) | |
109 | class = "$$cat($$file)" |
|
109 | class = "$$cat($$file)" | |
110 | found_class = $$find(class,class) |
|
110 | found_class = $$find(class,class) | |
111 | !isEmpty(found_class){ |
|
111 | !isEmpty(found_class){ | |
112 | split_class = $$split(found_class,QTCOMMERCIALCHART_EXPORT) |
|
112 | split_class = $$split(found_class,QTCOMMERCIALCHART_EXPORT) | |
113 | member_class = $$member(split_class,1) |
|
113 | member_class = $$member(split_class,1) | |
114 | member_split_class = $$split(member_class,' ') |
|
114 | member_split_class = $$split(member_class,' ') | |
115 | modified_class = $$replace(member_split_class,' ','') |
|
115 | modified_class = $$replace(member_split_class,' ','') | |
116 | final_class = $$member(modified_class,0) |
|
116 | final_class = $$member(modified_class,0) | |
117 | contains(QMAKE_HOST.os, Windows) { |
|
117 | contains(QMAKE_HOST.os, Windows) { | |
118 | command = "echo $${LITERAL_HASH}include \"$$last_name\" > $$CHART_BUILD_PUBLIC_HEADER_DIR/$$final_class" |
|
118 | command = "echo $${LITERAL_HASH}include \"$$last_name\" > $$CHART_BUILD_PUBLIC_HEADER_DIR/$$final_class" | |
119 | }else{ |
|
119 | }else{ | |
120 | command = "echo \"$${LITERAL_HASH}include \\\"$$last_name\\\"\" > $$CHART_BUILD_PUBLIC_HEADER_DIR/$$final_class" |
|
120 | command = "echo \"$${LITERAL_HASH}include \\\"$$last_name\\\"\" > $$CHART_BUILD_PUBLIC_HEADER_DIR/$$final_class" | |
121 | } |
|
121 | } | |
122 | PUBLIC_QT_HEADERS += $$CHART_BUILD_PUBLIC_HEADER_DIR/$$final_class |
|
122 | PUBLIC_QT_HEADERS += $$CHART_BUILD_PUBLIC_HEADER_DIR/$$final_class | |
123 | system($$command) |
|
123 | system($$command) | |
124 | } |
|
124 | } | |
125 | unset(name) |
|
125 | unset(name) | |
126 | unset(last_name) |
|
126 | unset(last_name) | |
127 | unset(class) |
|
127 | unset(class) | |
128 | unset(found_class) |
|
128 | unset(found_class) | |
129 | unset(split_class) |
|
129 | unset(split_class) | |
130 | unset(member_class) |
|
130 | unset(member_class) | |
131 | unset(member_split_class) |
|
131 | unset(member_split_class) | |
132 | unset(modified_class) |
|
132 | unset(modified_class) | |
133 | unset(final_class) |
|
133 | unset(final_class) | |
134 | } |
|
134 | } | |
135 |
|
135 | |||
136 | ############################# INSTALLERS ########################################## |
|
136 | ############################# INSTALLERS ########################################## | |
137 |
|
137 | |||
138 | public_headers.path = $$[QT_INSTALL_HEADERS]/QtCommercialChart |
|
138 | public_headers.path = $$[QT_INSTALL_HEADERS]/QtCommercialChart | |
139 | public_headers.files = $$PUBLIC_HEADERS $$PUBLIC_QT_HEADERS |
|
139 | public_headers.files = $$PUBLIC_HEADERS $$PUBLIC_QT_HEADERS | |
140 | INSTALLS += public_headers |
|
140 | INSTALLS += public_headers | |
141 |
|
141 | |||
142 | install_build_public_headers.name = build_public_headers |
|
142 | install_build_public_headers.name = build_public_headers | |
143 | install_build_public_headers.output = $$CHART_BUILD_PUBLIC_HEADER_DIR/${QMAKE_FILE_BASE}.h |
|
143 | install_build_public_headers.output = $$CHART_BUILD_PUBLIC_HEADER_DIR/${QMAKE_FILE_BASE}.h | |
144 | install_build_public_headers.input = PUBLIC_HEADERS |
|
144 | install_build_public_headers.input = PUBLIC_HEADERS | |
145 | install_build_public_headers.commands = $$QMAKE_COPY \ |
|
145 | install_build_public_headers.commands = $$QMAKE_COPY \ | |
146 | ${QMAKE_FILE_NAME} \ |
|
146 | ${QMAKE_FILE_NAME} \ | |
147 | $$CHART_BUILD_PUBLIC_HEADER_DIR |
|
147 | $$CHART_BUILD_PUBLIC_HEADER_DIR | |
148 | install_build_public_headers.CONFIG += target_predeps \ |
|
148 | install_build_public_headers.CONFIG += target_predeps \ | |
149 | no_link |
|
149 | no_link | |
150 |
|
150 | |||
151 | install_build_private_headers.name = build_private_headers |
|
151 | install_build_private_headers.name = build_private_headers | |
152 | install_build_private_headers.output = $$CHART_BUILD_PRIVATE_HEADER_DIR/${QMAKE_FILE_BASE}.h |
|
152 | install_build_private_headers.output = $$CHART_BUILD_PRIVATE_HEADER_DIR/${QMAKE_FILE_BASE}.h | |
153 | install_build_private_headers.input = PRIVATE_HEADERS |
|
153 | install_build_private_headers.input = PRIVATE_HEADERS | |
154 | install_build_private_headers.commands = $$QMAKE_COPY \ |
|
154 | install_build_private_headers.commands = $$QMAKE_COPY \ | |
155 | ${QMAKE_FILE_NAME} \ |
|
155 | ${QMAKE_FILE_NAME} \ | |
156 | $$CHART_BUILD_PRIVATE_HEADER_DIR |
|
156 | $$CHART_BUILD_PRIVATE_HEADER_DIR | |
157 | install_build_private_headers.CONFIG += target_predeps \ |
|
157 | install_build_private_headers.CONFIG += target_predeps \ | |
158 | no_link |
|
158 | no_link | |
159 |
|
159 | |||
160 | QMAKE_EXTRA_COMPILERS += install_build_public_headers \ |
|
160 | QMAKE_EXTRA_COMPILERS += install_build_public_headers \ | |
161 | install_build_private_headers \ |
|
161 | install_build_private_headers \ | |
162 |
|
162 | |||
163 | win32:{ |
|
163 | win32:{ | |
164 | bintarget.CONFIG += no_check_exist |
|
164 | bintarget.CONFIG += no_check_exist | |
165 | !staticlib: { |
|
165 | !staticlib: { | |
166 | bintarget.files += $$CHART_BUILD_LIB_DIR\\$${TARGET}.dll |
|
166 | bintarget.files += $$CHART_BUILD_LIB_DIR\\$${TARGET}.dll | |
167 | } |
|
167 | } | |
168 | win32-msvc*:CONFIG(debug, debug|release): { |
|
168 | win32-msvc*:CONFIG(debug, debug|release): { | |
169 | bintarget.files += $$CHART_BUILD_LIB_DIR\\$${TARGET}.pdb |
|
169 | bintarget.files += $$CHART_BUILD_LIB_DIR\\$${TARGET}.pdb | |
170 | } |
|
170 | } | |
171 | bintarget.path = $$[QT_INSTALL_BINS] |
|
171 | bintarget.path = $$[QT_INSTALL_BINS] | |
172 |
|
172 | |||
173 | libtarget.CONFIG += no_check_exist |
|
173 | libtarget.CONFIG += no_check_exist | |
174 | libtarget.files = $$CHART_BUILD_LIB_DIR\\$${TARGET}.prl |
|
174 | libtarget.files = $$CHART_BUILD_LIB_DIR\\$${TARGET}.prl | |
175 | win32-msvc*: { |
|
175 | win32-msvc*: { | |
176 | libtarget.files += $$CHART_BUILD_LIB_DIR\\$${TARGET}.lib |
|
176 | libtarget.files += $$CHART_BUILD_LIB_DIR\\$${TARGET}.lib | |
177 | } else { |
|
177 | } else { | |
178 | libtarget.files += $$CHART_BUILD_LIB_DIR\\lib$${TARGET}.a |
|
178 | libtarget.files += $$CHART_BUILD_LIB_DIR\\lib$${TARGET}.a | |
179 | } |
|
179 | } | |
180 | libtarget.path = $$[QT_INSTALL_LIBS] |
|
180 | libtarget.path = $$[QT_INSTALL_LIBS] | |
181 |
|
181 | |||
182 | DLLDESTDIR = $$CHART_BUILD_BIN_DIR |
|
182 | DLLDESTDIR = $$CHART_BUILD_BIN_DIR | |
183 | INSTALLS += bintarget libtarget |
|
183 | INSTALLS += bintarget libtarget | |
184 | }else{ |
|
184 | }else{ | |
185 | target.path=$$[QT_INSTALL_LIBS] |
|
185 | target.path=$$[QT_INSTALL_LIBS] | |
186 | INSTALLS += target |
|
186 | INSTALLS += target | |
187 | } |
|
187 | } | |
188 |
|
188 | |||
189 |
mac: !staticlib |
|
189 | mac: !static:!staticlib { | |
190 | # Update the name (id) of the library on OSX to point to the lib path |
|
190 | # Update the name (id) of the library on OSX to point to the lib path | |
191 | MAC_CHARTS_LIB_NAME = "lib"$$LIBRARY_NAME".1.dylib" |
|
191 | MAC_CHARTS_LIB_NAME = "lib"$$LIBRARY_NAME".1.dylib" | |
192 | QMAKE_POST_LINK += "install_name_tool -id $$CHART_BUILD_LIB_DIR"/"$$MAC_CHARTS_LIB_NAME $$CHART_BUILD_LIB_DIR"/"$$MAC_CHARTS_LIB_NAME" |
|
192 | QMAKE_POST_LINK += "install_name_tool -id $$CHART_BUILD_LIB_DIR"/"$$MAC_CHARTS_LIB_NAME $$CHART_BUILD_LIB_DIR"/"$$MAC_CHARTS_LIB_NAME" | |
193 |
|
193 | |||
194 | # Update the name (id) of the installed library on OSX to point to the installation path |
|
194 | # Update the name (id) of the installed library on OSX to point to the installation path | |
195 | postinstall.path = $$[QT_INSTALL_LIBS] |
|
195 | postinstall.path = $$[QT_INSTALL_LIBS] | |
196 | postinstall.extra = "install_name_tool -id $(INSTALL_ROOT)"/"$$[QT_INSTALL_LIBS]"/"$$MAC_CHARTS_LIB_NAME $(INSTALL_ROOT)"/"$$[QT_INSTALL_LIBS]"/"$$MAC_CHARTS_LIB_NAME" |
|
196 | postinstall.extra = "install_name_tool -id $(INSTALL_ROOT)"/"$$[QT_INSTALL_LIBS]"/"$$MAC_CHARTS_LIB_NAME $(INSTALL_ROOT)"/"$$[QT_INSTALL_LIBS]"/"$$MAC_CHARTS_LIB_NAME" | |
197 | INSTALLS += postinstall |
|
197 | INSTALLS += postinstall | |
198 | } |
|
198 | } | |
199 |
|
199 | |||
200 | ################################ DEVELOPMENT BUILD ########################################## |
|
200 | ################################ DEVELOPMENT BUILD ########################################## | |
201 | # There is a problem with jom.exe currently. It does not seem to understand QMAKE_EXTRA_TARGETS properly. |
|
201 | # There is a problem with jom.exe currently. It does not seem to understand QMAKE_EXTRA_TARGETS properly. | |
202 | # This is the case at least with shadow builds. |
|
202 | # This is the case at least with shadow builds. | |
203 | # http://qt-project.org/wiki/jom |
|
203 | # http://qt-project.org/wiki/jom | |
204 |
|
204 | |||
205 | development_build:!win32-msvc*:{ |
|
205 | development_build:!win32-msvc*:{ | |
206 | chartversion.target = $$PWD/qchartversion_p.h |
|
206 | chartversion.target = $$PWD/qchartversion_p.h | |
207 |
|
207 | |||
208 | unix:{ |
|
208 | unix:{ | |
209 | chartversion.commands = @echo \ |
|
209 | chartversion.commands = @echo \ | |
210 | \" $${LITERAL_HASH}ifndef QCHARTVERSION_P_H\\n\ |
|
210 | \" $${LITERAL_HASH}ifndef QCHARTVERSION_P_H\\n\ | |
211 | $${LITERAL_HASH}define QCHARTVERSION_P_H\\n\ |
|
211 | $${LITERAL_HASH}define QCHARTVERSION_P_H\\n\ | |
212 | const char *buildTime = \\\"`date +'%y%m%d%H%M'`\\\" ; \\n\ |
|
212 | const char *buildTime = \\\"`date +'%y%m%d%H%M'`\\\" ; \\n\ | |
213 | const char *gitHead = \\\"`git rev-parse HEAD`\\\" ; \\n \ |
|
213 | const char *gitHead = \\\"`git rev-parse HEAD`\\\" ; \\n \ | |
214 | $${LITERAL_HASH}endif \" \ |
|
214 | $${LITERAL_HASH}endif \" \ | |
215 | > \ |
|
215 | > \ | |
216 | $$chartversion.target; |
|
216 | $$chartversion.target; | |
217 | }else{ |
|
217 | }else{ | |
218 | chartversion.commands = @echo \ |
|
218 | chartversion.commands = @echo \ | |
219 | "const char *buildTime = \"%date%_%time%\" ; \ |
|
219 | "const char *buildTime = \"%date%_%time%\" ; \ | |
220 | const char *gitHead = \"unknown\" ; " \ |
|
220 | const char *gitHead = \"unknown\" ; " \ | |
221 | > \ |
|
221 | > \ | |
222 | $$chartversion.target |
|
222 | $$chartversion.target | |
223 | } |
|
223 | } | |
224 |
|
224 | |||
225 | chartversion.depends = $$HEADERS \ |
|
225 | chartversion.depends = $$HEADERS \ | |
226 | $$SOURCES |
|
226 | $$SOURCES | |
227 |
|
227 | |||
228 | PRE_TARGETDEPS += $$chartversion.target |
|
228 | PRE_TARGETDEPS += $$chartversion.target | |
229 | QMAKE_CLEAN += $$PWD/qchartversion_p.h |
|
229 | QMAKE_CLEAN += $$PWD/qchartversion_p.h | |
230 | QMAKE_EXTRA_TARGETS += chartversion |
|
230 | QMAKE_EXTRA_TARGETS += chartversion | |
231 | } |
|
231 | } | |
232 |
|
232 | |||
233 | ############################### CLEAN ########################################### |
|
233 | ############################### CLEAN ########################################### | |
234 |
|
234 | |||
235 | unix:QMAKE_DISTCLEAN += -r \ |
|
235 | unix:QMAKE_DISTCLEAN += -r \ | |
236 | $$CHART_BUILD_HEADER_DIR \ |
|
236 | $$CHART_BUILD_HEADER_DIR \ | |
237 | $$CHART_BUILD_LIB_DIR |
|
237 | $$CHART_BUILD_LIB_DIR | |
238 | win32:QMAKE_DISTCLEAN += /Q \ |
|
238 | win32:QMAKE_DISTCLEAN += /Q \ | |
239 | $$CHART_BUILD_HEADER_DIR \ |
|
239 | $$CHART_BUILD_HEADER_DIR \ | |
240 | $$CHART_BUILD_LIB_DIR |
|
240 | $$CHART_BUILD_LIB_DIR | |
241 |
|
241 | |||
242 | ############################## COVERAGE ######################################### |
|
242 | ############################## COVERAGE ######################################### | |
243 |
|
243 | |||
244 | unix:coverage:{ |
|
244 | unix:coverage:{ | |
245 |
|
245 | |||
246 | QMAKE_CXXFLAGS += -fprofile-arcs -ftest-coverage |
|
246 | QMAKE_CXXFLAGS += -fprofile-arcs -ftest-coverage | |
247 | QMAKE_LDFLAGS += -fprofile-arcs -ftest-coverage |
|
247 | QMAKE_LDFLAGS += -fprofile-arcs -ftest-coverage | |
248 |
|
248 | |||
249 | LIBS += -lgcov |
|
249 | LIBS += -lgcov | |
250 |
|
250 | |||
251 | QMAKE_CLEAN += $$OBJECTS_DIR/*.gcda $$OBJECTS_DIR/*.gcno $$PWD/*.gcov ../coverage/*.info |
|
251 | QMAKE_CLEAN += $$OBJECTS_DIR/*.gcda $$OBJECTS_DIR/*.gcno $$PWD/*.gcov ../coverage/*.info | |
252 | QMAKE_EXTRA_TARGETS += preparecoverage gencoverage |
|
252 | QMAKE_EXTRA_TARGETS += preparecoverage gencoverage | |
253 |
|
253 | |||
254 | preparecoverage.target = prepare_coverage |
|
254 | preparecoverage.target = prepare_coverage | |
255 | preparecoverage.depends = all |
|
255 | preparecoverage.depends = all | |
256 | preparecoverage.commands = lcov --directory $$OBJECTS_DIR --zerocounters ;\ |
|
256 | preparecoverage.commands = lcov --directory $$OBJECTS_DIR --zerocounters ;\ | |
257 | lcov -i -d $$OBJECTS_DIR -c -o ../coverage/base.info -b $$PWD; |
|
257 | lcov -i -d $$OBJECTS_DIR -c -o ../coverage/base.info -b $$PWD; | |
258 |
|
258 | |||
259 | gencoverage.target = gen_coverage |
|
259 | gencoverage.target = gen_coverage | |
260 | gencoverage.depends = all |
|
260 | gencoverage.depends = all | |
261 | gencoverage.commands = lcov -d $$OBJECTS_DIR -c -o ../coverage/src.info -b $$PWD;\ |
|
261 | gencoverage.commands = lcov -d $$OBJECTS_DIR -c -o ../coverage/src.info -b $$PWD;\ | |
262 | lcov -e ../coverage/base.info $$PWD/* $$PWD/animations/* $$PWD/areachart/* $$PWD/axis/* $$PWD/barchart/* $$PWD/legend/* $$PWD/linechart/* $$PWD/piechart/* $$PWD/scatterchart/* $$PWD/splinechart/* $$PWD/themes/* $$PWD/xychart/* -o ../coverage/base.info;\ |
|
262 | lcov -e ../coverage/base.info $$PWD/* $$PWD/animations/* $$PWD/areachart/* $$PWD/axis/* $$PWD/barchart/* $$PWD/legend/* $$PWD/linechart/* $$PWD/piechart/* $$PWD/scatterchart/* $$PWD/splinechart/* $$PWD/themes/* $$PWD/xychart/* -o ../coverage/base.info;\ | |
263 | lcov -e ../coverage/src.info $$PWD/* $$PWD/animations/* $$PWD/areachart/* $$PWD/axis/* $$PWD/barchart/* $$PWD/legend/* $$PWD/linechart/* $$PWD/piechart/* $$PWD/scatterchart/* $$PWD/splinechart/* $$PWD/themes/* $$PWD/xychart/* -o ../coverage/src.info;\ |
|
263 | lcov -e ../coverage/src.info $$PWD/* $$PWD/animations/* $$PWD/areachart/* $$PWD/axis/* $$PWD/barchart/* $$PWD/legend/* $$PWD/linechart/* $$PWD/piechart/* $$PWD/scatterchart/* $$PWD/splinechart/* $$PWD/themes/* $$PWD/xychart/* -o ../coverage/src.info;\ | |
264 | lcov -a ../coverage/base.info -a ../coverage/src.info -o ../coverage/coverage.info; |
|
264 | lcov -a ../coverage/base.info -a ../coverage/src.info -o ../coverage/coverage.info; | |
265 | } |
|
265 | } | |
266 |
|
266 |
General Comments 0
You need to be logged in to leave comments.
Login now