Diffstat (limited to 'noncore/graphics/opie-eye/gui/imageview.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/graphics/opie-eye/gui/imageview.h | 12 |
1 files changed, 9 insertions, 3 deletions
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 | |||
@@ -1,85 +1,91 @@ | |||
1 | #ifndef _IMAGE_VIEW_H | 1 | #ifndef _IMAGE_VIEW_H |
2 | #define _IMAGE_VIEW_H | 2 | #define _IMAGE_VIEW_H |
3 | 3 | ||
4 | #include <opie2/oimagescrollview.h> | 4 | #include <opie2/oimagescrollview.h> |
5 | 5 | ||
6 | #include <qwidget.h> | 6 | #include <qwidget.h> |
7 | 7 | ||
8 | class QTimer; | 8 | class QTimer; |
9 | class QActionGroup; | 9 | class QActionGroup; |
10 | class QAction; | 10 | class QAction; |
11 | 11 | ||
12 | class QCopChannel; | 12 | class QCopChannel; |
13 | 13 | ||
14 | namespace Opie { | 14 | namespace Opie { |
15 | namespace Core { | 15 | namespace Core { |
16 | class OConfig; | 16 | class OConfig; |
17 | class OKeyConfigManager; | 17 | class OKeyConfigManager; |
18 | } | 18 | } |
19 | } | 19 | } |
20 | 20 | ||
21 | class ImageView:public Opie::MM::OImageScrollView | 21 | class ImageView:public Opie::MM::OImageScrollView |
22 | { | 22 | { |
23 | Q_OBJECT | 23 | Q_OBJECT |
24 | 24 | ||
25 | enum ActionIds { | 25 | enum ActionIds { |
26 | ViewInfo, | 26 | ViewInfo, |
27 | FullScreen, | 27 | FullScreen, |
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 | ||
35 | public: | 37 | public: |
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 ); |
37 | virtual ~ImageView(); | 39 | virtual ~ImageView(); |
38 | Opie::Core::OKeyConfigManager* manager(); | 40 | Opie::Core::OKeyConfigManager* manager(); |
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 | ||
46 | signals: | 48 | signals: |
47 | void dispImageInfo(const QString&); | 49 | void dispImageInfo(const QString&); |
48 | void dispNext(); | 50 | void dispNext(); |
49 | void dispPrev(); | 51 | void dispPrev(); |
50 | void toggleFullScreen(); | 52 | void toggleFullScreen(); |
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 | ||
56 | protected: | 60 | protected: |
57 | Opie::Core::OConfig * m_cfg; | 61 | Opie::Core::OConfig * m_cfg; |
58 | Opie::Core::OKeyConfigManager*m_viewManager; | 62 | Opie::Core::OKeyConfigManager*m_viewManager; |
59 | void initKeys(); | 63 | void initKeys(); |
60 | bool m_isFullScreen:1; | 64 | bool m_isFullScreen:1; |
61 | bool m_ignore_next_in:1; | 65 | bool m_ignore_next_in:1; |
62 | bool m_Rotated:1; | 66 | bool m_Rotated:1; |
63 | 67 | ||
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 | ||
73 | public slots: | 77 | 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 | ||
79 | protected slots: | 85 | protected slots: |
80 | virtual void slotShowImageInfo(); | 86 | virtual void slotShowImageInfo(); |
81 | virtual void keyReleaseEvent(QKeyEvent * e); | 87 | virtual void keyReleaseEvent(QKeyEvent * e); |
82 | virtual void contentsMousePressEvent ( QMouseEvent * e); | 88 | virtual void contentsMousePressEvent ( QMouseEvent * e); |
83 | }; | 89 | }; |
84 | 90 | ||
85 | #endif | 91 | #endif |