author | alwin <alwin> | 2004-11-01 16:41:11 (UTC) |
---|---|---|
committer | alwin <alwin> | 2004-11-01 16:41:11 (UTC) |
commit | 5a41dcd5901badbd2e258b0a916fb012b6351eeb (patch) (unidiff) | |
tree | bf1821746491c996f20d9ecbf3952a94e96e422f /noncore/graphics/opie-eye/gui/basesetup.cpp | |
parent | e28f024b5d0d70dd22d7beacfd693b75e2fcf39e (diff) | |
download | opie-5a41dcd5901badbd2e258b0a916fb012b6351eeb.zip opie-5a41dcd5901badbd2e258b0a916fb012b6351eeb.tar.gz opie-5a41dcd5901badbd2e258b0a916fb012b6351eeb.tar.bz2 |
some layout work
work on saving default values
some fixes
Diffstat (limited to 'noncore/graphics/opie-eye/gui/basesetup.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/graphics/opie-eye/gui/basesetup.cpp | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/noncore/graphics/opie-eye/gui/basesetup.cpp b/noncore/graphics/opie-eye/gui/basesetup.cpp index 1a354a5..20dda5a 100644 --- a/noncore/graphics/opie-eye/gui/basesetup.cpp +++ b/noncore/graphics/opie-eye/gui/basesetup.cpp | |||
@@ -7,6 +7,7 @@ | |||
7 | 7 | ||
8 | BaseSetup::BaseSetup(Opie::Core::OConfig *a_cfg,QWidget * parent, const char * name, WFlags f) | 8 | BaseSetup::BaseSetup(Opie::Core::OConfig *a_cfg,QWidget * parent, const char * name, WFlags f) |
9 | :QWidget(parent,name,f) | 9 | :QFrame(parent,name,f) |
10 | { | 10 | { |
11 | setFrameStyle(Box|Raised); | ||
11 | m_cfg = a_cfg; | 12 | m_cfg = a_cfg; |
12 | m_MainLayout = new QVBoxLayout( this, 11, 6, "m_MainLayout"); | 13 | m_MainLayout = new QVBoxLayout( this, 11, 6, "m_MainLayout"); |
@@ -18,5 +19,5 @@ BaseSetup::BaseSetup(Opie::Core::OConfig *a_cfg,QWidget * parent, const char * n | |||
18 | m_SlideShowTime->setButtonSymbols( QSpinBox::PlusMinus ); | 19 | m_SlideShowTime->setButtonSymbols( QSpinBox::PlusMinus ); |
19 | m_SlideShowTime->setMaxValue( 60 ); | 20 | m_SlideShowTime->setMaxValue( 60 ); |
20 | m_SlideShowTime->setMinValue(1); | 21 | m_SlideShowTime->setMinValue(0); |
21 | m_SlideShowTime->setValue( 2 ); | 22 | m_SlideShowTime->setValue( 2 ); |
22 | m_SlideShowTime->setSuffix(tr(" seconds")); | 23 | m_SlideShowTime->setSuffix(tr(" seconds")); |
@@ -29,7 +30,12 @@ BaseSetup::BaseSetup(Opie::Core::OConfig *a_cfg,QWidget * parent, const char * n | |||
29 | m_MainLayout->addLayout( m_SlidetimeLayout ); | 30 | m_MainLayout->addLayout( m_SlidetimeLayout ); |
30 | 31 | ||
32 | #if 0 | ||
31 | m_ShowToolBar = new QCheckBox( this, "m_ShowToolBar" ); | 33 | m_ShowToolBar = new QCheckBox( this, "m_ShowToolBar" ); |
32 | m_ShowToolBar->setText(tr("Show toolbar on startup")); | 34 | m_ShowToolBar->setText(tr("Show toolbar on startup")); |
33 | m_MainLayout->addWidget( m_ShowToolBar ); | 35 | m_MainLayout->addWidget( m_ShowToolBar ); |
36 | #endif | ||
37 | m_SaveStateAuto = new QCheckBox( this, "m_SaveStateAuto" ); | ||
38 | m_SaveStateAuto->setText(tr("Save status of fullscreen/autorotate")); | ||
39 | m_MainLayout->addWidget( m_SaveStateAuto ); | ||
34 | 40 | ||
35 | spacer1 = new QSpacerItem( 20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding ); | 41 | spacer1 = new QSpacerItem( 20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding ); |
@@ -37,10 +43,8 @@ BaseSetup::BaseSetup(Opie::Core::OConfig *a_cfg,QWidget * parent, const char * n | |||
37 | 43 | ||
38 | int stime = m_cfg->readNumEntry("base_slideshowtimeout",2); | 44 | int stime = m_cfg->readNumEntry("base_slideshowtimeout",2); |
39 | if (stime<1) stime=2; | 45 | if (stime<0) stime=2; |
40 | if (stime>60) stime=60; | 46 | if (stime>60) stime=60; |
41 | m_SlideShowTime->setValue(stime); | 47 | m_SlideShowTime->setValue(stime); |
42 | 48 | m_SaveStateAuto->setChecked(m_cfg->readBoolEntry("base_savestatus",false)); | |
43 | bool stoolbar = m_cfg->readBoolEntry("base_showtoolbar",true); | ||
44 | m_ShowToolBar->setChecked(stoolbar); | ||
45 | } | 49 | } |
46 | 50 | ||
@@ -53,4 +57,4 @@ void BaseSetup::save_values() | |||
53 | if (!m_cfg) return; | 57 | if (!m_cfg) return; |
54 | m_cfg->writeEntry("base_slideshowtimeout",m_SlideShowTime->value()); | 58 | m_cfg->writeEntry("base_slideshowtimeout",m_SlideShowTime->value()); |
55 | m_cfg->writeEntry("base_showtoolbar",m_ShowToolBar->isChecked()); | 59 | m_cfg->writeEntry("base_savestatus",m_SaveStateAuto->isChecked()); |
56 | } | 60 | } |