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
|
|
| ~TimerModel () |
| destructor
|
|
QVariant | data (const QModelIndex &index, int role) const |
| overwritten data method of QAbstractItemModel
|
|
QModelIndex | index (int row, int column, const QModelIndex &parent=QModelIndex()) const |
| returns QModelIndex for given row and column
|
|
QModelIndex | parent (const QModelIndex &index) const |
| returns parent of given QModelIndex
|
|
int | rowCount (const QModelIndex &parent=QModelIndex()) const |
| counts number of bookmarks in this model
|
|
int | columnCount (const QModelIndex &parent=QModelIndex()) const |
| counts number of columns in this model (corresponds to number of header-elements)
|
|
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
|
|
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.
◆ TimerModel()
ito::TimerModel::TimerModel |
( |
| ) |
|
constructor
initializes headers and its alignment
◆ cacheItem()
bool ito::TimerModel::cacheItem |
( |
TimerItem & | item | ) |
|
|
private |
list of timers (TimerItem) which are currently available in this application
◆ columnCount()
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
◆ data()
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
◆ headerData()
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)
◆ index()
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
◆ parent()
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
◆ rowCount()
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:/Workspace/itom_development_VS2019_Qt5.15.2_x64/itomProject/itom/Qitom/models/timerModel.h
- C:/Workspace/itom_development_VS2019_Qt5.15.2_x64/itomProject/itom/Qitom/models/timerModel.cpp