Commit 4ec9ae53 authored by Johannes Zarl-Zierl's avatar Johannes Zarl-Zierl

Add indicator icon for read-only ListSelects.

parent cacb0dc6
......@@ -83,6 +83,11 @@ AnnotationDialog::ListSelect::ListSelect(const DB::CategoryPtr &category, QWidge
QHBoxLayout *lay2 = new QHBoxLayout;
layout->addLayout(lay2);
m_roIndicator = new QLabel;
m_roIndicator->setPixmap(smallIcon(QString::fromLatin1("emblem-readonly")));
m_roIndicator->setVisible(m_editMode == ListSelectEditMode::ReadOnly);
lay2->addWidget(m_roIndicator);
m_or = new QRadioButton(i18n("or"), this);
m_and = new QRadioButton(i18n("and"), this);
lay2->addWidget(m_or);
......@@ -714,6 +719,8 @@ void ListSelect::updateLineEditMode()
m_lineEdit->setMode(SearchMode);
else
m_lineEdit->setMode(m_mode);
m_roIndicator->setVisible(computedEditMode() == ListSelectEditMode::ReadOnly);
}
void AnnotationDialog::ListSelect::updateSelectionCount()
......
......@@ -153,6 +153,7 @@ private: // Variables
QRadioButton *m_and;
UsageMode m_mode;
ListSelectEditMode m_editMode = ListSelectEditMode::Editable;
QLabel *m_roIndicator;
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