-rw-r--r-- | noncore/settings/appearance2/appearance.cpp | 16 | ||||
-rw-r--r-- | noncore/settings/appearance2/appearance.h | 1 |
2 files changed, 17 insertions, 0 deletions
diff --git a/noncore/settings/appearance2/appearance.cpp b/noncore/settings/appearance2/appearance.cpp index d649ed6..82d8931 100644 --- a/noncore/settings/appearance2/appearance.cpp +++ b/noncore/settings/appearance2/appearance.cpp | |||
@@ -272,48 +272,62 @@ QWidget *Appearance::createColorTab ( QWidget *parent, Config &cfg ) | |||
272 | connect( tempButton, SIGNAL( clicked() ), this, SLOT( editSchemeClicked() ) ); | 272 | connect( tempButton, SIGNAL( clicked() ), this, SLOT( editSchemeClicked() ) ); |
273 | gridLayout->addWidget( tempButton, 0, 1 ); | 273 | gridLayout->addWidget( tempButton, 0, 1 ); |
274 | QWhatsThis::add( tempButton, tr( "Click here to change the colors in the current color scheme." ) ); | 274 | QWhatsThis::add( tempButton, tr( "Click here to change the colors in the current color scheme." ) ); |
275 | 275 | ||
276 | tempButton = new QPushButton( tab, "deleteSchemeButton" ); | 276 | tempButton = new QPushButton( tab, "deleteSchemeButton" ); |
277 | tempButton->setText( tr( "Delete" ) ); | 277 | tempButton->setText( tr( "Delete" ) ); |
278 | connect( tempButton, SIGNAL( clicked() ), this, SLOT( deleteSchemeClicked() ) ); | 278 | connect( tempButton, SIGNAL( clicked() ), this, SLOT( deleteSchemeClicked() ) ); |
279 | gridLayout->addWidget( tempButton, 1, 1 ); | 279 | gridLayout->addWidget( tempButton, 1, 1 ); |
280 | QWhatsThis::add( tempButton, tr( "Click here to delete the color scheme selected in the list to the left." ) ); | 280 | QWhatsThis::add( tempButton, tr( "Click here to delete the color scheme selected in the list to the left." ) ); |
281 | 281 | ||
282 | tempButton = new QPushButton( tab, "saveSchemeButton" ); | 282 | tempButton = new QPushButton( tab, "saveSchemeButton" ); |
283 | tempButton->setText( tr( "Save" ) ); | 283 | tempButton->setText( tr( "Save" ) ); |
284 | connect( tempButton, SIGNAL( clicked() ), this, SLOT( saveSchemeClicked() ) ); | 284 | connect( tempButton, SIGNAL( clicked() ), this, SLOT( saveSchemeClicked() ) ); |
285 | gridLayout->addWidget( tempButton, 2, 1 ); | 285 | gridLayout->addWidget( tempButton, 2, 1 ); |
286 | QWhatsThis::add( tempButton, tr( "Click here to name and save the current color scheme." ) ); | 286 | QWhatsThis::add( tempButton, tr( "Click here to name and save the current color scheme." ) ); |
287 | 287 | ||
288 | return tab; | 288 | return tab; |
289 | } | 289 | } |
290 | 290 | ||
291 | QWidget *Appearance::createAdvancedTab ( QWidget *parent, Config &cfg ) | 291 | QWidget *Appearance::createAdvancedTab ( QWidget *parent, Config &cfg ) |
292 | { | 292 | { |
293 | QWidget *tab = new QWidget ( parent ); | 293 | QWidget *tab = new QWidget ( parent ); |
294 | QVBoxLayout *vertLayout = new QVBoxLayout( tab, 3, 3 ); | 294 | QVBoxLayout *vertLayout = new QVBoxLayout( tab, 3, 3 ); |
295 | 295 | ||
296 | /* | ||
297 | * show scrollbars on the left? | ||
298 | */ | ||
299 | m_leftHand = new QCheckBox( tr("Show Scrollbars on the left"), tab ); | ||
300 | m_leftHand->setChecked( cfg.readBoolEntry( "LeftHand", false ) ); | ||
301 | QWhatsThis::add( m_leftHand, tr( "Click here to display scrollbars on the left side instead of the right." ) ); | ||
302 | vertLayout->addWidget( m_leftHand ); | ||
303 | |||
304 | QFrame *f = new QFrame ( tab ); | ||
305 | f-> setFrameStyle ( QFrame::HLine | QFrame::Sunken ); | ||
306 | vertLayout-> addWidget ( f ); | ||
307 | vertLayout-> addSpacing ( 3 ); | ||
308 | |||
309 | |||
296 | QGridLayout* gridLayout = new QGridLayout ( vertLayout, 0, 0, 3, 0 ); | 310 | QGridLayout* gridLayout = new QGridLayout ( vertLayout, 0, 0, 3, 0 ); |
297 | 311 | ||
298 | int style = cfg. readNumEntry ( "TabStyle", 2 ) - 1; | 312 | int style = cfg. readNumEntry ( "TabStyle", 2 ) - 1; |
299 | bool tabtop = ( cfg. readEntry ( "TabPosition", "Top" ) == "Top" ); | 313 | bool tabtop = ( cfg. readEntry ( "TabPosition", "Top" ) == "Top" ); |
300 | 314 | ||
301 | QLabel* label = new QLabel( tr( "Tab style:" ), tab ); | 315 | QLabel* label = new QLabel( tr( "Tab style:" ), tab ); |
302 | gridLayout-> addWidget ( label, 0, 0 ); | 316 | gridLayout-> addWidget ( label, 0, 0 ); |
303 | QWhatsThis::add( label, tr( "Click here to select a desired style for tabbed dialogs (such as this application). The styles available are:\n\n1. Tabs - normal tabs with text labels only\n2. Tabs w/icons - tabs with icons for each tab, text label only appears on current tab\n3. Drop down list - a vertical listing of tabs\n4. Drop down list w/icons - a vertical listing of tabs with icons" ) ); | 317 | QWhatsThis::add( label, tr( "Click here to select a desired style for tabbed dialogs (such as this application). The styles available are:\n\n1. Tabs - normal tabs with text labels only\n2. Tabs w/icons - tabs with icons for each tab, text label only appears on current tab\n3. Drop down list - a vertical listing of tabs\n4. Drop down list w/icons - a vertical listing of tabs with icons" ) ); |
304 | 318 | ||
305 | QButtonGroup* btngrp = new QButtonGroup( tab, "buttongroup" ); | 319 | QButtonGroup* btngrp = new QButtonGroup( tab, "buttongroup" ); |
306 | btngrp-> hide ( ); | 320 | btngrp-> hide ( ); |
307 | btngrp-> setExclusive ( true ); | 321 | btngrp-> setExclusive ( true ); |
308 | 322 | ||
309 | m_tabstyle_list = new QComboBox ( false, tab, "tabstyle" ); | 323 | m_tabstyle_list = new QComboBox ( false, tab, "tabstyle" ); |
310 | m_tabstyle_list-> insertItem ( tr( "Tabs" )); | 324 | m_tabstyle_list-> insertItem ( tr( "Tabs" )); |
311 | m_tabstyle_list-> insertItem ( tr( "Tabs w/icons" )); | 325 | m_tabstyle_list-> insertItem ( tr( "Tabs w/icons" )); |
312 | m_tabstyle_list-> insertItem ( tr( "Drop down list" )); | 326 | m_tabstyle_list-> insertItem ( tr( "Drop down list" )); |
313 | m_tabstyle_list-> insertItem ( tr( "Drop down list w/icons" )); | 327 | m_tabstyle_list-> insertItem ( tr( "Drop down list w/icons" )); |
314 | m_tabstyle_list-> setCurrentItem ( style ); | 328 | m_tabstyle_list-> setCurrentItem ( style ); |
315 | gridLayout-> addMultiCellWidget ( m_tabstyle_list, 0, 0, 1, 2 ); | 329 | gridLayout-> addMultiCellWidget ( m_tabstyle_list, 0, 0, 1, 2 ); |
316 | QWhatsThis::add( m_tabstyle_list, tr( "Click here to select a desired style for tabbed dialogs (such as this application). The styles available are:\n\n1. Tabs - normal tabs with text labels only\n2. Tabs w/icons - tabs with icons for each tab, text label only appears on current tab\n3. Drop down list - a vertical listing of tabs\n4. Drop down list w/icons - a vertical listing of tabs with icons" ) ); | 330 | QWhatsThis::add( m_tabstyle_list, tr( "Click here to select a desired style for tabbed dialogs (such as this application). The styles available are:\n\n1. Tabs - normal tabs with text labels only\n2. Tabs w/icons - tabs with icons for each tab, text label only appears on current tab\n3. Drop down list - a vertical listing of tabs\n4. Drop down list w/icons - a vertical listing of tabs with icons" ) ); |
317 | 331 | ||
318 | m_tabstyle_top = new QRadioButton( tr( "Top" ), tab, "tabpostop" ); | 332 | m_tabstyle_top = new QRadioButton( tr( "Top" ), tab, "tabpostop" ); |
319 | btngrp-> insert ( m_tabstyle_top ); | 333 | btngrp-> insert ( m_tabstyle_top ); |
@@ -472,48 +486,50 @@ void Appearance::accept ( ) | |||
472 | 486 | ||
473 | if ( m_color_changed ) | 487 | if ( m_color_changed ) |
474 | { | 488 | { |
475 | ColorListItem *item = (ColorListItem *) m_color_list-> item ( m_color_list-> currentItem ( )); | 489 | ColorListItem *item = (ColorListItem *) m_color_list-> item ( m_color_list-> currentItem ( )); |
476 | 490 | ||
477 | if ( item ) | 491 | if ( item ) |
478 | item-> save ( config ); | 492 | item-> save ( config ); |
479 | } | 493 | } |
480 | 494 | ||
481 | ODirection rot; | 495 | ODirection rot; |
482 | if (m_rotdir_ccw-> isChecked ( )) | 496 | if (m_rotdir_ccw-> isChecked ( )) |
483 | { | 497 | { |
484 | rot = CCW; | 498 | rot = CCW; |
485 | } | 499 | } |
486 | else if (m_rotdir_cw-> isChecked ( )) | 500 | else if (m_rotdir_cw-> isChecked ( )) |
487 | { | 501 | { |
488 | rot = CW; | 502 | rot = CW; |
489 | } | 503 | } |
490 | else | 504 | else |
491 | { | 505 | { |
492 | rot = Flip; | 506 | rot = Flip; |
493 | } | 507 | } |
494 | config. writeEntry ( "rotatedir", (int)rot ); | 508 | config. writeEntry ( "rotatedir", (int)rot ); |
495 | 509 | ||
510 | config. writeEntry( "LeftHand", m_leftHand->isChecked() ); | ||
511 | |||
496 | config. write ( ); // need to flush the config info first | 512 | config. write ( ); // need to flush the config info first |
497 | Global::applyStyle ( ); | 513 | Global::applyStyle ( ); |
498 | 514 | ||
499 | QDialog::accept ( ); | 515 | QDialog::accept ( ); |
500 | } | 516 | } |
501 | 517 | ||
502 | void Appearance::done ( int r ) | 518 | void Appearance::done ( int r ) |
503 | { | 519 | { |
504 | QDialog::done ( r ); | 520 | QDialog::done ( r ); |
505 | close ( ); | 521 | close ( ); |
506 | } | 522 | } |
507 | 523 | ||
508 | 524 | ||
509 | void Appearance::styleClicked ( int index ) | 525 | void Appearance::styleClicked ( int index ) |
510 | { | 526 | { |
511 | StyleListItem *sli = (StyleListItem *) m_style_list-> item ( index ); | 527 | StyleListItem *sli = (StyleListItem *) m_style_list-> item ( index ); |
512 | m_style_settings-> setEnabled ( sli ? sli-> hasSettings ( ) : false ); | 528 | m_style_settings-> setEnabled ( sli ? sli-> hasSettings ( ) : false ); |
513 | 529 | ||
514 | if ( m_sample && sli && sli-> style ( )) | 530 | if ( m_sample && sli && sli-> style ( )) |
515 | { | 531 | { |
516 | int ci = m_color_list ? m_color_list-> currentItem ( ) : -1; | 532 | int ci = m_color_list ? m_color_list-> currentItem ( ) : -1; |
517 | 533 | ||
518 | m_sample-> setStyle2 ( sli-> style ( ), ci < 0 ? palette ( ) : ((ColorListItem *) m_color_list-> item ( ci ))-> palette ( )); | 534 | m_sample-> setStyle2 ( sli-> style ( ), ci < 0 ? palette ( ) : ((ColorListItem *) m_color_list-> item ( ci ))-> palette ( )); |
519 | } | 535 | } |
diff --git a/noncore/settings/appearance2/appearance.h b/noncore/settings/appearance2/appearance.h index de2f1ab..287f9f7 100644 --- a/noncore/settings/appearance2/appearance.h +++ b/noncore/settings/appearance2/appearance.h | |||
@@ -98,27 +98,28 @@ private: | |||
98 | int m_original_deco; | 98 | int m_original_deco; |
99 | int m_original_tabstyle; | 99 | int m_original_tabstyle; |
100 | bool m_original_tabpos; | 100 | bool m_original_tabpos; |
101 | 101 | ||
102 | QListBox * m_style_list; | 102 | QListBox * m_style_list; |
103 | QPushButton * m_style_settings; | 103 | QPushButton * m_style_settings; |
104 | 104 | ||
105 | QListBox * m_deco_list; | 105 | QListBox * m_deco_list; |
106 | 106 | ||
107 | QListBox * m_color_list; | 107 | QListBox * m_color_list; |
108 | 108 | ||
109 | Opie::Ui::OFontSelector *m_fontselect; | 109 | Opie::Ui::OFontSelector *m_fontselect; |
110 | 110 | ||
111 | SampleWindow *m_sample; | 111 | SampleWindow *m_sample; |
112 | 112 | ||
113 | QComboBox * m_tabstyle_list; | 113 | QComboBox * m_tabstyle_list; |
114 | QRadioButton *m_tabstyle_top; | 114 | QRadioButton *m_tabstyle_top; |
115 | QRadioButton *m_tabstyle_bottom; | 115 | QRadioButton *m_tabstyle_bottom; |
116 | 116 | ||
117 | QRadioButton *m_rotdir_cw; | 117 | QRadioButton *m_rotdir_cw; |
118 | QRadioButton *m_rotdir_ccw; | 118 | QRadioButton *m_rotdir_ccw; |
119 | QRadioButton *m_rotdir_flip; | 119 | QRadioButton *m_rotdir_flip; |
120 | 120 | ||
121 | QWidget * m_advtab; | 121 | QWidget * m_advtab; |
122 | QCheckBox *m_leftHand; | ||
122 | }; | 123 | }; |
123 | 124 | ||
124 | #endif | 125 | #endif |