-rw-r--r-- | noncore/settings/appearance2/appearance.cpp | 24 | ||||
-rw-r--r-- | noncore/settings/appearance2/appearance.h | 1 |
2 files changed, 20 insertions, 5 deletions
diff --git a/noncore/settings/appearance2/appearance.cpp b/noncore/settings/appearance2/appearance.cpp index 32234f0..83532de 100644 --- a/noncore/settings/appearance2/appearance.cpp +++ b/noncore/settings/appearance2/appearance.cpp @@ -411,2 +411,4 @@ QWidget *Appearance::createAdvancedTab ( QWidget *parent, Config &cfg ) QPixmap ccw1; + m_rotdir_flip = new QRadioButton( tab, "rotdir_flip" ); + QPixmap flip1 = Resource::loadIconSet("pass"). pixmap( ); QButtonGroup* rotbtngrp = new QButtonGroup( tab, "rotbuttongroup" ); @@ -417,2 +419,3 @@ QWidget *Appearance::createAdvancedTab ( QWidget *parent, Config &cfg ) rotbtngrp-> insert ( m_rotdir_ccw ); + rotbtngrp-> insert ( m_rotdir_flip ); @@ -421,2 +424,3 @@ QWidget *Appearance::createAdvancedTab ( QWidget *parent, Config &cfg ) m_rotdir_ccw-> setPixmap( ccw1 ); + m_rotdir_flip-> setPixmap( flip1 ); @@ -425,6 +429,8 @@ QWidget *Appearance::createAdvancedTab ( QWidget *parent, Config &cfg ) rotLay-> addWidget ( m_rotdir_ccw, 0 ); + rotLay-> addWidget ( m_rotdir_flip, 0 ); - bool rotcw = !(cfg. readBoolEntry ( "rotatedir", 0 )); - m_rotdir_cw-> setChecked ( rotcw ); - m_rotdir_ccw-> setChecked ( !rotcw ); + int rot = cfg. readNumEntry ( "rotatedir", 0 ); + m_rotdir_cw-> setChecked ( rot == 0 ); + m_rotdir_ccw-> setChecked ( rot == 1 ); + m_rotdir_flip-> setChecked ( rot == 2 ); @@ -485,3 +491,2 @@ void Appearance::accept ( ) bool newtabpos = m_tabstyle_top-> isChecked ( ); - bool is_rotdir_ccw = m_rotdir_ccw-> isChecked ( ); int newtabstyle = m_tabstyle_list-> currentItem ( ); @@ -523,3 +528,12 @@ void Appearance::accept ( ) - config. writeEntry ( "rotatedir", is_rotdir_ccw ); + bool is_rotdir_ccw = m_rotdir_ccw-> isChecked ( ); + int rotval; + if (m_rotdir_ccw-> isChecked ( )) { + rotval = 1; + } else if (m_rotdir_cw-> isChecked ( )) { + rotval = 0; + } else { + rotval = 2; + } + config. writeEntry ( "rotatedir", rotval ); diff --git a/noncore/settings/appearance2/appearance.h b/noncore/settings/appearance2/appearance.h index 0e42298..da9e976 100644 --- a/noncore/settings/appearance2/appearance.h +++ b/noncore/settings/appearance2/appearance.h @@ -119,2 +119,3 @@ private: QRadioButton *m_rotdir_ccw; + QRadioButton *m_rotdir_flip; |