model for management of all timer objects. This model will be is used as model for the view in the timer manager.
More...
|
| TimerModel () |
| constructor More...
|
|
| ~TimerModel () |
| destructor
|
|
QVariant | data (const QModelIndex &index, int role) const |
| overwritten data method of QAbstractItemModel More...
|
|
QModelIndex | index (int row, int column, const QModelIndex &parent=QModelIndex()) const |
| returns QModelIndex for given row and column More...
|
|
QModelIndex | parent (const QModelIndex &index) const |
| returns parent of given QModelIndex More...
|
|
int | rowCount (const QModelIndex &parent=QModelIndex()) const |
| counts number of bookmarks in this model More...
|
|
int | columnCount (const QModelIndex &parent=QModelIndex()) const |
| counts number of columns in this model (corresponds to number of header-elements) More...
|
|
void | registerNewTimer (const QWeakPointer< QTimer > &timer, const QString &name) |
|
void | updateTimerData () |
|
void | autoUpdateModel (bool enabled) |
|
void | timerStart (const QModelIndex &index) |
|
void | timerStop (const QModelIndex &index) |
|
void | timerStopAll () |
|
|
QVariant | headerData (int section, Qt::Orientation orientation, int role) const |
| returns header element at given position More...
|
|
void | timerEvent (QTimerEvent *ev) |
|
|
void | timerDestroyed (QObject *timer) |
|
|
QList< TimerItem > | m_timers |
|
int | m_timerId |
|
int | m_enableCount |
|
QIcon | m_iconRunning |
|
QIcon | m_iconStopped |
|
QIcon | m_iconUnknown |
|
model for management of all timer objects. This model will be is used as model for the view in the timer manager.
ito::TimerModel::TimerModel |
( |
| ) |
|
constructor
initializes headers and its alignment
bool ito::TimerModel::cacheItem |
( |
TimerItem & |
item | ) |
|
|
private |
list of timers (TimerItem) which are currently available in this application
int ito::TimerModel::columnCount |
( |
const QModelIndex & |
parent = QModelIndex() | ) |
const |
counts number of columns in this model (corresponds to number of header-elements)
- Returns
- number of columns
QVariant ito::TimerModel::data |
( |
const QModelIndex & |
index, |
|
|
int |
role |
|
) |
| const |
overwritten data method of QAbstractItemModel
data method will be called by View-Widget in order to fill the table.
- Parameters
-
index | QModelIndex of item, whose content should be returned |
- Returns
- content of desired item and column
QVariant ito::TimerModel::headerData |
( |
int |
section, |
|
|
Qt::Orientation |
orientation, |
|
|
int |
role |
|
) |
| const |
|
protected |
returns header element at given position
- Parameters
-
section | position in m_headers list |
orientation | the model's orientation should be horizontal, no other orientation is supported |
role | model is only prepared for DisplayRole |
- Returns
- name of header or empty QVariant value (if no header element available)
QModelIndex ito::TimerModel::index |
( |
int |
row, |
|
|
int |
column, |
|
|
const QModelIndex & |
parent = QModelIndex() |
|
) |
| const |
returns QModelIndex for given row and column
- Parameters
-
row | row of desired entry, corresponds to index in m_bookmarks list |
column | column of desired entry |
parent | since this model is no tree model, parent always points to a "virtual" root element |
- Returns
- empty QModelIndex if row or column are out of bound, else returns new valid QModelIndex for that combination of row and column
QModelIndex ito::TimerModel::parent |
( |
const QModelIndex & |
index | ) |
const |
returns parent of given QModelIndex
since this model is not a tree model, returns always an empty QModelIndex
int ito::TimerModel::rowCount |
( |
const QModelIndex & |
parent = QModelIndex() | ) |
const |
counts number of bookmarks in this model
- Returns
- number of elements
The documentation for this class was generated from the following files:
- C:/itom/sources/itom/Qitom/models/timerModel.h
- C:/itom/sources/itom/Qitom/models/timerModel.cpp