Changeset View
Changeset View
Standalone View
Standalone View
krusader/ActionMan/actionproperty.cpp
Show All 19 Lines | |||||
20 | 20 | | |||
21 | #include "actionproperty.h" | 21 | #include "actionproperty.h" | ||
22 | #include "addplaceholderpopup.h" | 22 | #include "addplaceholderpopup.h" | ||
23 | 23 | | |||
24 | #include "../UserAction/useraction.h" | 24 | #include "../UserAction/useraction.h" | ||
25 | #include "../UserAction/kraction.h" | 25 | #include "../UserAction/kraction.h" | ||
26 | #include "../krusader.h" | 26 | #include "../krusader.h" | ||
27 | #include "../krglobal.h" | 27 | #include "../krglobal.h" | ||
28 | #include "../icon.h" | ||||
28 | 29 | | |||
29 | // QtWidgets | 30 | // QtWidgets | ||
30 | #include <QFileDialog> | 31 | #include <QFileDialog> | ||
31 | #include <QInputDialog> | 32 | #include <QInputDialog> | ||
32 | 33 | | |||
33 | #include <KI18n/KLocalizedString> | 34 | #include <KI18n/KLocalizedString> | ||
34 | #include <KIconThemes/KIconLoader> | | |||
35 | #include <KWidgetsAddons/KMessageBox> | 35 | #include <KWidgetsAddons/KMessageBox> | ||
36 | #include <KXmlGui/KActionCollection> | 36 | #include <KXmlGui/KActionCollection> | ||
37 | 37 | | |||
38 | 38 | | |||
39 | #define ICON(N) KIconLoader::global()->loadIcon(N, KIconLoader::Small) | | |||
40 | | ||||
41 | ActionProperty::ActionProperty(QWidget *parent, KrAction *action) | 39 | ActionProperty::ActionProperty(QWidget *parent, KrAction *action) | ||
42 | : QWidget(parent), _modified(false) | 40 | : QWidget(parent), _modified(false) | ||
43 | { | 41 | { | ||
44 | 42 | | |||
45 | setupUi(this); | 43 | setupUi(this); | ||
46 | 44 | | |||
47 | if (action) { | 45 | if (action) { | ||
48 | _action = action; | 46 | _action = action; | ||
49 | updateGUI(_action); | 47 | updateGUI(_action); | ||
50 | } | 48 | } | ||
51 | 49 | | |||
52 | ButtonAddPlaceholder->setIcon(ICON("list-add")); | 50 | ButtonAddPlaceholder->setIcon(Icon("list-add")); | ||
53 | ButtonAddStartpath->setIcon(ICON("document-open")); | 51 | ButtonAddStartpath->setIcon(Icon("document-open")); | ||
54 | 52 | | |||
55 | // fill with all existing categories | 53 | // fill with all existing categories | ||
56 | cbCategory->addItems(krUserAction->allCategories()); | 54 | cbCategory->addItems(krUserAction->allCategories()); | ||
57 | 55 | | |||
58 | connect(ButtonAddPlaceholder, SIGNAL(clicked()), this, SLOT(addPlaceholder())); | 56 | connect(ButtonAddPlaceholder, SIGNAL(clicked()), this, SLOT(addPlaceholder())); | ||
59 | connect(ButtonAddStartpath, SIGNAL(clicked()), this, SLOT(addStartpath())); | 57 | connect(ButtonAddStartpath, SIGNAL(clicked()), this, SLOT(addStartpath())); | ||
60 | connect(ButtonNewProtocol, SIGNAL(clicked()), this, SLOT(newProtocol())); | 58 | connect(ButtonNewProtocol, SIGNAL(clicked()), this, SLOT(newProtocol())); | ||
61 | connect(ButtonEditProtocol, SIGNAL(clicked()), this, SLOT(editProtocol())); | 59 | connect(ButtonEditProtocol, SIGNAL(clicked()), this, SLOT(editProtocol())); | ||
▲ Show 20 Lines • Show All 225 Lines • ▼ Show 20 Line(s) | 217 | { | |||
287 | else | 285 | else | ||
288 | _action->setAcceptURLs(false); | 286 | _action->setAcceptURLs(false); | ||
289 | 287 | | |||
290 | _action->setEnabled(chkEnabled->isChecked()); | 288 | _action->setEnabled(chkEnabled->isChecked()); | ||
291 | _action->setVisible(chkEnabled->isChecked()); | 289 | _action->setVisible(chkEnabled->isChecked()); | ||
292 | 290 | | |||
293 | _action->setConfirmExecution(chkConfirmExecution->isChecked()); | 291 | _action->setConfirmExecution(chkConfirmExecution->isChecked()); | ||
294 | 292 | | |||
295 | _action->setIcon(QIcon::fromTheme(ButtonIcon->icon())); | 293 | _action->setIcon(Icon(ButtonIcon->icon())); | ||
296 | _action->setIconName(ButtonIcon->icon()); | 294 | _action->setIconName(ButtonIcon->icon()); | ||
297 | 295 | | |||
298 | _action->setUser(leDifferentUser->text()); | 296 | _action->setUser(leDifferentUser->text()); | ||
299 | 297 | | |||
300 | setModified(false); | 298 | setModified(false); | ||
301 | } | 299 | } | ||
302 | 300 | | |||
303 | void ActionProperty::addPlaceholder() | 301 | void ActionProperty::addPlaceholder() | ||
▲ Show 20 Lines • Show All 217 Lines • Show Last 20 Lines |