-rw-r--r-- | noncore/graphics/opie-eye/gui/basesetup.cpp | 11 | ||||
-rw-r--r-- | noncore/graphics/opie-eye/gui/iconview.cpp | 22 | ||||
-rw-r--r-- | noncore/graphics/opie-eye/gui/iconview.h | 4 | ||||
-rw-r--r-- | noncore/graphics/opie-eye/gui/imageview.cpp | 37 | ||||
-rw-r--r-- | noncore/graphics/opie-eye/gui/imageview.h | 12 | ||||
-rw-r--r-- | noncore/graphics/opie-eye/gui/mainwindow.cpp | 16 | ||||
-rw-r--r-- | noncore/graphics/opie-eye/gui/mainwindow.h | 3 |
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 | |||
@@ -47,8 +47,8 @@ BaseSetup::BaseSetup(Opie::Core::OConfig *a_cfg,QWidget * parent, const char * n | |||
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" ); |
@@ -74,12 +74,13 @@ BaseSetup::BaseSetup(Opie::Core::OConfig *a_cfg,QWidget * parent, const char * n | |||
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 | ||
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 | |||
@@ -36,6 +36,10 @@ | |||
36 | 36 | ||
37 | using Opie::Core::OKeyConfigItem; | 37 | using Opie::Core::OKeyConfigItem; |
38 | 38 | ||
39 | const int PIconView::sMAX_ICON_SIZE = 128; | ||
40 | const int PIconView::sMIN_ICON_SIZE = 12; | ||
41 | const 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 | */ |
@@ -222,8 +226,8 @@ PIconView::PIconView( QWidget* wid, Opie::Core::OConfig* cfg ) | |||
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(); |
@@ -408,8 +412,8 @@ void PIconView::resetView() { | |||
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; |
@@ -422,7 +426,7 @@ void PIconView::resetView() { | |||
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; |
@@ -833,11 +837,11 @@ void PIconView::slotChangeMode( int mode ) { | |||
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; |
@@ -888,7 +892,7 @@ void PIconView::calculateGrid(QResizeEvent* re) | |||
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; |
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 | |||
@@ -37,6 +37,10 @@ public: | |||
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 | |||
40 | signals: | 44 | signals: |
41 | void sig_showInfo( const QString& ); | 45 | void sig_showInfo( const QString& ); |
42 | void sig_display(const QString&); | 46 | void sig_display(const QString&); |
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 | |||
@@ -29,6 +29,7 @@ ImageView::ImageView(Opie::Core::OConfig *cfg, QWidget* parent, const char* name | |||
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()? |
@@ -39,11 +40,28 @@ ImageView::ImageView(Opie::Core::OConfig *cfg, QWidget* parent, const char* name | |||
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 | ||
51 | void ImageView::slotIncBrightness() | ||
52 | { | ||
53 | int lb = Intensity()+5; | ||
54 | if (lb>100) lb=100; | ||
55 | setIntensity(lb,true); | ||
56 | } | ||
57 | |||
58 | void ImageView::slotDecBrightness() | ||
59 | { | ||
60 | int lb = Intensity()-5; | ||
61 | if (lb<-100) lb=-100; | ||
62 | setIntensity(lb,true); | ||
63 | } | ||
64 | |||
47 | void ImageView::systemMessage( const QCString& msg, const QByteArray& data ) | 65 | void ImageView::systemMessage( const QCString& msg, const QByteArray& data ) |
48 | { | 66 | { |
49 | int _newrotation; | 67 | int _newrotation; |
@@ -60,11 +78,12 @@ void ImageView::systemMessage( const QCString& msg, const QByteArray& data ) | |||
60 | } | 78 | } |
61 | } | 79 | } |
62 | 80 | ||
63 | void ImageView::setMenuActions(QActionGroup*hGroup,QActionGroup*nextprevGroup, QActionGroup*disptypeGroup) | 81 | void 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 | ||
70 | ImageView::~ImageView() | 89 | ImageView::~ImageView() |
@@ -174,6 +193,15 @@ void ImageView::initKeys() | |||
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 | } |
@@ -223,6 +251,10 @@ void ImageView::contentsMousePressEvent ( QMouseEvent * e) | |||
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()) ); |
@@ -235,6 +267,9 @@ void ImageView::contentsMousePressEvent ( QMouseEvent * e) | |||
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 | ||
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 | |||
@@ -29,7 +29,9 @@ class ImageView:public Opie::MM::OImageScrollView | |||
29 | ShowPrevious, | 29 | ShowPrevious, |
30 | Zoomer, | 30 | Zoomer, |
31 | Autorotate, | 31 | Autorotate, |
32 | Autoscale | 32 | Autoscale, |
33 | Incbrightness, | ||
34 | Decbrightness | ||
33 | }; | 35 | }; |
34 | 36 | ||
35 | public: | 37 | public: |
@@ -40,7 +42,7 @@ public: | |||
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 | ||
46 | signals: | 48 | signals: |
@@ -52,6 +54,8 @@ signals: | |||
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 | ||
56 | protected: | 60 | protected: |
57 | Opie::Core::OConfig * m_cfg; | 61 | Opie::Core::OConfig * m_cfg; |
@@ -65,7 +69,7 @@ protected: | |||
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; |
@@ -75,6 +79,8 @@ public slots: | |||
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 | ||
79 | protected slots: | 85 | protected slots: |
80 | virtual void slotShowImageInfo(); | 86 | virtual void slotShowImageInfo(); |
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 | |||
@@ -265,7 +265,7 @@ void PMainWindow::initDisp() { | |||
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()); |
@@ -279,6 +279,8 @@ void PMainWindow::initDisp() { | |||
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 | } |
@@ -380,6 +382,7 @@ void PMainWindow::slotDisplay( const QString& inf ) { | |||
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) { |
@@ -643,6 +646,11 @@ void PMainWindow::setupActions() | |||
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 | ||
648 | void PMainWindow::setupBrightness() | 656 | void PMainWindow::setupBrightness() |
@@ -651,7 +659,7 @@ void PMainWindow::setupBrightness() | |||
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 | } |
@@ -724,6 +732,10 @@ void PMainWindow::setupMenu() | |||
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); |
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 | |||
@@ -91,9 +91,10 @@ private: | |||
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(); |