author | alwin <alwin> | 2005-03-22 22:18:58 (UTC) |
---|---|---|
committer | alwin <alwin> | 2005-03-22 22:18:58 (UTC) |
commit | d7b39880bb7de4908e8a1239d37bb48d83c4a0ba (patch) (side-by-side diff) | |
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 @@ #include <qspinbox.h> #include <qcheckbox.h> BaseSetup::BaseSetup(Opie::Core::OConfig *a_cfg,QWidget * parent, const char * name, WFlags f) :QFrame(parent,name,f) { setFrameStyle(Box|Raised); m_cfg = a_cfg; m_MainLayout = new QVBoxLayout( this, 11, 6, "m_MainLayout"); m_SlidetimeLayout = new QGridLayout( 0, 1, 1, 0, 6, "m_SlidetimeLayout"); m_IconsizeLayout = new QGridLayout( 0, 1, 1, 0, 6, "m_IconsizeLayout"); + m_IntensityLayout = new QGridLayout( 0, 1, 1, 0, 6, "m_IntensityLayout"); m_SlideShowTime = new QSpinBox( this, "m_SlideShowTime" ); m_SlideShowTime->setSizePolicy(QSizePolicy(QSizePolicy::MinimumExpanding,QSizePolicy::Fixed)); m_SlideShowTime->setButtonSymbols( QSpinBox::PlusMinus ); m_SlideShowTime->setMaxValue( 60 ); m_SlideShowTime->setMinValue(0); m_SlideShowTime->setValue( 2 ); m_SlideShowTime->setSuffix(tr(" seconds")); m_SlidetimeLayout->addWidget( m_SlideShowTime, 0, 1 ); m_SlidetimeLabel = new QLabel( this, "m_SlidetimeLabel" ); m_SlidetimeLabel->setText(tr("Slideshow timeout:")); m_SlidetimeLayout->addWidget( m_SlidetimeLabel, 0, 0 ); m_MainLayout->addLayout( m_SlidetimeLayout ); m_Iconsize = new QSpinBox( this, "m_Iconsize" ); m_Iconsize->setSizePolicy(QSizePolicy(QSizePolicy::MinimumExpanding,QSizePolicy::Fixed)); m_Iconsize->setButtonSymbols( QSpinBox::PlusMinus ); - m_Iconsize->setMaxValue( 64 ); + m_Iconsize->setMaxValue( 128 ); m_Iconsize->setMinValue(12); m_Iconsize->setValue( 32 ); m_Iconsize->setSuffix(tr(" pixel")); m_IconsizeLayout->addWidget( m_Iconsize, 0, 1 ); m_IconsizeLabel = new QLabel( this, "m_IconsizeLabel" ); m_IconsizeLabel->setText(tr("Size of thumbnails:")); m_IconsizeLayout->addWidget( m_IconsizeLabel, 0, 0 ); m_MainLayout->addLayout(m_IconsizeLayout); + m_Intensity = new QSpinBox( this, "m_Intensity" ); + m_Intensity->setSizePolicy(QSizePolicy(QSizePolicy::MinimumExpanding,QSizePolicy::Fixed)); + m_Intensity->setButtonSymbols( QSpinBox::PlusMinus ); + m_Intensity->setMaxValue( 255 ); + m_Intensity->setMinValue(-255); + m_Intensity->setValue( 0 ); + m_IntensityLayout->addWidget( m_Intensity, 0, 1 ); + m_IntensityLabel = new QLabel( this, "m_IntensityLabel" ); + m_IntensityLabel->setText(tr("Default display brightness:")); + m_IntensityLayout->addWidget(m_IntensityLabel, 0, 0 ); + m_MainLayout->addLayout(m_IntensityLayout); #if 0 m_ShowToolBar = new QCheckBox( this, "m_ShowToolBar" ); m_ShowToolBar->setText(tr("Show toolbar on startup")); m_MainLayout->addWidget( m_ShowToolBar ); #endif m_SaveStateAuto = new QCheckBox( this, "m_SaveStateAuto" ); m_SaveStateAuto->setText(tr("Save status of fullscreen/autorotate")); m_MainLayout->addWidget( m_SaveStateAuto ); spacer1 = new QSpacerItem( 20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding ); m_MainLayout->addItem( spacer1 ); int stime = m_cfg->readNumEntry("slideshowtimeout",2); if (stime<0) stime=2; if (stime>60) stime=60; m_SlideShowTime->setValue(stime); m_SaveStateAuto->setChecked(m_cfg->readBoolEntry("savestatus",true)); stime = m_cfg->readNumEntry("iconsize", 32); if (stime<12)stime = 12; if (stime>64)stime = 64; m_Iconsize->setValue(stime); + stime = m_cfg->readNumEntry("intensity",0); + if (stime<-255) stime = -255; + if (stime>255) stime = 255; + m_Intensity->setValue(stime); } BaseSetup::~BaseSetup() { } void BaseSetup::save_values() { if (!m_cfg) return; m_cfg->writeEntry("slideshowtimeout",m_SlideShowTime->value()); m_cfg->writeEntry("savestatus",m_SaveStateAuto->isChecked()); m_cfg->writeEntry("iconsize",m_Iconsize->value()); + m_cfg->writeEntry("intensity",m_Intensity->value()); } |