##// END OF EJS Templates
commented out separatos. feature, we dont need?
sauimone -
r592:56a808b04750
parent child
Show More
@@ -54,7 +54,7 void BarPresenter::layoutChanged()
54 xPos += mBarWidth;
54 xPos += mBarWidth;
55 }
55 }
56 }
56 }
57
57 /*
58 // Position separators
58 // Position separators
59 qreal xPos = categoryWidth + categoryWidth/2;
59 qreal xPos = categoryWidth + categoryWidth/2;
60 for (int s=0; s < mSeparators.count(); s++) {
60 for (int s=0; s < mSeparators.count(); s++) {
@@ -64,7 +64,7 void BarPresenter::layoutChanged()
64 sep->setColor(QColor(255,0,0,255)); // TODO: color for separations from theme
64 sep->setColor(QColor(255,0,0,255)); // TODO: color for separations from theme
65 xPos += categoryWidth;
65 xPos += categoryWidth;
66 }
66 }
67
67 */
68 // Position floating values
68 // Position floating values
69 itemIndex = 0;
69 itemIndex = 0;
70 for (int category=0; category < mSeries->categoryCount(); category++) {
70 for (int category=0; category < mSeries->categoryCount(); category++) {
@@ -21,8 +21,8 BarPresenterBase::BarPresenterBase(QBarSeries *series, QChart *parent) :
21 mHeight(0)
21 mHeight(0)
22 {
22 {
23 connect(series,SIGNAL(showToolTip(QPoint,QString)),this,SLOT(showToolTip(QPoint,QString)));
23 connect(series,SIGNAL(showToolTip(QPoint,QString)),this,SLOT(showToolTip(QPoint,QString)));
24 connect(series,SIGNAL(enableSeparators(bool)),this,SLOT(enableSeparators(bool)));
24 // connect(series,SIGNAL(enableSeparators(bool)),this,SLOT(enableSeparators(bool)));
25 enableSeparators(series->separatorsVisible());
25 // enableSeparators(series->separatorsVisible());
26 initAxisLabels();
26 initAxisLabels();
27 dataChanged();
27 dataChanged();
28 }
28 }
@@ -58,7 +58,7 void BarPresenterBase::dataChanged()
58 }
58 }
59
59
60 mBars.clear();
60 mBars.clear();
61 mSeparators.clear();
61 // mSeparators.clear();
62 mFloatingValues.clear();
62 mFloatingValues.clear();
63
63
64 // Create new graphic items for bars
64 // Create new graphic items for bars
@@ -75,7 +75,7 void BarPresenterBase::dataChanged()
75 connect(bar,SIGNAL(hoverLeaved()),set,SLOT(barHoverLeaveEvent()));
75 connect(bar,SIGNAL(hoverLeaved()),set,SLOT(barHoverLeaveEvent()));
76 }
76 }
77 }
77 }
78
78 /*
79 // Create separators
79 // Create separators
80 int count = mSeries->categoryCount() - 1; // There is one less separator than columns
80 int count = mSeries->categoryCount() - 1; // There is one less separator than columns
81 for (int i=0; i<count; i++) {
81 for (int i=0; i<count; i++) {
@@ -84,7 +84,7 void BarPresenterBase::dataChanged()
84 childItems().append(sep);
84 childItems().append(sep);
85 mSeparators.append(sep);
85 mSeparators.append(sep);
86 }
86 }
87
87 */
88 // Create floating values
88 // Create floating values
89 for (int category=0; category<mSeries->categoryCount(); category++) {
89 for (int category=0; category<mSeries->categoryCount(); category++) {
90 for (int s=0; s<mSeries->barsetCount(); s++) {
90 for (int s=0; s<mSeries->barsetCount(); s++) {
@@ -168,12 +168,14 void BarPresenterBase::showToolTip(QPoint pos, QString tip)
168 QToolTip::showText(pos,tip);
168 QToolTip::showText(pos,tip);
169 }
169 }
170
170
171 /*
171 void BarPresenterBase::enableSeparators(bool enabled)
172 void BarPresenterBase::enableSeparators(bool enabled)
172 {
173 {
173 for (int i=0; i<mSeparators.count(); i++) {
174 for (int i=0; i<mSeparators.count(); i++) {
174 mSeparators.at(i)->setVisible(enabled);
175 mSeparators.at(i)->setVisible(enabled);
175 }
176 }
176 }
177 }
178 */
177
179
178 #include "moc_barpresenterbase_p.cpp"
180 #include "moc_barpresenterbase_p.cpp"
179
181
@@ -43,7 +43,7 public slots:
43
43
44 // Internal slots
44 // Internal slots
45 void showToolTip(QPoint pos, QString tip); // shows tooltip (if enabled)
45 void showToolTip(QPoint pos, QString tip); // shows tooltip (if enabled)
46 void enableSeparators(bool enabled);
46 // void enableSeparators(bool enabled);
47
47
48 protected:
48 protected:
49
49
@@ -57,7 +57,7 protected:
57 // Not owned.
57 // Not owned.
58 QBarSeries* mSeries;
58 QBarSeries* mSeries;
59 QList<Bar*> mBars;
59 QList<Bar*> mBars;
60 QList<Separator*> mSeparators;
60 // QList<Separator*> mSeparators;
61 QList<BarValue*> mFloatingValues;
61 QList<BarValue*> mFloatingValues;
62 QChart* mChart;
62 QChart* mChart;
63 };
63 };
@@ -55,7 +55,7 void PercentBarPresenter::layoutChanged()
55 }
55 }
56 xPos += xStep;
56 xPos += xStep;
57 }
57 }
58
58 /*
59 // Position separators
59 // Position separators
60 xPos = xStep + xStep/2;
60 xPos = xStep + xStep/2;
61 for (int s=0; s < mSeries->categoryCount() - 1; s++) {
61 for (int s=0; s < mSeries->categoryCount() - 1; s++) {
@@ -64,7 +64,7 void PercentBarPresenter::layoutChanged()
64 sep->setSize(QSizeF(1,mHeight));
64 sep->setSize(QSizeF(1,mHeight));
65 xPos += xStep;
65 xPos += xStep;
66 }
66 }
67
67 */
68 // Position floating values
68 // Position floating values
69 itemIndex = 0;
69 itemIndex = 0;
70 xPos = (tW/tC);
70 xPos = (tW/tC);
@@ -64,7 +64,7 void StackedBarPresenter::layoutChanged()
64 }
64 }
65 xPos += xStep;
65 xPos += xStep;
66 }
66 }
67
67 /*
68 // Position separators
68 // Position separators
69 xPos = xStep + xStep/2;
69 xPos = xStep + xStep/2;
70 for (int s=0; s < mSeries->categoryCount() - 1; s++) {
70 for (int s=0; s < mSeries->categoryCount() - 1; s++) {
@@ -73,7 +73,7 void StackedBarPresenter::layoutChanged()
73 sep->setSize(QSizeF(1,mHeight));
73 sep->setSize(QSizeF(1,mHeight));
74 xPos += xStep;
74 xPos += xStep;
75 }
75 }
76
76 */
77 // Position floating values
77 // Position floating values
78 itemIndex = 0;
78 itemIndex = 0;
79 xPos = (tW/tC);
79 xPos = (tW/tC);
General Comments 0
You need to be logged in to leave comments. Login now