Commit 956bdeb0 authored by Johannes Zarl-Zierl's avatar Johannes Zarl-Zierl

Add indicator icon for Selectable ListSelects.

This is a follow-up to commit 4ec9ae53
parent 01dc5303
......@@ -87,6 +87,10 @@ AnnotationDialog::ListSelect::ListSelect(const DB::CategoryPtr &category, QWidge
m_roIndicator->setPixmap(smallIcon(QString::fromLatin1("emblem-readonly")));
m_roIndicator->setVisible(m_editMode == ListSelectEditMode::ReadOnly);
lay2->addWidget(m_roIndicator);
m_selectableIndicator = new QLabel;
m_selectableIndicator->setPixmap(smallIcon(QString::fromLatin1("emblem-checked")));
m_selectableIndicator->setVisible(m_editMode == ListSelectEditMode::Selectable);
lay2->addWidget(m_selectableIndicator);
m_or = new QRadioButton(i18n("or"), this);
m_and = new QRadioButton(i18n("and"), this);
......@@ -727,6 +731,8 @@ void ListSelect::updateLineEditMode()
const bool isReadOnly = computedEditMode() == ListSelectEditMode::ReadOnly;
m_roIndicator->setVisible(isReadOnly);
const bool isSelectable = computedEditMode() == ListSelectEditMode::Selectable;
m_selectableIndicator->setVisible(isSelectable);
}
void AnnotationDialog::ListSelect::updateSelectionCount()
......
......@@ -153,7 +153,8 @@ private: // Variables
QRadioButton *m_and;
UsageMode m_mode;
ListSelectEditMode m_editMode = ListSelectEditMode::Editable;
QLabel *m_roIndicator;
QLabel *m_roIndicator; ///< indicates computedEditMode() ReadOnly
QLabel *m_selectableIndicator; ///< indicates computedEditMode() Selectable
QToolButton *m_alphaTreeSort;
QToolButton *m_alphaFlatSort;
QToolButton *m_dateSort;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment