|
svcore
1.9
|
#include <ModelDataTableModel.h>


Signals | |
| void | frameSelected (int) |
| void | addCommand (Command *) |
| void | currentChanged (const QModelIndex &) |
| void | modelRemoved () |
Public Member Functions | |
| ModelDataTableModel (TabularModel *m) | |
| virtual | ~ModelDataTableModel () |
| QVariant | data (const QModelIndex &index, int role) const |
| bool | setData (const QModelIndex &index, const QVariant &value, int role) |
| bool | insertRow (int row, const QModelIndex &parent=QModelIndex()) |
| bool | removeRow (int row, const QModelIndex &parent=QModelIndex()) |
| Qt::ItemFlags | flags (const QModelIndex &index) const |
| QVariant | headerData (int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const |
| QModelIndex | index (int row, int column, const QModelIndex &parent=QModelIndex()) const |
| QModelIndex | parent (const QModelIndex &index) const |
| int | rowCount (const QModelIndex &parent=QModelIndex()) const |
| int | columnCount (const QModelIndex &parent=QModelIndex()) const |
| QModelIndex | getModelIndexForFrame (int frame) const |
| int | getFrameForModelIndex (const QModelIndex &) const |
| void | sort (int column, Qt::SortOrder order=Qt::AscendingOrder) |
| QModelIndex | findText (QString text) const |
| void | setCurrentRow (int row) |
| int | getCurrentRow () const |
Protected Types | |
| typedef std::vector< int > | RowList |
Protected Slots | |
| void | modelChanged () |
| void | modelChangedWithin (int, int) |
| void | modelAboutToBeDeleted () |
Protected Member Functions | |
| int | getSorted (int row) const |
| int | getUnsorted (int row) const |
| void | resort () const |
| void | resortNumeric () const |
| void | resortAlphabetical () const |
| void | clearSort () |
Protected Attributes | |
| TabularModel * | m_model |
| int | m_sortColumn |
| Qt::SortOrder | m_sortOrdering |
| int | m_currentRow |
| RowList | m_sort |
| RowList | m_rsort |
Definition at line 26 of file ModelDataTableModel.h.
|
protected |
Definition at line 80 of file ModelDataTableModel.h.
| ModelDataTableModel::ModelDataTableModel | ( | TabularModel * | m | ) |
Definition at line 25 of file ModelDataTableModel.cpp.
References modelAboutToBeDeleted(), modelChanged(), and modelChangedWithin().
|
virtual |
Definition at line 40 of file ModelDataTableModel.cpp.
| QVariant ModelDataTableModel::data | ( | const QModelIndex & | index, |
| int | role | ||
| ) | const |
Definition at line 45 of file ModelDataTableModel.cpp.
References TabularModel::getData(), getUnsorted(), index(), and m_model.
| bool ModelDataTableModel::setData | ( | const QModelIndex & | index, |
| const QVariant & | value, | ||
| int | role | ||
| ) |
Definition at line 54 of file ModelDataTableModel.cpp.
References addCommand(), TabularModel::getSetDataCommand(), getUnsorted(), index(), and m_model.
| bool ModelDataTableModel::insertRow | ( | int | row, |
| const QModelIndex & | parent = QModelIndex() |
||
| ) |
Definition at line 70 of file ModelDataTableModel.cpp.
References addCommand(), TabularModel::getInsertRowCommand(), getUnsorted(), m_model, and parent().
| bool ModelDataTableModel::removeRow | ( | int | row, |
| const QModelIndex & | parent = QModelIndex() |
||
| ) |
Definition at line 89 of file ModelDataTableModel.cpp.
References addCommand(), TabularModel::getRemoveRowCommand(), getUnsorted(), m_model, and parent().
| Qt::ItemFlags ModelDataTableModel::flags | ( | const QModelIndex & | index | ) | const |
Definition at line 108 of file ModelDataTableModel.cpp.
| QVariant ModelDataTableModel::headerData | ( | int | section, |
| Qt::Orientation | orientation, | ||
| int | role = Qt::DisplayRole |
||
| ) | const |
Definition at line 116 of file ModelDataTableModel.cpp.
References TabularModel::getHeading(), and m_model.
| QModelIndex ModelDataTableModel::index | ( | int | row, |
| int | column, | ||
| const QModelIndex & | parent = QModelIndex() |
||
| ) | const |
Definition at line 130 of file ModelDataTableModel.cpp.
Referenced by data(), getFrameForModelIndex(), and setData().
| QModelIndex ModelDataTableModel::parent | ( | const QModelIndex & | index | ) | const |
Definition at line 136 of file ModelDataTableModel.cpp.
Referenced by columnCount(), insertRow(), removeRow(), and rowCount().
| int ModelDataTableModel::rowCount | ( | const QModelIndex & | parent = QModelIndex() | ) | const |
Definition at line 142 of file ModelDataTableModel.cpp.
References TabularModel::getRowCount(), m_model, and parent().
Referenced by findText(), getSorted(), and getUnsorted().
| int ModelDataTableModel::columnCount | ( | const QModelIndex & | parent = QModelIndex() | ) | const |
Definition at line 150 of file ModelDataTableModel.cpp.
References TabularModel::getColumnCount(), m_model, and parent().
Referenced by findText().
| QModelIndex ModelDataTableModel::getModelIndexForFrame | ( | int | frame | ) | const |
Definition at line 158 of file ModelDataTableModel.cpp.
References TabularModel::getRowForFrame(), getSorted(), and m_model.
| int ModelDataTableModel::getFrameForModelIndex | ( | const QModelIndex & | index | ) | const |
Definition at line 166 of file ModelDataTableModel.cpp.
References TabularModel::getFrameForRow(), getUnsorted(), index(), and m_model.
| void ModelDataTableModel::sort | ( | int | column, |
| Qt::SortOrder | order = Qt::AscendingOrder |
||
| ) |
Definition at line 196 of file ModelDataTableModel.cpp.
References clearSort(), currentChanged(), getCurrentRow(), m_sortColumn, and m_sortOrdering.
| QModelIndex ModelDataTableModel::findText | ( | QString | text | ) | const |
Definition at line 173 of file ModelDataTableModel.cpp.
References columnCount(), getCurrentRow(), TabularModel::getData(), TabularModel::getSortType(), getUnsorted(), m_model, rowCount(), and TabularModel::SortAlphabetical.
| void ModelDataTableModel::setCurrentRow | ( | int | row | ) |
Definition at line 379 of file ModelDataTableModel.cpp.
References getUnsorted(), and m_currentRow.
| int ModelDataTableModel::getCurrentRow | ( | ) | const |
Definition at line 373 of file ModelDataTableModel.cpp.
References getSorted(), and m_currentRow.
Referenced by findText(), and sort().
|
signal |
|
signal |
Referenced by insertRow(), removeRow(), and setData().
|
signal |
Referenced by sort().
|
signal |
Referenced by modelAboutToBeDeleted().
|
protectedslot |
Definition at line 215 of file ModelDataTableModel.cpp.
References clearSort().
Referenced by ModelDataTableModel().
|
protectedslot |
!! inefficient
Definition at line 222 of file ModelDataTableModel.cpp.
References clearSort().
Referenced by ModelDataTableModel().
|
protectedslot |
Definition at line 230 of file ModelDataTableModel.cpp.
References m_model, and modelRemoved().
Referenced by ModelDataTableModel().
|
protected |
Definition at line 237 of file ModelDataTableModel.cpp.
References TabularModel::isColumnTimeValue(), m_model, m_sort, m_sortColumn, m_sortOrdering, resort(), and rowCount().
Referenced by getCurrentRow(), and getModelIndexForFrame().
|
protected |
Definition at line 264 of file ModelDataTableModel.cpp.
References TabularModel::isColumnTimeValue(), m_model, m_rsort, m_sort, m_sortColumn, m_sortOrdering, resort(), and rowCount().
Referenced by data(), findText(), getFrameForModelIndex(), insertRow(), removeRow(), setCurrentRow(), and setData().
|
protected |
Definition at line 293 of file ModelDataTableModel.cpp.
References TabularModel::getSortType(), m_model, m_rsort, m_sort, m_sortColumn, resortAlphabetical(), resortNumeric(), and TabularModel::SortNumeric.
Referenced by getSorted(), and getUnsorted().
|
protected |
Definition at line 326 of file ModelDataTableModel.cpp.
References TabularModel::getData(), TabularModel::getRowCount(), m_model, m_rsort, m_sortColumn, and TabularModel::SortRole.
Referenced by resort().
|
protected |
Definition at line 349 of file ModelDataTableModel.cpp.
References TabularModel::getData(), TabularModel::getRowCount(), m_model, m_rsort, m_sortColumn, and TabularModel::SortRole.
Referenced by resort().
|
protected |
Definition at line 385 of file ModelDataTableModel.cpp.
References m_sort.
Referenced by modelChanged(), modelChangedWithin(), and sort().
|
protected |
Definition at line 76 of file ModelDataTableModel.h.
Referenced by columnCount(), data(), findText(), getFrameForModelIndex(), getModelIndexForFrame(), getSorted(), getUnsorted(), headerData(), insertRow(), modelAboutToBeDeleted(), removeRow(), resort(), resortAlphabetical(), resortNumeric(), rowCount(), and setData().
|
protected |
Definition at line 77 of file ModelDataTableModel.h.
Referenced by getSorted(), getUnsorted(), resort(), resortAlphabetical(), resortNumeric(), and sort().
|
protected |
Definition at line 78 of file ModelDataTableModel.h.
Referenced by getSorted(), getUnsorted(), and sort().
|
protected |
Definition at line 79 of file ModelDataTableModel.h.
Referenced by getCurrentRow(), and setCurrentRow().
|
mutableprotected |
Definition at line 81 of file ModelDataTableModel.h.
Referenced by clearSort(), getSorted(), getUnsorted(), and resort().
|
mutableprotected |
Definition at line 82 of file ModelDataTableModel.h.
Referenced by getUnsorted(), resort(), resortAlphabetical(), and resortNumeric().