Diffstat (limited to 'noncore/graphics/opie-eye/gui/basesetup.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/graphics/opie-eye/gui/basesetup.cpp | 28 |
1 files changed, 24 insertions, 4 deletions
diff --git a/noncore/graphics/opie-eye/gui/basesetup.cpp b/noncore/graphics/opie-eye/gui/basesetup.cpp index 20dda5a..fdf3466 100644 --- a/noncore/graphics/opie-eye/gui/basesetup.cpp +++ b/noncore/graphics/opie-eye/gui/basesetup.cpp | |||
@@ -10,12 +10,13 @@ BaseSetup::BaseSetup(Opie::Core::OConfig *a_cfg,QWidget * parent, const char * n | |||
10 | { | 10 | { |
11 | setFrameStyle(Box|Raised); | 11 | setFrameStyle(Box|Raised); |
12 | m_cfg = a_cfg; | 12 | m_cfg = a_cfg; |
13 | m_MainLayout = new QVBoxLayout( this, 11, 6, "m_MainLayout"); | 13 | m_MainLayout = new QVBoxLayout( this, 11, 6, "m_MainLayout"); |
14 | 14 | ||
15 | m_SlidetimeLayout = new QGridLayout( 0, 1, 1, 0, 6, "m_SlidetimeLayout"); | 15 | m_SlidetimeLayout = new QGridLayout( 0, 1, 1, 0, 6, "m_SlidetimeLayout"); |
16 | m_IconsizeLayout = new QGridLayout( 0, 1, 1, 0, 6, "m_IconsizeLayout"); | ||
16 | 17 | ||
17 | m_SlideShowTime = new QSpinBox( this, "m_SlideShowTime" ); | 18 | m_SlideShowTime = new QSpinBox( this, "m_SlideShowTime" ); |
18 | m_SlideShowTime->setSizePolicy(QSizePolicy(QSizePolicy::MinimumExpanding,QSizePolicy::Fixed)); | 19 | m_SlideShowTime->setSizePolicy(QSizePolicy(QSizePolicy::MinimumExpanding,QSizePolicy::Fixed)); |
19 | m_SlideShowTime->setButtonSymbols( QSpinBox::PlusMinus ); | 20 | m_SlideShowTime->setButtonSymbols( QSpinBox::PlusMinus ); |
20 | m_SlideShowTime->setMaxValue( 60 ); | 21 | m_SlideShowTime->setMaxValue( 60 ); |
21 | m_SlideShowTime->setMinValue(0); | 22 | m_SlideShowTime->setMinValue(0); |
@@ -26,35 +27,54 @@ BaseSetup::BaseSetup(Opie::Core::OConfig *a_cfg,QWidget * parent, const char * n | |||
26 | 27 | ||
27 | m_SlidetimeLabel = new QLabel( this, "m_SlidetimeLabel" ); | 28 | m_SlidetimeLabel = new QLabel( this, "m_SlidetimeLabel" ); |
28 | m_SlidetimeLabel->setText(tr("Slideshow timeout:")); | 29 | m_SlidetimeLabel->setText(tr("Slideshow timeout:")); |
29 | m_SlidetimeLayout->addWidget( m_SlidetimeLabel, 0, 0 ); | 30 | m_SlidetimeLayout->addWidget( m_SlidetimeLabel, 0, 0 ); |
30 | m_MainLayout->addLayout( m_SlidetimeLayout ); | 31 | m_MainLayout->addLayout( m_SlidetimeLayout ); |
31 | 32 | ||
33 | m_Iconsize = new QSpinBox( this, "m_Iconsize" ); | ||
34 | m_Iconsize->setSizePolicy(QSizePolicy(QSizePolicy::MinimumExpanding,QSizePolicy::Fixed)); | ||
35 | m_Iconsize->setButtonSymbols( QSpinBox::PlusMinus ); | ||
36 | m_Iconsize->setMaxValue( 64 ); | ||
37 | m_Iconsize->setMinValue(12); | ||
38 | m_Iconsize->setValue( 32 ); | ||
39 | m_Iconsize->setSuffix(tr(" pixel")); | ||
40 | m_IconsizeLayout->addWidget( m_Iconsize, 0, 1 ); | ||
41 | m_IconsizeLabel = new QLabel( this, "m_IconsizeLabel" ); | ||
42 | m_IconsizeLabel->setText(tr("Size of thumbnails:")); | ||
43 | m_IconsizeLayout->addWidget( m_IconsizeLabel, 0, 0 ); | ||
44 | m_MainLayout->addLayout(m_IconsizeLayout); | ||
45 | |||
46 | |||
32 | #if 0 | 47 | #if 0 |
33 | m_ShowToolBar = new QCheckBox( this, "m_ShowToolBar" ); | 48 | m_ShowToolBar = new QCheckBox( this, "m_ShowToolBar" ); |
34 | m_ShowToolBar->setText(tr("Show toolbar on startup")); | 49 | m_ShowToolBar->setText(tr("Show toolbar on startup")); |
35 | m_MainLayout->addWidget( m_ShowToolBar ); | 50 | m_MainLayout->addWidget( m_ShowToolBar ); |
36 | #endif | 51 | #endif |
37 | m_SaveStateAuto = new QCheckBox( this, "m_SaveStateAuto" ); | 52 | m_SaveStateAuto = new QCheckBox( this, "m_SaveStateAuto" ); |
38 | m_SaveStateAuto->setText(tr("Save status of fullscreen/autorotate")); | 53 | m_SaveStateAuto->setText(tr("Save status of fullscreen/autorotate")); |
39 | m_MainLayout->addWidget( m_SaveStateAuto ); | 54 | m_MainLayout->addWidget( m_SaveStateAuto ); |
40 | 55 | ||
41 | spacer1 = new QSpacerItem( 20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding ); | 56 | spacer1 = new QSpacerItem( 20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding ); |
42 | m_MainLayout->addItem( spacer1 ); | 57 | m_MainLayout->addItem( spacer1 ); |
43 | 58 | ||
44 | int stime = m_cfg->readNumEntry("base_slideshowtimeout",2); | 59 | int stime = m_cfg->readNumEntry("slideshowtimeout",2); |
45 | if (stime<0) stime=2; | 60 | if (stime<0) stime=2; |
46 | if (stime>60) stime=60; | 61 | if (stime>60) stime=60; |
47 | m_SlideShowTime->setValue(stime); | 62 | m_SlideShowTime->setValue(stime); |
48 | m_SaveStateAuto->setChecked(m_cfg->readBoolEntry("base_savestatus",false)); | 63 | m_SaveStateAuto->setChecked(m_cfg->readBoolEntry("savestatus",true)); |
64 | stime = m_cfg->readNumEntry("iconsize", 32); | ||
65 | if (stime<12)stime = 12; | ||
66 | if (stime>64)stime = 64; | ||
67 | m_Iconsize->setValue(stime); | ||
49 | } | 68 | } |
50 | 69 | ||
51 | BaseSetup::~BaseSetup() | 70 | BaseSetup::~BaseSetup() |
52 | { | 71 | { |
53 | } | 72 | } |
54 | 73 | ||
55 | void BaseSetup::save_values() | 74 | void BaseSetup::save_values() |
56 | { | 75 | { |
57 | if (!m_cfg) return; | 76 | if (!m_cfg) return; |
58 | m_cfg->writeEntry("base_slideshowtimeout",m_SlideShowTime->value()); | 77 | m_cfg->writeEntry("slideshowtimeout",m_SlideShowTime->value()); |
59 | m_cfg->writeEntry("base_savestatus",m_SaveStateAuto->isChecked()); | 78 | m_cfg->writeEntry("savestatus",m_SaveStateAuto->isChecked()); |
79 | m_cfg->writeEntry("iconsize",m_Iconsize->value()); | ||
60 | } | 80 | } |