Table model listing all CppMicroServices modules.
More...
#include <QmitkModuleTableModel.h>
|
| int | rowCount (const QModelIndex &parent=QModelIndex()) const override |
| | Return the number of modules. More...
|
| |
| int | columnCount (const QModelIndex &parent=QModelIndex()) const override |
| | Return the number of columns (always 4: ID, Name, Version, Location). More...
|
| |
| QVariant | data (const QModelIndex &index, int role) const override |
| | Return data for the given index and role. More...
|
| |
| QVariant | headerData (int section, Qt::Orientation orientation, int role) const override |
| | Return column header data. More...
|
| |
Table model listing all CppMicroServices modules.
Provides four columns: ID, Name, Version, and Location. Listens for module events and automatically updates when modules are loaded or unloaded. Unloaded modules are displayed with gray text. Tooltips show detailed module info.
Definition at line 36 of file QmitkModuleTableModel.h.
◆ QmitkModuleTableModel()
| QmitkModuleTableModel::QmitkModuleTableModel |
( |
QObject * |
parent = nullptr, |
|
|
us::ModuleContext * |
mc = nullptr |
|
) |
| |
Construct the model.
- Parameters
-
| [in] | parent | The parent QObject. |
| [in] | mc | The module context to query. Defaults to the current module context. |
◆ ~QmitkModuleTableModel()
| QmitkModuleTableModel::~QmitkModuleTableModel |
( |
| ) |
|
|
override |
Destructor. Removes the module event listener.
◆ columnCount()
| int QmitkModuleTableModel::columnCount |
( |
const QModelIndex & |
parent = QModelIndex() | ) |
const |
|
overrideprotected |
Return the number of columns (always 4: ID, Name, Version, Location).
- Parameters
-
| [in] | parent | The parent index (unused for table models). |
- Returns
- 4
◆ data()
| QVariant QmitkModuleTableModel::data |
( |
const QModelIndex & |
index, |
|
|
int |
role |
|
) |
| const |
|
overrideprotected |
Return data for the given index and role.
Supports Qt::DisplayRole, Qt::ForegroundRole (gray for unloaded), and Qt::ToolTipRole.
- Parameters
-
| [in] | index | The model index. |
| [in] | role | The data role. |
- Returns
- The requested data as QVariant.
◆ headerData()
| QVariant QmitkModuleTableModel::headerData |
( |
int |
section, |
|
|
Qt::Orientation |
orientation, |
|
|
int |
role |
|
) |
| const |
|
overrideprotected |
Return column header data.
- Parameters
-
| [in] | section | The column index. |
| [in] | orientation | The header orientation (only Qt::Horizontal is supported). |
| [in] | role | The data role (only Qt::DisplayRole is supported). |
- Returns
- The header label as QVariant.
◆ rowCount()
| int QmitkModuleTableModel::rowCount |
( |
const QModelIndex & |
parent = QModelIndex() | ) |
const |
|
overrideprotected |
Return the number of modules.
- Parameters
-
| [in] | parent | The parent index (unused for table models). |
- Returns
- The number of rows (modules).
The documentation for this class was generated from the following file: