summaryrefslogtreecommitdiffstats
path: root/src/barchart
diff options
context:
space:
mode:
authorsauimone <samu.uimonen@digia.com>2012-09-24 12:56:37 +0300
committersauimone <samu.uimonen@digia.com>2012-10-17 10:46:13 +0300
commit5397c9eef2aaeb85d80e0fc55a7edd0cad431185 (patch)
tree54e137070a4b75139c1dabce573f3b9223f11b97 /src/barchart
parentabb4622b2dab821b9139ef024b6e4a4917762dd2 (diff)
Added createLegendMarkers to private series. This will replace old createLegendMarker method. Notice the s in new method name. PIMPL for QLegendMarker. Newlegend example updated a bit
Diffstat (limited to 'src/barchart')
-rw-r--r--src/barchart/qabstractbarseries.cpp16
-rw-r--r--src/barchart/qabstractbarseries_p.h2
2 files changed, 18 insertions, 0 deletions
diff --git a/src/barchart/qabstractbarseries.cpp b/src/barchart/qabstractbarseries.cpp
index a6942353..06af863a 100644
--- a/src/barchart/qabstractbarseries.cpp
+++ b/src/barchart/qabstractbarseries.cpp
@@ -659,6 +659,22 @@ QList<LegendMarker *> QAbstractBarSeriesPrivate::createLegendMarker(QLegend *leg
return markers;
}
+QList<QLegendMarker*> QAbstractBarSeriesPrivate::createLegendMarkers(QLegend* legend)
+{
+ Q_UNUSED(legend);
+// Q_Q(QAbstractBarSeries);
+ QList<QLegendMarker*> markers;
+// TODO: when QBarLegendMarker is implemented
+/*
+ foreach(QBarSet* set, q->barSets()) {
+ BarLegendMarker* marker = new BarLegendMarker(q,set,legend);
+ markers << marker;
+ }
+*/
+ return markers;
+}
+
+
bool QAbstractBarSeriesPrivate::append(QBarSet *set)
{
if ((m_barSets.contains(set)) || (set == 0))
diff --git a/src/barchart/qabstractbarseries_p.h b/src/barchart/qabstractbarseries_p.h
index cffce0bd..8b988216 100644
--- a/src/barchart/qabstractbarseries_p.h
+++ b/src/barchart/qabstractbarseries_p.h
@@ -39,6 +39,7 @@ QTCOMMERCIALCHART_BEGIN_NAMESPACE
class QBarModelMapper;
class QBarCategoryAxis;
+class QLegendMarker;
class QAbstractBarSeriesPrivate : public QAbstractSeriesPrivate
{
@@ -56,6 +57,7 @@ public:
void scaleDomain(Domain &domain);
ChartElement *createGraphics(ChartPresenter *presenter);
QList<LegendMarker *> createLegendMarker(QLegend *legend);
+ QList<QLegendMarker*> createLegendMarkers(QLegend* legend);
void initializeAxis(QAbstractAxis *axis);
virtual QAbstractAxis::AxisType defaultAxisType(Qt::Orientation orientation) const;