Changeset View
Changeset View
Standalone View
Standalone View
krusader/ActionMan/actionman.cpp
Show All 32 Lines | |||||
33 | #include "../UserAction/useraction.h" | 33 | #include "../UserAction/useraction.h" | ||
34 | 34 | | |||
35 | ActionMan::ActionMan(QWidget * parent) | 35 | ActionMan::ActionMan(QWidget * parent) | ||
36 | : QDialog(parent) | 36 | : QDialog(parent) | ||
37 | { | 37 | { | ||
38 | setWindowModality(Qt::WindowModal); | 38 | setWindowModality(Qt::WindowModal); | ||
39 | setWindowTitle(i18n("ActionMan - Manage Your Useractions")); | 39 | setWindowTitle(i18n("ActionMan - Manage Your Useractions")); | ||
40 | 40 | | |||
41 | QVBoxLayout *mainLayout = new QVBoxLayout; | 41 | auto *mainLayout = new QVBoxLayout; | ||
42 | setLayout(mainLayout); | 42 | setLayout(mainLayout); | ||
43 | 43 | | |||
44 | userActionPage = new UserActionPage(this); | 44 | userActionPage = new UserActionPage(this); | ||
45 | mainLayout->addWidget(userActionPage); | 45 | mainLayout->addWidget(userActionPage); | ||
46 | 46 | | |||
47 | QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Close|QDialogButtonBox::Apply); | 47 | QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Close|QDialogButtonBox::Apply); | ||
48 | mainLayout->addWidget(buttonBox); | 48 | mainLayout->addWidget(buttonBox); | ||
49 | 49 | | |||
50 | applyButton = buttonBox->button(QDialogButtonBox::Apply); | 50 | applyButton = buttonBox->button(QDialogButtonBox::Apply); | ||
51 | applyButton->setEnabled(false); | 51 | applyButton->setEnabled(false); | ||
52 | 52 | | |||
53 | connect(buttonBox, SIGNAL(rejected()), SLOT(slotClose())); | 53 | connect(buttonBox, SIGNAL(rejected()), SLOT(slotClose())); | ||
54 | connect(applyButton, SIGNAL(clicked()), SLOT(slotApply())); | 54 | connect(applyButton, SIGNAL(clicked()), SLOT(slotApply())); | ||
55 | connect(userActionPage, SIGNAL(changed()), SLOT(slotEnableApplyButton())); | 55 | connect(userActionPage, SIGNAL(changed()), SLOT(slotEnableApplyButton())); | ||
56 | connect(userActionPage, SIGNAL(applied()), SLOT(slotDisableApplyButton())); | 56 | connect(userActionPage, SIGNAL(applied()), SLOT(slotDisableApplyButton())); | ||
57 | 57 | | |||
58 | exec(); | 58 | exec(); | ||
59 | 59 | | |||
60 | krApp->updateUserActions(); | 60 | krApp->updateUserActions(); | ||
61 | } | 61 | } | ||
62 | 62 | | |||
63 | ActionMan::~ActionMan() | 63 | ActionMan::~ActionMan() | ||
64 | { | 64 | = default; | ||
65 | } | | |||
66 | 65 | | |||
67 | void ActionMan::slotClose() | 66 | void ActionMan::slotClose() | ||
68 | { | 67 | { | ||
69 | if (userActionPage->readyToQuit()) | 68 | if (userActionPage->readyToQuit()) | ||
70 | reject(); | 69 | reject(); | ||
71 | } | 70 | } | ||
72 | 71 | | |||
73 | void ActionMan::slotApply() | 72 | void ActionMan::slotApply() | ||
Show All 14 Lines |