@@ -65,9 +65,8 QTCOMMERCIALCHART_BEGIN_NAMESPACE | |||||
65 | ChartTheme::ChartTheme(QChart::ChartTheme id) : |
|
65 | ChartTheme::ChartTheme(QChart::ChartTheme id) : | |
66 | m_masterFont(QFont("arial", 14)), |
|
66 | m_masterFont(QFont("arial", 14)), | |
67 | m_labelFont(QFont("arial", 10)), |
|
67 | m_labelFont(QFont("arial", 10)), | |
68 |
m_ |
|
68 | m_labelBrush(QColor(QRgb(0x000000))), | |
69 | m_axisLinePen(QPen(QRgb(0x000000))), |
|
69 | m_axisLinePen(QPen(QRgb(0x000000))), | |
70 | m_axisLabelBrush(QColor(QRgb(0x000000))), |
|
|||
71 | m_backgroundShadesPen(Qt::NoPen), |
|
70 | m_backgroundShadesPen(Qt::NoPen), | |
72 | m_backgroundShadesBrush(Qt::NoBrush), |
|
71 | m_backgroundShadesBrush(Qt::NoBrush), | |
73 | m_backgroundShades(BackgroundShadesNone), |
|
72 | m_backgroundShades(BackgroundShadesNone), | |
@@ -109,7 +108,7 void ChartTheme::decorate(QChart *chart) | |||||
109 | if(brush == chart->backgroundBrush() || m_force) |
|
108 | if(brush == chart->backgroundBrush() || m_force) | |
110 | chart->setBackgroundBrush(m_chartBackgroundGradient); |
|
109 | chart->setBackgroundBrush(m_chartBackgroundGradient); | |
111 | chart->setTitleFont(m_masterFont); |
|
110 | chart->setTitleFont(m_masterFont); | |
112 |
chart->setTitleBrush(m_ |
|
111 | chart->setTitleBrush(m_labelBrush); | |
113 | chart->setDropShadowEnabled(m_backgroundDropShadowEnabled); |
|
112 | chart->setDropShadowEnabled(m_backgroundDropShadowEnabled); | |
114 | } |
|
113 | } | |
115 |
|
114 | |||
@@ -125,12 +124,11 void ChartTheme::decorate(QLegend *legend) | |||||
125 | if (brush == legend->brush() || m_force) |
|
124 | if (brush == legend->brush() || m_force) | |
126 | legend->setBrush(m_chartBackgroundGradient); |
|
125 | legend->setBrush(m_chartBackgroundGradient); | |
127 |
|
126 | |||
128 | // TODO: should legend have own brush & font defined by theme? |
|
|||
129 | if (font == legend->font() || m_force) |
|
127 | if (font == legend->font() || m_force) | |
130 | legend->setFont(m_labelFont); |
|
128 | legend->setFont(m_labelFont); | |
131 |
|
129 | |||
132 | if (brush == legend->labelBrush() || m_force) |
|
130 | if (brush == legend->labelBrush() || m_force) | |
133 |
legend->setLabelBrush(m_ |
|
131 | legend->setLabelBrush(m_labelBrush); | |
134 | } |
|
132 | } | |
135 |
|
133 | |||
136 | void ChartTheme::decorate(QAreaSeries *series, int index) |
|
134 | void ChartTheme::decorate(QAreaSeries *series, int index) | |
@@ -241,7 +239,7 void ChartTheme::decorate(QPieSeries *series, int index) | |||||
241 | d->setBrush(brushColor, true); |
|
239 | d->setBrush(brushColor, true); | |
242 |
|
240 | |||
243 | if (d->m_data.m_labelBrush.isThemed() || m_force) |
|
241 | if (d->m_data.m_labelBrush.isThemed() || m_force) | |
244 |
d->setLabelBrush( |
|
242 | d->setLabelBrush(m_labelBrush.color(), true); | |
245 |
|
243 | |||
246 | if (d->m_data.m_labelFont.isThemed() || m_force) |
|
244 | if (d->m_data.m_labelFont.isThemed() || m_force) | |
247 | d->setLabelFont(m_labelFont, true); |
|
245 | d->setLabelFont(m_labelFont, true); | |
@@ -267,7 +265,7 void ChartTheme::decorate(QAxis *axis,bool axisX) | |||||
267 | if (axis->isAxisVisible()) { |
|
265 | if (axis->isAxisVisible()) { | |
268 |
|
266 | |||
269 | if(brush == axis->labelsBrush() || m_force){ |
|
267 | if(brush == axis->labelsBrush() || m_force){ | |
270 |
axis->setLabelsBrush(m_ |
|
268 | axis->setLabelsBrush(m_labelBrush); | |
271 | } |
|
269 | } | |
272 | if(pen == axis->labelsPen() || m_force){ |
|
270 | if(pen == axis->labelsPen() || m_force){ | |
273 | axis->setLabelsPen(Qt::NoPen); // NoPen for performance reasons |
|
271 | axis->setLabelsPen(Qt::NoPen); // NoPen for performance reasons |
@@ -95,9 +95,8 protected: | |||||
95 |
|
95 | |||
96 | QFont m_masterFont; |
|
96 | QFont m_masterFont; | |
97 | QFont m_labelFont; |
|
97 | QFont m_labelFont; | |
98 |
QBrush m_ |
|
98 | QBrush m_labelBrush; | |
99 | QPen m_axisLinePen; |
|
99 | QPen m_axisLinePen; | |
100 | QBrush m_axisLabelBrush; |
|
|||
101 | QPen m_backgroundShadesPen; |
|
100 | QPen m_backgroundShadesPen; | |
102 | QBrush m_backgroundShadesBrush; |
|
101 | QBrush m_backgroundShadesBrush; | |
103 | BackgroundShadesMode m_backgroundShades; |
|
102 | BackgroundShadesMode m_backgroundShades; |
@@ -52,13 +52,13 LegendMarker::LegendMarker(QAbstractSeries *series, QLegend *legend) : | |||||
52 |
|
52 | |||
53 | void LegendMarker::setPen(const QPen &pen) |
|
53 | void LegendMarker::setPen(const QPen &pen) | |
54 | { |
|
54 | { | |
55 |
m_ |
|
55 | m_rectItem->setPen(pen); | |
56 | updateLayout(); |
|
56 | updateLayout(); | |
57 | } |
|
57 | } | |
58 |
|
58 | |||
59 | QPen LegendMarker::pen() const |
|
59 | QPen LegendMarker::pen() const | |
60 | { |
|
60 | { | |
61 |
return m_ |
|
61 | return m_rectItem->pen(); | |
62 | } |
|
62 | } | |
63 |
|
63 | |||
64 | void LegendMarker::setBrush(const QBrush &brush) |
|
64 | void LegendMarker::setBrush(const QBrush &brush) | |
@@ -109,17 +109,6 QBrush LegendMarker::labelBrush() const | |||||
109 | return m_textItem->brush(); |
|
109 | return m_textItem->brush(); | |
110 | } |
|
110 | } | |
111 |
|
111 | |||
112 | void LegendMarker::setLabelPen(const QPen &pen) |
|
|||
113 | { |
|
|||
114 | m_textItem->setPen(pen); |
|
|||
115 | updateLayout(); |
|
|||
116 | } |
|
|||
117 |
|
||||
118 | QPen LegendMarker::labelPen() const |
|
|||
119 | { |
|
|||
120 | return m_textItem->pen(); |
|
|||
121 | } |
|
|||
122 |
|
||||
123 | void LegendMarker::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) |
|
112 | void LegendMarker::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) | |
124 | { |
|
113 | { | |
125 | Q_UNUSED(option) |
|
114 | Q_UNUSED(option) |
@@ -68,8 +68,6 public: | |||||
68 | QString label() const; |
|
68 | QString label() const; | |
69 | void setLabelBrush(const QBrush &brush); |
|
69 | void setLabelBrush(const QBrush &brush); | |
70 | QBrush labelBrush() const; |
|
70 | QBrush labelBrush() const; | |
71 | void setLabelPen(const QPen &pen); |
|
|||
72 | QPen labelPen() const; |
|
|||
73 |
|
71 | |||
74 | QAbstractSeries *series() const { return m_series;} |
|
72 | QAbstractSeries *series() const { return m_series;} | |
75 |
|
73 |
@@ -286,26 +286,11 QFont QLegend::font() const | |||||
286 | return d_ptr->m_font; |
|
286 | return d_ptr->m_font; | |
287 | } |
|
287 | } | |
288 |
|
288 | |||
289 | void QLegend::setLabelPen(const QPen &pen) |
|
|||
290 | { |
|
|||
291 | if (d_ptr->m_labelPen != pen) { |
|
|||
292 | d_ptr->setLabelPen(pen); |
|
|||
293 | emit labelPenChanged(pen); |
|
|||
294 | } |
|
|||
295 | } |
|
|||
296 |
|
||||
297 | QPen QLegend::labelPen() const |
|
|||
298 | { |
|
|||
299 | return d_ptr->m_labelPen; |
|
|||
300 | } |
|
|||
301 |
|
||||
302 | void QLegend::setLabelBrush(const QBrush &brush) |
|
289 | void QLegend::setLabelBrush(const QBrush &brush) | |
303 | { |
|
290 | { | |
304 | qDebug() << "setting legend brush 1"; |
|
|||
305 | if (d_ptr->m_labelBrush != brush) { |
|
291 | if (d_ptr->m_labelBrush != brush) { | |
306 | d_ptr->setLabelBrush(brush); |
|
292 | d_ptr->setLabelBrush(brush); | |
307 | emit labelBrushChanged(brush); |
|
293 | emit labelBrushChanged(brush); | |
308 | qDebug() << "setting legend brush 2"; |
|
|||
309 | } |
|
294 | } | |
310 | } |
|
295 | } | |
311 |
|
296 | |||
@@ -440,7 +425,6 QLegendPrivate::QLegendPrivate(ChartPresenter* presenter, QChart *chart, QLegend | |||||
440 | m_alignment(Qt::AlignTop), |
|
425 | m_alignment(Qt::AlignTop), | |
441 | m_brush(QBrush()), |
|
426 | m_brush(QBrush()), | |
442 | m_pen(QPen()), |
|
427 | m_pen(QPen()), | |
443 | m_labelPen(QPen(Qt::NoPen)), |
|
|||
444 | m_labelBrush(QBrush()), |
|
428 | m_labelBrush(QBrush()), | |
445 | m_offsetX(0), |
|
429 | m_offsetX(0), | |
446 | m_offsetY(0), |
|
430 | m_offsetY(0), | |
@@ -765,18 +749,6 void QLegendPrivate::setFont(const QFont &font) | |||||
765 | updateLayout(); |
|
749 | updateLayout(); | |
766 | } |
|
750 | } | |
767 |
|
751 | |||
768 | void QLegendPrivate::setLabelPen(const QPen &pen) |
|
|||
769 | { |
|
|||
770 | m_labelPen = pen; |
|
|||
771 | QList<QGraphicsItem *> items = m_markers->childItems(); |
|
|||
772 |
|
||||
773 | foreach (QGraphicsItem *markers, items) { |
|
|||
774 | LegendMarker *marker = static_cast<LegendMarker*>(markers); |
|
|||
775 | marker->setPen(m_labelPen); |
|
|||
776 | } |
|
|||
777 | updateLayout(); |
|
|||
778 | } |
|
|||
779 |
|
||||
780 | void QLegendPrivate::setLabelBrush(const QBrush &brush) |
|
752 | void QLegendPrivate::setLabelBrush(const QBrush &brush) | |
781 | { |
|
753 | { | |
782 | m_labelBrush = brush; |
|
754 | m_labelBrush = brush; | |
@@ -796,7 +768,6 void QLegendPrivate::handleSeriesAdded(QAbstractSeries *series, Domain *domain) | |||||
796 | QList<LegendMarker*> markers = series->d_ptr->createLegendMarker(q_ptr); |
|
768 | QList<LegendMarker*> markers = series->d_ptr->createLegendMarker(q_ptr); | |
797 | foreach(LegendMarker* marker, markers) { |
|
769 | foreach(LegendMarker* marker, markers) { | |
798 | marker->setFont(m_font); |
|
770 | marker->setFont(m_font); | |
799 | marker->setLabelPen(m_labelPen); |
|
|||
800 | marker->setLabelBrush(m_labelBrush); |
|
771 | marker->setLabelBrush(m_labelBrush); | |
801 | m_markers->addToGroup(marker); |
|
772 | m_markers->addToGroup(marker); | |
802 | } |
|
773 | } |
@@ -49,8 +49,6 class QTCOMMERCIALCHART_EXPORT QLegend : public QGraphicsWidget | |||||
49 | Q_PROPERTY(QColor borderColor READ borderColor WRITE setBorderColor NOTIFY borderColorChanged) |
|
49 | Q_PROPERTY(QColor borderColor READ borderColor WRITE setBorderColor NOTIFY borderColorChanged) | |
50 | Q_PROPERTY(QFont font READ font WRITE setFont NOTIFY fontChanged) |
|
50 | Q_PROPERTY(QFont font READ font WRITE setFont NOTIFY fontChanged) | |
51 | Q_PROPERTY(QColor labelColor READ labelColor WRITE setLabelColor NOTIFY labelColorChanged) |
|
51 | Q_PROPERTY(QColor labelColor READ labelColor WRITE setLabelColor NOTIFY labelColorChanged) | |
52 | // TODO? |
|
|||
53 | // Q_PROPERTY(QColor labelBorderColor READ labelBorderColor WRITE setLabelBorderColor NOTIFY labelBorderColorChanged) |
|
|||
54 |
|
52 | |||
55 | private: |
|
53 | private: | |
56 | explicit QLegend(QChart *chart); |
|
54 | explicit QLegend(QChart *chart); | |
@@ -73,8 +71,6 public: | |||||
73 |
|
71 | |||
74 | void setFont(const QFont &font); |
|
72 | void setFont(const QFont &font); | |
75 | QFont font() const; |
|
73 | QFont font() const; | |
76 | void setLabelPen(const QPen &pen); |
|
|||
77 | QPen labelPen() const; |
|
|||
78 | void setLabelBrush(const QBrush &brush); |
|
74 | void setLabelBrush(const QBrush &brush); | |
79 | QBrush labelBrush() const; |
|
75 | QBrush labelBrush() const; | |
80 |
|
76 | |||
@@ -104,11 +100,8 Q_SIGNALS: | |||||
104 | void colorChanged(QColor color); |
|
100 | void colorChanged(QColor color); | |
105 | void borderColorChanged(QColor color); |
|
101 | void borderColorChanged(QColor color); | |
106 | void fontChanged(QFont font); |
|
102 | void fontChanged(QFont font); | |
107 | void labelPenChanged(QPen pen); |
|
|||
108 | void labelBrushChanged(QBrush brush); |
|
103 | void labelBrushChanged(QBrush brush); | |
109 | void labelColorChanged(QColor color); |
|
104 | void labelColorChanged(QColor color); | |
110 | // TODO? |
|
|||
111 | // void labelBorderColorChanged(QColor color); |
|
|||
112 |
|
105 | |||
113 | private: |
|
106 | private: | |
114 | QScopedPointer<QLegendPrivate> d_ptr; |
|
107 | QScopedPointer<QLegendPrivate> d_ptr; |
@@ -52,7 +52,6 public: | |||||
52 | void attachToChart(); |
|
52 | void attachToChart(); | |
53 | int roundness(qreal size); |
|
53 | int roundness(qreal size); | |
54 | void setFont(const QFont &font); |
|
54 | void setFont(const QFont &font); | |
55 | void setLabelPen(const QPen &pen); |
|
|||
56 | void setLabelBrush(const QBrush &brush); |
|
55 | void setLabelBrush(const QBrush &brush); | |
57 |
|
56 | |||
58 | public Q_SLOTS: |
|
57 | public Q_SLOTS: | |
@@ -71,7 +70,6 private: | |||||
71 | QBrush m_brush; |
|
70 | QBrush m_brush; | |
72 | QPen m_pen; |
|
71 | QPen m_pen; | |
73 | QFont m_font; |
|
72 | QFont m_font; | |
74 | QPen m_labelPen; |
|
|||
75 | QBrush m_labelBrush; |
|
73 | QBrush m_labelBrush; | |
76 | QRectF m_rect; |
|
74 | QRectF m_rect; | |
77 | qreal m_offsetX; |
|
75 | qreal m_offsetX; |
@@ -55,10 +55,9 public: | |||||
55 | m_chartBackgroundGradient = backgroundGradient; |
|
55 | m_chartBackgroundGradient = backgroundGradient; | |
56 |
|
56 | |||
57 | // Axes and other |
|
57 | // Axes and other | |
58 |
m_ |
|
58 | m_labelBrush = QBrush(QRgb(0xffffff)); | |
59 | m_axisLinePen = QPen(QRgb(0xd6d6d6)); |
|
59 | m_axisLinePen = QPen(QRgb(0xd6d6d6)); | |
60 | m_axisLinePen.setWidth(2); |
|
60 | m_axisLinePen.setWidth(2); | |
61 | m_axisLabelBrush = QBrush(QRgb(0xffffff)); |
|
|||
62 | m_gridLinePen = QPen(QRgb(0x84a2b0)); |
|
61 | m_gridLinePen = QPen(QRgb(0x84a2b0)); | |
63 | m_gridLinePen.setWidth(1); |
|
62 | m_gridLinePen.setWidth(1); | |
64 | m_backgroundShades = BackgroundShadesNone; |
|
63 | m_backgroundShades = BackgroundShadesNone; |
@@ -56,10 +56,9 public: | |||||
56 | m_backgroundDropShadowEnabled = true; |
|
56 | m_backgroundDropShadowEnabled = true; | |
57 |
|
57 | |||
58 | // Axes and other |
|
58 | // Axes and other | |
59 |
m_ |
|
59 | m_labelBrush = QBrush(QRgb(0x404044)); | |
60 | m_axisLinePen = QPen(QRgb(0xd6d6d6)); |
|
60 | m_axisLinePen = QPen(QRgb(0xd6d6d6)); | |
61 | m_axisLinePen.setWidth(2); |
|
61 | m_axisLinePen.setWidth(2); | |
62 | m_axisLabelBrush = QBrush(QRgb(0x404044)); |
|
|||
63 | m_gridLinePen = QPen(QRgb(0xe2e2e2)); |
|
62 | m_gridLinePen = QPen(QRgb(0xe2e2e2)); | |
64 | m_gridLinePen.setWidth(1); |
|
63 | m_gridLinePen.setWidth(1); | |
65 | m_backgroundShades = BackgroundShadesNone; |
|
64 | m_backgroundShades = BackgroundShadesNone; |
@@ -55,10 +55,9 public: | |||||
55 | m_chartBackgroundGradient = backgroundGradient; |
|
55 | m_chartBackgroundGradient = backgroundGradient; | |
56 |
|
56 | |||
57 | // Axes and other |
|
57 | // Axes and other | |
58 |
m_ |
|
58 | m_labelBrush = QBrush(QRgb(0x404044)); | |
59 | m_axisLinePen = QPen(QRgb(0xd6d6d6)); |
|
59 | m_axisLinePen = QPen(QRgb(0xd6d6d6)); | |
60 | m_axisLinePen.setWidth(2); |
|
60 | m_axisLinePen.setWidth(2); | |
61 | m_axisLabelBrush = QBrush(QRgb(0x404044)); |
|
|||
62 | m_gridLinePen = QPen(QRgb(0xe2e2e2)); |
|
61 | m_gridLinePen = QPen(QRgb(0xe2e2e2)); | |
63 | m_gridLinePen.setWidth(1); |
|
62 | m_gridLinePen.setWidth(1); | |
64 | m_backgroundShades = BackgroundShadesNone; |
|
63 | m_backgroundShades = BackgroundShadesNone; |
@@ -55,10 +55,9 public: | |||||
55 | m_chartBackgroundGradient = backgroundGradient; |
|
55 | m_chartBackgroundGradient = backgroundGradient; | |
56 |
|
56 | |||
57 | // Axes and other |
|
57 | // Axes and other | |
58 |
m_ |
|
58 | m_labelBrush = QBrush(QRgb(0x404044)); | |
59 | m_axisLinePen = QPen(QRgb(0xb5b0a7)); |
|
59 | m_axisLinePen = QPen(QRgb(0xb5b0a7)); | |
60 | m_axisLinePen.setWidth(2); |
|
60 | m_axisLinePen.setWidth(2); | |
61 | m_axisLabelBrush = QBrush(QRgb(0x404044)); |
|
|||
62 | m_gridLinePen = QPen(QRgb(0xd4cec3)); |
|
61 | m_gridLinePen = QPen(QRgb(0xd4cec3)); | |
63 | m_gridLinePen.setWidth(1); |
|
62 | m_gridLinePen.setWidth(1); | |
64 | m_backgroundShades = BackgroundShadesNone; |
|
63 | m_backgroundShades = BackgroundShadesNone; |
@@ -55,10 +55,9 public: | |||||
55 | m_chartBackgroundGradient = backgroundGradient; |
|
55 | m_chartBackgroundGradient = backgroundGradient; | |
56 |
|
56 | |||
57 | // Axes and other |
|
57 | // Axes and other | |
58 |
m_ |
|
58 | m_labelBrush = QBrush(QRgb(0xffffff)); | |
59 | m_axisLinePen = QPen(QRgb(0x86878c)); |
|
59 | m_axisLinePen = QPen(QRgb(0x86878c)); | |
60 | m_axisLinePen.setWidth(2); |
|
60 | m_axisLinePen.setWidth(2); | |
61 | m_axisLabelBrush = QBrush(QRgb(0xffffff)); |
|
|||
62 | m_gridLinePen = QPen(QRgb(0x86878c)); |
|
61 | m_gridLinePen = QPen(QRgb(0x86878c)); | |
63 | m_gridLinePen.setWidth(1); |
|
62 | m_gridLinePen.setWidth(1); | |
64 | m_backgroundShades = BackgroundShadesNone; |
|
63 | m_backgroundShades = BackgroundShadesNone; |
@@ -56,10 +56,9 public: | |||||
56 | m_backgroundDropShadowEnabled = true; |
|
56 | m_backgroundDropShadowEnabled = true; | |
57 |
|
57 | |||
58 | // Axes and other |
|
58 | // Axes and other | |
59 |
m_ |
|
59 | m_labelBrush = QBrush(QRgb(0x181818)); | |
60 | m_axisLinePen = QPen(QRgb(0x8c8c8c)); |
|
60 | m_axisLinePen = QPen(QRgb(0x8c8c8c)); | |
61 | m_axisLinePen.setWidth(2); |
|
61 | m_axisLinePen.setWidth(2); | |
62 | m_axisLabelBrush = QBrush(QRgb(0x181818)); |
|
|||
63 | m_gridLinePen = QPen(QRgb(0x8c8c8c)); |
|
62 | m_gridLinePen = QPen(QRgb(0x8c8c8c)); | |
64 | m_gridLinePen.setWidth(1); |
|
63 | m_gridLinePen.setWidth(1); | |
65 | m_backgroundShadesBrush = QBrush(QRgb(0xffeecd)); |
|
64 | m_backgroundShadesBrush = QBrush(QRgb(0xffeecd)); |
@@ -59,7 +59,7 public: | |||||
59 | // Axes and other |
|
59 | // Axes and other | |
60 | m_axisLinePen = QPen(0xd6d6d6); |
|
60 | m_axisLinePen = QPen(0xd6d6d6); | |
61 | m_axisLinePen.setWidth(1); |
|
61 | m_axisLinePen.setWidth(1); | |
62 |
m_ |
|
62 | m_labelBrush = QBrush(QRgb(0x404044)); | |
63 | m_gridLinePen = QPen(QRgb(0xe2e2e2)); |
|
63 | m_gridLinePen = QPen(QRgb(0xe2e2e2)); | |
64 | m_gridLinePen.setWidth(1); |
|
64 | m_gridLinePen.setWidth(1); | |
65 | m_backgroundShades = BackgroundShadesNone; |
|
65 | m_backgroundShades = BackgroundShadesNone; |
@@ -98,7 +98,7 public: | |||||
98 | // Axes and other |
|
98 | // Axes and other | |
99 | m_axisLinePen = QPen(0xd6d6d6); |
|
99 | m_axisLinePen = QPen(0xd6d6d6); | |
100 | m_axisLinePen.setWidth(1); |
|
100 | m_axisLinePen.setWidth(1); | |
101 |
m_ |
|
101 | m_labelBrush = QBrush(QRgb(0x404044)); | |
102 | m_gridLinePen = QPen(QRgb(0xe2e2e2)); |
|
102 | m_gridLinePen = QPen(QRgb(0xe2e2e2)); | |
103 | m_gridLinePen.setWidth(1); |
|
103 | m_gridLinePen.setWidth(1); | |
104 | m_backgroundShades = BackgroundShadesNone; |
|
104 | m_backgroundShades = BackgroundShadesNone; | |
@@ -121,7 +121,7 public: | |||||
121 | // Axes and other |
|
121 | // Axes and other | |
122 | m_axisLinePen = QPen(0xd6d6d6); |
|
122 | m_axisLinePen = QPen(0xd6d6d6); | |
123 | m_axisLinePen.setWidth(1); |
|
123 | m_axisLinePen.setWidth(1); | |
124 |
m_ |
|
124 | m_labelBrush = QBrush(QRgb(0x404044)); | |
125 | m_gridLinePen = QPen(QRgb(0xe2e2e2)); |
|
125 | m_gridLinePen = QPen(QRgb(0xe2e2e2)); | |
126 | m_gridLinePen.setWidth(1); |
|
126 | m_gridLinePen.setWidth(1); | |
127 | m_backgroundShades = BackgroundShadesNone; |
|
127 | m_backgroundShades = BackgroundShadesNone; | |
@@ -144,7 +144,7 public: | |||||
144 | // Axes and other |
|
144 | // Axes and other | |
145 | m_axisLinePen = QPen(0xd6d6d6); |
|
145 | m_axisLinePen = QPen(0xd6d6d6); | |
146 | m_axisLinePen.setWidth(1); |
|
146 | m_axisLinePen.setWidth(1); | |
147 |
m_ |
|
147 | m_labelBrush = QBrush(QRgb(0x404044)); | |
148 | m_gridLinePen = QPen(QRgb(0xe2e2e2)); |
|
148 | m_gridLinePen = QPen(QRgb(0xe2e2e2)); | |
149 | m_gridLinePen.setWidth(1); |
|
149 | m_gridLinePen.setWidth(1); | |
150 | m_backgroundShades = BackgroundShadesNone; |
|
150 | m_backgroundShades = BackgroundShadesNone; | |
@@ -167,7 +167,7 public: | |||||
167 | // Axes and other |
|
167 | // Axes and other | |
168 | m_axisLinePen = QPen(0xd6d6d6); |
|
168 | m_axisLinePen = QPen(0xd6d6d6); | |
169 | m_axisLinePen.setWidth(1); |
|
169 | m_axisLinePen.setWidth(1); | |
170 |
m_ |
|
170 | m_labelBrush = QBrush(QRgb(0x404044)); | |
171 | m_gridLinePen = QPen(QRgb(0xe2e2e2)); |
|
171 | m_gridLinePen = QPen(QRgb(0xe2e2e2)); | |
172 | m_gridLinePen.setWidth(1); |
|
172 | m_gridLinePen.setWidth(1); | |
173 | m_backgroundShades = BackgroundShadesNone; |
|
173 | m_backgroundShades = BackgroundShadesNone; |
@@ -63,6 +63,8 ChartView { | |||||
63 | legend.onBackgroundVisibleChanged: console.log("legend.onBackgroundVisibleChanged: " + visible); |
|
63 | legend.onBackgroundVisibleChanged: console.log("legend.onBackgroundVisibleChanged: " + visible); | |
64 | legend.onColorChanged: console.log("legend.onColorChanged: " + color); |
|
64 | legend.onColorChanged: console.log("legend.onColorChanged: " + color); | |
65 | legend.onBorderColorChanged: console.log("legend.onBorderColorChanged: " + color); |
|
65 | legend.onBorderColorChanged: console.log("legend.onBorderColorChanged: " + color); | |
|
66 | legend.onLabelColorChanged: console.log("legend.onLabelColorChanged: " + color); | |||
|
67 | legend.onLabelBrushChanged: console.log("legend.onLabelBrushChanged: " + brush); | |||
66 |
|
68 | |||
67 | axisX.onColorChanged: console.log("axisX.onColorChanged: " + color); |
|
69 | axisX.onColorChanged: console.log("axisX.onColorChanged: " + color); | |
68 | axisX.onLabelsVisibleChanged: console.log("axisX.onLabelsVisibleChanged: " + visible); |
|
70 | axisX.onLabelsVisibleChanged: console.log("axisX.onLabelsVisibleChanged: " + visible); |
@@ -47,6 +47,10 Row { | |||||
47 | onClicked: chartLegend.borderColor = main.nextColor(); |
|
47 | onClicked: chartLegend.borderColor = main.nextColor(); | |
48 | } |
|
48 | } | |
49 | Button { |
|
49 | Button { | |
|
50 | text: "legend label color" | |||
|
51 | onClicked: chartLegend.labelColor = main.nextColor(); | |||
|
52 | } | |||
|
53 | Button { | |||
50 | text: "legend top" |
|
54 | text: "legend top" | |
51 | onClicked: chartLegend.alignment ^= Qt.AlignTop; |
|
55 | onClicked: chartLegend.alignment ^= Qt.AlignTop; | |
52 | } |
|
56 | } |
General Comments 0
You need to be logged in to leave comments.
Login now