Diffstat (limited to 'noncore/apps/tinykate/libkate/view/kateviewdialog.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/tinykate/libkate/view/kateviewdialog.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/noncore/apps/tinykate/libkate/view/kateviewdialog.cpp b/noncore/apps/tinykate/libkate/view/kateviewdialog.cpp index 6a19e01..4cb13e8 100644 --- a/noncore/apps/tinykate/libkate/view/kateviewdialog.cpp +++ b/noncore/apps/tinykate/libkate/view/kateviewdialog.cpp | |||
@@ -14,60 +14,60 @@ | |||
14 | * it under the terms of the GNU General Public License as published by * | 14 | * it under the terms of the GNU General Public License as published by * |
15 | * the Free Software Foundation; either version 2 of the License, or * | 15 | * the Free Software Foundation; either version 2 of the License, or * |
16 | * (at your option) any later version. * | 16 | * (at your option) any later version. * |
17 | * * | 17 | * * |
18 | ***************************************************************************/ | 18 | ***************************************************************************/ |
19 | // Dialogs | 19 | // Dialogs |
20 | 20 | ||
21 | #include <stdio.h> | 21 | #include <stdio.h> |
22 | #include <stdlib.h> | 22 | #include <stdlib.h> |
23 | 23 | ||
24 | #include <qgrid.h> | 24 | #include <qgrid.h> |
25 | #include <qlabel.h> | 25 | #include <qlabel.h> |
26 | #include <qlayout.h> | 26 | #include <qlayout.h> |
27 | #include <qlistbox.h> | 27 | #include <qlistbox.h> |
28 | #include <qspinbox.h> | 28 | #include <qspinbox.h> |
29 | #include <qcombobox.h> | 29 | #include <qcombobox.h> |
30 | #include <qgroupbox.h> | 30 | #include <qgroupbox.h> |
31 | #include <qlineedit.h> | 31 | #include <qlineedit.h> |
32 | #include <qcheckbox.h> | 32 | #include <qcheckbox.h> |
33 | #include <qcollection.h> | 33 | #include <qcollection.h> |
34 | #include <qpushbutton.h> | 34 | #include <qpushbutton.h> |
35 | #include <qobjectlist.h> | 35 | #include <qobjectlist.h> |
36 | #include <qradiobutton.h> | 36 | #include <qradiobutton.h> |
37 | #include <qwhatsthis.h> | 37 | #include <qwhatsthis.h> |
38 | #include <qstringlist.h> | 38 | #include <qstringlist.h> |
39 | #include <klocale.h> | 39 | #include <klocale.h> |
40 | #include <kcolorbtn.h> | 40 | #include <kcolorbtn.h> |
41 | #include <qcombobox.h> | 41 | #include <qcombobox.h> |
42 | #include <kglobal.h> | 42 | #include <kglobal.h> |
43 | #include <qvbox.h> | 43 | #include <qvbox.h> |
44 | #include <qspinbox.h> | 44 | #include <qspinbox.h> |
45 | #include <kfontdialog.h> | 45 | #include <kfontdialog.h> |
46 | 46 | ||
47 | #include "../document/katedocument.h" | 47 | #include "../document/katedocument.h" |
48 | #include "kateviewdialog.h" | 48 | #include "kateviewdialog.h" |
49 | #include <opie/ofontselector.h> | 49 | #include <opie2/ofontselector.h> |
50 | 50 | ||
51 | 51 | ||
52 | SearchDialog::SearchDialog( QWidget *parent, QStringList &searchFor, QStringList &replaceWith, int flags ) | 52 | SearchDialog::SearchDialog( QWidget *parent, QStringList &searchFor, QStringList &replaceWith, int flags ) |
53 | : KDialogBase( parent, 0L, true, i18n( "Find Text" ), Ok | Cancel, Ok ) | 53 | : KDialogBase( parent, 0L, true, i18n( "Find Text" ), Ok | Cancel, Ok ) |
54 | , m_replace( 0L ) | 54 | , m_replace( 0L ) |
55 | { | 55 | { |
56 | QWidget *page = new QWidget( this ); | 56 | QWidget *page = new QWidget( this ); |
57 | setMainWidget( page ); | 57 | setMainWidget( page ); |
58 | 58 | ||
59 | QVBoxLayout *topLayout = new QVBoxLayout( page, 0, spacingHint() ); | 59 | QVBoxLayout *topLayout = new QVBoxLayout( page, 0, spacingHint() ); |
60 | 60 | ||
61 | m_search = new QComboBox( true, page ); | 61 | m_search = new QComboBox( true, page ); |
62 | m_search->insertStringList( searchFor ); | 62 | m_search->insertStringList( searchFor ); |
63 | m_search->setMinimumWidth( m_search->sizeHint().width() ); | 63 | m_search->setMinimumWidth( m_search->sizeHint().width() ); |
64 | m_search->lineEdit()->selectAll(); | 64 | m_search->lineEdit()->selectAll(); |
65 | QLabel *label = new QLabel( m_search, i18n( "&Text To Find:" ), page ); | 65 | QLabel *label = new QLabel( m_search, i18n( "&Text To Find:" ), page ); |
66 | m_optRegExp = new QCheckBox( i18n( "Regular Expression" ), page ); | 66 | m_optRegExp = new QCheckBox( i18n( "Regular Expression" ), page ); |
67 | topLayout->addWidget( label ); | 67 | topLayout->addWidget( label ); |
68 | topLayout->addWidget( m_search ); | 68 | topLayout->addWidget( m_search ); |
69 | topLayout->addWidget( m_optRegExp ); | 69 | topLayout->addWidget( m_optRegExp ); |
70 | 70 | ||
71 | if( flags & KateView::sfReplace ) | 71 | if( flags & KateView::sfReplace ) |
72 | { | 72 | { |
73 | // make it a replace dialog | 73 | // make it a replace dialog |
@@ -404,49 +404,49 @@ EditConfigTab::EditConfigTab(QWidget *parent, KateView *view) | |||
404 | opt[8]->setChecked(configFlags & flags[8]); | 404 | opt[8]->setChecked(configFlags & flags[8]); |
405 | 405 | ||
406 | cbLayout->addStretch(); | 406 | cbLayout->addStretch(); |
407 | 407 | ||
408 | // edit lines | 408 | // edit lines |
409 | leLayout = new QVBoxLayout(); | 409 | leLayout = new QVBoxLayout(); |
410 | mainLayout->addLayout(leLayout,10); | 410 | mainLayout->addLayout(leLayout,10); |
411 | 411 | ||
412 | e1 = new QSpinBox(this); | 412 | e1 = new QSpinBox(this); |
413 | e1->setMinValue(20); | 413 | e1->setMinValue(20); |
414 | e1->setMaxValue( 200); | 414 | e1->setMaxValue( 200); |
415 | e1->setValue((int)(view->doc()->wordWrapAt())); | 415 | e1->setValue((int)(view->doc()->wordWrapAt())); |
416 | #warning fixme e1->setLabel(i18n("Wrap Words At:")); | 416 | #warning fixme e1->setLabel(i18n("Wrap Words At:")); |
417 | 417 | ||
418 | e2 = new QSpinBox(this); | 418 | e2 = new QSpinBox(this); |
419 | e2->setMinValue(1); | 419 | e2->setMinValue(1); |
420 | e2->setMaxValue(16); | 420 | e2->setMaxValue(16); |
421 | e2->setValue((int)view->tabWidth()); | 421 | e2->setValue((int)view->tabWidth()); |
422 | 422 | ||
423 | #warning fixme e2->setLabel(i18n("Tab/Indent Width:")); | 423 | #warning fixme e2->setLabel(i18n("Tab/Indent Width:")); |
424 | 424 | ||
425 | e3 = new QSpinBox(this); | 425 | e3 = new QSpinBox(this); |
426 | e3->setMinValue(5); | 426 | e3->setMinValue(5); |
427 | e3->setMaxValue( 30000); | 427 | e3->setMaxValue( 30000); |
428 | #warning fixme e3->setLabel(i18n("Undo steps:")); | 428 | #warning fixme e3->setLabel(i18n("Undo steps:")); |
429 | e3->setValue((int)view->undoSteps()); | 429 | e3->setValue((int)view->undoSteps()); |
430 | 430 | ||
431 | leLayout->addWidget(e1, 0, AlignLeft); | 431 | leLayout->addWidget(e1, 0, AlignLeft); |
432 | leLayout->addWidget(e2, 0, AlignLeft); | 432 | leLayout->addWidget(e2, 0, AlignLeft); |
433 | leLayout->addWidget(e3, 0, AlignLeft); | 433 | leLayout->addWidget(e3, 0, AlignLeft); |
434 | 434 | ||
435 | 435 | ||
436 | QVBox *box = new QVBox (this); | 436 | QVBox *box = new QVBox (this); |
437 | leLayout->addWidget (box, 0, AlignLeft); | 437 | leLayout->addWidget (box, 0, AlignLeft); |
438 | 438 | ||
439 | new QLabel (i18n("Encoding:"), box); | 439 | new QLabel (i18n("Encoding:"), box); |
440 | 440 | ||
441 | encoding = new QComboBox(box); | 441 | encoding = new QComboBox(box); |
442 | #warning fixme | 442 | #warning fixme |
443 | #if 0 | 443 | #if 0 |
444 | encoding->insertStringList (KGlobal::charsets()->availableEncodingNames()); | 444 | encoding->insertStringList (KGlobal::charsets()->availableEncodingNames()); |
445 | encoding->setCurrentItem (KGlobal::charsets()->availableEncodingNames().findIndex(view->doc()->encoding())); | 445 | encoding->setCurrentItem (KGlobal::charsets()->availableEncodingNames().findIndex(view->doc()->encoding())); |
446 | #endif | 446 | #endif |
447 | leLayout->addStretch(); | 447 | leLayout->addStretch(); |
448 | 448 | ||
449 | // What is this? help | 449 | // What is this? help |
450 | QWhatsThis::add(opt[0], i18n("Word wrap is a feature that causes the editor to automatically start a new line of text and move (wrap) the cursor to the beginning of that new line. KateView will automatically start a new line of text when the current line reaches the length specified by the Wrap Words At: option.<p><b>NOTE:<b> Word Wrap will not change existing lines or wrap them for easy reading as in some applications.")); | 450 | QWhatsThis::add(opt[0], i18n("Word wrap is a feature that causes the editor to automatically start a new line of text and move (wrap) the cursor to the beginning of that new line. KateView will automatically start a new line of text when the current line reaches the length specified by the Wrap Words At: option.<p><b>NOTE:<b> Word Wrap will not change existing lines or wrap them for easy reading as in some applications.")); |
451 | QWhatsThis::add(e1, i18n("If the Word Wrap option is selected this entry determines the length (in characters) at which the editor will automatically start a new line.")); | 451 | QWhatsThis::add(e1, i18n("If the Word Wrap option is selected this entry determines the length (in characters) at which the editor will automatically start a new line.")); |
452 | QWhatsThis::add(opt[1], i18n("KateView will replace any tabs with the number of spaces indicated in the Tab Width: entry.")); | 452 | QWhatsThis::add(opt[1], i18n("KateView will replace any tabs with the number of spaces indicated in the Tab Width: entry.")); |
@@ -520,49 +520,49 @@ void ColorConfig::getColors(QColor *colors) | |||
520 | { | 520 | { |
521 | colors[0] = m_back->color(); | 521 | colors[0] = m_back->color(); |
522 | colors[1] = m_selected->color(); | 522 | colors[1] = m_selected->color(); |
523 | } | 523 | } |
524 | 524 | ||
525 | FontConfig::FontConfig( QWidget *parent, char *name ) | 525 | FontConfig::FontConfig( QWidget *parent, char *name ) |
526 | : QWidget( parent, name ) | 526 | : QWidget( parent, name ) |
527 | { | 527 | { |
528 | // sizemanagment | 528 | // sizemanagment |
529 | QGridLayout *grid = new QGridLayout( this, 1, 1 ); | 529 | QGridLayout *grid = new QGridLayout( this, 1, 1 ); |
530 | // QString familyStr = cfg. readEntry ( "FontFamily", "Helvetica" ); | 530 | // QString familyStr = cfg. readEntry ( "FontFamily", "Helvetica" ); |
531 | // QString styleStr = cfg. readEntry ( "FontStyle", "Regular" ); | 531 | // QString styleStr = cfg. readEntry ( "FontStyle", "Regular" ); |
532 | // int size = cfg. readNumEntry ( "FontSize", 10 ); | 532 | // int size = cfg. readNumEntry ( "FontSize", 10 ); |
533 | // OFontSelector *m_fontselect; | 533 | // OFontSelector *m_fontselect; |
534 | 534 | ||
535 | m_fontselect = new OFontSelector ( false, this, "FontTab" ); | 535 | m_fontselect = new OFontSelector ( false, this, "FontTab" ); |
536 | // m_fontselect-> setSelectedFont ( familyStr, styleStr, size ); | 536 | // m_fontselect-> setSelectedFont ( familyStr, styleStr, size ); |
537 | // QWhatsThis::add( m_fontselect, | 537 | // QWhatsThis::add( m_fontselect, |
538 | // tr( "Select the desired name, style and size of the default font applications will use." ) ); | 538 | // tr( "Select the desired name, style and size of the default font applications will use." ) ); |
539 | 539 | ||
540 | connect( m_fontselect, SIGNAL( fontSelected ( const QFont & )), | 540 | connect( m_fontselect, SIGNAL( fontSelected ( const QFont & )), |
541 | this, SLOT( slotFontSelected( const QFont & ))); | 541 | this, SLOT( slotFontSelected( const QFont & ))); |
542 | grid->addWidget( m_fontselect, 0, 0); | 542 | grid->addWidget( m_fontselect, 0, 0); |
543 | 543 | ||
544 | 544 | ||
545 | // #if 0 | 545 | // #if 0 |
546 | // m_fontchooser = new KFontChooser ( this ); | 546 | // m_fontchooser = new KFontChooser ( this ); |
547 | // m_fontchooser->enableColumn(KFontChooser::StyleList, false); | 547 | // m_fontchooser->enableColumn(KFontChooser::StyleList, false); |
548 | // grid->addWidget( m_fontchooser, 0, 0); | 548 | // grid->addWidget( m_fontchooser, 0, 0); |
549 | 549 | ||
550 | // connect (m_fontchooser, SIGNAL (fontSelected( const QFont & )), this, SLOT (slotFontSelected( const QFont & ))); | 550 | // connect (m_fontchooser, SIGNAL (fontSelected( const QFont & )), this, SLOT (slotFontSelected( const QFont & ))); |
551 | // #endif | 551 | // #endif |
552 | } | 552 | } |
553 | 553 | ||
554 | FontConfig::~FontConfig() | 554 | FontConfig::~FontConfig() |
555 | { | 555 | { |
556 | } | 556 | } |
557 | 557 | ||
558 | void FontConfig::setFont ( const QFont &font ) | 558 | void FontConfig::setFont ( const QFont &font ) |
559 | { | 559 | { |
560 | //#if 0 | 560 | //#if 0 |
561 | m_fontselect->setFont (font); | 561 | m_fontselect->setFont (font); |
562 | myFont = font; | 562 | myFont = font; |
563 | //#endif | 563 | //#endif |
564 | } | 564 | } |
565 | 565 | ||
566 | void FontConfig::slotFontSelected( const QFont &font ) | 566 | void FontConfig::slotFontSelected( const QFont &font ) |
567 | { | 567 | { |
568 | myFont = font; | 568 | myFont = font; |