summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/appearance2/appearance.cpp30
-rw-r--r--noncore/settings/appearance2/appearance.h3
2 files changed, 33 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
@@ -397,12 +397,40 @@ QWidget *Appearance::createAdvancedTab ( QWidget *parent, Config &cfg )
m_tabstyle_top-> setChecked ( tabtop );
m_tabstyle_bottom-> setChecked ( !tabtop );
m_original_tabstyle = style;
m_original_tabpos = tabtop;
+ vertLayout-> addSpacing ( 3 );
+ QHBoxLayout *rotLay = new QHBoxLayout ( vertLayout, 3 );
+
+ QLabel* rotlabel = new QLabel( tr( "Rotation direction:" ), tab );
+ m_rotdir_cw = new QRadioButton( tab, "rotdir_cw" );
+ QPixmap cw1 = Resource::loadIconSet("redo"). pixmap( );
+ m_rotdir_ccw = new QRadioButton( tab, "rotdir_ccw" );
+ QImage ccwImage = cw1. convertToImage( ). mirror( 1, 0 );
+ QPixmap ccw1;
+ QButtonGroup* rotbtngrp = new QButtonGroup( tab, "rotbuttongroup" );
+
+ rotbtngrp-> hide ( );
+ rotbtngrp-> setExclusive ( true );
+ rotbtngrp-> insert ( m_rotdir_cw );
+ rotbtngrp-> insert ( m_rotdir_ccw );
+
+ ccw1. convertFromImage( ccwImage );
+ m_rotdir_cw-> setPixmap( cw1 );
+ m_rotdir_ccw-> setPixmap( ccw1 );
+
+ rotLay-> addWidget ( rotlabel, 0 );
+ rotLay-> addWidget ( m_rotdir_cw, 0 );
+ rotLay-> addWidget ( m_rotdir_ccw, 0 );
+
+ bool rotcw = !(cfg. readBoolEntry ( "rotatedir", 0 ));
+ m_rotdir_cw-> setChecked ( rotcw );
+ m_rotdir_ccw-> setChecked ( !rotcw );
+
return tab;
}
Appearance::Appearance( QWidget* parent, const char* name, WFlags )
: QDialog ( parent, name, true, WStyle_ContextHelp )
@@ -452,12 +480,13 @@ void Appearance::tabChanged ( QWidget *w )
m_sample-> show ( );
}
void Appearance::accept ( )
{
bool newtabpos = m_tabstyle_top-> isChecked ( );
+ bool is_rotdir_ccw = m_rotdir_ccw-> isChecked ( );
int newtabstyle = m_tabstyle_list-> currentItem ( );
Config config ( "qpe" );
config. setGroup ( "Appearance" );
if ( m_style_changed ) {
@@ -489,12 +518,13 @@ void Appearance::accept ( )
ColorListItem *item = (ColorListItem *) m_color_list-> item ( m_color_list-> currentItem ( ));
if ( item )
item-> save ( config );
}
+ config. writeEntry ( "rotatedir", is_rotdir_ccw );
m_except-> setFocus ( ); // if the focus was on the embedded line-edit, we have to move it away first, so the contents are updated
QStringList sl;
QString exceptstr;
for ( ExceptListItem *it = (ExceptListItem *) m_except-> firstChild ( ); it; it = (ExceptListItem *) it-> nextSibling ( )) {
diff --git a/noncore/settings/appearance2/appearance.h b/noncore/settings/appearance2/appearance.h
index 065dfb7..0e42298 100644
--- a/noncore/settings/appearance2/appearance.h
+++ b/noncore/settings/appearance2/appearance.h
@@ -112,12 +112,15 @@ private:
SampleWindow *m_sample;
QComboBox * m_tabstyle_list;
QRadioButton *m_tabstyle_top;
QRadioButton *m_tabstyle_bottom;
+ QRadioButton *m_rotdir_cw;
+ QRadioButton *m_rotdir_ccw;
+
QWidget * m_advtab;
QListView * m_except;
QCheckBox * m_force;
};
#endif