Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

imageview.h

Go to the documentation of this file.
00001 #ifndef _IMAGE_VIEW_H
00002 #define _IMAGE_VIEW_H
00003 
00004 #include <opie2/oimagescrollview.h>
00005 
00006 #include <qwidget.h>
00007 
00008 class QTimer;
00009 class QActionGroup;
00010 class QAction;
00011 
00012 class QCopChannel;
00013 
00014 namespace Opie {
00015     namespace Core {
00016         class OConfig;
00017         class OKeyConfigManager;
00018     }
00019 }
00020 
00021 class ImageView:public Opie::MM::OImageScrollView
00022 {
00023     Q_OBJECT
00024 
00025     enum ActionIds {
00026         ViewInfo,
00027         FullScreen,
00028         ShowNext,
00029         ShowPrevious,
00030         Zoomer,
00031         Autorotate,
00032         Autoscale,
00033         Incbrightness,
00034         Decbrightness
00035     };
00036 
00037 public:
00038     ImageView(Opie::Core::OConfig *cfg,QWidget* parent,const char* name = 0, WFlags fl = 0 );
00039     virtual ~ImageView();
00040     Opie::Core::OKeyConfigManager* manager();
00041     void setFullScreen(bool how,bool force=true);
00042     bool fullScreen(){return m_isFullScreen;}
00043     virtual void enableFullscreen();
00044     void stopSlide();
00045     void setMenuActions(QActionGroup*hGroup,QActionGroup*nextprevGroup, QActionGroup*disptypeGroup,QActionGroup*brightGroup);
00046     void setCloseIfHide(bool);
00047 
00048 signals:
00049     void dispImageInfo(const QString&);
00050     void dispNext();
00051     void dispPrev();
00052     void toggleFullScreen();
00053     void hideMe();
00054     void toggleZoomer();
00055     void toggleAutoscale();
00056     void toggleAutorotate();
00057     void incBrightness();
00058     void decBrightness();
00059 
00060 protected:
00061     Opie::Core::OConfig * m_cfg;
00062     Opie::Core::OKeyConfigManager*m_viewManager;
00063     void initKeys();
00064     bool m_isFullScreen:1;
00065     bool m_ignore_next_in:1;
00066     bool m_Rotated:1;
00067 
00068     int focus_in_count;
00069     QTimer*m_slideTimer;
00070     int m_slideValue;
00071     virtual void focusInEvent ( QFocusEvent * );
00072     QActionGroup *m_gDisplayType,*m_gPrevNext,*m_hGroup,*m_gBright;
00073     bool closeIfHide:1;
00074     QCopChannel* m_sysChannel;
00075     int m_rotation;
00076 
00077 public slots:
00078     virtual void hide();
00079     virtual void startSlide(int);
00080     virtual void nextSlide();
00081     virtual void systemMessage( const QCString&, const QByteArray& );
00082     virtual void slotIncBrightness();
00083     virtual void slotDecBrightness();
00084 
00085 protected slots:
00086     virtual void slotShowImageInfo();
00087     virtual void keyReleaseEvent(QKeyEvent * e);
00088     virtual void contentsMousePressEvent ( QMouseEvent * e);
00089 };
00090 
00091 #endif

Generated on Sat Nov 5 16:17:30 2005 for OPIE by  doxygen 1.4.2