comparison libgui/src/settings-dialog.ui @ 16620:818eef7b2618

allow terminal colors to be set from preferences dialog * QTerminalInterface.h (QTerminalInterface::setBackgroundColor, QTerminalInterface::setForeroundColor, QTerminalInterface::setSelectionColor, QTerminalInterface::setCursorColor): New functions. * QUnixTerminalImpl.h, QUnixTerminalImpl.cpp QUnixTerminalImpl::setBackgroundColor, QUnixTerminalImpl::setForeroundColor, QUnixTerminalImpl::setSelectionColor, QUnixTerminalImpl::setCursorColor): New functions. * QWinTerminalImpl.h, QWinTerminalImpl.cpp (QConsolePrivate::setCursorColor): New argument, useForegroundColor. (QConsolePrivate::m_selectionColor, QConsolePrivate::m_cursorColor): New member variablebs. (QConsolePrivate::selectionColor, QConsolePrivate::cursorColor, QConsolePrivate::setSelectionColor, QConsolePrivate::setCursorColor): Use member variables instead of Windows console color map. (QConsolePrivate::cursorColor): Return foreground color if stored color is invalid. (QConsolePrivate::setCursorColor): Store invalid color if useForegroundcolor. (QConsolePrivate::QConsolePrivate): Set default selection and cursor colors. * QTerminal.cc (QTerminal::notice_settings): Handle terminal color settings. * resource-manager.h, resource-manager.cc (resource_manager::terminal_color_names, resource_manager::terminal_default_colors, resource_manager::terminal_color_chars): New functions. * settings-dialog.h, settings-dialog.cc (settings_dialog::read_terminal_colors): New function. (settings_dialog::settings_dialog): Call read_terminal_colors. Read valud for using foreground color for cursor color. (settings_dialog::write_terminal_colors): New function. (settings_dialog::write_changed_settings): Call write_terminal_colors. Handle setting for using foreground color for cursor color. * settings-dialog.ui: Add color selection to terminal settings dialog.
author John W. Eaton <jwe@octave.org>
date Mon, 06 May 2013 06:00:44 -0400
parents a1f613e5066d
children cf939872811c
comparison
equal deleted inserted replaced
16619:db31d1e77d7b 16620:818eef7b2618
30 </property> 30 </property>
31 <layout class="QVBoxLayout" name="verticalLayout_2"> 31 <layout class="QVBoxLayout" name="verticalLayout_2">
32 <item> 32 <item>
33 <widget class="QTabWidget" name="tabWidget"> 33 <widget class="QTabWidget" name="tabWidget">
34 <property name="currentIndex"> 34 <property name="currentIndex">
35 <number>0</number> 35 <number>3</number>
36 </property> 36 </property>
37 <widget class="QWidget" name="tab_4"> 37 <widget class="QWidget" name="tab_4">
38 <property name="enabled"> 38 <property name="enabled">
39 <bool>true</bool> 39 <bool>true</bool>
40 </property> 40 </property>
315 </widget> 315 </widget>
316 <widget class="QWidget" name="tab_5"> 316 <widget class="QWidget" name="tab_5">
317 <attribute name="title"> 317 <attribute name="title">
318 <string>Terminal</string> 318 <string>Terminal</string>
319 </attribute> 319 </attribute>
320 <layout class="QVBoxLayout" name="verticalLayout"> 320 <widget class="QWidget" name="horizontalLayoutWidget">
321 <item> 321 <property name="geometry">
322 <layout class="QHBoxLayout" name="horizontalLayout_5"> 322 <rect>
323 <item> 323 <x>10</x>
324 <widget class="QLabel" name="label_11"> 324 <y>50</y>
325 <property name="text"> 325 <width>631</width>
326 <string>Font</string> 326 <height>31</height>
327 </property> 327 </rect>
328 </widget> 328 </property>
329 </item> 329 <layout class="QHBoxLayout" name="horizontalLayout_3">
330 <item> 330 <item>
331 <widget class="QFontComboBox" name="terminal_fontName"> 331 <widget class="QLabel" name="label">
332 <property name="editable"> 332 <property name="text">
333 <bool>false</bool> 333 <string>Cursor type:</string>
334 </property> 334 </property>
335 <property name="fontFilters"> 335 </widget>
336 <set>QFontComboBox::MonospacedFonts</set> 336 </item>
337 </property> 337 <item>
338 </widget> 338 <widget class="QComboBox" name="terminal_cursorType"/>
339 </item> 339 </item>
340 <item> 340 <item>
341 <widget class="QLabel" name="label_12"> 341 <spacer name="horizontalSpacer">
342 <property name="text"> 342 <property name="orientation">
343 <string>Font Size</string> 343 <enum>Qt::Horizontal</enum>
344 </property> 344 </property>
345 </widget> 345 <property name="sizeHint" stdset="0">
346 </item> 346 <size>
347 <item> 347 <width>40</width>
348 <widget class="QSpinBox" name="terminal_fontSize"> 348 <height>20</height>
349 <property name="minimum"> 349 </size>
350 <number>2</number> 350 </property>
351 </property> 351 </spacer>
352 <property name="maximum"> 352 </item>
353 <number>96</number> 353 <item>
354 </property> 354 <widget class="QCheckBox" name="terminal_cursorBlinking">
355 <property name="value"> 355 <property name="text">
356 <number>10</number> 356 <string>Cursor blinking</string>
357 </property> 357 </property>
358 </widget> 358 </widget>
359 </item> 359 </item>
360 <item> 360 <item>
361 <spacer name="horizontalSpacer_5"> 361 <widget class="QCheckBox" name="terminal_cursorUseForegroundColor">
362 <property name="orientation"> 362 <property name="text">
363 <enum>Qt::Horizontal</enum> 363 <string>Use Foreground Color</string>
364 </property> 364 </property>
365 <property name="sizeHint" stdset="0"> 365 </widget>
366 <size> 366 </item>
367 <width>40</width> 367 </layout>
368 <height>20</height> 368 </widget>
369 </size> 369 <widget class="QWidget" name="verticalLayoutWidget_2">
370 </property> 370 <property name="geometry">
371 </spacer> 371 <rect>
372 </item> 372 <x>10</x>
373 </layout> 373 <y>90</y>
374 </item> 374 <width>631</width>
375 <item> 375 <height>164</height>
376 <layout class="QHBoxLayout" name="horizontalLayout_3"> 376 </rect>
377 <item> 377 </property>
378 <widget class="QLabel" name="label"> 378 <layout class="QVBoxLayout" name="verticalLayout">
379 <property name="text"> 379 <item>
380 <string>Cursor type:</string> 380 <widget class="QGroupBox" name="terminal_colors_box">
381 </property> 381 <property name="minimumSize">
382 </widget> 382 <size>
383 </item> 383 <width>0</width>
384 <item> 384 <height>162</height>
385 <widget class="QComboBox" name="terminal_cursorType"/> 385 </size>
386 </item> 386 </property>
387 <item> 387 <property name="title">
388 <spacer name="horizontalSpacer"> 388 <string>Terminal Colors</string>
389 <property name="orientation"> 389 </property>
390 <enum>Qt::Horizontal</enum> 390 </widget>
391 </property> 391 </item>
392 <property name="sizeHint" stdset="0"> 392 </layout>
393 <size> 393 </widget>
394 <width>40</width> 394 <widget class="QWidget" name="verticalLayoutWidget_3">
395 <height>20</height> 395 <property name="geometry">
396 </size> 396 <rect>
397 </property> 397 <x>10</x>
398 </spacer> 398 <y>260</y>
399 </item> 399 <width>631</width>
400 </layout> 400 <height>121</height>
401 </item> 401 </rect>
402 <item> 402 </property>
403 <layout class="QHBoxLayout" name="horizontalLayout_2"> 403 <layout class="QVBoxLayout" name="verticalLayout_8">
404 <item> 404 <item>
405 <widget class="QCheckBox" name="terminal_cursorBlinking"> 405 <spacer name="verticalSpacer_3">
406 <property name="text"> 406 <property name="orientation">
407 <string>Cursor blinking</string> 407 <enum>Qt::Vertical</enum>
408 </property> 408 </property>
409 </widget> 409 <property name="sizeHint" stdset="0">
410 </item> 410 <size>
411 <item> 411 <width>20</width>
412 <spacer name="horizontalSpacer_2"> 412 <height>40</height>
413 <property name="orientation"> 413 </size>
414 <enum>Qt::Horizontal</enum> 414 </property>
415 </property> 415 </spacer>
416 <property name="sizeHint" stdset="0"> 416 </item>
417 <size> 417 </layout>
418 <width>40</width> 418 </widget>
419 <height>20</height> 419 <widget class="QWidget" name="layoutWidget">
420 </size> 420 <property name="geometry">
421 </property> 421 <rect>
422 </spacer> 422 <x>10</x>
423 </item> 423 <y>10</y>
424 </layout> 424 <width>631</width>
425 </item> 425 <height>30</height>
426 <item> 426 </rect>
427 <spacer name="verticalSpacer_3"> 427 </property>
428 <property name="orientation"> 428 <layout class="QHBoxLayout" name="horizontalLayout_5">
429 <enum>Qt::Vertical</enum> 429 <item>
430 </property> 430 <widget class="QLabel" name="label_11">
431 <property name="sizeHint" stdset="0"> 431 <property name="text">
432 <size> 432 <string>Font</string>
433 <width>20</width> 433 </property>
434 <height>321</height> 434 </widget>
435 </size> 435 </item>
436 </property> 436 <item>
437 </spacer> 437 <widget class="QFontComboBox" name="terminal_fontName">
438 </item> 438 <property name="editable">
439 </layout> 439 <bool>false</bool>
440 </property>
441 <property name="fontFilters">
442 <set>QFontComboBox::MonospacedFonts</set>
443 </property>
444 </widget>
445 </item>
446 <item>
447 <widget class="QLabel" name="label_12">
448 <property name="text">
449 <string>Font Size</string>
450 </property>
451 </widget>
452 </item>
453 <item>
454 <widget class="QSpinBox" name="terminal_fontSize">
455 <property name="minimum">
456 <number>2</number>
457 </property>
458 <property name="maximum">
459 <number>96</number>
460 </property>
461 <property name="value">
462 <number>10</number>
463 </property>
464 </widget>
465 </item>
466 <item>
467 <spacer name="horizontalSpacer_5">
468 <property name="orientation">
469 <enum>Qt::Horizontal</enum>
470 </property>
471 <property name="sizeHint" stdset="0">
472 <size>
473 <width>40</width>
474 <height>20</height>
475 </size>
476 </property>
477 </spacer>
478 </item>
479 </layout>
480 </widget>
440 </widget> 481 </widget>
441 <widget class="QWidget" name="tab_2"> 482 <widget class="QWidget" name="tab_2">
442 <attribute name="title"> 483 <attribute name="title">
443 <string>File Browser</string> 484 <string>File Browser</string>
444 </attribute> 485 </attribute>
511 <y>19</y> 552 <y>19</y>
512 <width>631</width> 553 <width>631</width>
513 <height>81</height> 554 <height>81</height>
514 </rect> 555 </rect>
515 </property> 556 </property>
557 <property name="minimumSize">
558 <size>
559 <width>0</width>
560 <height>81</height>
561 </size>
562 </property>
516 <property name="title"> 563 <property name="title">
517 <string>Storage Class Colors</string> 564 <string>Storage Class Colors</string>
518 </property> 565 </property>
519 </widget> 566 </widget>
520 </widget> 567 </widget>