19 #include <QStandardItemModel>
22 :
StyledToolBar(parent), m_comboBox(new QComboBox), m_comboBoxAction(nullptr)
24 setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
26 m_comboBox->setToolTip(
"Select type of graphical presentation.");
41 const QStringList& activeList)
43 ASSERT(presentationList.size());
50 if (activeList.contains(previous))
53 if (!activeList.isEmpty())
68 for (
auto action : actions())
71 for (
auto action : actionList) {
83 static_cast<void (QComboBox::*)(
const QString&)
>(&QComboBox::currentIndexChanged),
88 static_cast<void (QComboBox::*)(
const QString&)
>(&QComboBox::currentIndexChanged),
this,
96 const QStandardItemModel* model =
dynamic_cast<const QStandardItemModel*
>(
m_comboBox->model());
99 for (
int row = 0; row <
m_comboBox->count(); ++row) {
101 model->item(row)->setEnabled(activePresentations.contains(text));
Defines the macro ASSERT.
#define ASSERT(condition)
QString const & name(EShape k)