Changeset View
Changeset View
Standalone View
Standalone View
src/dialogs/katedialogs.cpp
Show First 20 Lines • Show All 105 Lines • ▼ Show 20 Line(s) | 103 | { | |||
---|---|---|---|---|---|
106 | QVBoxLayout *layout = new QVBoxLayout; | 106 | QVBoxLayout *layout = new QVBoxLayout; | ||
107 | QWidget *newWidget = new QWidget(this); | 107 | QWidget *newWidget = new QWidget(this); | ||
108 | 108 | | |||
109 | ui = new Ui::IndentationConfigWidget(); | 109 | ui = new Ui::IndentationConfigWidget(); | ||
110 | ui->setupUi(newWidget); | 110 | ui->setupUi(newWidget); | ||
111 | 111 | | |||
112 | ui->cmbMode->addItems(KateAutoIndent::listModes()); | 112 | ui->cmbMode->addItems(KateAutoIndent::listModes()); | ||
113 | 113 | | |||
114 | // FIXME Give ui->label a more descriptive name, it's these "More..." info about tab key action | ||||
114 | ui->label->setTextInteractionFlags(Qt::LinksAccessibleByMouse | Qt::LinksAccessibleByKeyboard); | 115 | ui->label->setTextInteractionFlags(Qt::LinksAccessibleByMouse | Qt::LinksAccessibleByKeyboard); | ||
115 | connect(ui->label, SIGNAL(linkActivated(QString)), this, SLOT(showWhatsThis(QString))); | 116 | connect(ui->label, &QLabel::linkActivated, this, &KateIndentConfigTab::showWhatsThis); | ||
116 | 117 | | |||
117 | // What's This? help can be found in the ui file | 118 | // "What's This?" help can be found in the ui file | ||
118 | 119 | | |||
119 | reload(); | 120 | reload(); | ||
120 | 121 | | |||
121 | // | 122 | observeChanges(ui->chkBackspaceUnindents); | ||
122 | // after initial reload, connect the stuff for the changed () signal | 123 | observeChanges(ui->chkIndentPaste); | ||
123 | // | 124 | observeChanges(ui->chkKeepExtraSpaces); | ||
124 | 125 | observeChanges(ui->cmbMode); | |||
125 | connect(ui->cmbMode, SIGNAL(activated(int)), this, SLOT(slotChanged())); | 126 | observeChanges(ui->rbIndentMixed); | ||
126 | connect(ui->rbIndentWithTabs, SIGNAL(toggled(bool)), this, SLOT(slotChanged())); | 127 | observeChanges(ui->rbIndentWithSpaces); | ||
127 | connect(ui->rbIndentWithSpaces, SIGNAL(toggled(bool)), this, SLOT(slotChanged())); | 128 | observeChanges(ui->rbIndentWithTabs); | ||
128 | connect(ui->rbIndentMixed, SIGNAL(toggled(bool)), this, SLOT(slotChanged())); | 129 | connect(ui->rbIndentWithTabs, &QAbstractButton::toggled, ui->sbIndentWidth, &QWidget::setDisabled); | ||
129 | connect(ui->rbIndentWithTabs, SIGNAL(toggled(bool)), ui->sbIndentWidth, SLOT(setDisabled(bool))); | 130 | connect(ui->rbIndentWithTabs, &QAbstractButton::toggled, this, &KateIndentConfigTab::slotChanged); // FIXME See slot below | ||
130 | 131 | observeChanges(ui->rbTabAdvances); | |||
131 | connect(ui->chkKeepExtraSpaces, SIGNAL(toggled(bool)), this, SLOT(slotChanged())); | 132 | observeChanges(ui->rbTabIndents); | ||
132 | connect(ui->chkIndentPaste, SIGNAL(toggled(bool)), this, SLOT(slotChanged())); | 133 | observeChanges(ui->rbTabSmart); | ||
133 | connect(ui->chkBackspaceUnindents, SIGNAL(toggled(bool)), this, SLOT(slotChanged())); | 134 | observeChanges(ui->sbIndentWidth); | ||
134 | 135 | observeChanges(ui->sbTabWidth); | |||
135 | connect(ui->sbTabWidth, SIGNAL(valueChanged(int)), this, SLOT(slotChanged())); | | |||
136 | connect(ui->sbIndentWidth, SIGNAL(valueChanged(int)), this, SLOT(slotChanged())); | | |||
137 | | ||||
138 | connect(ui->rbTabAdvances, SIGNAL(toggled(bool)), this, SLOT(slotChanged())); | | |||
139 | connect(ui->rbTabIndents, SIGNAL(toggled(bool)), this, SLOT(slotChanged())); | | |||
140 | connect(ui->rbTabSmart, SIGNAL(toggled(bool)), this, SLOT(slotChanged())); | | |||
141 | 136 | | |||
142 | layout->addWidget(newWidget); | 137 | layout->addWidget(newWidget); | ||
143 | setLayout(layout); | 138 | setLayout(layout); | ||
144 | } | 139 | } | ||
145 | 140 | | |||
146 | KateIndentConfigTab::~KateIndentConfigTab() | 141 | KateIndentConfigTab::~KateIndentConfigTab() | ||
147 | { | 142 | { | ||
148 | delete ui; | 143 | delete ui; | ||
149 | } | 144 | } | ||
150 | 145 | | |||
151 | void KateIndentConfigTab::slotChanged() | 146 | void KateIndentConfigTab::slotChanged() | ||
152 | { | 147 | { | ||
148 | // FIXME Make it working without this quirk | ||||
149 | // When the value is not copied it will silently set back to "Tabs & Spaces" | ||||
153 | if (ui->rbIndentWithTabs->isChecked()) { | 150 | if (ui->rbIndentWithTabs->isChecked()) { | ||
154 | ui->sbIndentWidth->setValue(ui->sbTabWidth->value()); | 151 | ui->sbIndentWidth->setValue(ui->sbTabWidth->value()); | ||
155 | } | 152 | } | ||
156 | | ||||
157 | KateConfigPage::slotChanged(); | | |||
158 | } | 153 | } | ||
159 | 154 | | |||
155 | // NOTE Should we have more use of such info stuff, consider to make it part | ||||
156 | // of KateConfigPage and add a similar function like observeChanges(..) | ||||
dhaumann: Typo: sililar | |||||
160 | void KateIndentConfigTab::showWhatsThis(const QString &text) | 157 | void KateIndentConfigTab::showWhatsThis(const QString &text) | ||
161 | { | 158 | { | ||
162 | QWhatsThis::showText(QCursor::pos(), text); | 159 | QWhatsThis::showText(QCursor::pos(), text); | ||
163 | } | 160 | } | ||
164 | 161 | | |||
165 | void KateIndentConfigTab::apply() | 162 | void KateIndentConfigTab::apply() | ||
166 | { | 163 | { | ||
167 | // nothing changed, no need to apply stuff | 164 | // nothing changed, no need to apply stuff | ||
▲ Show 20 Lines • Show All 67 Lines • ▼ Show 20 Line(s) | 231 | { | |||
235 | // This will let us have more separation between this page and | 232 | // This will let us have more separation between this page and | ||
236 | // the QTabWidget edge (ereslibre) | 233 | // the QTabWidget edge (ereslibre) | ||
237 | QVBoxLayout *layout = new QVBoxLayout; | 234 | QVBoxLayout *layout = new QVBoxLayout; | ||
238 | QWidget *newWidget = new QWidget(this); | 235 | QWidget *newWidget = new QWidget(this); | ||
239 | 236 | | |||
240 | ui = new Ui::CompletionConfigTab(); | 237 | ui = new Ui::CompletionConfigTab(); | ||
241 | ui->setupUi(newWidget); | 238 | ui->setupUi(newWidget); | ||
242 | 239 | | |||
243 | // What's This? help can be found in the ui file | 240 | // "What's This?" help can be found in the ui file | ||
244 | 241 | | |||
245 | reload(); | 242 | reload(); | ||
246 | 243 | | |||
247 | // | 244 | observeChanges(ui->chkAutoCompletionEnabled); | ||
248 | // after initial reload, connect the stuff for the changed () signal | 245 | observeChanges(ui->gbKeywordCompletion); | ||
249 | // | 246 | observeChanges(ui->gbWordCompletion); | ||
250 | 247 | observeChanges(ui->minimalWordLength); | |||
251 | connect(ui->chkAutoCompletionEnabled, SIGNAL(toggled(bool)), this, SLOT(slotChanged())); | 248 | observeChanges(ui->removeTail); | ||
252 | connect(ui->gbWordCompletion, SIGNAL(toggled(bool)), this, SLOT(slotChanged())); | | |||
253 | connect(ui->gbKeywordCompletion, SIGNAL(toggled(bool)), this, SLOT(slotChanged())); | | |||
254 | connect(ui->minimalWordLength, SIGNAL(valueChanged(int)), this, SLOT(slotChanged())); | | |||
255 | connect(ui->removeTail, SIGNAL(toggled(bool)), this, SLOT(slotChanged())); | | |||
256 | 249 | | |||
257 | layout->addWidget(newWidget); | 250 | layout->addWidget(newWidget); | ||
258 | setLayout(layout); | 251 | setLayout(layout); | ||
259 | } | 252 | } | ||
260 | 253 | | |||
261 | KateCompletionConfigTab::~KateCompletionConfigTab() | 254 | KateCompletionConfigTab::~KateCompletionConfigTab() | ||
262 | { | 255 | { | ||
263 | delete ui; | 256 | delete ui; | ||
264 | } | 257 | } | ||
265 | 258 | | |||
266 | void KateCompletionConfigTab::showWhatsThis(const QString &text) | 259 | void KateCompletionConfigTab::showWhatsThis(const QString &text) // NOTE Not used atm, remove? See also KateIndentConfigTab::showWhatsThis | ||
267 | { | 260 | { | ||
268 | QWhatsThis::showText(QCursor::pos(), text); | 261 | QWhatsThis::showText(QCursor::pos(), text); | ||
269 | } | 262 | } | ||
270 | 263 | | |||
271 | void KateCompletionConfigTab::apply() | 264 | void KateCompletionConfigTab::apply() | ||
272 | { | 265 | { | ||
273 | // nothing changed, no need to apply stuff | 266 | // nothing changed, no need to apply stuff | ||
274 | if (!hasChanged()) { | 267 | if (!hasChanged()) { | ||
Show All 37 Lines | 304 | { | |||
312 | // This will let us have more separation between this page and | 305 | // This will let us have more separation between this page and | ||
313 | // the QTabWidget edge (ereslibre) | 306 | // the QTabWidget edge (ereslibre) | ||
314 | QVBoxLayout *layout = new QVBoxLayout; | 307 | QVBoxLayout *layout = new QVBoxLayout; | ||
315 | QWidget *newWidget = new QWidget(this); | 308 | QWidget *newWidget = new QWidget(this); | ||
316 | 309 | | |||
317 | ui = new Ui::SpellCheckConfigWidget(); | 310 | ui = new Ui::SpellCheckConfigWidget(); | ||
318 | ui->setupUi(newWidget); | 311 | ui->setupUi(newWidget); | ||
319 | 312 | | |||
320 | // What's This? help can be found in the ui file | 313 | // "What's This?" help can be found in the ui file | ||
321 | reload(); | | |||
322 | 314 | | |||
323 | // | 315 | reload(); | ||
324 | // after initial reload, connect the stuff for the changed () signal | | |||
325 | 316 | | |||
326 | m_sonnetConfigWidget = new Sonnet::ConfigWidget(this); | 317 | m_sonnetConfigWidget = new Sonnet::ConfigWidget(this); | ||
327 | connect(m_sonnetConfigWidget, SIGNAL(configChanged()), this, SLOT(slotChanged())); | 318 | connect(m_sonnetConfigWidget, &Sonnet::ConfigWidget::configChanged, this, &KateSpellCheckConfigTab::slotChanged); | ||
328 | layout->addWidget(m_sonnetConfigWidget); | 319 | layout->addWidget(m_sonnetConfigWidget); | ||
329 | 320 | | |||
330 | layout->addWidget(newWidget); | 321 | layout->addWidget(newWidget); | ||
331 | setLayout(layout); | 322 | setLayout(layout); | ||
332 | } | 323 | } | ||
333 | 324 | | |||
334 | KateSpellCheckConfigTab::~KateSpellCheckConfigTab() | 325 | KateSpellCheckConfigTab::~KateSpellCheckConfigTab() | ||
335 | { | 326 | { | ||
336 | delete ui; | 327 | delete ui; | ||
337 | } | 328 | } | ||
338 | 329 | | |||
339 | void KateSpellCheckConfigTab::showWhatsThis(const QString &text) | 330 | void KateSpellCheckConfigTab::showWhatsThis(const QString &text) // NOTE Not used atm, remove? See also KateIndentConfigTab::showWhatsThis | ||
340 | { | 331 | { | ||
341 | QWhatsThis::showText(QCursor::pos(), text); | 332 | QWhatsThis::showText(QCursor::pos(), text); | ||
342 | } | 333 | } | ||
343 | 334 | | |||
344 | void KateSpellCheckConfigTab::apply() | 335 | void KateSpellCheckConfigTab::apply() | ||
345 | { | 336 | { | ||
346 | if (!hasChanged()) { | 337 | if (!hasChanged()) { | ||
347 | // nothing changed, no need to apply stuff | 338 | // nothing changed, no need to apply stuff | ||
Show All 33 Lines | 371 | { | |||
381 | // This will let us having more separation between this page and | 372 | // This will let us having more separation between this page and | ||
382 | // the QTabWidget edge (ereslibre) | 373 | // the QTabWidget edge (ereslibre) | ||
383 | QVBoxLayout *layout = new QVBoxLayout; | 374 | QVBoxLayout *layout = new QVBoxLayout; | ||
384 | QWidget *newWidget = new QWidget(this); | 375 | QWidget *newWidget = new QWidget(this); | ||
385 | 376 | | |||
386 | ui = new Ui::NavigationConfigWidget(); | 377 | ui = new Ui::NavigationConfigWidget(); | ||
387 | ui->setupUi(newWidget); | 378 | ui->setupUi(newWidget); | ||
388 | 379 | | |||
389 | // What's This? Help is in the ui-files | 380 | // "What's This?" help can be found in the ui file | ||
390 | 381 | | |||
391 | reload(); | 382 | reload(); | ||
392 | 383 | | |||
393 | // | 384 | observeChanges(ui->cbTextSelectionMode); | ||
394 | // after initial reload, connect the stuff for the changed () signal | 385 | observeChanges(ui->chkBackspaceRemoveComposed); | ||
395 | // | 386 | observeChanges(ui->chkPagingMovesCursor); | ||
396 | 387 | observeChanges(ui->chkScrollPastEnd); | |||
397 | connect(ui->cbTextSelectionMode, SIGNAL(currentIndexChanged(int)), this, SLOT(slotChanged())); | 388 | observeChanges(ui->chkSmartHome); | ||
398 | connect(ui->chkSmartHome, SIGNAL(toggled(bool)), this, SLOT(slotChanged())); | 389 | observeChanges(ui->sbAutoCenterCursor); | ||
399 | connect(ui->chkPagingMovesCursor, SIGNAL(toggled(bool)), this, SLOT(slotChanged())); | | |||
400 | connect(ui->sbAutoCenterCursor, SIGNAL(valueChanged(int)), this, SLOT(slotChanged())); | | |||
401 | connect(ui->chkScrollPastEnd, SIGNAL(toggled(bool)), this, SLOT(slotChanged())); | | |||
402 | connect(ui->chkBackspaceRemoveComposed, SIGNAL(toggled(bool)), this, SLOT(slotChanged())); | | |||
403 | 390 | | |||
404 | layout->addWidget(newWidget); | 391 | layout->addWidget(newWidget); | ||
405 | setLayout(layout); | 392 | setLayout(layout); | ||
406 | } | 393 | } | ||
407 | 394 | | |||
408 | KateNavigationConfigTab::~KateNavigationConfigTab() | 395 | KateNavigationConfigTab::~KateNavigationConfigTab() | ||
409 | { | 396 | { | ||
410 | delete ui; | 397 | delete ui; | ||
▲ Show 20 Lines • Show All 50 Lines • ▼ Show 20 Line(s) | 445 | { | |||
461 | ui = new Ui::EditConfigWidget(); | 448 | ui = new Ui::EditConfigWidget(); | ||
462 | ui->setupUi(newWidget); | 449 | ui->setupUi(newWidget); | ||
463 | 450 | | |||
464 | QList<KateAbstractInputModeFactory *> inputModes = KTextEditor::EditorPrivate::self()->inputModeFactories(); | 451 | QList<KateAbstractInputModeFactory *> inputModes = KTextEditor::EditorPrivate::self()->inputModeFactories(); | ||
465 | Q_FOREACH(KateAbstractInputModeFactory *fact, inputModes) { | 452 | Q_FOREACH(KateAbstractInputModeFactory *fact, inputModes) { | ||
466 | ui->cmbInputMode->addItem(fact->name(), static_cast<int>(fact->inputMode())); | 453 | ui->cmbInputMode->addItem(fact->name(), static_cast<int>(fact->inputMode())); | ||
467 | } | 454 | } | ||
468 | 455 | | |||
469 | reload(); | 456 | // "What's This?" Help is in the ui-files | ||
470 | 457 | | |||
471 | connect(ui->chkStaticWordWrap, SIGNAL(toggled(bool)), this, SLOT(slotChanged())); | 458 | reload(); | ||
472 | connect(ui->chkShowStaticWordWrapMarker, SIGNAL(toggled(bool)), this, SLOT(slotChanged())); | | |||
473 | connect(ui->sbWordWrap, SIGNAL(valueChanged(int)), this, SLOT(slotChanged())); | | |||
474 | connect(ui->chkAutoBrackets, SIGNAL(toggled(bool)), this, SLOT(slotChanged())); | | |||
475 | connect(ui->chkSmartCopyCut, SIGNAL(toggled(bool)), this, SLOT(slotChanged())); | | |||
476 | connect(ui->chkMousePasteAtCursorPosition, SIGNAL(toggled(bool)), this, SLOT(slotChanged())); | | |||
477 | connect(ui->cmbInputMode, SIGNAL(currentIndexChanged(int)), this, SLOT(slotChanged())); | | |||
478 | 459 | | |||
479 | // "What's this?" help is in the ui-file | 460 | observeChanges(ui->chkAutoBrackets); | ||
461 | observeChanges(ui->chkMousePasteAtCursorPosition); | ||||
462 | observeChanges(ui->chkShowStaticWordWrapMarker); | ||||
463 | observeChanges(ui->chkSmartCopyCut); | ||||
464 | observeChanges(ui->chkStaticWordWrap); | ||||
465 | observeChanges(ui->cmbInputMode); | ||||
466 | observeChanges(ui->sbWordWrap); | ||||
480 | 467 | | |||
481 | layout->addWidget(newWidget); | 468 | layout->addWidget(newWidget); | ||
482 | setLayout(layout); | 469 | setLayout(layout); | ||
483 | } | 470 | } | ||
484 | 471 | | |||
485 | KateEditGeneralConfigTab::~KateEditGeneralConfigTab() | 472 | KateEditGeneralConfigTab::~KateEditGeneralConfigTab() | ||
486 | { | 473 | { | ||
487 | delete ui; | 474 | delete ui; | ||
▲ Show 20 Lines • Show All 61 Lines • ▼ Show 20 Line(s) | 532 | { | |||
549 | 536 | | |||
550 | // add all tabs | 537 | // add all tabs | ||
551 | tabWidget->insertTab(0, editConfigTab, editConfigTab->name()); | 538 | tabWidget->insertTab(0, editConfigTab, editConfigTab->name()); | ||
552 | tabWidget->insertTab(1, navigationConfigTab, navigationConfigTab->name()); | 539 | tabWidget->insertTab(1, navigationConfigTab, navigationConfigTab->name()); | ||
553 | tabWidget->insertTab(2, indentConfigTab, indentConfigTab->name()); | 540 | tabWidget->insertTab(2, indentConfigTab, indentConfigTab->name()); | ||
554 | tabWidget->insertTab(3, completionConfigTab, completionConfigTab->name()); | 541 | tabWidget->insertTab(3, completionConfigTab, completionConfigTab->name()); | ||
555 | tabWidget->insertTab(4, spellCheckConfigTab, spellCheckConfigTab->name()); | 542 | tabWidget->insertTab(4, spellCheckConfigTab, spellCheckConfigTab->name()); | ||
556 | 543 | | |||
557 | connect(editConfigTab, SIGNAL(changed()), this, SLOT(slotChanged())); | 544 | observeChanges(editConfigTab); | ||
558 | connect(navigationConfigTab, SIGNAL(changed()), this, SLOT(slotChanged())); | 545 | observeChanges(navigationConfigTab); | ||
559 | connect(indentConfigTab, SIGNAL(changed()), this, SLOT(slotChanged())); | 546 | observeChanges(indentConfigTab); | ||
560 | connect(completionConfigTab, SIGNAL(changed()), this, SLOT(slotChanged())); | 547 | observeChanges(completionConfigTab); | ||
561 | connect(spellCheckConfigTab, SIGNAL(changed()), this, SLOT(slotChanged())); | 548 | observeChanges(spellCheckConfigTab); | ||
562 | 549 | | |||
563 | int i = tabWidget->count(); | 550 | int i = tabWidget->count(); | ||
564 | Q_FOREACH(KateAbstractInputModeFactory *factory, KTextEditor::EditorPrivate::self()->inputModeFactories()) { | 551 | Q_FOREACH(KateAbstractInputModeFactory *factory, KTextEditor::EditorPrivate::self()->inputModeFactories()) { | ||
565 | KateConfigPage *tab = factory->createConfigPage(this); | 552 | KateConfigPage *tab = factory->createConfigPage(this); | ||
566 | if (tab) { | 553 | if (tab) { | ||
567 | m_inputModeConfigTabs << tab; | 554 | m_inputModeConfigTabs << tab; | ||
568 | tabWidget->insertTab(i, tab, tab->name()); | 555 | tabWidget->insertTab(i, tab, tab->name()); | ||
569 | connect(tab, SIGNAL(changed()), this, SLOT(slotChanged())); | 556 | observeChanges(tab); | ||
570 | i++; | 557 | i++; | ||
571 | } | 558 | } | ||
572 | } | 559 | } | ||
573 | 560 | | |||
574 | layout->addWidget(tabWidget); | 561 | layout->addWidget(tabWidget); | ||
575 | setLayout(layout); | 562 | setLayout(layout); | ||
576 | } | 563 | } | ||
577 | 564 | | |||
▲ Show 20 Lines • Show All 86 Lines • ▼ Show 20 Line(s) | 641 | { | |||
664 | QWidget *bordersTab = new QWidget(tabWidget); | 651 | QWidget *bordersTab = new QWidget(tabWidget); | ||
665 | bordersUi->setupUi(bordersTab); | 652 | bordersUi->setupUi(bordersTab); | ||
666 | tabWidget->addTab(bordersTab, i18n("Borders")); | 653 | tabWidget->addTab(bordersTab, i18n("Borders")); | ||
667 | 654 | | |||
668 | textareaUi->cmbDynamicWordWrapIndicator->addItem(i18n("Off")); | 655 | textareaUi->cmbDynamicWordWrapIndicator->addItem(i18n("Off")); | ||
669 | textareaUi->cmbDynamicWordWrapIndicator->addItem(i18n("Follow Line Numbers")); | 656 | textareaUi->cmbDynamicWordWrapIndicator->addItem(i18n("Follow Line Numbers")); | ||
670 | textareaUi->cmbDynamicWordWrapIndicator->addItem(i18n("Always On")); | 657 | textareaUi->cmbDynamicWordWrapIndicator->addItem(i18n("Always On")); | ||
671 | 658 | | |||
672 | // What's This? help is in the ui-file | 659 | // "What's This?" help is in the ui-file | ||
673 | 660 | | |||
674 | reload(); | 661 | reload(); | ||
675 | 662 | | |||
676 | // | 663 | observeChanges(textareaUi->chkAnimateBracketMatching); | ||
677 | // after initial reload, connect the stuff for the changed () signal | 664 | observeChanges(textareaUi->chkDynWrapAtStaticMarker); | ||
678 | // | 665 | observeChanges(textareaUi->chkFoldFirstLine); | ||
679 | 666 | observeChanges(textareaUi->chkShowIndentationLines); | |||
680 | connect(textareaUi->chkAnimateBracketMatching, SIGNAL(toggled(bool)), this, SLOT(slotChanged())); | 667 | observeChanges(textareaUi->chkShowLineCount); | ||
681 | connect(textareaUi->chkDynWrapAtStaticMarker, SIGNAL(toggled(bool)), this, SLOT(slotChanged())); | 668 | observeChanges(textareaUi->chkShowTabs); | ||
682 | connect(textareaUi->chkFoldFirstLine, SIGNAL(toggled(bool)), this, SLOT(slotChanged())); | 669 | observeChanges(textareaUi->chkShowWholeBracketExpression); | ||
683 | connect(textareaUi->chkShowIndentationLines, SIGNAL(toggled(bool)), this, SLOT(slotChanged())); | 670 | observeChanges(textareaUi->chkShowWordCount); | ||
684 | connect(textareaUi->chkShowLineCount, SIGNAL(toggled(bool)), this, SLOT(slotChanged())); | 671 | observeChanges(textareaUi->cmbDynamicWordWrapIndicator); | ||
685 | connect(textareaUi->chkShowTabs, SIGNAL(toggled(bool)), this, SLOT(slotChanged())); | 672 | observeChanges(textareaUi->gbWordWrap); | ||
686 | connect(textareaUi->chkShowWholeBracketExpression, SIGNAL(toggled(bool)), this, SLOT(slotChanged())); | 673 | observeChanges(textareaUi->sbDynamicWordWrapDepth); | ||
687 | connect(textareaUi->chkShowWordCount, SIGNAL(toggled(bool)), this, SLOT(slotChanged())); | 674 | observeChanges(textareaUi->sliSetMarkerSize); | ||
688 | connect(textareaUi->cmbDynamicWordWrapIndicator, SIGNAL(activated(int)), this, SLOT(slotChanged())); | 675 | observeChanges(textareaUi->spacesComboBox); | ||
689 | connect(textareaUi->gbWordWrap, SIGNAL(toggled(bool)), this, SLOT(slotChanged())); | 676 | | ||
690 | connect(textareaUi->sbDynamicWordWrapDepth, SIGNAL(valueChanged(int)), this, SLOT(slotChanged())); | 677 | observeChanges(bordersUi->chkIconBorder); | ||
691 | connect(textareaUi->sliSetMarkerSize, SIGNAL(valueChanged(int)), this, SLOT(slotChanged())); | 678 | observeChanges(bordersUi->chkLineNumbers); | ||
692 | connect(textareaUi->spacesComboBox, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &KateViewDefaultsConfig::slotChanged); | 679 | observeChanges(bordersUi->chkScrollbarMarks); | ||
693 | 680 | observeChanges(bordersUi->chkScrollbarMiniMap); | |||
694 | connect(bordersUi->chkIconBorder, SIGNAL(toggled(bool)), this, SLOT(slotChanged())); | 681 | observeChanges(bordersUi->chkScrollbarMiniMapAll); | ||
695 | connect(bordersUi->chkLineNumbers, SIGNAL(toggled(bool)), this, SLOT(slotChanged())); | | |||
696 | connect(bordersUi->chkScrollbarMarks, SIGNAL(toggled(bool)), this, SLOT(slotChanged())); | | |||
697 | connect(bordersUi->chkScrollbarMiniMap, SIGNAL(toggled(bool)), this, SLOT(slotChanged())); | | |||
698 | connect(bordersUi->chkScrollbarMiniMapAll, SIGNAL(toggled(bool)), this, SLOT(slotChanged())); | | |||
699 | bordersUi->chkScrollbarMiniMapAll->hide(); // this is temporary until the feature is done | 682 | bordersUi->chkScrollbarMiniMapAll->hide(); // this is temporary until the feature is done | ||
700 | connect(bordersUi->chkScrollbarPreview, SIGNAL(toggled(bool)), this, SLOT(slotChanged())); | 683 | observeChanges(bordersUi->chkScrollbarPreview); | ||
701 | connect(bordersUi->chkShowFoldingMarkers, SIGNAL(toggled(bool)), this, SLOT(slotChanged())); | 684 | observeChanges(bordersUi->chkShowFoldingMarkers); | ||
702 | connect(bordersUi->chkShowFoldingPreview, SIGNAL(toggled(bool)), this, SLOT(slotChanged())); | 685 | observeChanges(bordersUi->chkShowFoldingPreview); | ||
703 | connect(bordersUi->chkShowLineModification, SIGNAL(toggled(bool)), this, SLOT(slotChanged())); | 686 | observeChanges(bordersUi->chkShowLineModification); | ||
704 | connect(bordersUi->cmbShowScrollbars, SIGNAL(activated(int)), this, SLOT(slotChanged())); | 687 | observeChanges(bordersUi->cmbShowScrollbars); | ||
705 | connect(bordersUi->rbSortBookmarksByCreation, SIGNAL(toggled(bool)), this, SLOT(slotChanged())); | 688 | observeChanges(bordersUi->rbSortBookmarksByCreation); | ||
706 | connect(bordersUi->rbSortBookmarksByPosition, SIGNAL(toggled(bool)), this, SLOT(slotChanged())); | 689 | observeChanges(bordersUi->rbSortBookmarksByPosition); | ||
707 | connect(bordersUi->spBoxMiniMapWidth, SIGNAL(valueChanged(int)), this, SLOT(slotChanged())); | 690 | observeChanges(bordersUi->spBoxMiniMapWidth); | ||
708 | } | 691 | } | ||
709 | 692 | | |||
710 | KateViewDefaultsConfig::~KateViewDefaultsConfig() | 693 | KateViewDefaultsConfig::~KateViewDefaultsConfig() | ||
711 | { | 694 | { | ||
712 | delete bordersUi; | 695 | delete bordersUi; | ||
713 | delete textareaUi; | 696 | delete textareaUi; | ||
714 | } | 697 | } | ||
715 | 698 | | |||
▲ Show 20 Lines • Show All 117 Lines • ▼ Show 20 Line(s) | 804 | { | |||
833 | ui->setupUi(newWidget); | 816 | ui->setupUi(newWidget); | ||
834 | 817 | | |||
835 | QWidget *tmpWidget2 = new QWidget(tabWidget); | 818 | QWidget *tmpWidget2 = new QWidget(tabWidget); | ||
836 | QVBoxLayout *internalLayout2 = new QVBoxLayout; | 819 | QVBoxLayout *internalLayout2 = new QVBoxLayout; | ||
837 | QWidget *newWidget2 = new QWidget(tabWidget); | 820 | QWidget *newWidget2 = new QWidget(tabWidget); | ||
838 | uiadv = new Ui::OpenSaveConfigAdvWidget(); | 821 | uiadv = new Ui::OpenSaveConfigAdvWidget(); | ||
839 | uiadv->setupUi(newWidget2); | 822 | uiadv->setupUi(newWidget2); | ||
840 | 823 | | |||
841 | // What's this help is added in ui/opensaveconfigwidget.ui | 824 | // "What's This?" help can be found in the ui file | ||
825 | | ||||
842 | reload(); | 826 | reload(); | ||
843 | 827 | | |||
844 | // | 828 | observeChanges(ui->cbRemoveTrailingSpaces); | ||
845 | // after initial reload, connect the stuff for the changed () signal | 829 | observeChanges(ui->chkDetectEOL); | ||
846 | // | 830 | observeChanges(ui->chkEnableBOM); | ||
847 | 831 | observeChanges(ui->chkNewLineAtEof); | |||
848 | connect(ui->cmbEncoding, SIGNAL(activated(int)), this, SLOT(slotChanged())); | 832 | observeChanges(ui->cmbEOL); | ||
849 | connect(ui->cmbEncodingDetection, SIGNAL(activated(int)), this, SLOT(slotChanged())); | 833 | observeChanges(ui->cmbEncoding); | ||
850 | connect(ui->cmbEncodingFallback, SIGNAL(activated(int)), this, SLOT(slotChanged())); | 834 | observeChanges(ui->cmbEncodingDetection); | ||
851 | connect(ui->cmbEOL, SIGNAL(activated(int)), this, SLOT(slotChanged())); | 835 | observeChanges(ui->cmbEncodingFallback); | ||
852 | connect(ui->chkDetectEOL, SIGNAL(toggled(bool)), this, SLOT(slotChanged())); | 836 | observeChanges(ui->lineLengthLimit); | ||
853 | connect(ui->chkEnableBOM, SIGNAL(toggled(bool)), this, SLOT(slotChanged())); | 837 | | ||
854 | connect(ui->lineLengthLimit, SIGNAL(valueChanged(int)), this, SLOT(slotChanged())); | 838 | observeChanges(uiadv->chkBackupLocalFiles); | ||
855 | connect(ui->cbRemoveTrailingSpaces, SIGNAL(currentIndexChanged(int)), this, SLOT(slotChanged())); | 839 | observeChanges(uiadv->chkBackupRemoteFiles); | ||
856 | connect(ui->chkNewLineAtEof, SIGNAL(toggled(bool)), this, SLOT(slotChanged())); | 840 | observeChanges(uiadv->cmbSwapFileMode); | ||
857 | connect(uiadv->chkBackupLocalFiles, SIGNAL(toggled(bool)), this, SLOT(slotChanged())); | 841 | connect(uiadv->cmbSwapFileMode, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &KateSaveConfigTab::swapFileModeChanged); | ||
858 | connect(uiadv->chkBackupRemoteFiles, SIGNAL(toggled(bool)), this, SLOT(slotChanged())); | 842 | observeChanges(uiadv->edtBackupPrefix); | ||
859 | connect(uiadv->edtBackupPrefix, SIGNAL(textChanged(QString)), this, SLOT(slotChanged())); | 843 | observeChanges(uiadv->edtBackupSuffix); | ||
860 | connect(uiadv->edtBackupSuffix, SIGNAL(textChanged(QString)), this, SLOT(slotChanged())); | 844 | observeChanges(uiadv->kurlSwapDirectory); | ||
861 | connect(uiadv->cmbSwapFileMode, SIGNAL(currentIndexChanged(int)), this, SLOT(slotChanged())); | 845 | observeChanges(uiadv->spbSwapFileSync); | ||
862 | connect(uiadv->cmbSwapFileMode, SIGNAL(currentIndexChanged(int)), this, SLOT(swapFileModeChanged(int))); | | |||
863 | connect(uiadv->kurlSwapDirectory, SIGNAL(textChanged(QString)), this, SLOT(slotChanged())); | | |||
864 | connect(uiadv->spbSwapFileSync, SIGNAL(valueChanged(int)), this, SLOT(slotChanged())); | | |||
865 | 846 | | |||
866 | internalLayout->addWidget(newWidget); | 847 | internalLayout->addWidget(newWidget); | ||
867 | tmpWidget->setLayout(internalLayout); | 848 | tmpWidget->setLayout(internalLayout); | ||
868 | internalLayout2->addWidget(newWidget2); | 849 | internalLayout2->addWidget(newWidget2); | ||
869 | tmpWidget2->setLayout(internalLayout2); | 850 | tmpWidget2->setLayout(internalLayout2); | ||
870 | 851 | | |||
871 | // add all tabs | 852 | // add all tabs | ||
872 | tabWidget->insertTab(0, tmpWidget, i18n("General")); | 853 | tabWidget->insertTab(0, tmpWidget, i18n("General")); | ||
873 | tabWidget->insertTab(1, tmpWidget2, i18n("Advanced")); | 854 | tabWidget->insertTab(1, tmpWidget2, i18n("Advanced")); | ||
874 | tabWidget->insertTab(2, modeConfigPage, modeConfigPage->name()); | 855 | tabWidget->insertTab(2, modeConfigPage, modeConfigPage->name()); | ||
875 | 856 | | |||
876 | connect(modeConfigPage, SIGNAL(changed()), this, SLOT(slotChanged())); | 857 | observeChanges(modeConfigPage); | ||
877 | 858 | | |||
878 | layout->addWidget(tabWidget); | 859 | layout->addWidget(tabWidget); | ||
879 | setLayout(layout); | 860 | setLayout(layout); | ||
880 | } | 861 | } | ||
881 | 862 | | |||
882 | KateSaveConfigTab::~KateSaveConfigTab() | 863 | KateSaveConfigTab::~KateSaveConfigTab() | ||
883 | { | 864 | { | ||
884 | delete ui; | 865 | delete ui; | ||
▲ Show 20 Lines • Show All 525 Lines • Show Last 20 Lines |
Typo: sililar