Changeset View
Changeset View
Standalone View
Standalone View
krusader/ActionMan/addplaceholderpopup.cpp
Show First 20 Lines • Show All 202 Lines • ▼ Show 20 Line(s) | 155 | { | |||
---|---|---|---|---|---|
203 | layout->addWidget(line); | 203 | layout->addWidget(line); | ||
204 | 204 | | |||
205 | QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok|QDialogButtonBox::RestoreDefaults); | 205 | QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok|QDialogButtonBox::RestoreDefaults); | ||
206 | mainLayout->addWidget(buttonBox); | 206 | mainLayout->addWidget(buttonBox); | ||
207 | 207 | | |||
208 | QPushButton *okButton = buttonBox->button(QDialogButtonBox::Ok); | 208 | QPushButton *okButton = buttonBox->button(QDialogButtonBox::Ok); | ||
209 | okButton->setDefault(true); | 209 | okButton->setDefault(true); | ||
210 | okButton->setShortcut(Qt::CTRL | Qt::Key_Return); | 210 | okButton->setShortcut(Qt::CTRL | Qt::Key_Return); | ||
211 | connect(okButton, SIGNAL(clicked()), this, SLOT(slotOk())); | 211 | connect(okButton, &QPushButton:: clicked, this, &ParameterDialog::slotOk); | ||
212 | connect(buttonBox, SIGNAL(accepted()), this, SLOT(accept())); | 212 | connect(buttonBox, &QDialogButtonBox::accepted, this, &ParameterDialog::accept); | ||
213 | connect(buttonBox, SIGNAL(rejected()), this, SLOT(reject())); | 213 | connect(buttonBox, &QDialogButtonBox::rejected, this, &ParameterDialog::reject); | ||
214 | connect(buttonBox->button(QDialogButtonBox::RestoreDefaults), SIGNAL(clicked()), this, SLOT(reset())); | 214 | connect(buttonBox->button(QDialogButtonBox::RestoreDefaults), &QPushButton::clicked, this, &ParameterDialog::reset); | ||
215 | } | 215 | } | ||
216 | 216 | | |||
217 | QString ParameterDialog::getParameter() | 217 | QString ParameterDialog::getParameter() | ||
218 | { | 218 | { | ||
219 | if (_parameterCount == 0) // meaning no parameters | 219 | if (_parameterCount == 0) // meaning no parameters | ||
220 | return QString(); | 220 | return QString(); | ||
221 | 221 | | |||
222 | if (exec() == -1) | 222 | if (exec() == -1) | ||
▲ Show 20 Lines • Show All 81 Lines • ▼ Show 20 Line(s) | 295 | { | |||
304 | 304 | | |||
305 | hbox->setContentsMargins(0, 0, 0, 0); | 305 | hbox->setContentsMargins(0, 0, 0, 0); | ||
306 | hbox->setSpacing(6); | 306 | hbox->setSpacing(6); | ||
307 | _lineEdit = new KLineEdit(hboxWidget); | 307 | _lineEdit = new KLineEdit(hboxWidget); | ||
308 | hbox->addWidget(_lineEdit); | 308 | hbox->addWidget(_lineEdit); | ||
309 | _button = new QToolButton(hboxWidget); | 309 | _button = new QToolButton(hboxWidget); | ||
310 | _button->setIcon(Icon("list-add")); | 310 | _button->setIcon(Icon("list-add")); | ||
311 | hbox->addWidget(_button); | 311 | hbox->addWidget(_button); | ||
312 | connect(_button, SIGNAL(clicked()), this, SLOT(addPlaceholder())); | 312 | connect(_button, &QToolButton::clicked, this, &ParameterPlaceholder::addPlaceholder); | ||
313 | } | 313 | } | ||
314 | 314 | | |||
315 | QString ParameterPlaceholder::text() | 315 | QString ParameterPlaceholder::text() | ||
316 | { | 316 | { | ||
317 | return _lineEdit->text(); | 317 | return _lineEdit->text(); | ||
318 | } | 318 | } | ||
319 | QString ParameterPlaceholder::preset() | 319 | QString ParameterPlaceholder::preset() | ||
320 | { | 320 | { | ||
▲ Show 20 Lines • Show All 95 Lines • ▼ Show 20 Line(s) | 406 | { | |||
416 | 416 | | |||
417 | hbox->setContentsMargins(0, 0, 0, 0); | 417 | hbox->setContentsMargins(0, 0, 0, 0); | ||
418 | hbox->setSpacing(6); | 418 | hbox->setSpacing(6); | ||
419 | _lineEdit = new KLineEdit(hboxWidget); | 419 | _lineEdit = new KLineEdit(hboxWidget); | ||
420 | hbox->addWidget(_lineEdit); | 420 | hbox->addWidget(_lineEdit); | ||
421 | _button = new QToolButton(hboxWidget); | 421 | _button = new QToolButton(hboxWidget); | ||
422 | hbox->addWidget(_button); | 422 | hbox->addWidget(_button); | ||
423 | _button->setIcon(Icon("document-open")); | 423 | _button->setIcon(Icon("document-open")); | ||
424 | connect(_button, SIGNAL(clicked()), this, SLOT(addFile())); | 424 | connect(_button, &QToolButton::clicked, this, &ParameterFile::addFile); | ||
425 | } | 425 | } | ||
426 | 426 | | |||
427 | QString ParameterFile::text() | 427 | QString ParameterFile::text() | ||
428 | { | 428 | { | ||
429 | return _lineEdit->text(); | 429 | return _lineEdit->text(); | ||
430 | } | 430 | } | ||
431 | QString ParameterFile::preset() | 431 | QString ParameterFile::preset() | ||
432 | { | 432 | { | ||
▲ Show 20 Lines • Show All 96 Lines • ▼ Show 20 Line(s) | 519 | { | |||
529 | hbox->setContentsMargins(0, 0, 0, 0); | 529 | hbox->setContentsMargins(0, 0, 0, 0); | ||
530 | hbox->setSpacing(6); | 530 | hbox->setSpacing(6); | ||
531 | _lineEdit = new KLineEdit(hboxWidget); | 531 | _lineEdit = new KLineEdit(hboxWidget); | ||
532 | _lineEdit->setCompletionObject(new KUrlCompletion(KUrlCompletion::DirCompletion)); | 532 | _lineEdit->setCompletionObject(new KUrlCompletion(KUrlCompletion::DirCompletion)); | ||
533 | hbox->addWidget(_lineEdit); | 533 | hbox->addWidget(_lineEdit); | ||
534 | _dirButton = new QToolButton(hboxWidget); | 534 | _dirButton = new QToolButton(hboxWidget); | ||
535 | hbox->addWidget(_dirButton); | 535 | hbox->addWidget(_dirButton); | ||
536 | _dirButton->setIcon(Icon("document-open")); | 536 | _dirButton->setIcon(Icon("document-open")); | ||
537 | connect(_dirButton, SIGNAL(clicked()), this, SLOT(setDir())); | 537 | connect(_dirButton, &QToolButton::clicked, this, &ParameterGoto::setDir); | ||
538 | _placeholderButton = new QToolButton(hboxWidget); | 538 | _placeholderButton = new QToolButton(hboxWidget); | ||
539 | _placeholderButton->setIcon(Icon("list-add")); | 539 | _placeholderButton->setIcon(Icon("list-add")); | ||
540 | hbox->addWidget(_placeholderButton); | 540 | hbox->addWidget(_placeholderButton); | ||
541 | connect(_placeholderButton, SIGNAL(clicked()), this, SLOT(addPlaceholder())); | 541 | connect(_placeholderButton, &QToolButton::clicked, this, &ParameterGoto::addPlaceholder); | ||
542 | 542 | | |||
543 | layout->addWidget(hboxWidget); | 543 | layout->addWidget(hboxWidget); | ||
544 | } | 544 | } | ||
545 | 545 | | |||
546 | QString ParameterGoto::text() | 546 | QString ParameterGoto::text() | ||
547 | { | 547 | { | ||
548 | return _lineEdit->text(); | 548 | return _lineEdit->text(); | ||
549 | } | 549 | } | ||
▲ Show 20 Lines • Show All 154 Lines • Show Last 20 Lines |