@@ -0,0 +1,63 | |||||
|
1 | #include "qchartglobal.h" | |||
|
2 | #include "legendmarker_p.h" | |||
|
3 | #include <QPainter> | |||
|
4 | #include <QGraphicsSceneEvent> | |||
|
5 | ||||
|
6 | QTCOMMERCIALCHART_BEGIN_NAMESPACE | |||
|
7 | ||||
|
8 | LegendMarker::LegendMarker(QSeries* series, QGraphicsItem *parent) | |||
|
9 | : QGraphicsObject(parent) | |||
|
10 | ,mSeries(series) | |||
|
11 | ,mBoundingRect(0,0,1,1) | |||
|
12 | { | |||
|
13 | setAcceptedMouseButtons(Qt::LeftButton|Qt::RightButton); | |||
|
14 | } | |||
|
15 | ||||
|
16 | void LegendMarker::setBoundingRect(const QRectF rect) | |||
|
17 | { | |||
|
18 | mBoundingRect = rect; | |||
|
19 | } | |||
|
20 | ||||
|
21 | void LegendMarker::setBrush(const QBrush brush) | |||
|
22 | { | |||
|
23 | mBrush = brush; | |||
|
24 | } | |||
|
25 | ||||
|
26 | void LegendMarker::setName(const QString name) | |||
|
27 | { | |||
|
28 | mName = name; | |||
|
29 | } | |||
|
30 | ||||
|
31 | QString LegendMarker::name() const | |||
|
32 | { | |||
|
33 | return mName; | |||
|
34 | } | |||
|
35 | ||||
|
36 | QColor LegendMarker::color() const | |||
|
37 | { | |||
|
38 | return mBrush.color(); | |||
|
39 | } | |||
|
40 | ||||
|
41 | void LegendMarker::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) | |||
|
42 | { | |||
|
43 | painter->setBrush(mBrush); | |||
|
44 | painter->drawRect(mBoundingRect); | |||
|
45 | } | |||
|
46 | ||||
|
47 | QRectF LegendMarker::boundingRect() const | |||
|
48 | { | |||
|
49 | return mBoundingRect; | |||
|
50 | } | |||
|
51 | ||||
|
52 | void LegendMarker::mousePressEvent(QGraphicsSceneMouseEvent *event) | |||
|
53 | { | |||
|
54 | if (event->button() == Qt::LeftButton) { | |||
|
55 | emit clicked(mSeries, mName); | |||
|
56 | } else if (event->button() == Qt::RightButton) { | |||
|
57 | emit rightClicked(mSeries, mName); | |||
|
58 | } | |||
|
59 | } | |||
|
60 | ||||
|
61 | #include "moc_legendmarker_p.cpp" | |||
|
62 | ||||
|
63 | QTCOMMERCIALCHART_END_NAMESPACE |
@@ -0,0 +1,44 | |||||
|
1 | #ifndef LEGENDMARKER_P_H | |||
|
2 | #define LEGENDMARKER_P_H | |||
|
3 | ||||
|
4 | #include "qchartglobal.h" | |||
|
5 | #include <QGraphicsObject> | |||
|
6 | #include <QBrush> | |||
|
7 | ||||
|
8 | QTCOMMERCIALCHART_BEGIN_NAMESPACE | |||
|
9 | ||||
|
10 | class QSeries; | |||
|
11 | ||||
|
12 | ||||
|
13 | class LegendMarker : public QGraphicsObject | |||
|
14 | { | |||
|
15 | Q_OBJECT | |||
|
16 | public: | |||
|
17 | LegendMarker(QSeries* series, QGraphicsItem *parent = 0); | |||
|
18 | void setBoundingRect(const QRectF rect); | |||
|
19 | void setBrush(const QBrush brush); | |||
|
20 | void setName(const QString name); | |||
|
21 | QString name() const; | |||
|
22 | QColor color() const; | |||
|
23 | ||||
|
24 | void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0); | |||
|
25 | ||||
|
26 | QRectF boundingRect() const; | |||
|
27 | ||||
|
28 | public: | |||
|
29 | // From QGraphicsObject | |||
|
30 | void mousePressEvent(QGraphicsSceneMouseEvent *event); | |||
|
31 | ||||
|
32 | Q_SIGNALS: | |||
|
33 | void clicked(QSeries* series, QString name); | |||
|
34 | void rightClicked(QSeries* series, QString name); | |||
|
35 | ||||
|
36 | private: | |||
|
37 | QRectF mBoundingRect; | |||
|
38 | QBrush mBrush; | |||
|
39 | QString mName; | |||
|
40 | QSeries* mSeries; | |||
|
41 | }; | |||
|
42 | ||||
|
43 | QTCOMMERCIALCHART_END_NAMESPACE | |||
|
44 | #endif // LEGENDMARKER_P_H |
1 | NO CONTENT: modified file |
|
NO CONTENT: modified file |
@@ -1,140 +1,119 | |||||
1 | #include "qchartglobal.h" |
|
1 | #include "qchartglobal.h" | |
2 | #include "qlegend.h" |
|
2 | #include "qlegend.h" | |
3 | #include "qseries.h" |
|
3 | #include "qseries.h" | |
|
4 | #include "legendmarker_p.h" | |||
4 | #include <QPainter> |
|
5 | #include <QPainter> | |
5 | #include <QPen> |
|
6 | #include <QPen> | |
6 |
|
7 | |||
7 | QTCOMMERCIALCHART_BEGIN_NAMESPACE |
|
8 | #include <QGraphicsSceneEvent> | |
8 |
|
||||
9 | // TODO: this to legendmarker_p.h header |
|
|||
10 | class LegendMarker : public QGraphicsItem |
|
|||
11 | { |
|
|||
12 | public: |
|
|||
13 | LegendMarker(QGraphicsItem *parent = 0) : QGraphicsItem(parent) |
|
|||
14 | ,mBoundingRect(0,0,1,1) |
|
|||
15 | {} |
|
|||
16 |
|
||||
17 | void setBoundingRect(const QRectF rect) { mBoundingRect = rect; } |
|
|||
18 | void setBrush(const QBrush brush) { mBrush = brush; } |
|
|||
19 | void setName(const QString name) { mName = name; } |
|
|||
20 | QString name() const { return mName; } |
|
|||
21 | QColor color() const { return mBrush.color(); } |
|
|||
22 |
|
9 | |||
23 | void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0) |
|
10 | QTCOMMERCIALCHART_BEGIN_NAMESPACE | |
24 | { |
|
|||
25 | painter->setBrush(mBrush); |
|
|||
26 | painter->drawRect(mBoundingRect); |
|
|||
27 | } |
|
|||
28 |
|
||||
29 | QRectF boundingRect() const { return mBoundingRect; } |
|
|||
30 |
|
||||
31 | private: |
|
|||
32 | QRectF mBoundingRect; |
|
|||
33 | QBrush mBrush; |
|
|||
34 | QString mName; |
|
|||
35 | }; |
|
|||
36 |
|
11 | |||
37 | QLegend::QLegend(QGraphicsItem *parent) |
|
12 | QLegend::QLegend(QGraphicsItem *parent) | |
38 | : QGraphicsObject(parent) |
|
13 | : QGraphicsObject(parent) | |
39 | ,mBoundingRect(0,0,1,1) |
|
14 | ,mBoundingRect(0,0,1,1) | |
40 | ,mBackgroundBrush(Qt::darkGray) // TODO: from theme? |
|
15 | ,mBackgroundBrush(Qt::darkGray) // TODO: from theme? | |
41 | { |
|
16 | { | |
42 | } |
|
17 | } | |
43 |
|
18 | |||
44 | void QLegend::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) |
|
19 | void QLegend::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) | |
45 | { |
|
20 | { | |
46 | painter->setBrush(mBackgroundBrush); |
|
21 | painter->setBrush(mBackgroundBrush); | |
47 | painter->drawRect(mBoundingRect); |
|
22 | painter->drawRect(mBoundingRect); | |
48 |
|
23 | |||
49 | foreach(LegendMarker* m, mMarkers) { |
|
24 | foreach(LegendMarker* m, mMarkers) { | |
50 | QRectF r = m->boundingRect(); |
|
25 | QRectF r = m->boundingRect(); | |
51 | painter->setPen(m->color()); |
|
26 | painter->setPen(m->color()); | |
52 |
painter->drawText(r.x() + 2 |
|
27 | painter->drawText(r.x() + r.width()*2, r.y() + r.height(), m->name()); | |
53 | } |
|
28 | } | |
54 | } |
|
29 | } | |
55 |
|
30 | |||
56 | QRectF QLegend::boundingRect() const |
|
31 | QRectF QLegend::boundingRect() const | |
57 | { |
|
32 | { | |
58 | return mBoundingRect; |
|
33 | return mBoundingRect; | |
59 | } |
|
34 | } | |
60 |
|
35 | |||
61 | void QLegend::setBackgroundBrush(const QBrush& brush) |
|
36 | void QLegend::setBackgroundBrush(const QBrush& brush) | |
62 | { |
|
37 | { | |
63 | mBackgroundBrush = brush; |
|
38 | mBackgroundBrush = brush; | |
64 | } |
|
39 | } | |
65 |
|
40 | |||
66 | QBrush QLegend::backgroundBrush() const |
|
41 | QBrush QLegend::backgroundBrush() const | |
67 | { |
|
42 | { | |
68 | return mBackgroundBrush; |
|
43 | return mBackgroundBrush; | |
69 | } |
|
44 | } | |
70 |
|
45 | |||
71 | void QLegend::handleSeriesAdded(QSeries* series,Domain* domain) |
|
46 | void QLegend::handleSeriesAdded(QSeries* series,Domain* domain) | |
72 | { |
|
47 | { | |
73 | mSeriesList.append(series); |
|
48 | mSeriesList.append(series); | |
74 | dataChanged(); |
|
49 | dataChanged(); | |
75 | layoutChanged(); |
|
50 | layoutChanged(); | |
76 | } |
|
51 | } | |
77 |
|
52 | |||
78 | void QLegend::handleSeriesRemoved(QSeries* series) |
|
53 | void QLegend::handleSeriesRemoved(QSeries* series) | |
79 | { |
|
54 | { | |
80 | mSeriesList.removeOne(series); |
|
55 | mSeriesList.removeOne(series); | |
81 | dataChanged(); |
|
56 | dataChanged(); | |
82 | layoutChanged(); |
|
57 | layoutChanged(); | |
83 | } |
|
58 | } | |
84 |
|
59 | |||
85 | void QLegend::handleGeometryChanged(const QRectF& size) |
|
60 | void QLegend::handleGeometryChanged(const QRectF& size) | |
86 | { |
|
61 | { | |
87 | mBoundingRect = size; |
|
62 | mBoundingRect = size; | |
88 | layoutChanged(); |
|
63 | layoutChanged(); | |
89 | } |
|
64 | } | |
90 |
|
65 | |||
91 | void QLegend::dataChanged() |
|
66 | void QLegend::dataChanged() | |
92 | { |
|
67 | { | |
93 | foreach (QGraphicsItem* i, childItems()) { |
|
68 | foreach (LegendMarker* marker, mMarkers) { | |
94 | delete i; |
|
69 | disconnect(marker,SIGNAL(clicked(QSeries*,QString)),this,SIGNAL(clicked(QSeries*,QString))); | |
|
70 | disconnect(marker,SIGNAL(rightClicked(QSeries*,QString)),this,SIGNAL(rightClicked(QSeries*,QString))); | |||
|
71 | delete marker; | |||
95 | } |
|
72 | } | |
96 |
|
73 | |||
97 | mMarkers.clear(); |
|
74 | mMarkers.clear(); | |
98 |
|
75 | |||
99 | foreach (QSeries* s, mSeriesList) { |
|
76 | foreach (QSeries* s, mSeriesList) { | |
100 | for (int i=0; i<s->legendEntries().count(); i++) { |
|
77 | for (int i=0; i<s->legendEntries().count(); i++) { | |
101 | LegendMarker *marker = new LegendMarker(this); |
|
78 | LegendMarker *marker = new LegendMarker(s, this); | |
102 | marker->setBrush(s->legendEntries().at(i).mBrush); |
|
79 | marker->setBrush(s->legendEntries().at(i).mBrush); | |
103 | marker->setName(s->legendEntries().at(i).mName); |
|
80 | marker->setName(s->legendEntries().at(i).mName); | |
104 | mMarkers.append(marker); |
|
81 | mMarkers.append(marker); | |
105 |
|
|
82 | childItems().append(marker); | |
|
83 | connect(marker,SIGNAL(clicked(QSeries*,QString)),this,SIGNAL(clicked(QSeries*,QString))); | |||
|
84 | connect(marker,SIGNAL(rightClicked(QSeries*,QString)),this,SIGNAL(rightClicked(QSeries*,QString))); | |||
106 | } |
|
85 | } | |
107 | } |
|
86 | } | |
108 | } |
|
87 | } | |
109 |
|
88 | |||
110 | void QLegend::layoutChanged() |
|
89 | void QLegend::layoutChanged() | |
111 | { |
|
90 | { | |
112 | // Calculate layout for markers and text |
|
91 | // Calculate layout for markers and text | |
113 | if (mMarkers.count() <= 0) { |
|
92 | if (mMarkers.count() <= 0) { | |
114 | // Nothing to do |
|
93 | // Nothing to do | |
115 | return; |
|
94 | return; | |
116 | } |
|
95 | } | |
117 |
|
96 | |||
118 | // TODO: marker defined by series. |
|
97 | // TODO: marker defined by series. | |
119 | QSizeF markerSize(10,10); |
|
98 | QSizeF markerSize(10,10); | |
120 |
|
99 | |||
121 | // TODO: better layout, this is just concept. |
|
100 | // TODO: better layout, this is just concept. | |
122 | // Leave some space around markers like this: | x x x x | |
|
101 | // Leave some space around markers like this: | x x x x | | |
123 | qreal steps = mMarkers.count(); |
|
102 | qreal steps = mMarkers.count(); | |
124 |
|
103 | |||
125 | qreal xStep = mBoundingRect.width() / steps; |
|
104 | qreal xStep = mBoundingRect.width() / steps; | |
126 | qreal yStep = mBoundingRect.height() / steps; |
|
105 | qreal yStep = mBoundingRect.height() / steps; | |
127 | qreal x = mBoundingRect.x() + 5; |
|
106 | qreal x = mBoundingRect.x() + 5; | |
128 | qreal y = mBoundingRect.y() + (mBoundingRect.height() - markerSize.height())/2; |
|
107 | qreal y = mBoundingRect.y() + (mBoundingRect.height() - markerSize.height())/2; | |
129 | foreach (LegendMarker* m, mMarkers) { |
|
108 | foreach (LegendMarker* m, mMarkers) { | |
130 | qDebug() << "marker x:" << x; |
|
109 | qDebug() << "marker x:" << x; | |
131 | qDebug() << "marker y:" << y; |
|
110 | qDebug() << "marker y:" << y; | |
132 | m->setBoundingRect(QRectF(x,y,markerSize.width(),markerSize.height())); |
|
111 | m->setBoundingRect(QRectF(x,y,markerSize.width(),markerSize.height())); | |
133 | x += xStep; |
|
112 | x += xStep; | |
134 | } |
|
113 | } | |
135 | } |
|
114 | } | |
136 |
|
115 | |||
137 |
|
116 | |||
138 |
|
117 | |||
139 | #include "moc_qlegend.cpp" |
|
118 | #include "moc_qlegend.cpp" | |
140 | QTCOMMERCIALCHART_END_NAMESPACE |
|
119 | QTCOMMERCIALCHART_END_NAMESPACE |
@@ -1,46 +1,49 | |||||
1 | #ifndef QLEGEND_H |
|
1 | #ifndef QLEGEND_H | |
2 | #define QLEGEND_H |
|
2 | #define QLEGEND_H | |
3 |
|
3 | |||
4 | #include "qchartglobal.h" |
|
4 | #include "qchartglobal.h" | |
5 | #include "qseries.h" |
|
5 | #include "qseries.h" | |
6 | #include <QGraphicsObject> |
|
6 | #include <QGraphicsObject> | |
7 |
|
7 | |||
8 | QTCOMMERCIALCHART_BEGIN_NAMESPACE |
|
8 | QTCOMMERCIALCHART_BEGIN_NAMESPACE | |
9 |
|
9 | |||
10 | class Domain; |
|
10 | class Domain; | |
11 | class LegendMarker; |
|
11 | class LegendMarker; | |
12 |
|
12 | |||
13 | class QTCOMMERCIALCHART_EXPORT QLegend : public QGraphicsObject |
|
13 | class QTCOMMERCIALCHART_EXPORT QLegend : public QGraphicsObject | |
14 | { |
|
14 | { | |
15 | Q_OBJECT |
|
15 | Q_OBJECT | |
16 | public: |
|
16 | public: | |
17 |
|
17 | |||
18 | explicit QLegend(QGraphicsItem *parent = 0); |
|
18 | explicit QLegend(QGraphicsItem *parent = 0); | |
19 |
|
19 | |||
20 | void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0); |
|
20 | void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0); | |
21 | QRectF boundingRect() const; |
|
21 | QRectF boundingRect() const; | |
22 |
|
22 | |||
23 | void setBackgroundBrush(const QBrush& brush); |
|
23 | void setBackgroundBrush(const QBrush& brush); | |
24 | QBrush backgroundBrush() const; |
|
24 | QBrush backgroundBrush() const; | |
25 |
|
25 | |||
26 | signals: |
|
26 | signals: | |
|
27 | // for interactions. | |||
|
28 | void clicked(QSeries* series, QString name); | |||
|
29 | void rightClicked(QSeries* series, QString name); | |||
27 |
|
30 | |||
28 | public slots: |
|
31 | public slots: | |
29 | void handleSeriesAdded(QSeries* series,Domain* domain); |
|
32 | void handleSeriesAdded(QSeries* series,Domain* domain); | |
30 | void handleSeriesRemoved(QSeries* series); |
|
33 | void handleSeriesRemoved(QSeries* series); | |
31 | void handleGeometryChanged(const QRectF& size); |
|
34 | void handleGeometryChanged(const QRectF& size); | |
32 |
|
35 | |||
33 | private: |
|
36 | private: | |
34 | void dataChanged(); |
|
37 | void dataChanged(); | |
35 | void layoutChanged(); |
|
38 | void layoutChanged(); | |
36 |
|
39 | |||
37 | QRectF mBoundingRect; |
|
40 | QRectF mBoundingRect; | |
38 | QList<QSeries*> mSeriesList; |
|
41 | QList<QSeries*> mSeriesList; | |
39 | QList<LegendMarker*> mMarkers; |
|
42 | QList<LegendMarker*> mMarkers; | |
40 |
|
43 | |||
41 | QBrush mBackgroundBrush; |
|
44 | QBrush mBackgroundBrush; | |
42 | }; |
|
45 | }; | |
43 |
|
46 | |||
44 | QTCOMMERCIALCHART_END_NAMESPACE |
|
47 | QTCOMMERCIALCHART_END_NAMESPACE | |
45 |
|
48 | |||
46 | #endif // QLEGEND_H |
|
49 | #endif // QLEGEND_H |
@@ -1,96 +1,98 | |||||
1 | !include( ../common.pri ):error( Couldn't find the common.pri file! ) |
|
1 | !include( ../common.pri ):error( Couldn't find the common.pri file! ) | |
2 | TARGET = QtCommercialChart |
|
2 | TARGET = QtCommercialChart | |
3 | DESTDIR = $$CHART_BUILD_LIB_DIR |
|
3 | DESTDIR = $$CHART_BUILD_LIB_DIR | |
4 | TEMPLATE = lib |
|
4 | TEMPLATE = lib | |
5 | QT += core \ |
|
5 | QT += core \ | |
6 | gui |
|
6 | gui | |
7 | CONFIG += debug_and_release |
|
7 | CONFIG += debug_and_release | |
8 | CONFIG(debug, debug|release):TARGET = QtCommercialChartd |
|
8 | CONFIG(debug, debug|release):TARGET = QtCommercialChartd | |
9 | SOURCES += \ |
|
9 | SOURCES += \ | |
10 | chartdataset.cpp \ |
|
10 | chartdataset.cpp \ | |
11 | chartpresenter.cpp \ |
|
11 | chartpresenter.cpp \ | |
12 | charttheme.cpp \ |
|
12 | charttheme.cpp \ | |
13 | domain.cpp \ |
|
13 | domain.cpp \ | |
14 | qchart.cpp \ |
|
14 | qchart.cpp \ | |
15 | qchartview.cpp \ |
|
15 | qchartview.cpp \ | |
16 | qseries.cpp \ |
|
16 | qseries.cpp \ | |
17 | qlegend.cpp |
|
17 | qlegend.cpp \ | |
|
18 | legendmarker.cpp | |||
18 | PRIVATE_HEADERS += \ |
|
19 | PRIVATE_HEADERS += \ | |
19 | chartdataset_p.h \ |
|
20 | chartdataset_p.h \ | |
20 | chartitem_p.h \ |
|
21 | chartitem_p.h \ | |
21 | chartpresenter_p.h \ |
|
22 | chartpresenter_p.h \ | |
22 | charttheme_p.h \ |
|
23 | charttheme_p.h \ | |
23 | domain_p.h |
|
24 | domain_p.h \ | |
|
25 | legendmarker_p.h | |||
24 |
PUBLIC_HEADERS += \ |
|
26 | PUBLIC_HEADERS += \ | |
25 | qchart.h \ |
|
27 | qchart.h \ | |
26 | qchartglobal.h \ |
|
28 | qchartglobal.h \ | |
27 | qseries.h \ |
|
29 | qseries.h \ | |
28 | qchartview.h \ |
|
30 | qchartview.h \ | |
29 | qlegend.h |
|
31 | qlegend.h | |
30 |
|
32 | |||
31 | include(animations/animations.pri) |
|
33 | include(animations/animations.pri) | |
32 | include(axis/axis.pri) |
|
34 | include(axis/axis.pri) | |
33 | include(xychart/xychart.pri) |
|
35 | include(xychart/xychart.pri) | |
34 | include(linechart/linechart.pri) |
|
36 | include(linechart/linechart.pri) | |
35 | include(areachart/areachart.pri) |
|
37 | include(areachart/areachart.pri) | |
36 | include(barchart/barchart.pri) |
|
38 | include(barchart/barchart.pri) | |
37 | include(piechart/piechart.pri) |
|
39 | include(piechart/piechart.pri) | |
38 | include(scatterseries/scatter.pri) |
|
40 | include(scatterseries/scatter.pri) | |
39 | include(splinechart/splinechart.pri) |
|
41 | include(splinechart/splinechart.pri) | |
40 |
|
42 | |||
41 | THEMES += themes/chartthemedefault_p.h \ |
|
43 | THEMES += themes/chartthemedefault_p.h \ | |
42 | themes/chartthemeicy_p.h \ |
|
44 | themes/chartthemeicy_p.h \ | |
43 | themes/chartthemegrayscale_p.h \ |
|
45 | themes/chartthemegrayscale_p.h \ | |
44 | themes/chartthemescientific_p.h \ |
|
46 | themes/chartthemescientific_p.h \ | |
45 | themes/chartthemevanilla_p.h |
|
47 | themes/chartthemevanilla_p.h | |
46 | HEADERS += $$PUBLIC_HEADERS |
|
48 | HEADERS += $$PUBLIC_HEADERS | |
47 | HEADERS += $$PRIVATE_HEADERS |
|
49 | HEADERS += $$PRIVATE_HEADERS | |
48 | HEADERS += $$THEMES |
|
50 | HEADERS += $$THEMES | |
49 | INCLUDEPATH += linechart \ |
|
51 | INCLUDEPATH += linechart \ | |
50 | barchart \ |
|
52 | barchart \ | |
51 | themes \ |
|
53 | themes \ | |
52 | . |
|
54 | . | |
53 | OBJECTS_DIR = $$CHART_BUILD_DIR/lib |
|
55 | OBJECTS_DIR = $$CHART_BUILD_DIR/lib | |
54 | MOC_DIR = $$CHART_BUILD_DIR/lib |
|
56 | MOC_DIR = $$CHART_BUILD_DIR/lib | |
55 | UI_DIR = $$CHART_BUILD_DIR/lib |
|
57 | UI_DIR = $$CHART_BUILD_DIR/lib | |
56 | RCC_DIR = $$CHART_BUILD_DIR/lib |
|
58 | RCC_DIR = $$CHART_BUILD_DIR/lib | |
57 | DEFINES += QTCOMMERCIALCHART_LIBRARY |
|
59 | DEFINES += QTCOMMERCIALCHART_LIBRARY | |
58 | public_headers.path = $$[QT_INSTALL_HEADERS]/QtCommercialChart |
|
60 | public_headers.path = $$[QT_INSTALL_HEADERS]/QtCommercialChart | |
59 | public_headers.files = $$PUBLIC_HEADERS |
|
61 | public_headers.files = $$PUBLIC_HEADERS | |
60 | target.path = $$[QT_INSTALL_LIBS] |
|
62 | target.path = $$[QT_INSTALL_LIBS] | |
61 | INSTALLS += target \ |
|
63 | INSTALLS += target \ | |
62 | public_headers |
|
64 | public_headers | |
63 | install_build_public_headers.name = bild_public_headers |
|
65 | install_build_public_headers.name = bild_public_headers | |
64 | install_build_public_headers.output = $$CHART_BUILD_PUBLIC_HEADER_DIR/${QMAKE_FILE_BASE}.h |
|
66 | install_build_public_headers.output = $$CHART_BUILD_PUBLIC_HEADER_DIR/${QMAKE_FILE_BASE}.h | |
65 | install_build_public_headers.input = PUBLIC_HEADERS |
|
67 | install_build_public_headers.input = PUBLIC_HEADERS | |
66 | install_build_public_headers.commands = $$QMAKE_COPY \ |
|
68 | install_build_public_headers.commands = $$QMAKE_COPY \ | |
67 | ${QMAKE_FILE_NAME} \ |
|
69 | ${QMAKE_FILE_NAME} \ | |
68 | $$CHART_BUILD_PUBLIC_HEADER_DIR |
|
70 | $$CHART_BUILD_PUBLIC_HEADER_DIR | |
69 | install_build_public_headers.CONFIG += target_predeps \ |
|
71 | install_build_public_headers.CONFIG += target_predeps \ | |
70 | no_link |
|
72 | no_link | |
71 | install_build_private_headers.name = bild_private_headers |
|
73 | install_build_private_headers.name = bild_private_headers | |
72 | install_build_private_headers.output = $$CHART_BUILD_PRIVATE_HEADER_DIR/${QMAKE_FILE_BASE}.h |
|
74 | install_build_private_headers.output = $$CHART_BUILD_PRIVATE_HEADER_DIR/${QMAKE_FILE_BASE}.h | |
73 | install_build_private_headers.input = PRIVATE_HEADERS |
|
75 | install_build_private_headers.input = PRIVATE_HEADERS | |
74 | install_build_private_headers.commands = $$QMAKE_COPY \ |
|
76 | install_build_private_headers.commands = $$QMAKE_COPY \ | |
75 | ${QMAKE_FILE_NAME} \ |
|
77 | ${QMAKE_FILE_NAME} \ | |
76 | $$CHART_BUILD_PRIVATE_HEADER_DIR |
|
78 | $$CHART_BUILD_PRIVATE_HEADER_DIR | |
77 | install_build_private_headers.CONFIG += target_predeps \ |
|
79 | install_build_private_headers.CONFIG += target_predeps \ | |
78 | no_link |
|
80 | no_link | |
79 | QMAKE_EXTRA_COMPILERS += install_build_public_headers \ |
|
81 | QMAKE_EXTRA_COMPILERS += install_build_public_headers \ | |
80 | install_build_private_headers |
|
82 | install_build_private_headers | |
81 | chartversion.target = qchartversion_p.h |
|
83 | chartversion.target = qchartversion_p.h | |
82 | chartversion.commands = @echo \ |
|
84 | chartversion.commands = @echo \ | |
83 | "build_time" \ |
|
85 | "build_time" \ | |
84 | > \ |
|
86 | > \ | |
85 | $$chartversion.target; |
|
87 | $$chartversion.target; | |
86 | chartversion.depends = $$HEADERS \ |
|
88 | chartversion.depends = $$HEADERS \ | |
87 | $$SOURCES |
|
89 | $$SOURCES | |
88 | PRE_TARGETDEPS += qchartversion_p.h |
|
90 | PRE_TARGETDEPS += qchartversion_p.h | |
89 | QMAKE_CLEAN += qchartversion_p.h |
|
91 | QMAKE_CLEAN += qchartversion_p.h | |
90 | QMAKE_EXTRA_TARGETS += chartversion |
|
92 | QMAKE_EXTRA_TARGETS += chartversion | |
91 | unix:QMAKE_DISTCLEAN += -r \ |
|
93 | unix:QMAKE_DISTCLEAN += -r \ | |
92 | $$CHART_BUILD_HEADER_DIR \ |
|
94 | $$CHART_BUILD_HEADER_DIR \ | |
93 | $$CHART_BUILD_LIB_DIR |
|
95 | $$CHART_BUILD_LIB_DIR | |
94 | win32:QMAKE_DISTCLEAN += /Q \ |
|
96 | win32:QMAKE_DISTCLEAN += /Q \ | |
95 | $$CHART_BUILD_HEADER_DIR \ |
|
97 | $$CHART_BUILD_HEADER_DIR \ | |
96 | $$CHART_BUILD_LIB_DIR |
|
98 | $$CHART_BUILD_LIB_DIR |
General Comments 0
You need to be logged in to leave comments.
Login now