[libcalamaresui] Expose currentIndex also as model data
This commit is contained in:
parent
b8962cec2d
commit
aad79f664e
@ -559,6 +559,8 @@ ViewManager::data( const QModelIndex& index, int role ) const
|
|||||||
{
|
{
|
||||||
return QVariant();
|
return QVariant();
|
||||||
}
|
}
|
||||||
|
case ProgressTreeItemCurrentIndex:
|
||||||
|
return m_currentStep;
|
||||||
case ProgressTreeItemCurrentRole:
|
case ProgressTreeItemCurrentRole:
|
||||||
return currentStep() == step;
|
return currentStep() == step;
|
||||||
case ProgressTreeItemCompletedRole:
|
case ProgressTreeItemCompletedRole:
|
||||||
|
@ -154,7 +154,8 @@ public:
|
|||||||
enum Role
|
enum Role
|
||||||
{
|
{
|
||||||
ProgressTreeItemCurrentRole = Qt::UserRole + 11, ///< Is this the *current* step?
|
ProgressTreeItemCurrentRole = Qt::UserRole + 11, ///< Is this the *current* step?
|
||||||
ProgressTreeItemCompletedRole = Qt::UserRole + 12 ///< Are we past this one?
|
ProgressTreeItemCompletedRole = Qt::UserRole + 12, ///< Are we past this one?
|
||||||
|
ProgressTreeItemCurrentIndex = Qt::UserRole + 13 ///< Index (row) of the current step
|
||||||
};
|
};
|
||||||
|
|
||||||
QVariant data( const QModelIndex& index, int role = Qt::DisplayRole ) const override;
|
QVariant data( const QModelIndex& index, int role = Qt::DisplayRole ) const override;
|
||||||
|
Loading…
Reference in New Issue
Block a user