summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/graphics/opie-eye/gui/basesetup.cpp11
-rw-r--r--noncore/graphics/opie-eye/gui/iconview.cpp22
-rw-r--r--noncore/graphics/opie-eye/gui/iconview.h4
-rw-r--r--noncore/graphics/opie-eye/gui/imageview.cpp37
-rw-r--r--noncore/graphics/opie-eye/gui/imageview.h12
-rw-r--r--noncore/graphics/opie-eye/gui/mainwindow.cpp16
-rw-r--r--noncore/graphics/opie-eye/gui/mainwindow.h3
7 files changed, 84 insertions, 21 deletions
diff --git a/noncore/graphics/opie-eye/gui/basesetup.cpp b/noncore/graphics/opie-eye/gui/basesetup.cpp
index b0fefbf..fe51321 100644
--- a/noncore/graphics/opie-eye/gui/basesetup.cpp
+++ b/noncore/graphics/opie-eye/gui/basesetup.cpp
@@ -46,10 +46,10 @@ BaseSetup::BaseSetup(Opie::Core::OConfig *a_cfg,QWidget * parent, const char * n
46 46
47 m_Intensity = new QSpinBox( this, "m_Intensity" ); 47 m_Intensity = new QSpinBox( this, "m_Intensity" );
48 m_Intensity->setSizePolicy(QSizePolicy(QSizePolicy::MinimumExpanding,QSizePolicy::Fixed)); 48 m_Intensity->setSizePolicy(QSizePolicy(QSizePolicy::MinimumExpanding,QSizePolicy::Fixed));
49 m_Intensity->setButtonSymbols( QSpinBox::PlusMinus ); 49 m_Intensity->setButtonSymbols( QSpinBox::PlusMinus );
50 m_Intensity->setMaxValue( 255 ); 50 m_Intensity->setMaxValue( 100 );
51 m_Intensity->setMinValue(-255); 51 m_Intensity->setMinValue(-100);
52 m_Intensity->setValue( 0 ); 52 m_Intensity->setValue( 0 );
53 m_IntensityLayout->addWidget( m_Intensity, 0, 1 ); 53 m_IntensityLayout->addWidget( m_Intensity, 0, 1 );
54 m_IntensityLabel = new QLabel( this, "m_IntensityLabel" ); 54 m_IntensityLabel = new QLabel( this, "m_IntensityLabel" );
55 m_IntensityLabel->setText(tr("Default display brightness:")); 55 m_IntensityLabel->setText(tr("Default display brightness:"));
@@ -73,14 +73,15 @@ BaseSetup::BaseSetup(Opie::Core::OConfig *a_cfg,QWidget * parent, const char * n
73 if (stime>60) stime=60; 73 if (stime>60) stime=60;
74 m_SlideShowTime->setValue(stime); 74 m_SlideShowTime->setValue(stime);
75 m_SaveStateAuto->setChecked(m_cfg->readBoolEntry("savestatus",true)); 75 m_SaveStateAuto->setChecked(m_cfg->readBoolEntry("savestatus",true));
76 stime = m_cfg->readNumEntry("iconsize", 32); 76 stime = m_cfg->readNumEntry("iconsize", 32);
77 /* must equal to s(MAX/MIN_ICONSIZE) in iconview.cpp! */
77 if (stime<12)stime = 12; 78 if (stime<12)stime = 12;
78 if (stime>64)stime = 64; 79 if (stime>128)stime = 128;
79 m_Iconsize->setValue(stime); 80 m_Iconsize->setValue(stime);
80 stime = m_cfg->readNumEntry("intensity",0); 81 stime = m_cfg->readNumEntry("intensity",0);
81 if (stime<-255) stime = -255; 82 if (stime<-100) stime = -100;
82 if (stime>255) stime = 255; 83 if (stime>100) stime = 100;
83 m_Intensity->setValue(stime); 84 m_Intensity->setValue(stime);
84} 85}
85 86
86BaseSetup::~BaseSetup() 87BaseSetup::~BaseSetup()
diff --git a/noncore/graphics/opie-eye/gui/iconview.cpp b/noncore/graphics/opie-eye/gui/iconview.cpp
index b2443e8..59091a8 100644
--- a/noncore/graphics/opie-eye/gui/iconview.cpp
+++ b/noncore/graphics/opie-eye/gui/iconview.cpp
@@ -35,8 +35,12 @@
35 35
36 36
37using Opie::Core::OKeyConfigItem; 37using Opie::Core::OKeyConfigItem;
38 38
39const int PIconView::sMAX_ICON_SIZE = 128;
40const int PIconView::sMIN_ICON_SIZE = 12;
41const int PIconView::sDEF_ICON_SIZE = 64;
42
39/* 43/*
40 * The Icons, Request Cache and IconViewItem for the IconView 44 * The Icons, Request Cache and IconViewItem for the IconView
41 */ 45 */
42namespace { 46namespace {
@@ -221,10 +225,10 @@ PIconView::PIconView( QWidget* wid, Opie::Core::OConfig* cfg )
221 } else { 225 } else {
222 m_view->setResizeMode(QIconView::Fixed); 226 m_view->setResizeMode(QIconView::Fixed);
223 } 227 }
224 m_iconsize = m_cfg->readNumEntry("iconsize", 32); 228 m_iconsize = m_cfg->readNumEntry("iconsize", 32);
225 if (m_iconsize<12)m_iconsize = 12; 229 if (m_iconsize<sMIN_ICON_SIZE)m_iconsize = sMIN_ICON_SIZE;
226 if (m_iconsize>64)m_iconsize = 64; 230 if (m_iconsize>sMAX_ICON_SIZE)m_iconsize = sMAX_ICON_SIZE;
227 231
228 calculateGrid(); 232 calculateGrid();
229 initKeys(); 233 initKeys();
230 loadViews(); 234 loadViews();
@@ -407,10 +411,10 @@ void PIconView::resetView() {
407 g_stringInf.clear(); 411 g_stringInf.clear();
408 if (m_mode>1) { 412 if (m_mode>1) {
409 int osize = m_iconsize; 413 int osize = m_iconsize;
410 m_iconsize = m_cfg->readNumEntry("iconsize", 32); 414 m_iconsize = m_cfg->readNumEntry("iconsize", 32);
411 if (m_iconsize<12)m_iconsize = 12; 415 if (m_iconsize<sMIN_ICON_SIZE)m_iconsize = sMIN_ICON_SIZE;
412 if (m_iconsize>64)m_iconsize = 64; 416 if (m_iconsize>sMAX_ICON_SIZE)m_iconsize = sMAX_ICON_SIZE;
413 if (osize != m_iconsize) { 417 if (osize != m_iconsize) {
414 if (_dirPix){ 418 if (_dirPix){
415 delete _dirPix; 419 delete _dirPix;
416 _dirPix = 0; 420 _dirPix = 0;
@@ -421,9 +425,9 @@ void PIconView::resetView() {
421 } 425 }
422 calculateGrid(); 426 calculateGrid();
423 } 427 }
424 } else { 428 } else {
425 m_iconsize = 64; 429 m_iconsize = sDEF_ICON_SIZE;
426 } 430 }
427 slotViewChanged(m_views->currentItem()); 431 slotViewChanged(m_views->currentItem());
428 m_internalReset = false; 432 m_internalReset = false;
429} 433}
@@ -832,13 +836,13 @@ void PIconView::slotChangeMode( int mode ) {
832 } else { 836 } else {
833 m_view->setResizeMode(QIconView::Fixed); 837 m_view->setResizeMode(QIconView::Fixed);
834 } 838 }
835 if (m_mode==1) { 839 if (m_mode==1) {
836 m_iconsize = 64; 840 m_iconsize = sDEF_ICON_SIZE;
837 } else { 841 } else {
838 m_iconsize = m_cfg->readNumEntry("iconsize", 32); 842 m_iconsize = m_cfg->readNumEntry("iconsize", 32);
839 if (m_iconsize<12)m_iconsize = 12; 843 if (m_iconsize<sMIN_ICON_SIZE)m_iconsize = sMIN_ICON_SIZE;
840 if (m_iconsize>64)m_iconsize = 64; 844 if (m_iconsize>sMAX_ICON_SIZE)m_iconsize = sMAX_ICON_SIZE;
841 } 845 }
842 if (_dirPix){ 846 if (_dirPix){
843 delete _dirPix; 847 delete _dirPix;
844 _dirPix = 0; 848 _dirPix = 0;
@@ -887,9 +891,9 @@ void PIconView::calculateGrid(QResizeEvent* re)
887 case 2: 891 case 2:
888 m_view->setSpacing(2); 892 m_view->setSpacing(2);
889 m_view->setGridX(m_iconsize); 893 m_view->setGridX(m_iconsize);
890 m_view->setGridY(-1); 894 m_view->setGridY(-1);
891 cache = (int)((double)64/(double)m_iconsize*40.0); 895 cache = (int)((double)sDEF_ICON_SIZE/(double)m_iconsize*80.0);
892 odebug << "cache size: " << cache << oendl; 896 odebug << "cache size: " << cache << oendl;
893 PPixmapCache::self()->setMaxImages(cache); 897 PPixmapCache::self()->setMaxImages(cache);
894 break; 898 break;
895 case 3: 899 case 3:
diff --git a/noncore/graphics/opie-eye/gui/iconview.h b/noncore/graphics/opie-eye/gui/iconview.h
index 6e08fd8..a546b88 100644
--- a/noncore/graphics/opie-eye/gui/iconview.h
+++ b/noncore/graphics/opie-eye/gui/iconview.h
@@ -36,8 +36,12 @@ public:
36 Opie::Core::OKeyConfigManager* manager(); 36 Opie::Core::OKeyConfigManager* manager();
37 37
38 void setDoccalled(bool); 38 void setDoccalled(bool);
39 39
40 static const int sMAX_ICON_SIZE;
41 static const int sMIN_ICON_SIZE;
42 static const int sDEF_ICON_SIZE;
43
40signals: 44signals:
41 void sig_showInfo( const QString& ); 45 void sig_showInfo( const QString& );
42 void sig_display(const QString&); 46 void sig_display(const QString&);
43 void sig_startslide(int timeout); 47 void sig_startslide(int timeout);
diff --git a/noncore/graphics/opie-eye/gui/imageview.cpp b/noncore/graphics/opie-eye/gui/imageview.cpp
index 6c3f9cb..994fe12 100644
--- a/noncore/graphics/opie-eye/gui/imageview.cpp
+++ b/noncore/graphics/opie-eye/gui/imageview.cpp
@@ -28,8 +28,9 @@ ImageView::ImageView(Opie::Core::OConfig *cfg, QWidget* parent, const char* name
28 m_slideValue = 5; 28 m_slideValue = 5;
29 m_gDisplayType = 0; 29 m_gDisplayType = 0;
30 m_gPrevNext = 0; 30 m_gPrevNext = 0;
31 m_hGroup = 0; 31 m_hGroup = 0;
32 m_gBright = 0;
32 m_Rotated = false; 33 m_Rotated = false;
33 closeIfHide = false; 34 closeIfHide = false;
34 int min = QApplication::desktop()->size().width()>QApplication::desktop()->size().height()? 35 int min = QApplication::desktop()->size().width()>QApplication::desktop()->size().height()?
35 QApplication::desktop()->size().height():QApplication::desktop()->size().width(); 36 QApplication::desktop()->size().height():QApplication::desktop()->size().width();
@@ -38,13 +39,30 @@ ImageView::ImageView(Opie::Core::OConfig *cfg, QWidget* parent, const char* name
38 setMinimumSize(min/3,min/3); 39 setMinimumSize(min/3,min/3);
39 } else { 40 } else {
40 setMinimumSize(10,10); 41 setMinimumSize(10,10);
41 } 42 }
43 connect(this,SIGNAL(incBrightness()),this,SLOT(slotIncBrightness()));
44 connect(this,SIGNAL(decBrightness()),this,SLOT(slotDecBrightness()));
45
42 m_sysChannel = new QCopChannel( "QPE/System", this ); 46 m_sysChannel = new QCopChannel( "QPE/System", this );
43 connect( m_sysChannel, SIGNAL( received(const QCString&,const QByteArray&) ), 47 connect( m_sysChannel, SIGNAL( received(const QCString&,const QByteArray&) ),
44 this, SLOT( systemMessage(const QCString&,const QByteArray&) ) ); 48 this, SLOT( systemMessage(const QCString&,const QByteArray&) ) );
45} 49}
46 50
51void ImageView::slotIncBrightness()
52{
53 int lb = Intensity()+5;
54 if (lb>100) lb=100;
55 setIntensity(lb,true);
56}
57
58void ImageView::slotDecBrightness()
59{
60 int lb = Intensity()-5;
61 if (lb<-100) lb=-100;
62 setIntensity(lb,true);
63}
64
47void ImageView::systemMessage( const QCString& msg, const QByteArray& data ) 65void ImageView::systemMessage( const QCString& msg, const QByteArray& data )
48{ 66{
49 int _newrotation; 67 int _newrotation;
50 QDataStream stream( data, IO_ReadOnly ); 68 QDataStream stream( data, IO_ReadOnly );
@@ -59,13 +77,14 @@ void ImageView::systemMessage( const QCString& msg, const QByteArray& data )
59 } 77 }
60 } 78 }
61} 79}
62 80
63void ImageView::setMenuActions(QActionGroup*hGroup,QActionGroup*nextprevGroup, QActionGroup*disptypeGroup) 81void ImageView::setMenuActions(QActionGroup*hGroup,QActionGroup*nextprevGroup, QActionGroup*disptypeGroup,QActionGroup*brightGroup)
64{ 82{
65 m_gDisplayType = disptypeGroup; 83 m_gDisplayType = disptypeGroup;
66 m_gPrevNext = nextprevGroup; 84 m_gPrevNext = nextprevGroup;
67 m_hGroup = hGroup; 85 m_hGroup = hGroup;
86 m_gBright = brightGroup;
68} 87}
69 88
70ImageView::~ImageView() 89ImageView::~ImageView()
71{ 90{
@@ -173,8 +192,17 @@ void ImageView::initKeys()
173 m_viewManager->addKeyConfig( Opie::Core::OKeyConfigItem(tr("Toggle thumbnail"), "imagezoomer", 192 m_viewManager->addKeyConfig( Opie::Core::OKeyConfigItem(tr("Toggle thumbnail"), "imagezoomer",
174 Resource::loadPixmap("mag"), Zoomer, 193 Resource::loadPixmap("mag"), Zoomer,
175 Opie::Core::OKeyPair(Qt::Key_T,0), 194 Opie::Core::OKeyPair(Qt::Key_T,0),
176 this, SIGNAL(toggleZoomer()))); 195 this, SIGNAL(toggleZoomer())));
196
197 m_viewManager->addKeyConfig( Opie::Core::OKeyConfigItem(tr("Increase brightness"), "incbrightness",
198 Resource::loadPixmap("up"), Incbrightness,
199 Opie::Core::OKeyPair(Qt::Key_B,0),
200 this, SIGNAL(incBrightness())));
201 m_viewManager->addKeyConfig( Opie::Core::OKeyConfigItem(tr("Decrease brightness"), "decbrightness",
202 Resource::loadPixmap("down"), Decbrightness,
203 Opie::Core::OKeyPair(Qt::Key_D,0),
204 this, SIGNAL(decBrightness())));
177 m_viewManager->handleWidget( this ); 205 m_viewManager->handleWidget( this );
178 m_viewManager->load(); 206 m_viewManager->load();
179} 207}
180 208
@@ -222,8 +250,12 @@ void ImageView::contentsMousePressEvent ( QMouseEvent * e)
222 if (m_gDisplayType) { 250 if (m_gDisplayType) {
223 m->insertSeparator(); 251 m->insertSeparator();
224 m_gDisplayType->addTo(m); 252 m_gDisplayType->addTo(m);
225 } 253 }
254 if (m_gBright) {
255 m->insertSeparator();
256 m_gBright->addTo(m);
257 }
226 } 258 }
227 m->setFocus(); 259 m->setFocus();
228 m->exec( QPoint( QCursor::pos().x(), QCursor::pos().y()) ); 260 m->exec( QPoint( QCursor::pos().x(), QCursor::pos().y()) );
229 if (m_hGroup) { 261 if (m_hGroup) {
@@ -234,8 +266,11 @@ void ImageView::contentsMousePressEvent ( QMouseEvent * e)
234 } 266 }
235 if (m_gDisplayType) { 267 if (m_gDisplayType) {
236 m_gDisplayType->removeFrom(m); 268 m_gDisplayType->removeFrom(m);
237 } 269 }
270 if (m_gBright) {
271 m_gBright->removeFrom(m);
272 }
238 delete m; 273 delete m;
239} 274}
240 275
241void ImageView::setFullScreen(bool how,bool force) 276void ImageView::setFullScreen(bool how,bool force)
diff --git a/noncore/graphics/opie-eye/gui/imageview.h b/noncore/graphics/opie-eye/gui/imageview.h
index e8c8df7..b5801a6 100644
--- a/noncore/graphics/opie-eye/gui/imageview.h
+++ b/noncore/graphics/opie-eye/gui/imageview.h
@@ -28,9 +28,11 @@ class ImageView:public Opie::MM::OImageScrollView
28 ShowNext, 28 ShowNext,
29 ShowPrevious, 29 ShowPrevious,
30 Zoomer, 30 Zoomer,
31 Autorotate, 31 Autorotate,
32 Autoscale 32 Autoscale,
33 Incbrightness,
34 Decbrightness
33 }; 35 };
34 36
35public: 37public:
36 ImageView(Opie::Core::OConfig *cfg,QWidget* parent,const char* name = 0, WFlags fl = 0 ); 38 ImageView(Opie::Core::OConfig *cfg,QWidget* parent,const char* name = 0, WFlags fl = 0 );
@@ -39,9 +41,9 @@ public:
39 void setFullScreen(bool how,bool force=true); 41 void setFullScreen(bool how,bool force=true);
40 bool fullScreen(){return m_isFullScreen;} 42 bool fullScreen(){return m_isFullScreen;}
41 virtual void enableFullscreen(); 43 virtual void enableFullscreen();
42 void stopSlide(); 44 void stopSlide();
43 void setMenuActions(QActionGroup*hGroup,QActionGroup*nextprevGroup, QActionGroup*disptypeGroup); 45 void setMenuActions(QActionGroup*hGroup,QActionGroup*nextprevGroup, QActionGroup*disptypeGroup,QActionGroup*brightGroup);
44 void setCloseIfHide(bool); 46 void setCloseIfHide(bool);
45 47
46signals: 48signals:
47 void dispImageInfo(const QString&); 49 void dispImageInfo(const QString&);
@@ -51,8 +53,10 @@ signals:
51 void hideMe(); 53 void hideMe();
52 void toggleZoomer(); 54 void toggleZoomer();
53 void toggleAutoscale(); 55 void toggleAutoscale();
54 void toggleAutorotate(); 56 void toggleAutorotate();
57 void incBrightness();
58 void decBrightness();
55 59
56protected: 60protected:
57 Opie::Core::OConfig * m_cfg; 61 Opie::Core::OConfig * m_cfg;
58 Opie::Core::OKeyConfigManager*m_viewManager; 62 Opie::Core::OKeyConfigManager*m_viewManager;
@@ -64,9 +68,9 @@ protected:
64 int focus_in_count; 68 int focus_in_count;
65 QTimer*m_slideTimer; 69 QTimer*m_slideTimer;
66 int m_slideValue; 70 int m_slideValue;
67 virtual void focusInEvent ( QFocusEvent * ); 71 virtual void focusInEvent ( QFocusEvent * );
68 QActionGroup *m_gDisplayType,*m_gPrevNext,*m_hGroup; 72 QActionGroup *m_gDisplayType,*m_gPrevNext,*m_hGroup,*m_gBright;
69 bool closeIfHide:1; 73 bool closeIfHide:1;
70 QCopChannel* m_sysChannel; 74 QCopChannel* m_sysChannel;
71 int m_rotation; 75 int m_rotation;
72 76
@@ -74,8 +78,10 @@ public slots:
74 virtual void hide(); 78 virtual void hide();
75 virtual void startSlide(int); 79 virtual void startSlide(int);
76 virtual void nextSlide(); 80 virtual void nextSlide();
77 virtual void systemMessage( const QCString&, const QByteArray& ); 81 virtual void systemMessage( const QCString&, const QByteArray& );
82 virtual void slotIncBrightness();
83 virtual void slotDecBrightness();
78 84
79protected slots: 85protected slots:
80 virtual void slotShowImageInfo(); 86 virtual void slotShowImageInfo();
81 virtual void keyReleaseEvent(QKeyEvent * e); 87 virtual void keyReleaseEvent(QKeyEvent * e);
diff --git a/noncore/graphics/opie-eye/gui/mainwindow.cpp b/noncore/graphics/opie-eye/gui/mainwindow.cpp
index d11e4e1..4ee252f 100644
--- a/noncore/graphics/opie-eye/gui/mainwindow.cpp
+++ b/noncore/graphics/opie-eye/gui/mainwindow.cpp
@@ -264,9 +264,9 @@ void PMainWindow::initDisp() {
264 if (m_disp) { 264 if (m_disp) {
265// if (m_stack->mode() != Opie::Ui::OWidgetStack::SmallScreen) { 265// if (m_stack->mode() != Opie::Ui::OWidgetStack::SmallScreen) {
266 //m_disp->setMinimumSize(QApplication::desktop()->size()/2); 266 //m_disp->setMinimumSize(QApplication::desktop()->size()/2);
267// } 267// }
268 m_disp->setMenuActions(m_hGroup,m_gPrevNext,m_gDisplayType); 268 m_disp->setMenuActions(m_hGroup,m_gPrevNext,m_gDisplayType,m_hBright);
269 m_disp->setAutoScale(!m_aUnscaled->isOn()); 269 m_disp->setAutoScale(!m_aUnscaled->isOn());
270 m_disp->setAutoRotate(m_aAutoRotate->isOn()); 270 m_disp->setAutoRotate(m_aAutoRotate->isOn());
271 m_disp->setShowZoomer(m_aZoomer->isOn()); 271 m_disp->setShowZoomer(m_aZoomer->isOn());
272 m_disp->setBackgroundColor(white); 272 m_disp->setBackgroundColor(white);
@@ -278,8 +278,10 @@ void PMainWindow::initDisp() {
278 connect(m_disp,SIGNAL(toggleZoomer()),this,SLOT(slotToggleZoomer())); 278 connect(m_disp,SIGNAL(toggleZoomer()),this,SLOT(slotToggleZoomer()));
279 connect(m_disp,SIGNAL(toggleAutoscale()),this,SLOT(slotToggleAutoscale())); 279 connect(m_disp,SIGNAL(toggleAutoscale()),this,SLOT(slotToggleAutoscale()));
280 connect(m_disp,SIGNAL(toggleAutorotate()),this,SLOT(slotToggleAutorotate())); 280 connect(m_disp,SIGNAL(toggleAutorotate()),this,SLOT(slotToggleAutorotate()));
281 connect(m_view,SIGNAL(sig_startslide(int)),m_disp,SLOT(startSlide(int))); 281 connect(m_view,SIGNAL(sig_startslide(int)),m_disp,SLOT(startSlide(int)));
282 connect(m_IncBrightness,SIGNAL(activated()),m_disp,SLOT(slotIncBrightness()));
283 connect(m_DecBrightness,SIGNAL(activated()),m_disp,SLOT(slotDecBrightness()));
282 slotFullScreenToggled(m_aFullScreen->isOn()); 284 slotFullScreenToggled(m_aFullScreen->isOn());
283 } 285 }
284} 286}
285 287
@@ -379,8 +381,9 @@ void PMainWindow::slotDisplay( const QString& inf ) {
379 nwindow = true; 381 nwindow = true;
380 initDisp(); 382 initDisp();
381 m_disp->setIntensity(m_Intensity); 383 m_disp->setIntensity(m_Intensity);
382 m_setCurrentBrightness->setEnabled(true); 384 m_setCurrentBrightness->setEnabled(true);
385 m_hBright->setEnabled(true);
383 } 386 }
384 m_disp->setImage( inf ); 387 m_disp->setImage( inf );
385 if (m_SmallWindow) { 388 if (m_SmallWindow) {
386 if (m_gPrevNext->isEnabled()==false) { 389 if (m_gPrevNext->isEnabled()==false) {
@@ -642,17 +645,22 @@ void PMainWindow::setupActions()
642 m_aForceSmall = 0; 645 m_aForceSmall = 0;
643 } 646 }
644 m_setCurrentBrightness = new QAction(tr("Display brightness..."), 0, 0, this, 0, false); 647 m_setCurrentBrightness = new QAction(tr("Display brightness..."), 0, 0, this, 0, false);
645 connect(m_setCurrentBrightness,SIGNAL(activated()),this,SLOT(setupBrightness())); 648 connect(m_setCurrentBrightness,SIGNAL(activated()),this,SLOT(setupBrightness()));
649 m_IncBrightness = new QAction(tr("Increase brightness by 5"),Resource::loadIconSet( "up" ),0, 0, this, 0, false);
650 m_DecBrightness = new QAction(tr("Decrease brightness by 5"),Resource::loadIconSet( "down" ),0, 0, this, 0, false);
651 m_hBright = new QActionGroup(this,"actioncollection",false),
652 m_hBright->insert(m_IncBrightness);
653 m_hBright->insert(m_DecBrightness);
646} 654}
647 655
648void PMainWindow::setupBrightness() 656void PMainWindow::setupBrightness()
649{ 657{
650 if (!m_disp) { 658 if (!m_disp) {
651 return; 659 return;
652 } 660 }
653 int lb = m_disp->Intensity(); 661 int lb = m_disp->Intensity();
654 if (Valuebox(0,-255,255,lb,lb)) { 662 if (Valuebox(0,-100,100,lb,lb)) {
655 m_disp->setIntensity(lb,true); 663 m_disp->setIntensity(lb,true);
656 } 664 }
657} 665}
658 666
@@ -723,8 +731,12 @@ void PMainWindow::setupMenu()
723 dispMenu->insertSeparator(); 731 dispMenu->insertSeparator();
724 m_gPrevNext->addTo(dispMenu); 732 m_gPrevNext->addTo(dispMenu);
725 m_setCurrentBrightness->addTo(dispMenu); 733 m_setCurrentBrightness->addTo(dispMenu);
726 m_setCurrentBrightness->setEnabled(false); 734 m_setCurrentBrightness->setEnabled(false);
735 dispMenu->insertSeparator();
736 m_hBright->addTo(dispMenu);
737 m_hBright->setEnabled(false);
738
727 if (m_aForceSmall) { 739 if (m_aForceSmall) {
728 dispMenu->insertSeparator(); 740 dispMenu->insertSeparator();
729 m_aForceSmall->addTo(dispMenu); 741 m_aForceSmall->addTo(dispMenu);
730 } 742 }
diff --git a/noncore/graphics/opie-eye/gui/mainwindow.h b/noncore/graphics/opie-eye/gui/mainwindow.h
index 62b446b..c3b51f6 100644
--- a/noncore/graphics/opie-eye/gui/mainwindow.h
+++ b/noncore/graphics/opie-eye/gui/mainwindow.h
@@ -90,11 +90,12 @@ private:
90 QToolBar *toolBar; 90 QToolBar *toolBar;
91 QPopupMenu *fileMenu,*dispMenu,*fsMenu,*listviewMenu,*settingsMenu; 91 QPopupMenu *fileMenu,*dispMenu,*fsMenu,*listviewMenu,*settingsMenu;
92 QAction*m_aShowInfo,*m_aBeam,*m_aTrash,*m_aViewfile,*m_aDirUp,*m_aStartSlide; 92 QAction*m_aShowInfo,*m_aBeam,*m_aTrash,*m_aViewfile,*m_aDirUp,*m_aStartSlide;
93 QAction*m_aHideToolbar,*m_aSetup,*m_aDirName,*m_aDirShort,*m_aDirLong; 93 QAction*m_aHideToolbar,*m_aSetup,*m_aDirName,*m_aDirShort,*m_aDirLong;
94 QActionGroup *m_gListViewMode,*m_gDisplayType,*m_gPrevNext,*m_hGroup; 94 QActionGroup *m_gListViewMode,*m_gDisplayType,*m_gPrevNext,*m_hGroup,*m_hBright;
95 QAction *m_aNext,*m_aPrevious,*m_aFullScreen; 95 QAction *m_aNext,*m_aPrevious,*m_aFullScreen;
96 QAction *m_aAutoRotate,*m_aUnscaled,*m_aZoomer,*m_aForceSmall,*m_setCurrentBrightness; 96 QAction *m_aAutoRotate,*m_aUnscaled,*m_aZoomer,*m_aForceSmall,*m_setCurrentBrightness;
97 QAction *m_IncBrightness,*m_DecBrightness;
97 98
98 /* init funs */ 99 /* init funs */
99 void readConfig(); 100 void readConfig();
100 void setupActions(); 101 void setupActions();