Changeset View
Changeset View
Standalone View
Standalone View
krusader/Dialogs/krdialogs.cpp
Show First 20 Lines • Show All 116 Lines • ▼ Show 20 Line(s) | 100 | { | |||
---|---|---|---|---|---|
117 | 117 | | |||
118 | QPushButton *queueButton = new QPushButton( | 118 | QPushButton *queueButton = new QPushButton( | ||
119 | krJobMan->isQueueModeEnabled() ? i18n("F2 Delay Job Start") : i18n("F2 Queue"), this); | 119 | krJobMan->isQueueModeEnabled() ? i18n("F2 Delay Job Start") : i18n("F2 Queue"), this); | ||
120 | queueButton->setToolTip(krJobMan->isQueueModeEnabled() ? | 120 | queueButton->setToolTip(krJobMan->isQueueModeEnabled() ? | ||
121 | i18n("Do not start the job now.") : | 121 | i18n("Do not start the job now.") : | ||
122 | i18n("Enqueue the job if another job is running. Otherwise start immediately.")); | 122 | i18n("Enqueue the job if another job is running. Otherwise start immediately.")); | ||
123 | buttonBox->addButton(queueButton, QDialogButtonBox::ActionRole); | 123 | buttonBox->addButton(queueButton, QDialogButtonBox::ActionRole); | ||
124 | 124 | | |||
125 | connect(buttonBox, SIGNAL(accepted()), SLOT(accept())); | 125 | connect(buttonBox, &QDialogButtonBox::accepted, this, &KUrlRequesterDlgForCopy::accept); | ||
126 | connect(buttonBox, SIGNAL(rejected()), SLOT(reject())); | 126 | connect(buttonBox, &QDialogButtonBox::rejected, this, &KUrlRequesterDlgForCopy::reject); | ||
127 | connect(queueButton, SIGNAL(clicked()), SLOT(slotQueueButtonClicked())); | 127 | connect(queueButton, &QPushButton::clicked, this, &KUrlRequesterDlgForCopy::slotQueueButtonClicked); | ||
128 | connect(urlRequester_, SIGNAL(textChanged(QString)), SLOT(slotTextChanged(QString))); | 128 | connect(urlRequester_, &KUrlRequester::textChanged, this, &KUrlRequesterDlgForCopy::slotTextChanged); | ||
129 | 129 | | |||
130 | urlRequester_->setFocus(); | 130 | urlRequester_->setFocus(); | ||
131 | bool state = !urlName.isEmpty(); | 131 | bool state = !urlName.isEmpty(); | ||
132 | okButton->setEnabled(state); | 132 | okButton->setEnabled(state); | ||
133 | } | 133 | } | ||
134 | 134 | | |||
135 | void KUrlRequesterDlgForCopy::keyPressEvent(QKeyEvent *e) | 135 | void KUrlRequesterDlgForCopy::keyPressEvent(QKeyEvent *e) | ||
136 | { | 136 | { | ||
Show All 39 Lines | |||||
176 | { | 176 | { | ||
177 | setWindowModality(Qt::WindowModal); | 177 | setWindowModality(Qt::WindowModal); | ||
178 | dateWidget = new KDatePicker(this); | 178 | dateWidget = new KDatePicker(this); | ||
179 | dateWidget->setDate(date); | 179 | dateWidget->setDate(date); | ||
180 | dateWidget->resize(dateWidget->sizeHint()); | 180 | dateWidget->resize(dateWidget->sizeHint()); | ||
181 | setMinimumSize(dateWidget->sizeHint()); | 181 | setMinimumSize(dateWidget->sizeHint()); | ||
182 | setMaximumSize(dateWidget->sizeHint()); | 182 | setMaximumSize(dateWidget->sizeHint()); | ||
183 | resize(minimumSize()); | 183 | resize(minimumSize()); | ||
184 | connect(dateWidget, SIGNAL(dateSelected(QDate)), this, SLOT(setDate(QDate))); | 184 | connect(dateWidget, &KDatePicker::dateSelected, this, &KRGetDate::setDate); | ||
185 | connect(dateWidget, SIGNAL(dateEntered(QDate)), this, SLOT(setDate(QDate))); | 185 | connect(dateWidget, &KDatePicker::dateEntered, this, &KRGetDate::setDate); | ||
186 | 186 | | |||
187 | // keep the original date - incase ESC is pressed | 187 | // keep the original date - incase ESC is pressed | ||
188 | originalDate = date; | 188 | originalDate = date; | ||
189 | } | 189 | } | ||
190 | 190 | | |||
191 | QDate KRGetDate::getDate() | 191 | QDate KRGetDate::getDate() | ||
192 | { | 192 | { | ||
193 | if (exec() == QDialog::Rejected) chosenDate = QDate(); | 193 | if (exec() == QDialog::Rejected) chosenDate = QDate(); | ||
Show All 10 Lines |