summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/tinykate/libkate/view/kateviewdialog.cpp2
-rw-r--r--noncore/apps/tinykate/libkate/view/kateviewdialog.h4
2 files changed, 3 insertions, 3 deletions
diff --git a/noncore/apps/tinykate/libkate/view/kateviewdialog.cpp b/noncore/apps/tinykate/libkate/view/kateviewdialog.cpp
index 4cb13e8..bd5b74f 100644
--- a/noncore/apps/tinykate/libkate/view/kateviewdialog.cpp
+++ b/noncore/apps/tinykate/libkate/view/kateviewdialog.cpp
@@ -279,295 +279,295 @@ IndentConfigTab::IndentConfigTab(QWidget *parent, KateView *view)
279 QWhatsThis::add(opt[0], i18n("When <b>Auto indent</b> is on, KateView will indent new lines to equal the indent on the previous line.<p>If the previous line is blank, the nearest line above with text is used")); 279 QWhatsThis::add(opt[0], i18n("When <b>Auto indent</b> is on, KateView will indent new lines to equal the indent on the previous line.<p>If the previous line is blank, the nearest line above with text is used"));
280 QWhatsThis::add(opt[1], i18n("Check this if you want to indent with spaces rather than tabs.<br>A Tab will be converted to <u>Tab-width</u> as set in the <b>edit</b> options")); 280 QWhatsThis::add(opt[1], i18n("Check this if you want to indent with spaces rather than tabs.<br>A Tab will be converted to <u>Tab-width</u> as set in the <b>edit</b> options"));
281 QWhatsThis::add(opt[2], i18n("This allows the <b>backspace</b> key to be used to indent.")); 281 QWhatsThis::add(opt[2], i18n("This allows the <b>backspace</b> key to be used to indent."));
282 QWhatsThis::add(opt[3], i18n("This allows the <b>tab</b> key to be used to indent.")); 282 QWhatsThis::add(opt[3], i18n("This allows the <b>tab</b> key to be used to indent."));
283 QWhatsThis::add(opt[4], i18n("This retains current indentation settings for future documents.")); 283 QWhatsThis::add(opt[4], i18n("This retains current indentation settings for future documents."));
284 QWhatsThis::add(opt[5], i18n("Indentations of more than the selected number of spaces will not be shortened.")); 284 QWhatsThis::add(opt[5], i18n("Indentations of more than the selected number of spaces will not be shortened."));
285} 285}
286 286
287void IndentConfigTab::getData(KateView *view) { 287void IndentConfigTab::getData(KateView *view) {
288 int configFlags, z; 288 int configFlags, z;
289 289
290 configFlags = view->config(); 290 configFlags = view->config();
291 for (z = 0; z < numFlags; z++) { 291 for (z = 0; z < numFlags; z++) {
292 configFlags &= ~flags[z]; 292 configFlags &= ~flags[z];
293 if (opt[z]->isChecked()) configFlags |= flags[z]; 293 if (opt[z]->isChecked()) configFlags |= flags[z];
294 } 294 }
295 view->setConfig(configFlags); 295 view->setConfig(configFlags);
296} 296}
297 297
298const int SelectConfigTab::flags[] = {KateView::cfPersistent, KateView::cfDelOnInput, 298const int SelectConfigTab::flags[] = {KateView::cfPersistent, KateView::cfDelOnInput,
299 KateView::cfMouseAutoCopy, KateView::cfSingleSelection, KateView::cfVerticalSelect, KateView::cfXorSelect}; 299 KateView::cfMouseAutoCopy, KateView::cfSingleSelection, KateView::cfVerticalSelect, KateView::cfXorSelect};
300 300
301SelectConfigTab::SelectConfigTab(QWidget *parent, KateView *view) 301SelectConfigTab::SelectConfigTab(QWidget *parent, KateView *view)
302 : QWidget(parent, 0L) 302 : QWidget(parent, 0L)
303{ 303{
304 QVBoxLayout *layout = new QVBoxLayout(this, 0, KDialog::spacingHint() ); 304 QVBoxLayout *layout = new QVBoxLayout(this, 0, KDialog::spacingHint() );
305 int configFlags = view->config(); 305 int configFlags = view->config();
306 306
307 opt[0] = new QCheckBox(i18n("&Persistent Selections"), this); 307 opt[0] = new QCheckBox(i18n("&Persistent Selections"), this);
308 layout->addWidget(opt[0], 0, AlignLeft); 308 layout->addWidget(opt[0], 0, AlignLeft);
309 opt[0]->setChecked(configFlags & flags[0]); 309 opt[0]->setChecked(configFlags & flags[0]);
310 310
311 opt[1] = new QCheckBox(i18n("&Overwrite Selections"), this); 311 opt[1] = new QCheckBox(i18n("&Overwrite Selections"), this);
312 layout->addWidget(opt[1], 0, AlignLeft); 312 layout->addWidget(opt[1], 0, AlignLeft);
313 opt[1]->setChecked(configFlags & flags[1]); 313 opt[1]->setChecked(configFlags & flags[1]);
314 314
315 opt[2] = new QCheckBox(i18n("Mouse &Autocopy"), this); 315 opt[2] = new QCheckBox(i18n("Mouse &Autocopy"), this);
316 layout->addWidget(opt[2], 0, AlignLeft); 316 layout->addWidget(opt[2], 0, AlignLeft);
317 opt[2]->setChecked(configFlags & flags[2]); 317 opt[2]->setChecked(configFlags & flags[2]);
318 318
319 opt[3] = new QCheckBox(i18n("&X11-like Single Selection"), this); 319 opt[3] = new QCheckBox(i18n("&X11-like Single Selection"), this);
320 layout->addWidget(opt[3], 0, AlignLeft); 320 layout->addWidget(opt[3], 0, AlignLeft);
321 opt[3]->setChecked(configFlags & flags[3]); 321 opt[3]->setChecked(configFlags & flags[3]);
322 322
323 opt[4] = new QCheckBox(i18n("&Vertical Selections"), this); 323 opt[4] = new QCheckBox(i18n("&Vertical Selections"), this);
324 layout->addWidget(opt[4], 0, AlignLeft); 324 layout->addWidget(opt[4], 0, AlignLeft);
325 opt[4]->setChecked(configFlags & flags[4]); 325 opt[4]->setChecked(configFlags & flags[4]);
326 326
327 opt[5] = new QCheckBox(i18n("&Toggle Old"), this); 327 opt[5] = new QCheckBox(i18n("&Toggle Old"), this);
328 layout->addWidget(opt[5], 0, AlignLeft); 328 layout->addWidget(opt[5], 0, AlignLeft);
329 opt[5]->setChecked(configFlags & flags[5]); 329 opt[5]->setChecked(configFlags & flags[5]);
330 330
331 layout->addStretch(); 331 layout->addStretch();
332 332
333 // What is this? help 333 // What is this? help
334 QWhatsThis::add(opt[0], i18n("Enabling this prevents key input or cursor movement by way of the arrow keys from causing the elimination of text selection.<p><b>Note:</b> If the Overwrite Selections option is activated then any typed character input or paste operation will replace the selected text.")); 334 QWhatsThis::add(opt[0], i18n("Enabling this prevents key input or cursor movement by way of the arrow keys from causing the elimination of text selection.<p><b>Note:</b> If the Overwrite Selections option is activated then any typed character input or paste operation will replace the selected text."));
335 QWhatsThis::add(opt[1], i18n("When this is on, any keyed character input or paste operation will replace the selected text.")); 335 QWhatsThis::add(opt[1], i18n("When this is on, any keyed character input or paste operation will replace the selected text."));
336 QWhatsThis::add(opt[2], i18n("When this is on, any text selected with the mouse will be automatically copied to the clipboard.")); 336 QWhatsThis::add(opt[2], i18n("When this is on, any text selected with the mouse will be automatically copied to the clipboard."));
337 QWhatsThis::add(opt[3], i18n("Not implemented yet.")); 337 QWhatsThis::add(opt[3], i18n("Not implemented yet."));
338 QWhatsThis::add(opt[4], i18n("Enabling this allows you to make vertical selections.")); 338 QWhatsThis::add(opt[4], i18n("Enabling this allows you to make vertical selections."));
339 QWhatsThis::add(opt[5], i18n("Not yet implemented.")); 339 QWhatsThis::add(opt[5], i18n("Not yet implemented."));
340} 340}
341 341
342void SelectConfigTab::getData(KateView *view) { 342void SelectConfigTab::getData(KateView *view) {
343 int configFlags, z; 343 int configFlags, z;
344 344
345 configFlags = view->config(); 345 configFlags = view->config();
346 for (z = 0; z < numFlags; z++) { 346 for (z = 0; z < numFlags; z++) {
347 configFlags &= ~flags[z]; // clear flag 347 configFlags &= ~flags[z]; // clear flag
348 if (opt[z]->isChecked()) configFlags |= flags[z]; // set flag if checked 348 if (opt[z]->isChecked()) configFlags |= flags[z]; // set flag if checked
349 } 349 }
350 view->setConfig(configFlags); 350 view->setConfig(configFlags);
351} 351}
352 352
353const int EditConfigTab::flags[] = {KateView::cfWordWrap, KateView::cfReplaceTabs, KateView::cfRemoveSpaces, 353const int EditConfigTab::flags[] = {KateView::cfWordWrap, KateView::cfReplaceTabs, KateView::cfRemoveSpaces,
354 KateView::cfAutoBrackets, KateView::cfGroupUndo, KateView::cfShowTabs, KateView::cfSmartHome, 354 KateView::cfAutoBrackets, KateView::cfGroupUndo, KateView::cfShowTabs, KateView::cfSmartHome,
355 KateView::cfPageUDMovesCursor, KateView::cfWrapCursor}; 355 KateView::cfPageUDMovesCursor, KateView::cfWrapCursor};
356 356
357EditConfigTab::EditConfigTab(QWidget *parent, KateView *view) 357EditConfigTab::EditConfigTab(QWidget *parent, KateView *view)
358 : QWidget(parent, 0L) { 358 : QWidget(parent, 0L) {
359 359
360 QHBoxLayout *mainLayout; 360 QHBoxLayout *mainLayout;
361 QVBoxLayout *cbLayout, *leLayout; 361 QVBoxLayout *cbLayout, *leLayout;
362 int configFlags; 362 int configFlags;
363 363
364 mainLayout = new QHBoxLayout(this, 0, KDialog::spacingHint() ); 364 mainLayout = new QHBoxLayout(this, 0, KDialog::spacingHint() );
365 365
366 // checkboxes 366 // checkboxes
367 cbLayout = new QVBoxLayout( mainLayout ); 367 cbLayout = new QVBoxLayout( mainLayout );
368 configFlags = view->config(); 368 configFlags = view->config();
369 369
370 opt[0] = new QCheckBox(i18n("&Word wrap"), this); 370 opt[0] = new QCheckBox(i18n("&Word wrap"), this);
371 cbLayout->addWidget(opt[0], 0, AlignLeft); 371 cbLayout->addWidget(opt[0], 0, AlignLeft);
372 opt[0]->setChecked(view->doc()->wordWrap()); 372 opt[0]->setChecked(view->doc()->wordWrap());
373 373
374 opt[1] = new QCheckBox(i18n("Replace &tabs with spaces"), this); 374 opt[1] = new QCheckBox(i18n("Replace &tabs with spaces"), this);
375 cbLayout->addWidget(opt[1], 0, AlignLeft); 375 cbLayout->addWidget(opt[1], 0, AlignLeft);
376 opt[1]->setChecked(configFlags & flags[1]); 376 opt[1]->setChecked(configFlags & flags[1]);
377 377
378 opt[2] = new QCheckBox(i18n("&Remove trailing spaces"), this); 378 opt[2] = new QCheckBox(i18n("&Remove trailing spaces"), this);
379 cbLayout->addWidget(opt[2], 0, AlignLeft); 379 cbLayout->addWidget(opt[2], 0, AlignLeft);
380 opt[2]->setChecked(configFlags & flags[2]); 380 opt[2]->setChecked(configFlags & flags[2]);
381 381
382 opt[3] = new QCheckBox(i18n("&Auto brackets"), this); 382 opt[3] = new QCheckBox(i18n("&Auto brackets"), this);
383 cbLayout->addWidget(opt[3], 0, AlignLeft); 383 cbLayout->addWidget(opt[3], 0, AlignLeft);
384 opt[3]->setChecked(configFlags & flags[3]); 384 opt[3]->setChecked(configFlags & flags[3]);
385 385
386 opt[4] = new QCheckBox(i18n("Group &undos"), this); 386 opt[4] = new QCheckBox(i18n("Group &undos"), this);
387 cbLayout->addWidget(opt[4], 0, AlignLeft); 387 cbLayout->addWidget(opt[4], 0, AlignLeft);
388 opt[4]->setChecked(configFlags & flags[4]); 388 opt[4]->setChecked(configFlags & flags[4]);
389 389
390 opt[5] = new QCheckBox(i18n("&Show tabs"), this); 390 opt[5] = new QCheckBox(i18n("&Show tabs"), this);
391 cbLayout->addWidget(opt[5], 0, AlignLeft); 391 cbLayout->addWidget(opt[5], 0, AlignLeft);
392 opt[5]->setChecked(configFlags & flags[5]); 392 opt[5]->setChecked(configFlags & flags[5]);
393 393
394 opt[6] = new QCheckBox(i18n("Smart &home"), this); 394 opt[6] = new QCheckBox(i18n("Smart &home"), this);
395 cbLayout->addWidget(opt[6], 0, AlignLeft); 395 cbLayout->addWidget(opt[6], 0, AlignLeft);
396 opt[6]->setChecked(configFlags & flags[6]); 396 opt[6]->setChecked(configFlags & flags[6]);
397 397
398 opt[7] = new QCheckBox(i18n("&Page up/down moves cursor"), this); 398 opt[7] = new QCheckBox(i18n("&Page up/down moves cursor"), this);
399 cbLayout->addWidget(opt[7], 0, AlignLeft); 399 cbLayout->addWidget(opt[7], 0, AlignLeft);
400 opt[7]->setChecked(configFlags & flags[7]); 400 opt[7]->setChecked(configFlags & flags[7]);
401 401
402 opt[8] = new QCheckBox(i18n("Wrap &cursor"), this); 402 opt[8] = new QCheckBox(i18n("Wrap &cursor"), this);
403 cbLayout->addWidget(opt[8], 0, AlignLeft); 403 cbLayout->addWidget(opt[8], 0, AlignLeft);
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."));
453 QWhatsThis::add(e2, i18n("If the Replace Tabs By Spaces option is selected this entry determines the number of spaces with which the editor will automatically replace tabs.")); 453 QWhatsThis::add(e2, i18n("If the Replace Tabs By Spaces option is selected this entry determines the number of spaces with which the editor will automatically replace tabs."));
454 QWhatsThis::add(opt[2], i18n("KateView will automatically eliminate extra spaces at the ends of lines of text.")); 454 QWhatsThis::add(opt[2], i18n("KateView will automatically eliminate extra spaces at the ends of lines of text."));
455 QWhatsThis::add(opt[3], i18n("When the user types a left bracket ([,(, or {) KateView automatically enters the right bracket (}, ), or ]) to the right of the cursor.")); 455 QWhatsThis::add(opt[3], i18n("When the user types a left bracket ([,(, or {) KateView automatically enters the right bracket (}, ), or ]) to the right of the cursor."));
456 QWhatsThis::add(opt[4], i18n("Checking this will cause sequences of similar actions to be undone at once.")); 456 QWhatsThis::add(opt[4], i18n("Checking this will cause sequences of similar actions to be undone at once."));
457 QWhatsThis::add(opt[5], i18n("The editor will display a symbol to indicate the presence of a tab in the text.")); 457 QWhatsThis::add(opt[5], i18n("The editor will display a symbol to indicate the presence of a tab in the text."));
458 QWhatsThis::add(opt[6], i18n("Not yet implemented.")); 458 QWhatsThis::add(opt[6], i18n("Not yet implemented."));
459 QWhatsThis::add(opt[7], i18n("If this is selected, the insertion cursor will be moved to the first/last line when pressing the page up/down buttons.<p>If not selected, it will remain at it's relative position in the visible text.")); 459 QWhatsThis::add(opt[7], i18n("If this is selected, the insertion cursor will be moved to the first/last line when pressing the page up/down buttons.<p>If not selected, it will remain at it's relative position in the visible text."));
460 QWhatsThis::add(e3, i18n("Sets the number of undo/redo steps to record. More steps uses more memory.")); 460 QWhatsThis::add(e3, i18n("Sets the number of undo/redo steps to record. More steps uses more memory."));
461 QWhatsThis::add(opt[8], i18n("When on, moving the insertion cursor using the <b>Left</b> and <b>Right</b> keys will go on to previous/next line at beginning/end of the line, similar to most editors.<p>When off, the insertion cursor cannot be moved left of the line start, but it can be moved off the line end, which can be very handy for programmers.")); 461 QWhatsThis::add(opt[8], i18n("When on, moving the insertion cursor using the <b>Left</b> and <b>Right</b> keys will go on to previous/next line at beginning/end of the line, similar to most editors.<p>When off, the insertion cursor cannot be moved left of the line start, but it can be moved off the line end, which can be very handy for programmers."));
462} 462}
463 463
464void EditConfigTab::getData(KateView *view) 464void EditConfigTab::getData(KateView *view)
465{ 465{
466 int configFlags, z; 466 int configFlags, z;
467 467
468 configFlags = view->config(); 468 configFlags = view->config();
469 for (z = 1; z < numFlags; z++) { 469 for (z = 1; z < numFlags; z++) {
470 configFlags &= ~flags[z]; 470 configFlags &= ~flags[z];
471 if (opt[z]->isChecked()) configFlags |= flags[z]; 471 if (opt[z]->isChecked()) configFlags |= flags[z];
472 } 472 }
473 view->setConfig(configFlags); 473 view->setConfig(configFlags);
474 474
475 view->setEncoding (encoding->currentText()); 475 view->setEncoding (encoding->currentText());
476 view->doc()->setWordWrapAt(e1->value()); 476 view->doc()->setWordWrapAt(e1->value());
477 view->doc()->setWordWrap (opt[0]->isChecked()); 477 view->doc()->setWordWrap (opt[0]->isChecked());
478 view->setTabWidth(e2->value()); 478 view->setTabWidth(e2->value());
479 view->setUndoSteps(e3->value()); 479 view->setUndoSteps(e3->value());
480} 480}
481 481
482ColorConfig::ColorConfig( QWidget *parent, char *name ) 482ColorConfig::ColorConfig( QWidget *parent, char *name )
483 : QWidget( parent, name ) 483 : QWidget( parent, name )
484{ 484{
485 QGridLayout *glay = new QGridLayout( this, 6, 2, 0, KDialog::spacingHint()); 485 QGridLayout *glay = new QGridLayout( this, 6, 2, 0, KDialog::spacingHint());
486 glay->setColStretch(1,1); 486 glay->setColStretch(1,1);
487 glay->setRowStretch(5,1); 487 glay->setRowStretch(5,1);
488 488
489 QLabel *label; 489 QLabel *label;
490 490
491 label = new QLabel( i18n("Background:"), this); 491 label = new QLabel( i18n("Background:"), this);
492 label->setAlignment( AlignRight|AlignVCenter ); 492 label->setAlignment( AlignRight|AlignVCenter );
493 m_back = new KColorButton( this ); 493 m_back = new KColorButton( this );
494 glay->addWidget( label, 0, 0 ); 494 glay->addWidget( label, 0, 0 );
495 glay->addWidget( m_back, 0, 1 ); 495 glay->addWidget( m_back, 0, 1 );
496 496
497 label = new QLabel( i18n("Selected:"), this); 497 label = new QLabel( i18n("Selected:"), this);
498 label->setAlignment( AlignRight|AlignVCenter ); 498 label->setAlignment( AlignRight|AlignVCenter );
499 m_selected = new KColorButton( this ); 499 m_selected = new KColorButton( this );
500 glay->addWidget( label, 2, 0 ); 500 glay->addWidget( label, 2, 0 );
501 glay->addWidget( m_selected, 2, 1 ); 501 glay->addWidget( m_selected, 2, 1 );
502 502
503 // QWhatsThis help 503 // QWhatsThis help
504 QWhatsThis::add(m_back, i18n("Sets the background color of the editing area")); 504 QWhatsThis::add(m_back, i18n("Sets the background color of the editing area"));
505 QWhatsThis::add(m_selected, i18n("Sets the background color of the selection. To set the text color for selected text, use the &quot;<b>Configure Highlighting</b>&quot; dialog.")); 505 QWhatsThis::add(m_selected, i18n("Sets the background color of the selection. To set the text color for selected text, use the &quot;<b>Configure Highlighting</b>&quot; dialog."));
506} 506}
507 507
508 508
509ColorConfig::~ColorConfig() 509ColorConfig::~ColorConfig()
510{ 510{
511} 511}
512 512
513void ColorConfig::setColors(QColor *colors) 513void ColorConfig::setColors(QColor *colors)
514{ 514{
515 m_back->setColor( colors[0] ); 515 m_back->setColor( colors[0] );
516 m_selected->setColor( colors[1] ); 516 m_selected->setColor( colors[1] );
517} 517}
518 518
519void ColorConfig::getColors(QColor *colors) 519void 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
525FontConfig::FontConfig( QWidget *parent, char *name ) 525FontConfig::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 Opie::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
554FontConfig::~FontConfig() 554FontConfig::~FontConfig()
555{ 555{
556} 556}
557 557
558void FontConfig::setFont ( const QFont &font ) 558void FontConfig::setFont ( const QFont &font )
559{ 559{
560//#if 0 560//#if 0
561m_fontselect->setFont (font); 561m_fontselect->setFont (font);
562 myFont = font; 562 myFont = font;
563//#endif 563//#endif
564} 564}
565 565
566void FontConfig::slotFontSelected( const QFont &font ) 566void FontConfig::slotFontSelected( const QFont &font )
567{ 567{
568 myFont = font; 568 myFont = font;
569} 569}
570 570
571 571
572 572
573 573
diff --git a/noncore/apps/tinykate/libkate/view/kateviewdialog.h b/noncore/apps/tinykate/libkate/view/kateviewdialog.h
index 2ce5a11..98d8799 100644
--- a/noncore/apps/tinykate/libkate/view/kateviewdialog.h
+++ b/noncore/apps/tinykate/libkate/view/kateviewdialog.h
@@ -1,196 +1,196 @@
1/*************************************************************************** 1/***************************************************************************
2 kateviewdialog.h - description 2 kateviewdialog.h - description
3 ------------------- 3 -------------------
4 copyright : (C) 2001 by The Kate Team 4 copyright : (C) 2001 by The Kate Team
5 (C) 2002 by Joseph Wenninger 5 (C) 2002 by Joseph Wenninger
6 email : kwrite-devel@kde.org 6 email : kwrite-devel@kde.org
7 jowenn@kde.org 7 jowenn@kde.org
8 8
9 ***************************************************************************/ 9 ***************************************************************************/
10 10
11/*************************************************************************** 11/***************************************************************************
12 * * 12 * *
13 * This program is free software; you can redistribute it and/or modify * 13 * This program is free software; you can redistribute it and/or modify *
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#ifndef _KWDIALOG_H_ 21#ifndef _KWDIALOG_H_
22#define _KWDIALOG_H_ 22#define _KWDIALOG_H_
23 23
24 24
25class QCheckBox; 25class QCheckBox;
26class QLineEdit; 26class QLineEdit;
27class QPushButton; 27class QPushButton;
28class QRadioButton; 28class QRadioButton;
29class QSpinBox; 29class QSpinBox;
30class KColorButton; 30class KColorButton;
31class QComboBox; 31class QComboBox;
32 32
33#include <kdialogbase.h> 33#include <kdialogbase.h>
34#include <opie/ofontselector.h> 34#include <opie2/ofontselector.h>
35#include "kateview.h" 35#include "kateview.h"
36 36
37class SearchDialog : public KDialogBase 37class SearchDialog : public KDialogBase
38{ 38{
39 Q_OBJECT 39 Q_OBJECT
40 40
41 public: 41 public:
42 SearchDialog( QWidget *parent, QStringList &searchFor, QStringList &replaceWith, int flags ); 42 SearchDialog( QWidget *parent, QStringList &searchFor, QStringList &replaceWith, int flags );
43 QString getSearchFor(); 43 QString getSearchFor();
44 QString getReplaceWith(); 44 QString getReplaceWith();
45 int getFlags(); 45 int getFlags();
46 void setSearchText( const QString &searchstr ); 46 void setSearchText( const QString &searchstr );
47 47
48 protected slots: 48 protected slots:
49 void slotOk(); 49 void slotOk();
50 50
51 protected: 51 protected:
52 QComboBox *m_search; 52 QComboBox *m_search;
53 QComboBox *m_replace; 53 QComboBox *m_replace;
54 QCheckBox *m_opt1; 54 QCheckBox *m_opt1;
55 QCheckBox *m_opt2; 55 QCheckBox *m_opt2;
56 QCheckBox *m_opt3; 56 QCheckBox *m_opt3;
57 QCheckBox *m_optRegExp; 57 QCheckBox *m_optRegExp;
58 QCheckBox *m_opt4; 58 QCheckBox *m_opt4;
59 QCheckBox *m_opt5; 59 QCheckBox *m_opt5;
60 QCheckBox *m_opt6; 60 QCheckBox *m_opt6;
61}; 61};
62 62
63class ReplacePrompt : public KDialogBase 63class ReplacePrompt : public KDialogBase
64{ 64{
65 Q_OBJECT 65 Q_OBJECT
66 66
67 public: 67 public:
68 68
69 ReplacePrompt(QWidget *parent); 69 ReplacePrompt(QWidget *parent);
70 70
71 signals: 71 signals:
72 72
73 void clicked(); 73 void clicked();
74 74
75 protected slots: 75 protected slots:
76 76
77 void slotUser1( void ); // All 77 void slotUser1( void ); // All
78 void slotUser2( void ); // No 78 void slotUser2( void ); // No
79 void slotUser3( void ); // Yes 79 void slotUser3( void ); // Yes
80 virtual void done(int); 80 virtual void done(int);
81 81
82 protected: 82 protected:
83 83
84 void closeEvent(QCloseEvent *); 84 void closeEvent(QCloseEvent *);
85}; 85};
86 86
87class GotoLineDialog : public KDialogBase 87class GotoLineDialog : public KDialogBase
88{ 88{
89 Q_OBJECT 89 Q_OBJECT
90 90
91 public: 91 public:
92 92
93 GotoLineDialog(QWidget *parent, int line, int max); 93 GotoLineDialog(QWidget *parent, int line, int max);
94 int getLine(); 94 int getLine();
95 95
96 protected: 96 protected:
97 97
98 QSpinBox *e1; 98 QSpinBox *e1;
99 QPushButton *btnOK; 99 QPushButton *btnOK;
100}; 100};
101 101
102class IndentConfigTab : public QWidget 102class IndentConfigTab : public QWidget
103{ 103{
104 Q_OBJECT 104 Q_OBJECT
105 105
106 public: 106 public:
107 107
108 IndentConfigTab(QWidget *parent, KateView *); 108 IndentConfigTab(QWidget *parent, KateView *);
109 void getData(KateView *); 109 void getData(KateView *);
110 110
111 protected: 111 protected:
112 112
113 static const int numFlags = 6; 113 static const int numFlags = 6;
114 static const int flags[numFlags]; 114 static const int flags[numFlags];
115 QCheckBox *opt[numFlags]; 115 QCheckBox *opt[numFlags];
116}; 116};
117 117
118class SelectConfigTab : public QWidget 118class SelectConfigTab : public QWidget
119{ 119{
120 Q_OBJECT 120 Q_OBJECT
121 121
122 public: 122 public:
123 123
124 SelectConfigTab(QWidget *parent, KateView *); 124 SelectConfigTab(QWidget *parent, KateView *);
125 void getData(KateView *); 125 void getData(KateView *);
126 126
127 protected: 127 protected:
128 128
129 static const int numFlags = 6; 129 static const int numFlags = 6;
130 static const int flags[numFlags]; 130 static const int flags[numFlags];
131 QCheckBox *opt[numFlags]; 131 QCheckBox *opt[numFlags];
132}; 132};
133 133
134class EditConfigTab : public QWidget 134class EditConfigTab : public QWidget
135{ 135{
136 Q_OBJECT 136 Q_OBJECT
137 137
138 public: 138 public:
139 139
140 EditConfigTab(QWidget *parent, KateView *); 140 EditConfigTab(QWidget *parent, KateView *);
141 void getData(KateView *); 141 void getData(KateView *);
142 142
143 protected: 143 protected:
144 144
145 static const int numFlags = 9; 145 static const int numFlags = 9;
146 static const int flags[numFlags]; 146 static const int flags[numFlags];
147 QCheckBox *opt[numFlags]; 147 QCheckBox *opt[numFlags];
148 QComboBox *encoding; 148 QComboBox *encoding;
149 149
150 150
151 QSpinBox *e1; 151 QSpinBox *e1;
152 QSpinBox *e2; 152 QSpinBox *e2;
153 QSpinBox *e3; 153 QSpinBox *e3;
154}; 154};
155 155
156class ColorConfig : public QWidget 156class ColorConfig : public QWidget
157{ 157{
158 Q_OBJECT 158 Q_OBJECT
159 159
160public: 160public:
161 161
162 ColorConfig( QWidget *parent = 0, char *name = 0 ); 162 ColorConfig( QWidget *parent = 0, char *name = 0 );
163 ~ColorConfig(); 163 ~ColorConfig();
164 164
165 void setColors( QColor * ); 165 void setColors( QColor * );
166 void getColors( QColor * ); 166 void getColors( QColor * );
167 167
168private: 168private:
169 169
170 KColorButton *m_back; 170 KColorButton *m_back;
171 KColorButton *m_selected; 171 KColorButton *m_selected;
172}; 172};
173 173
174class FontConfig : public QWidget 174class FontConfig : public QWidget
175{ 175{
176 Q_OBJECT 176 Q_OBJECT
177 177
178public: 178public:
179 179
180 FontConfig( QWidget *parent = 0, char *name = 0 ); 180 FontConfig( QWidget *parent = 0, char *name = 0 );
181 ~FontConfig(); 181 ~FontConfig();
182 182
183 void setFont ( const QFont &font ); 183 void setFont ( const QFont &font );
184 QFont getFont ( ) { return myFont; }; 184 QFont getFont ( ) { return myFont; };
185 185
186 private: 186 private:
187 OFontSelector *m_fontselect; 187 Opie::OFontSelector *m_fontselect;
188// class KFontChooser *m_fontchooser; 188// class KFontChooser *m_fontchooser;
189 QFont myFont; 189 QFont myFont;
190 190
191 private slots: 191 private slots:
192 void slotFontSelected( const QFont &font ); 192 void slotFontSelected( const QFont &font );
193}; 193};
194 194
195 195
196#endif //_KWDIALOG_H_ 196#endif //_KWDIALOG_H_