28 , m_model(new QStandardItemModel())
40 for (QAction *action: actionCollection->
actions()) {
41 actionsSnapshot->
addAction(action->objectName(), action);
44 QMap<QString, KisKActionCollection*> sortedCollections = actionsSnapshot->actionCollections();
46 for (QAction* action: collection->actions()) {
47 QString actionName = KLocalizedString::removeAcceleratorMarker(action->text());
48 QStandardItem* item =
new QStandardItem(action->icon(), actionName);
49 QStandardItem* actionNameItem =
new QStandardItem(action->objectName());
55 m_model->insertRow(0,
new QStandardItem(i18n(
"Do nothing")));
97 KConfigGroup cfg = KSharedConfig::openConfig()->group(
"SPenSettings");
100 cfg.writeEntry(
"actionButtonDoubleClick",
actionNameForIndex(
mUi->cmbDoubleClickAction->currentIndex()));
102 cfg.writeEntry(
"actionGestureSwipeDown",
actionNameForIndex(
mUi->cmbGestureSwipeDown->currentIndex()));
103 cfg.writeEntry(
"actionGestureSwipeLeft",
actionNameForIndex(
mUi->cmbGestureSwipeLeft->currentIndex()));
104 cfg.writeEntry(
"actionGestureSwipeRight",
actionNameForIndex(
mUi->cmbGestureSwipeRight->currentIndex()));
105 cfg.writeEntry(
"actionGestureCircleCW",
actionNameForIndex(
mUi->cmbGestureCircleCW->currentIndex()));
106 cfg.writeEntry(
"actionGestureCircleCCW",
actionNameForIndex(
mUi->cmbGestureCircleCCW->currentIndex()));
113 KConfigGroup cfg = KSharedConfig::openConfig()->group(
"SPenSettings");
116 mUi->cmbDoubleClickAction->setCurrentIndex(
indexFromActionName(cfg.readEntry(
"actionButtonDoubleClick", QString())));
117 mUi->cmbGestureSwipeUp->setCurrentIndex(
indexFromActionName(cfg.readEntry(
"actionGestureSwipeUp", QString())));
118 mUi->cmbGestureSwipeDown->setCurrentIndex(
indexFromActionName(cfg.readEntry(
"actionGestureSwipeDown", QString())));
119 mUi->cmbGestureSwipeLeft->setCurrentIndex(
indexFromActionName(cfg.readEntry(
"actionGestureSwipeLeft", QString())));
120 mUi->cmbGestureSwipeRight->setCurrentIndex(
indexFromActionName(cfg.readEntry(
"actionGestureSwipeRight", QString())));
121 mUi->cmbGestureCircleCW->setCurrentIndex(
indexFromActionName(cfg.readEntry(
"actionGestureCircleCW", QString())));
122 mUi->cmbGestureCircleCCW->setCurrentIndex(
indexFromActionName(cfg.readEntry(
"actionGestureCircleCCW", QString())));
133 mUi->cmbGestureSwipeRight->setCurrentIndex(
indexFromActionName(QString(
"KritaSelected/KisToolColorSampler")));
135 mUi->cmbGestureCircleCCW->setCurrentIndex(
indexFromActionName(QString(
"shift_brush_color_counter_clockwise")));