00001 00007 #ifndef WFRAME_H 00008 #define WFRAME_H 00009 00010 #include <QtGui/qmainwindow.h> 00011 #include "defs.h" 00012 00013 class Visu2D; 00014 class Palette; 00015 class Selection; 00016 class WStatistics; 00017 class Image; 00018 class QLabel; 00019 00026 class WFrame : public QMainWindow 00027 { 00028 // the Q_OBJECT macro is mandatory to tell Qt to inject the necessary 00029 // code for the internal communication mechanism of the Qt classes 00030 // (i.e. the signal/slots) 00031 Q_OBJECT 00032 00033 public: 00034 00041 WFrame(QMainWindow* parent = 0,const QString& applicationPath= "", Qt::WFlags = Qt::Window ); 00042 00046 virtual ~WFrame(); 00047 00048 private: 00049 00051 Palette* m_palette; 00052 00054 Visu2D* m_visu2d; 00055 00057 WStatistics *m_wstats; 00058 00060 Image *m_pImage; 00061 00063 QString m_applicationPath; 00064 00066 QAction *m_actionRectangle; 00067 00069 QAction *m_actionCurrentShape; 00070 00071 QLabel* m_label; 00072 00073 public slots: 00078 bool ReadImage(); 00079 00084 void UpdateStatusBar(const QString& s); 00085 00089 void ClickRectangle(); 00090 00094 void UpdateColorMap(); 00095 00099 void UpdateStats(Selection*); 00100 00101 protected: 00103 void InitMenus(); 00104 00106 void InitToolBar(); 00107 00109 void SetType(QAction* tb, SHAPE_TYPE type); 00110 }; 00111 00112 #endif // WFRAME_H