Mercurial > hg > svcore
comparison data/model/ModelDataTableModel.cpp @ 425:f5e8f12d2e58
* Add audio device selection to preferences
* Add (not yet functional) insert, delete, edit buttons to data edit window
* Add proper set methods for time fields in data edit window (using general
sparse model base class)
author | Chris Cannam |
---|---|
date | Fri, 13 Jun 2008 21:09:43 +0000 |
parents | eafef13bb0b3 |
children | 2386582f67cd |
comparison
equal
deleted
inserted
replaced
424:eafef13bb0b3 | 425:f5e8f12d2e58 |
---|---|
72 } | 72 } |
73 | 73 |
74 QVariant | 74 QVariant |
75 ModelDataTableModel::headerData(int section, Qt::Orientation orientation, int role) const | 75 ModelDataTableModel::headerData(int section, Qt::Orientation orientation, int role) const |
76 { | 76 { |
77 if (orientation == Qt::Vertical && role == Qt::DisplayRole) { | |
78 return section + 1; | |
79 } | |
77 if (orientation == Qt::Horizontal && role == Qt::DisplayRole) { | 80 if (orientation == Qt::Horizontal && role == Qt::DisplayRole) { |
78 return m_model->getHeading(section); | 81 return m_model->getHeading(section); |
79 } | 82 } |
80 return QVariant(); | 83 return QVariant(); |
81 } | 84 } |
82 | 85 |
83 QModelIndex | 86 QModelIndex |
84 ModelDataTableModel::index(int row, int column, const QModelIndex &parent) const | 87 ModelDataTableModel::index(int row, int column, const QModelIndex &parent) const |