22 : QActionGroup(parent)
25 {
26 setExclusive(true);
29
32
33 for (int i = 0; i < unitNames.count(); ++i) {
34 QAction* action = new QAction(unitNames.at(i), this);
35 action->setData(i);
36 action->setCheckable(true);
37
38 if (currentUnitIndex == i) {
39 action->setChecked(true);
40 }
41 }
42 }
connect(this, SIGNAL(optionsChanged()), this, SLOT(saveOptions()))
static QStringList listOfUnitNameForUi(ListOptions listOptions=ListAll)
Returns the list of unit types for the UI, controlled with the given listOptions.
int indexInListForUi(ListOptions listOptions=ListAll) const
KoUnit::ListOptions m_listOptions
void onTriggered(QAction *action)
void onUnitChanged(const KoUnit &unit)