diff --git a/src/barchart/qbarmodelmapper.cpp b/src/barchart/qbarmodelmapper.cpp index 46412b7..7d35efb 100644 --- a/src/barchart/qbarmodelmapper.cpp +++ b/src/barchart/qbarmodelmapper.cpp @@ -101,29 +101,29 @@ void QBarModelMapper::setOrientation(Qt::Orientation orientation) d->initializeBarFromModel(); } -int QBarModelMapper::firstBarSection() const +int QBarModelMapper::firstBarSetSection() const { Q_D(const QBarModelMapper); - return d->m_firstBarSection; + return d->m_firstBarSetSection; } -void QBarModelMapper::setFirstBarSection(int firstBarSection) +void QBarModelMapper::setFirstBarSetSection(int firstBarSetSection) { Q_D(QBarModelMapper); - d->m_firstBarSection = firstBarSection; + d->m_firstBarSetSection = firstBarSetSection; d->initializeBarFromModel(); } -int QBarModelMapper::lastBarSection() const +int QBarModelMapper::lastBarSetSection() const { Q_D(const QBarModelMapper); - return d->m_lastBarSection; + return d->m_lastBarSetSection; } -void QBarModelMapper::setLastBarSection(int lastBarSection) +void QBarModelMapper::setLastBarSetSection(int lastBarSetSection) { Q_D(QBarModelMapper); - d->m_lastBarSection = lastBarSection; + d->m_lastBarSetSection = lastBarSetSection; d->initializeBarFromModel(); } @@ -146,8 +146,8 @@ void QBarModelMapper::reset() d->m_first = 0; d->m_count = -1; d->m_orientation = Qt::Vertical; - d->m_firstBarSection = -1; - d->m_lastBarSection = -1; + d->m_firstBarSetSection = -1; + d->m_lastBarSetSection = -1; d->m_categoriesSection = -1; d->initializeBarFromModel(); } @@ -160,8 +160,8 @@ QBarModelMapperPrivate::QBarModelMapperPrivate(QBarModelMapper *q) : m_first(0), m_count(-1), m_orientation(Qt::Vertical), - m_firstBarSection(-1), - m_lastBarSection(-1), + m_firstBarSetSection(-1), + m_lastBarSetSection(-1), m_categoriesSection(-1), m_seriesSignalsBlock(false), m_modelSignalsBlock(false), @@ -184,12 +184,12 @@ QBarSet* QBarModelMapperPrivate::barSet(QModelIndex index) if (!index.isValid()) return 0; - if (m_orientation == Qt::Vertical && index.column() >= m_firstBarSection && index.column() <= m_lastBarSection) { + if (m_orientation == Qt::Vertical && index.column() >= m_firstBarSetSection && index.column() <= m_lastBarSetSection) { if (index.row() >= m_first && (m_count == - 1 || index.row() < m_first + m_count)) - return m_series->barSets().at(index.column() - m_firstBarSection); - } else if (m_orientation == Qt::Horizontal && index.row() >= m_firstBarSection && index.row() <= m_lastBarSection) { + return m_series->barSets().at(index.column() - m_firstBarSetSection); + } else if (m_orientation == Qt::Horizontal && index.row() >= m_firstBarSetSection && index.row() <= m_lastBarSetSection) { if (index.column() >= m_first && (m_count == - 1 || index.column() < m_first + m_count)) - return m_series->barSets().at(index.row() - m_firstBarSection); + return m_series->barSets().at(index.row() - m_firstBarSetSection); } return 0; // This part of model has not been mapped to any slice } @@ -199,7 +199,7 @@ QModelIndex QBarModelMapperPrivate::barModelIndex(int barSection, int posInBar) if (m_count != -1 && posInBar >= m_count) return QModelIndex(); // invalid - if (barSection < m_firstBarSection || barSection > m_lastBarSection) + if (barSection < m_firstBarSetSection || barSection > m_lastBarSetSection) return QModelIndex(); // invalid if (m_orientation == Qt::Vertical) @@ -260,7 +260,7 @@ void QBarModelMapperPrivate::modelRowsAdded(QModelIndex parent, int start, int e if (m_orientation == Qt::Vertical) // insertData(start, end); initializeBarFromModel(); - else if (start <= m_firstBarSection || start <= m_lastBarSection || start <= m_categoriesSection) // if the changes affect the map - reinitialize + else if (start <= m_firstBarSetSection || start <= m_lastBarSetSection || start <= m_categoriesSection) // if the changes affect the map - reinitialize initializeBarFromModel(); blockSeriesSignals(false); } @@ -276,7 +276,7 @@ void QBarModelMapperPrivate::modelRowsRemoved(QModelIndex parent, int start, int if (m_orientation == Qt::Vertical) // removeData(start, end); initializeBarFromModel(); - else if (start <= m_firstBarSection || start <= m_lastBarSection || start <= m_categoriesSection) // if the changes affect the map - reinitialize + else if (start <= m_firstBarSetSection || start <= m_lastBarSetSection || start <= m_categoriesSection) // if the changes affect the map - reinitialize initializeBarFromModel(); blockSeriesSignals(false); } @@ -292,7 +292,7 @@ void QBarModelMapperPrivate::modelColumnsAdded(QModelIndex parent, int start, in if (m_orientation == Qt::Horizontal) // insertData(start, end); initializeBarFromModel(); - else if (start <= m_firstBarSection || start <= m_lastBarSection || start <= m_categoriesSection) // if the changes affect the map - reinitialize + else if (start <= m_firstBarSetSection || start <= m_lastBarSetSection || start <= m_categoriesSection) // if the changes affect the map - reinitialize initializeBarFromModel(); blockSeriesSignals(false); } @@ -308,7 +308,7 @@ void QBarModelMapperPrivate::modelColumnsRemoved(QModelIndex parent, int start, if (m_orientation == Qt::Horizontal) // removeData(start, end); initializeBarFromModel(); - else if (start <= m_firstBarSection || start <= m_lastBarSection || start <= m_categoriesSection) // if the changes affect the map - reinitialize + else if (start <= m_firstBarSetSection || start <= m_lastBarSetSection || start <= m_categoriesSection) // if the changes affect the map - reinitialize initializeBarFromModel(); blockSeriesSignals(false); } @@ -390,7 +390,7 @@ void QBarModelMapperPrivate::initializeBarFromModel() m_series->clear(); // create the initial bar sets - for (int i = m_firstBarSection; i <= m_lastBarSection; i++) { + for (int i = m_firstBarSetSection; i <= m_lastBarSetSection; i++) { int posInBar = 0; QModelIndex barIndex = barModelIndex(i, posInBar); QBarSet *barSet = new QBarSet(m_model->headerData(i, Qt::Horizontal).toString()); diff --git a/src/barchart/qbarmodelmapper.h b/src/barchart/qbarmodelmapper.h index 42ca91b..748abd3 100644 --- a/src/barchart/qbarmodelmapper.h +++ b/src/barchart/qbarmodelmapper.h @@ -36,11 +36,11 @@ public: int count() const; void setCount(int count); - int firstBarSection() const; - void setFirstBarSection(int firstBarSection); + int firstBarSetSection() const; + void setFirstBarSetSection(int firstBarSetSection); - int lastBarSection() const; - void setLastBarSection(int lastBarSection); + int lastBarSetSection() const; + void setLastBarSetSection(int lastBarSetSection); int categoriesSection() const; void setCategoriesSection(int categoriesSection); diff --git a/src/barchart/qbarmodelmapper_p.h b/src/barchart/qbarmodelmapper_p.h index f79c205..49cbc2e 100644 --- a/src/barchart/qbarmodelmapper_p.h +++ b/src/barchart/qbarmodelmapper_p.h @@ -47,8 +47,8 @@ private: int m_first; int m_count; Qt::Orientation m_orientation; - int m_firstBarSection; - int m_lastBarSection; + int m_firstBarSetSection; + int m_lastBarSetSection; int m_categoriesSection; bool m_seriesSignalsBlock; bool m_modelSignalsBlock; diff --git a/src/barchart/qhbarmodelmapper.cpp b/src/barchart/qhbarmodelmapper.cpp index 2f516a9..62172b3 100644 --- a/src/barchart/qhbarmodelmapper.cpp +++ b/src/barchart/qhbarmodelmapper.cpp @@ -8,24 +8,24 @@ QHBarModelMapper::QHBarModelMapper(QObject *parent) : QBarModelMapper::setOrientation(Qt::Horizontal); } -int QHBarModelMapper::firstBarRow() const +int QHBarModelMapper::firstBarSetRow() const { - return QBarModelMapper::firstBarSection(); + return QBarModelMapper::firstBarSetSection(); } -void QHBarModelMapper::setFirstBarRow(int firstBarRow) +void QHBarModelMapper::setFirstBarSetRow(int firstBarSetRow) { - return QBarModelMapper::setFirstBarSection(firstBarRow); + return QBarModelMapper::setFirstBarSetSection(firstBarSetRow); } -int QHBarModelMapper::lastBarRow() const +int QHBarModelMapper::lastBarSetRow() const { - return QBarModelMapper::lastBarSection(); + return QBarModelMapper::lastBarSetSection(); } -void QHBarModelMapper::setLastBarRow(int lastBarRow) +void QHBarModelMapper::setLastBarSetRow(int lastBarSetRow) { - return QBarModelMapper::setLastBarSection(lastBarRow); + return QBarModelMapper::setLastBarSetSection(lastBarSetRow); } int QHBarModelMapper::categoriesRow() const diff --git a/src/barchart/qhbarmodelmapper.h b/src/barchart/qhbarmodelmapper.h index e069497..3db52d4 100644 --- a/src/barchart/qhbarmodelmapper.h +++ b/src/barchart/qhbarmodelmapper.h @@ -8,17 +8,17 @@ QTCOMMERCIALCHART_BEGIN_NAMESPACE class QTCOMMERCIALCHART_EXPORT QHBarModelMapper : public QBarModelMapper { Q_OBJECT - Q_PROPERTY(int firstBarRow READ firstBarRow WRITE setFirstBarRow) - Q_PROPERTY(int lastBarRow READ lastBarRow WRITE setLastBarRow) + Q_PROPERTY(int firstBarSetRow READ firstBarSetRow WRITE setFirstBarSetRow) + Q_PROPERTY(int lastBarSetRow READ lastBarSetRow WRITE setLastBarSetRow) public: explicit QHBarModelMapper(QObject *parent = 0); - int firstBarRow() const; - void setFirstBarRow(int firstBarRow); + int firstBarSetRow() const; + void setFirstBarSetRow(int firstBarSetRow); - int lastBarRow() const; - void setLastBarRow(int lastBarRow); + int lastBarSetRow() const; + void setLastBarSetRow(int lastBarSetRow); int categoriesRow() const; void setCategoriesRow(int categoriesRow); diff --git a/src/barchart/qvbarmodelmapper.cpp b/src/barchart/qvbarmodelmapper.cpp index 548bac9..63d1c7c 100644 --- a/src/barchart/qvbarmodelmapper.cpp +++ b/src/barchart/qvbarmodelmapper.cpp @@ -8,24 +8,24 @@ QVBarModelMapper::QVBarModelMapper(QObject *parent) : QBarModelMapper::setOrientation(Qt::Vertical); } -int QVBarModelMapper::firstBarColumn() const +int QVBarModelMapper::firstBarSetColumn() const { - return QBarModelMapper::firstBarSection(); + return QBarModelMapper::firstBarSetSection(); } -void QVBarModelMapper::setFirstBarColumn(int firstBarColumn) +void QVBarModelMapper::setFirstBarSetColumn(int firstBarSetColumn) { - return QBarModelMapper::setFirstBarSection(firstBarColumn); + return QBarModelMapper::setFirstBarSetSection(firstBarSetColumn); } -int QVBarModelMapper::lastBarColumn() const +int QVBarModelMapper::lastBarSetColumn() const { - return QBarModelMapper::lastBarSection(); + return QBarModelMapper::lastBarSetSection(); } -void QVBarModelMapper::setLastBarColumn(int lastBarColumn) +void QVBarModelMapper::setLastBarSetColumn(int lastBarSetColumn) { - return QBarModelMapper::setLastBarSection(lastBarColumn); + return QBarModelMapper::setLastBarSetSection(lastBarSetColumn); } int QVBarModelMapper::categoriesColumn() const diff --git a/src/barchart/qvbarmodelmapper.h b/src/barchart/qvbarmodelmapper.h index 0b74d39..4b3c4fe 100644 --- a/src/barchart/qvbarmodelmapper.h +++ b/src/barchart/qvbarmodelmapper.h @@ -8,17 +8,17 @@ QTCOMMERCIALCHART_BEGIN_NAMESPACE class QTCOMMERCIALCHART_EXPORT QVBarModelMapper : public QBarModelMapper { Q_OBJECT - Q_PROPERTY(int firstBarColumn READ firstBarColumn WRITE setFirstBarColumn) - Q_PROPERTY(int lastBarColumn READ lastBarColumn WRITE setLastBarColumn) + Q_PROPERTY(int firstBarSetColumn READ firstBarSetColumn WRITE setFirstBarSetColumn) + Q_PROPERTY(int lastBarSetColumn READ lastBarSetColumn WRITE setLastBarSetColumn) public: explicit QVBarModelMapper(QObject *parent = 0); - int firstBarColumn() const; - void setFirstBarColumn(int firstBarColumn); + int firstBarSetColumn() const; + void setFirstBarSetColumn(int firstBarSetColumn); - int lastBarColumn() const; - void setLastBarColumn(int lastBarColumn); + int lastBarSetColumn() const; + void setLastBarSetColumn(int lastBarSetColumn); int categoriesColumn() const; void setCategoriesColumn(int categoriesColumn);