Changeset View
Changeset View
Standalone View
Standalone View
src/dialogs/katedialogs.cpp
Show First 20 Lines • Show All 457 Lines • ▼ Show 20 Line(s) | 448 | { | |||
---|---|---|---|---|---|
458 | 458 | | |||
459 | reload(); | 459 | reload(); | ||
460 | 460 | | |||
461 | connect(ui->chkStaticWordWrap, SIGNAL(toggled(bool)), this, SLOT(slotChanged())); | 461 | connect(ui->chkStaticWordWrap, SIGNAL(toggled(bool)), this, SLOT(slotChanged())); | ||
462 | connect(ui->chkShowStaticWordWrapMarker, SIGNAL(toggled(bool)), this, SLOT(slotChanged())); | 462 | connect(ui->chkShowStaticWordWrapMarker, SIGNAL(toggled(bool)), this, SLOT(slotChanged())); | ||
463 | connect(ui->sbWordWrap, SIGNAL(valueChanged(int)), this, SLOT(slotChanged())); | 463 | connect(ui->sbWordWrap, SIGNAL(valueChanged(int)), this, SLOT(slotChanged())); | ||
464 | connect(ui->chkAutoBrackets, SIGNAL(toggled(bool)), this, SLOT(slotChanged())); | 464 | connect(ui->chkAutoBrackets, SIGNAL(toggled(bool)), this, SLOT(slotChanged())); | ||
465 | connect(ui->chkSmartCopyCut, SIGNAL(toggled(bool)), this, SLOT(slotChanged())); | 465 | connect(ui->chkSmartCopyCut, SIGNAL(toggled(bool)), this, SLOT(slotChanged())); | ||
466 | connect(ui->chkMousePasteAtCursorPosition, SIGNAL(toggled(bool)), this, SLOT(slotChanged())); | ||||
466 | connect(ui->cmbInputMode, SIGNAL(currentIndexChanged(int)), this, SLOT(slotChanged())); | 467 | connect(ui->cmbInputMode, SIGNAL(currentIndexChanged(int)), this, SLOT(slotChanged())); | ||
467 | 468 | | |||
468 | // "What's this?" help is in the ui-file | 469 | // "What's this?" help is in the ui-file | ||
469 | 470 | | |||
470 | layout->addWidget(newWidget); | 471 | layout->addWidget(newWidget); | ||
471 | setLayout(layout); | 472 | setLayout(layout); | ||
472 | } | 473 | } | ||
473 | 474 | | |||
Show All 15 Lines | 481 | { | |||
489 | 490 | | |||
490 | KateDocumentConfig::global()->setWordWrapAt(ui->sbWordWrap->value()); | 491 | KateDocumentConfig::global()->setWordWrapAt(ui->sbWordWrap->value()); | ||
491 | KateDocumentConfig::global()->setWordWrap(ui->chkStaticWordWrap->isChecked()); | 492 | KateDocumentConfig::global()->setWordWrap(ui->chkStaticWordWrap->isChecked()); | ||
492 | 493 | | |||
493 | KateRendererConfig::global()->setWordWrapMarker(ui->chkShowStaticWordWrapMarker->isChecked()); | 494 | KateRendererConfig::global()->setWordWrapMarker(ui->chkShowStaticWordWrapMarker->isChecked()); | ||
494 | 495 | | |||
495 | KateViewConfig::global()->setAutoBrackets(ui->chkAutoBrackets->isChecked()); | 496 | KateViewConfig::global()->setAutoBrackets(ui->chkAutoBrackets->isChecked()); | ||
496 | KateViewConfig::global()->setSmartCopyCut(ui->chkSmartCopyCut->isChecked()); | 497 | KateViewConfig::global()->setSmartCopyCut(ui->chkSmartCopyCut->isChecked()); | ||
498 | KateViewConfig::global()->setMousePasteAtCursorPosition(ui->chkMousePasteAtCursorPosition->isChecked()); | ||||
497 | 499 | | |||
498 | KateViewConfig::global()->setInputModeRaw(ui->cmbInputMode->currentData().toInt()); | 500 | KateViewConfig::global()->setInputModeRaw(ui->cmbInputMode->currentData().toInt()); | ||
499 | 501 | | |||
500 | KateDocumentConfig::global()->configEnd(); | 502 | KateDocumentConfig::global()->configEnd(); | ||
501 | KateViewConfig::global()->configEnd(); | 503 | KateViewConfig::global()->configEnd(); | ||
502 | } | 504 | } | ||
503 | 505 | | |||
504 | void KateEditGeneralConfigTab::reload() | 506 | void KateEditGeneralConfigTab::reload() | ||
505 | { | 507 | { | ||
506 | ui->chkStaticWordWrap->setChecked(KateDocumentConfig::global()->wordWrap()); | 508 | ui->chkStaticWordWrap->setChecked(KateDocumentConfig::global()->wordWrap()); | ||
507 | ui->chkShowStaticWordWrapMarker->setChecked(KateRendererConfig::global()->wordWrapMarker()); | 509 | ui->chkShowStaticWordWrapMarker->setChecked(KateRendererConfig::global()->wordWrapMarker()); | ||
508 | ui->sbWordWrap->setSuffix(ki18ncp("Wrap words at (value is at 20 or larger)", " character", " characters")); | 510 | ui->sbWordWrap->setSuffix(ki18ncp("Wrap words at (value is at 20 or larger)", " character", " characters")); | ||
509 | ui->sbWordWrap->setValue(KateDocumentConfig::global()->wordWrapAt()); | 511 | ui->sbWordWrap->setValue(KateDocumentConfig::global()->wordWrapAt()); | ||
510 | ui->chkAutoBrackets->setChecked(KateViewConfig::global()->autoBrackets()); | 512 | ui->chkAutoBrackets->setChecked(KateViewConfig::global()->autoBrackets()); | ||
511 | ui->chkSmartCopyCut->setChecked(KateViewConfig::global()->smartCopyCut()); | 513 | ui->chkSmartCopyCut->setChecked(KateViewConfig::global()->smartCopyCut()); | ||
514 | ui->chkMousePasteAtCursorPosition->setChecked(KateViewConfig::global()->mousePasteAtCursorPosition()); | ||||
512 | 515 | | |||
513 | const int id = static_cast<int>(KateViewConfig::global()->inputMode()); | 516 | const int id = static_cast<int>(KateViewConfig::global()->inputMode()); | ||
514 | ui->cmbInputMode->setCurrentIndex(ui->cmbInputMode->findData(id)); | 517 | ui->cmbInputMode->setCurrentIndex(ui->cmbInputMode->findData(id)); | ||
515 | } | 518 | } | ||
516 | 519 | | |||
517 | QString KateEditGeneralConfigTab::name() const | 520 | QString KateEditGeneralConfigTab::name() const | ||
518 | { | 521 | { | ||
519 | return i18n("General"); | 522 | return i18n("General"); | ||
▲ Show 20 Lines • Show All 786 Lines • Show Last 20 Lines |