author | alwin <alwin> | 2005-03-22 22:18:58 (UTC) |
---|---|---|
committer | alwin <alwin> | 2005-03-22 22:18:58 (UTC) |
commit | d7b39880bb7de4908e8a1239d37bb48d83c4a0ba (patch) (unidiff) | |
tree | 64ffc1750d149f52c1c48c676f7ecc29cc442b23 /noncore/graphics/opie-eye/gui/basesetup.cpp | |
parent | 31035d399edaaaff64976705fd44468b6357c863 (diff) | |
download | opie-d7b39880bb7de4908e8a1239d37bb48d83c4a0ba.zip opie-d7b39880bb7de4908e8a1239d37bb48d83c4a0ba.tar.gz opie-d7b39880bb7de4908e8a1239d37bb48d83c4a0ba.tar.bz2 |
-fixed some strange display bugs depending of switch to qte 2.3.10
-inserted the missed (and asked for) feature setting a display brightness
on the fly.
Known Bugs left: When starting with setting a document the image will not
displayed if too large. It is since switch to qte 2.3.10 eg. seems to be
a timing problem when loading cost too much time. I have no idea how to fix
it this moment.
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 | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/noncore/graphics/opie-eye/gui/basesetup.cpp b/noncore/graphics/opie-eye/gui/basesetup.cpp index fdf3466..b0fefbf 100644 --- a/noncore/graphics/opie-eye/gui/basesetup.cpp +++ b/noncore/graphics/opie-eye/gui/basesetup.cpp | |||
@@ -5,76 +5,93 @@ | |||
5 | #include <qspinbox.h> | 5 | #include <qspinbox.h> |
6 | #include <qcheckbox.h> | 6 | #include <qcheckbox.h> |
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 | :QFrame(parent,name,f) | 9 | :QFrame(parent,name,f) |
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 | m_IconsizeLayout = new QGridLayout( 0, 1, 1, 0, 6, "m_IconsizeLayout"); |
17 | m_IntensityLayout = new QGridLayout( 0, 1, 1, 0, 6, "m_IntensityLayout"); | ||
17 | 18 | ||
18 | m_SlideShowTime = new QSpinBox( this, "m_SlideShowTime" ); | 19 | m_SlideShowTime = new QSpinBox( this, "m_SlideShowTime" ); |
19 | m_SlideShowTime->setSizePolicy(QSizePolicy(QSizePolicy::MinimumExpanding,QSizePolicy::Fixed)); | 20 | m_SlideShowTime->setSizePolicy(QSizePolicy(QSizePolicy::MinimumExpanding,QSizePolicy::Fixed)); |
20 | m_SlideShowTime->setButtonSymbols( QSpinBox::PlusMinus ); | 21 | m_SlideShowTime->setButtonSymbols( QSpinBox::PlusMinus ); |
21 | m_SlideShowTime->setMaxValue( 60 ); | 22 | m_SlideShowTime->setMaxValue( 60 ); |
22 | m_SlideShowTime->setMinValue(0); | 23 | m_SlideShowTime->setMinValue(0); |
23 | m_SlideShowTime->setValue( 2 ); | 24 | m_SlideShowTime->setValue( 2 ); |
24 | m_SlideShowTime->setSuffix(tr(" seconds")); | 25 | m_SlideShowTime->setSuffix(tr(" seconds")); |
25 | 26 | ||
26 | m_SlidetimeLayout->addWidget( m_SlideShowTime, 0, 1 ); | 27 | m_SlidetimeLayout->addWidget( m_SlideShowTime, 0, 1 ); |
27 | 28 | ||
28 | m_SlidetimeLabel = new QLabel( this, "m_SlidetimeLabel" ); | 29 | m_SlidetimeLabel = new QLabel( this, "m_SlidetimeLabel" ); |
29 | m_SlidetimeLabel->setText(tr("Slideshow timeout:")); | 30 | m_SlidetimeLabel->setText(tr("Slideshow timeout:")); |
30 | m_SlidetimeLayout->addWidget( m_SlidetimeLabel, 0, 0 ); | 31 | m_SlidetimeLayout->addWidget( m_SlidetimeLabel, 0, 0 ); |
31 | m_MainLayout->addLayout( m_SlidetimeLayout ); | 32 | m_MainLayout->addLayout( m_SlidetimeLayout ); |
32 | 33 | ||
33 | m_Iconsize = new QSpinBox( this, "m_Iconsize" ); | 34 | m_Iconsize = new QSpinBox( this, "m_Iconsize" ); |
34 | m_Iconsize->setSizePolicy(QSizePolicy(QSizePolicy::MinimumExpanding,QSizePolicy::Fixed)); | 35 | m_Iconsize->setSizePolicy(QSizePolicy(QSizePolicy::MinimumExpanding,QSizePolicy::Fixed)); |
35 | m_Iconsize->setButtonSymbols( QSpinBox::PlusMinus ); | 36 | m_Iconsize->setButtonSymbols( QSpinBox::PlusMinus ); |
36 | m_Iconsize->setMaxValue( 64 ); | 37 | m_Iconsize->setMaxValue( 128 ); |
37 | m_Iconsize->setMinValue(12); | 38 | m_Iconsize->setMinValue(12); |
38 | m_Iconsize->setValue( 32 ); | 39 | m_Iconsize->setValue( 32 ); |
39 | m_Iconsize->setSuffix(tr(" pixel")); | 40 | m_Iconsize->setSuffix(tr(" pixel")); |
40 | m_IconsizeLayout->addWidget( m_Iconsize, 0, 1 ); | 41 | m_IconsizeLayout->addWidget( m_Iconsize, 0, 1 ); |
41 | m_IconsizeLabel = new QLabel( this, "m_IconsizeLabel" ); | 42 | m_IconsizeLabel = new QLabel( this, "m_IconsizeLabel" ); |
42 | m_IconsizeLabel->setText(tr("Size of thumbnails:")); | 43 | m_IconsizeLabel->setText(tr("Size of thumbnails:")); |
43 | m_IconsizeLayout->addWidget( m_IconsizeLabel, 0, 0 ); | 44 | m_IconsizeLayout->addWidget( m_IconsizeLabel, 0, 0 ); |
44 | m_MainLayout->addLayout(m_IconsizeLayout); | 45 | m_MainLayout->addLayout(m_IconsizeLayout); |
45 | 46 | ||
47 | m_Intensity = new QSpinBox( this, "m_Intensity" ); | ||
48 | m_Intensity->setSizePolicy(QSizePolicy(QSizePolicy::MinimumExpanding,QSizePolicy::Fixed)); | ||
49 | m_Intensity->setButtonSymbols( QSpinBox::PlusMinus ); | ||
50 | m_Intensity->setMaxValue( 255 ); | ||
51 | m_Intensity->setMinValue(-255); | ||
52 | m_Intensity->setValue( 0 ); | ||
53 | m_IntensityLayout->addWidget( m_Intensity, 0, 1 ); | ||
54 | m_IntensityLabel = new QLabel( this, "m_IntensityLabel" ); | ||
55 | m_IntensityLabel->setText(tr("Default display brightness:")); | ||
56 | m_IntensityLayout->addWidget(m_IntensityLabel, 0, 0 ); | ||
57 | m_MainLayout->addLayout(m_IntensityLayout); | ||
46 | 58 | ||
47 | #if 0 | 59 | #if 0 |
48 | m_ShowToolBar = new QCheckBox( this, "m_ShowToolBar" ); | 60 | m_ShowToolBar = new QCheckBox( this, "m_ShowToolBar" ); |
49 | m_ShowToolBar->setText(tr("Show toolbar on startup")); | 61 | m_ShowToolBar->setText(tr("Show toolbar on startup")); |
50 | m_MainLayout->addWidget( m_ShowToolBar ); | 62 | m_MainLayout->addWidget( m_ShowToolBar ); |
51 | #endif | 63 | #endif |
52 | m_SaveStateAuto = new QCheckBox( this, "m_SaveStateAuto" ); | 64 | m_SaveStateAuto = new QCheckBox( this, "m_SaveStateAuto" ); |
53 | m_SaveStateAuto->setText(tr("Save status of fullscreen/autorotate")); | 65 | m_SaveStateAuto->setText(tr("Save status of fullscreen/autorotate")); |
54 | m_MainLayout->addWidget( m_SaveStateAuto ); | 66 | m_MainLayout->addWidget( m_SaveStateAuto ); |
55 | 67 | ||
56 | spacer1 = new QSpacerItem( 20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding ); | 68 | spacer1 = new QSpacerItem( 20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding ); |
57 | m_MainLayout->addItem( spacer1 ); | 69 | m_MainLayout->addItem( spacer1 ); |
58 | 70 | ||
59 | int stime = m_cfg->readNumEntry("slideshowtimeout",2); | 71 | int stime = m_cfg->readNumEntry("slideshowtimeout",2); |
60 | if (stime<0) stime=2; | 72 | if (stime<0) stime=2; |
61 | if (stime>60) stime=60; | 73 | if (stime>60) stime=60; |
62 | m_SlideShowTime->setValue(stime); | 74 | m_SlideShowTime->setValue(stime); |
63 | m_SaveStateAuto->setChecked(m_cfg->readBoolEntry("savestatus",true)); | 75 | m_SaveStateAuto->setChecked(m_cfg->readBoolEntry("savestatus",true)); |
64 | stime = m_cfg->readNumEntry("iconsize", 32); | 76 | stime = m_cfg->readNumEntry("iconsize", 32); |
65 | if (stime<12)stime = 12; | 77 | if (stime<12)stime = 12; |
66 | if (stime>64)stime = 64; | 78 | if (stime>64)stime = 64; |
67 | m_Iconsize->setValue(stime); | 79 | m_Iconsize->setValue(stime); |
80 | stime = m_cfg->readNumEntry("intensity",0); | ||
81 | if (stime<-255) stime = -255; | ||
82 | if (stime>255) stime = 255; | ||
83 | m_Intensity->setValue(stime); | ||
68 | } | 84 | } |
69 | 85 | ||
70 | BaseSetup::~BaseSetup() | 86 | BaseSetup::~BaseSetup() |
71 | { | 87 | { |
72 | } | 88 | } |
73 | 89 | ||
74 | void BaseSetup::save_values() | 90 | void BaseSetup::save_values() |
75 | { | 91 | { |
76 | if (!m_cfg) return; | 92 | if (!m_cfg) return; |
77 | m_cfg->writeEntry("slideshowtimeout",m_SlideShowTime->value()); | 93 | m_cfg->writeEntry("slideshowtimeout",m_SlideShowTime->value()); |
78 | m_cfg->writeEntry("savestatus",m_SaveStateAuto->isChecked()); | 94 | m_cfg->writeEntry("savestatus",m_SaveStateAuto->isChecked()); |
79 | m_cfg->writeEntry("iconsize",m_Iconsize->value()); | 95 | m_cfg->writeEntry("iconsize",m_Iconsize->value()); |
96 | m_cfg->writeEntry("intensity",m_Intensity->value()); | ||
80 | } | 97 | } |