##// END OF EJS Templates
removed old legend prototry functions
sauimone -
r595:ea666328ae95
parent child
Show More
@@ -39,19 +39,6 QList<QBarSet*> BarChartModel::barSets()
39 return mDataModel;
39 return mDataModel;
40 }
40 }
41
41
42 QList<QSeries::LegendEntry> BarChartModel::legendEntries()
43 {
44 QList<QSeries::LegendEntry> legend;
45
46 for (int i=0; i<mDataModel.count(); i++) {
47 QSeries::LegendEntry l;
48 l.mName = mDataModel.at(i)->name();
49 l.mBrush = mDataModel.at(i)->brush();
50 legend.append(l);
51 }
52 return legend;
53 }
54
55 int BarChartModel::barsetCount()
42 int BarChartModel::barsetCount()
56 {
43 {
57 return mDataModel.count();
44 return mDataModel.count();
@@ -25,8 +25,6 public:
25 QBarSet *setAt(int index);
25 QBarSet *setAt(int index);
26 QList<QBarSet*> barSets();
26 QList<QBarSet*> barSets();
27
27
28 QList<QSeries::LegendEntry> legendEntries();
29
30 int barsetCount(); // Number of sets in model
28 int barsetCount(); // Number of sets in model
31 int categoryCount(); // Number of categories
29 int categoryCount(); // Number of categories
32
30
@@ -103,14 +103,6 QBarSet* QBarSeries::barsetAt(int index)
103 }
103 }
104
104
105 /*!
105 /*!
106 Returns legend of series.
107 */
108 QList<QSeries::LegendEntry> QBarSeries::legendEntries()
109 {
110 return mModel->legendEntries();
111 }
112
113 /*!
114 \internal \a category
106 \internal \a category
115 */
107 */
116 QString QBarSeries::categoryName(int category)
108 QString QBarSeries::categoryName(int category)
@@ -24,7 +24,6 public:
24 int barsetCount();
24 int barsetCount();
25 int categoryCount();
25 int categoryCount();
26 QList<QBarSet*> barSets();
26 QList<QBarSet*> barSets();
27 QList<QSeries::LegendEntry> legendEntries();
28
27
29 bool setModel(QAbstractItemModel* model);
28 bool setModel(QAbstractItemModel* model);
30 QAbstractItemModel* modelExt() {return m_model;}
29 QAbstractItemModel* modelExt() {return m_model;}
@@ -25,11 +25,11 public:
25
25
26 // Helper class to contain legend and color for it
26 // Helper class to contain legend and color for it
27 // TODO: This is actually quite close to current LegendMarker.. combine them?
27 // TODO: This is actually quite close to current LegendMarker.. combine them?
28 class LegendEntry {
28 /* class LegendEntry {
29 public:
29 public:
30 QString mName;
30 QString mName;
31 QBrush mBrush;
31 /QBrush mBrush;
32 };
32 };*/
33
33
34 protected:
34 protected:
35 QSeries(QObject *parent = 0) : QObject(parent) {}
35 QSeries(QObject *parent = 0) : QObject(parent) {}
@@ -41,9 +41,6 public:
41 // TODO
41 // TODO
42 virtual bool setModel(QAbstractItemModel* /*model*/) { return false; }
42 virtual bool setModel(QAbstractItemModel* /*model*/) { return false; }
43
43
44 // TODO: consider this
45 virtual QList<QSeries::LegendEntry> legendEntries() { QList<QSeries::LegendEntry> l; return l; }
46
47 void setTitle(QString title) { m_title = title; }
44 void setTitle(QString title) { m_title = title; }
48 QString title() { return m_title; }
45 QString title() { return m_title; }
49
46
General Comments 0
You need to be logged in to leave comments. Login now