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

mainwindow.h

Go to the documentation of this file.
00001 /*
00002  * GPLv2 zecke@handhelds.org
00003  * No WArranty...
00004  */
00005 
00006 #ifndef PHUNK_MAIN_WINDOW_H
00007 #define PHUNK_MAIN_WINDOW_H
00008 
00009 #include <opie2/oconfig.h>
00010 
00011 #include <qmainwindow.h>
00012 
00013 
00014 
00015 namespace Opie {
00016 namespace Ui{
00017     class OWidgetStack;
00018 }
00019 namespace Core{
00020     class OKeyConfigManager;
00021 }
00022 }
00023 
00024 class ImageView;
00025 class ImageWidget;
00026 class PIconView;
00027 class imageinfo;
00028 class QMenuBar;
00029 class QToolBar;
00030 class QPopupMenu;
00031 class QAction;
00032 class QActionGroup;
00033 class StorageInfo;
00034 
00035 class PMainWindow : public QMainWindow {
00036     Q_OBJECT
00037     enum Views { IconView,  ImageInfo, ImageDisplay };
00038 public:
00039     static QString appName() { return QString::fromLatin1("opie-eye" ); }
00040     PMainWindow(QWidget*, const char*, WFlags );
00041     ~PMainWindow();
00042 
00043 signals:
00044     void configChanged();
00045     void changeDir( const QString& );
00046     void changeListMode(int);
00047 
00048 public slots:
00049     void slotShowInfo( const QString& inf );
00050     void slotDisplay( const QString& inf );
00051     void slotReturn();
00052     void slotRotateToggled(bool);
00053     void slotScaleToggled(bool);
00054     void slotZoomerToggled(bool);
00055     void slotToggleZoomer();
00056     void slotToggleAutorotate();
00057     void slotToggleAutoscale();
00058     void setDocument( const QString& );
00059     virtual void slotToggleFullScreen();
00060     virtual void slotFullScreenToggled(bool);
00061     virtual void polish();
00062 
00063 protected slots:
00064     void raiseIconView();
00065     void closeEvent( QCloseEvent* );
00066     void showToolbar(bool);
00067     void listviewselected(QAction*);
00068     void slotFullScreenButton(bool);
00069     void check_view_fullscreen();
00070     virtual void setupBrightness();
00071 
00072 private:
00073     template<class T>  void initT( const char* name, T**, int );
00074     void initInfo();
00075     void initDisp();
00076     void setupViewWindow(bool full, bool forceDisplay);
00077 
00078 private:
00079     Opie::Core::OConfig *m_cfg;
00080     Opie::Ui::OWidgetStack *m_stack;
00081     PIconView* m_view;
00082     imageinfo *m_info;
00083     ImageView *m_disp;
00084     bool autoSave:1;
00085     bool m_setDocCalled:1;
00086     bool m_polishDone:1;
00087     bool m_SmallWindow:1;
00088     int m_Intensity;
00089     QToolButton*fsButton;
00090     QToolBar *toolBar;
00091     QPopupMenu *fileMenu,*dispMenu,*fsMenu,*listviewMenu,*settingsMenu;
00092     QAction*m_aShowInfo,*m_aBeam,*m_aTrash,*m_aViewfile,*m_aDirUp,*m_aStartSlide;
00093     QAction*m_aHideToolbar,*m_aSetup,*m_aDirName,*m_aDirShort,*m_aDirLong;
00094     QActionGroup *m_gListViewMode,*m_gDisplayType,*m_gPrevNext,*m_hGroup,*m_hBright;
00095     QAction *m_aNext,*m_aPrevious,*m_aFullScreen;
00096     QAction *m_aAutoRotate,*m_aUnscaled,*m_aZoomer,*m_aForceSmall,*m_setCurrentBrightness;
00097     QAction *m_IncBrightness,*m_DecBrightness;
00098 
00099     /* init funs */
00100     void readConfig();
00101     void setupActions();
00102     void setupToolbar();
00103     void setupMenu();
00104     /* for the device submenu - ToDo: Merge with the special button */
00105     StorageInfo *m_storage;
00106     QMap<QString, QString> m_dev;
00107     static bool Valuebox(QWidget*parent,int min, int max, int current,int&store);
00108 
00109 private slots:
00110     void slotConfig();
00111     void slotSelectDir(int);
00112     void dirChanged();
00113     void slotForceSmall(bool);
00114 };
00115 
00116 #endif

Generated on Sat Nov 5 16:15:53 2005 for OPIE by  doxygen 1.4.2