16 #include "Base/Util/Assert.h"
18 #include <QStandardItemModel>
22 , m_comboBox(new QComboBox)
23 , m_comboBoxAction(nullptr)
25 setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
27 m_comboBox->setToolTip(
"Select type of graphical presentation.");
42 const QStringList& activeList)
49 if (activeList.contains(previous))
52 if (!activeList.isEmpty())
67 for (
auto* action : actions())
70 for (
auto* action : actionList) {
82 static_cast<void (QComboBox::*)(
const QString&)
>(&QComboBox::currentIndexChanged),
87 static_cast<void (QComboBox::*)(
const QString&)
>(&QComboBox::currentIndexChanged),
this,
95 const auto* model =
dynamic_cast<const QStandardItemModel*
>(
m_comboBox->model());
98 for (
int row = 0; row <
m_comboBox->count(); ++row) {
100 model->item(row)->setEnabled(activePresentations.contains(text));
QString const & name(EShape k)