Diffstat (limited to 'noncore/settings/appearance2/appearance.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/appearance2/appearance.cpp | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/noncore/settings/appearance2/appearance.cpp b/noncore/settings/appearance2/appearance.cpp index db863d6..32234f0 100644 --- a/noncore/settings/appearance2/appearance.cpp +++ b/noncore/settings/appearance2/appearance.cpp | |||
@@ -400,6 +400,34 @@ QWidget *Appearance::createAdvancedTab ( QWidget *parent, Config &cfg ) | |||
400 | m_original_tabstyle = style; | 400 | m_original_tabstyle = style; |
401 | m_original_tabpos = tabtop; | 401 | m_original_tabpos = tabtop; |
402 | 402 | ||
403 | vertLayout-> addSpacing ( 3 ); | ||
404 | QHBoxLayout *rotLay = new QHBoxLayout ( vertLayout, 3 ); | ||
405 | |||
406 | QLabel* rotlabel = new QLabel( tr( "Rotation direction:" ), tab ); | ||
407 | m_rotdir_cw = new QRadioButton( tab, "rotdir_cw" ); | ||
408 | QPixmap cw1 = Resource::loadIconSet("redo"). pixmap( ); | ||
409 | m_rotdir_ccw = new QRadioButton( tab, "rotdir_ccw" ); | ||
410 | QImage ccwImage = cw1. convertToImage( ). mirror( 1, 0 ); | ||
411 | QPixmap ccw1; | ||
412 | QButtonGroup* rotbtngrp = new QButtonGroup( tab, "rotbuttongroup" ); | ||
413 | |||
414 | rotbtngrp-> hide ( ); | ||
415 | rotbtngrp-> setExclusive ( true ); | ||
416 | rotbtngrp-> insert ( m_rotdir_cw ); | ||
417 | rotbtngrp-> insert ( m_rotdir_ccw ); | ||
418 | |||
419 | ccw1. convertFromImage( ccwImage ); | ||
420 | m_rotdir_cw-> setPixmap( cw1 ); | ||
421 | m_rotdir_ccw-> setPixmap( ccw1 ); | ||
422 | |||
423 | rotLay-> addWidget ( rotlabel, 0 ); | ||
424 | rotLay-> addWidget ( m_rotdir_cw, 0 ); | ||
425 | rotLay-> addWidget ( m_rotdir_ccw, 0 ); | ||
426 | |||
427 | bool rotcw = !(cfg. readBoolEntry ( "rotatedir", 0 )); | ||
428 | m_rotdir_cw-> setChecked ( rotcw ); | ||
429 | m_rotdir_ccw-> setChecked ( !rotcw ); | ||
430 | |||
403 | return tab; | 431 | return tab; |
404 | } | 432 | } |
405 | 433 | ||
@@ -455,6 +483,7 @@ void Appearance::tabChanged ( QWidget *w ) | |||
455 | void Appearance::accept ( ) | 483 | void Appearance::accept ( ) |
456 | { | 484 | { |
457 | bool newtabpos = m_tabstyle_top-> isChecked ( ); | 485 | bool newtabpos = m_tabstyle_top-> isChecked ( ); |
486 | bool is_rotdir_ccw = m_rotdir_ccw-> isChecked ( ); | ||
458 | int newtabstyle = m_tabstyle_list-> currentItem ( ); | 487 | int newtabstyle = m_tabstyle_list-> currentItem ( ); |
459 | 488 | ||
460 | Config config ( "qpe" ); | 489 | Config config ( "qpe" ); |
@@ -492,6 +521,7 @@ void Appearance::accept ( ) | |||
492 | item-> save ( config ); | 521 | item-> save ( config ); |
493 | } | 522 | } |
494 | 523 | ||
524 | config. writeEntry ( "rotatedir", is_rotdir_ccw ); | ||
495 | 525 | ||
496 | m_except-> setFocus ( ); // if the focus was on the embedded line-edit, we have to move it away first, so the contents are updated | 526 | m_except-> setFocus ( ); // if the focus was on the embedded line-edit, we have to move it away first, so the contents are updated |
497 | 527 | ||