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