#include <qsescanaveragermodel.h>
List of all members.
Public Member Functions |
| | QseScanAveragerModel (QseScanAverager *averager, QTableView *table, QObject *parent=0) |
| int | rowCount (const QModelIndex &parent=QModelIndex()) const |
| int | columnCount (const QModelIndex &parent=QModelIndex()) const |
| QVariant | data (const QModelIndex &index, int role) const |
| QVariant | headerData (int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const |
Private Types |
| typedef QAbstractTableModel | inherited |
Detailed Description
Definition at line 9 of file qsescanaveragermodel.h.
Member Typedef Documentation
Constructor & Destructor Documentation
| QseScanAveragerModel::QseScanAveragerModel |
( |
QseScanAverager * |
averager, |
|
|
QTableView * |
table, |
|
|
QObject * |
parent = 0 |
|
) |
| |
Member Function Documentation
| int QseScanAveragerModel::columnCount |
( |
const QModelIndex & |
parent = QModelIndex() | ) |
const |
| QVariant QseScanAveragerModel::data |
( |
const QModelIndex & |
index, |
|
|
int |
role |
|
) |
| const |
Definition at line 71 of file qsescanaveragermodel.cpp.
References QseScan::column(), columnCount(), and m_ScanAverager.
{
if (!index.isValid()) {
return QVariant();
}
if (role == Qt::DisplayRole) {
int row = index.row();
int col = index.column();
switch (col) {
case 0:
return scan -> name();
break;
case 1:
return scan -> maxRowCount();
break;
case 2:
break;
default:
if (c) {
return c -> name();
} else {
return QVariant();
}
}
} else {
return QVariant();
}
}
| void QseScanAveragerModel::dataChanged |
( |
| ) |
|
|
slot |
| void QseScanAveragerModel::dataCleared |
( |
| ) |
|
|
slot |
| QVariant QseScanAveragerModel::headerData |
( |
int |
section, |
|
|
Qt::Orientation |
orientation, |
|
|
int |
role = Qt::DisplayRole |
|
) |
| const |
Definition at line 112 of file qsescanaveragermodel.cpp.
{
if (orientation == Qt::Horizontal && role == Qt::DisplayRole) {
switch (section) {
case 0:
return "Scan Name";
break;
case 1:
return "Rows";
break;
case 2:
return "Columns";
break;
default:
return tr("Col %1").arg(section-3);
}
}
if (orientation == Qt::Vertical && role == Qt::DisplayRole) {
return section;
}
return QVariant();
}
| void QseScanAveragerModel::operationCompleted |
( |
| ) |
|
|
slot |
| int QseScanAveragerModel::rowCount |
( |
const QModelIndex & |
parent = QModelIndex() | ) |
const |
| void QseScanAveragerModel::scanAdded |
( |
int |
n | ) |
|
|
slot |
Member Data Documentation
| int QseScanAveragerModel::m_PrevColumnCount |
|
mutableprivate |
| int QseScanAveragerModel::m_PrevRowCount |
|
mutableprivate |
| QTableView* QseScanAveragerModel::m_TableView |
|
private |
The documentation for this class was generated from the following files: