@@ -7,11 +7,11 QTCOMMERCIALCHART_BEGIN_NAMESPACE | |||
|
7 | 7 | |
|
8 | 8 | Bar::Bar(QString category, QGraphicsItem *parent) |
|
9 | 9 | : QGraphicsObject(parent), |
|
10 | mCategory(category), | |
|
11 | 10 | mXpos(0), |
|
12 | 11 | mYpos(0), |
|
13 | 12 | mWidth(0), |
|
14 | mHeight(0) | |
|
13 | mHeight(0), | |
|
14 | mCategory(category) | |
|
15 | 15 | { |
|
16 | 16 | setAcceptedMouseButtons(Qt::LeftButton|Qt::RightButton); |
|
17 | 17 | setAcceptHoverEvents(true); |
@@ -15,11 +15,11 QTCOMMERCIALCHART_BEGIN_NAMESPACE | |||
|
15 | 15 | |
|
16 | 16 | BarPresenterBase::BarPresenterBase(QBarSeries *series, QChart *parent) : |
|
17 | 17 | ChartItem(parent), |
|
18 | mHeight(0), | |
|
19 | mWidth(0), | |
|
18 | 20 | mLayoutSet(false), |
|
19 | 21 | mSeries(series), |
|
20 |
mChart(parent) |
|
|
21 | mWidth(0), | |
|
22 | mHeight(0) | |
|
22 | mChart(parent) | |
|
23 | 23 | { |
|
24 | 24 | connect(series,SIGNAL(showToolTip(QPoint,QString)),this,SLOT(showToolTip(QPoint,QString))); |
|
25 | 25 | // connect(series,SIGNAL(enableSeparators(bool)),this,SLOT(enableSeparators(bool))); |
@@ -39,8 +39,8 QBarSeries::QBarSeries(QStringList categories, QObject *parent) | |||
|
39 | 39 | { |
|
40 | 40 | m_model = NULL; |
|
41 | 41 | m_mapCategories = -1; |
|
42 |
m_mapBarBottom - |
|
|
43 |
m_mapBarTop - |
|
|
42 | m_mapBarBottom = -1; | |
|
43 | m_mapBarTop = -1; | |
|
44 | 44 | } |
|
45 | 45 | |
|
46 | 46 | /*! |
@@ -218,7 +218,7 void ChartDataSet::calculateDomain(QSeries* series,Domain* domain) const | |||
|
218 | 218 | } |
|
219 | 219 | |
|
220 | 220 | case QSeries::SeriesTypePie: { |
|
221 | QPieSeries *pieSeries = static_cast<QPieSeries *>(series); | |
|
221 | //QPieSeries *pieSeries = static_cast<QPieSeries *>(series); | |
|
222 | 222 | // TODO: domain stuff |
|
223 | 223 | break; |
|
224 | 224 | } |
@@ -27,6 +27,7 | |||
|
27 | 27 | #include <stdarg.h> |
|
28 | 28 | #include <QDebug> |
|
29 | 29 | |
|
30 | /* | |
|
30 | 31 | static QDebug chartDebug(int numargs,...) |
|
31 | 32 |
|
|
32 | 33 | va_list valist; |
@@ -38,4 +39,5 static QDebug chartDebug(int numargs,...) | |||
|
38 | 39 | va_end(valist); |
|
39 | 40 | return qDebug()<<QString().append(function).append("(").append(file).append(":%1)").arg(line); |
|
40 | 41 |
|
|
42 | */ | |
|
41 | 43 | #endif |
@@ -130,3 +130,5 win32:QMAKE_DISTCLEAN += /Q \ | |||
|
130 | 130 | $$CHART_BUILD_HEADER_DIR \ |
|
131 | 131 | $$CHART_BUILD_LIB_DIR |
|
132 | 132 | |
|
133 | # treat warnings as errors | |
|
134 | QMAKE_CXXFLAGS += -Werror |
@@ -189,16 +189,17 int QXYSeries::count() const | |||
|
189 | 189 | { |
|
190 | 190 | Q_ASSERT(m_x.size() == m_y.size()); |
|
191 | 191 | |
|
192 | if (m_model) | |
|
192 | if (m_model) { | |
|
193 | 193 | if (m_mapOrientation == Qt::Vertical) |
|
194 | 194 | // data is in a column, so return the number of items in single column |
|
195 | 195 | return m_model->rowCount(); |
|
196 | 196 | else |
|
197 | 197 | // data is in a row, so return the number of items in single row |
|
198 | m_model->columnCount(); | |
|
199 |
|
|
|
200 | // model is not specified, return the number of points in the series internal data store | |
|
201 | return m_x.size(); | |
|
198 | return m_model->columnCount(); | |
|
199 | } | |
|
200 | ||
|
201 | // model is not specified, return the number of points in the series internal data store | |
|
202 | return m_x.size(); | |
|
202 | 203 | } |
|
203 | 204 | |
|
204 | 205 | /*! |
General Comments 0
You need to be logged in to leave comments.
Login now