WFrame Class Reference

DrawQt application management. This class is the central class of our application. It directly inherits from QMainWindow which is the main Qt window and also interacts with the whole list of displayed selections. More...

#include <wframe.h>

Collaboration diagram for WFrame:

Collaboration graph
[legend]

List of all members.

Public Slots

bool ReadImage ()
 Method called when a new image is selected.
void UpdateStatusBar (const QString &s)
 Method called by visu2d when a modification in the info bar is needed.
void ClickRectangle ()
 Method called when the Rectangle button is clicked.
void UpdateColorMap ()
 Method called when the palette is updated.
void UpdateStats (Selection *)
 Called when the selection is modified. Used to update the stats window.

Public Member Functions

 WFrame (QMainWindow *parent=0, const QString &applicationPath="", Qt::WFlags=Qt::Window)
 Constructor of the class. Initialize the menus, the toolbar and the images and information regions.
virtual ~WFrame ()
 Destructor of the class.

Protected Member Functions

void InitMenus ()
 Initialize the menus.
void InitToolBar ()
 Initialize the toolbar.
void SetType (QAction *tb, SHAPE_TYPE type)
 Modify the selected shape type.

Private Attributes

Palettem_palette
 Pointer to the palette widget.
Visu2Dm_visu2d
 Pointer to the visualization widget.
WStatisticsm_wstats
 Pointer to the statistics widget.
Imagem_pImage
 Pointer to our image.
QString m_applicationPath
 absolute path to the binary of this application
QAction * m_actionRectangle
 Events associated to the 'rectangle' button.
QAction * m_actionCurrentShape
 Pointer used to store the current shape. No button is directly associated.
QLabel * m_label


Detailed Description

DrawQt application management. This class is the central class of our application. It directly inherits from QMainWindow which is the main Qt window and also interacts with the whole list of displayed selections.

Definition at line 26 of file wframe.h.


Constructor & Destructor Documentation

WFrame::WFrame ( QMainWindow *  parent = 0,
const QString &  applicationPath = "",
Qt::WFlags  fl = Qt::Window 
)

Constructor of the class. Initialize the menus, the toolbar and the images and information regions.

Construction of the main window: contains the menus, the toolbar and the visualization window (visu2d).

Parameters:
parent : parent of this window. here, 0 means this is the main window
applicationPath : absolute path to the executable of this application

Definition at line 27 of file wframe.cpp.

References InitMenus(), InitToolBar(), m_applicationPath, m_label, m_palette, m_pImage, m_visu2d, m_wstats, UpdateColorMap(), UpdateStats(), and UpdateStatusBar().

Here is the call graph for this function:

WFrame::~WFrame (  )  [virtual]

Destructor of the class.

Destroys the object and frees any allocated resources

Definition at line 66 of file wframe.cpp.

References m_pImage.


Member Function Documentation

bool WFrame::ReadImage (  )  [slot]

Method called when a new image is selected.

Returns:
true if the image is correct, false otherwise

Definition at line 117 of file wframe.cpp.

References Palette::ChangeDataMinMax(), Image::GetMax(), Image::GetMin(), m_palette, m_pImage, m_visu2d, Image::ReadFile(), and Visu2D::UpdateDataAndPixmap().

Referenced by InitMenus().

void WFrame::UpdateStatusBar ( const QString &  s  )  [slot]

Method called by visu2d when a modification in the info bar is needed.

Parameters:
s new string to put in the info bar

Definition at line 146 of file wframe.cpp.

References m_label.

Referenced by WFrame().

void WFrame::ClickRectangle (  )  [slot]

Method called when the Rectangle button is clicked.

Definition at line 133 of file wframe.cpp.

References m_actionRectangle, RECTANGLE, and SetType().

Referenced by InitToolBar().

void WFrame::UpdateColorMap (  )  [slot]

Method called when the palette is updated.

Definition at line 151 of file wframe.cpp.

References m_palette, m_pImage, m_visu2d, and Visu2D::UpdateDataAndPixmap().

Referenced by WFrame().

void WFrame::UpdateStats ( Selection pSelection  )  [slot]

Called when the selection is modified. Used to update the stats window.

Definition at line 156 of file wframe.cpp.

References m_pImage, m_wstats, and WStatistics::UpdateStats().

Referenced by WFrame().

void WFrame::InitMenus (  )  [protected]

Initialize the menus.

Initialization of the menus : file, palette

Definition at line 74 of file wframe.cpp.

References Palette::GetMenu(), m_palette, and ReadImage().

Referenced by WFrame().

Here is the call graph for this function:

Here is the caller graph for this function:

void WFrame::InitToolBar (  )  [protected]

Initialize the toolbar.

Definition at line 87 of file wframe.cpp.

References ClickRectangle(), m_actionCurrentShape, m_actionRectangle, m_applicationPath, m_visu2d, RECTANGLE, and Visu2D::SetShapeType().

Referenced by WFrame().

Here is the call graph for this function:

Here is the caller graph for this function:

void WFrame::SetType ( QAction *  tb,
SHAPE_TYPE  type 
) [protected]

Modify the selected shape type.

Definition at line 138 of file wframe.cpp.

References m_actionCurrentShape, m_visu2d, and Visu2D::SetShapeType().

Referenced by ClickRectangle().

Here is the call graph for this function:


Member Data Documentation

Pointer to the palette widget.

Definition at line 51 of file wframe.h.

Referenced by InitMenus(), ReadImage(), UpdateColorMap(), and WFrame().

Pointer to the visualization widget.

Definition at line 54 of file wframe.h.

Referenced by InitToolBar(), ReadImage(), SetType(), UpdateColorMap(), and WFrame().

Pointer to the statistics widget.

Definition at line 57 of file wframe.h.

Referenced by UpdateStats(), and WFrame().

Image* WFrame::m_pImage [private]

Pointer to our image.

Definition at line 60 of file wframe.h.

Referenced by ReadImage(), UpdateColorMap(), UpdateStats(), WFrame(), and ~WFrame().

QString WFrame::m_applicationPath [private]

absolute path to the binary of this application

Definition at line 63 of file wframe.h.

Referenced by InitToolBar(), and WFrame().

QAction* WFrame::m_actionRectangle [private]

Events associated to the 'rectangle' button.

Definition at line 66 of file wframe.h.

Referenced by ClickRectangle(), and InitToolBar().

QAction* WFrame::m_actionCurrentShape [private]

Pointer used to store the current shape. No button is directly associated.

Definition at line 69 of file wframe.h.

Referenced by InitToolBar(), and SetType().

QLabel* WFrame::m_label [private]

Definition at line 71 of file wframe.h.

Referenced by UpdateStatusBar(), and WFrame().


The documentation for this class was generated from the following files:

Generated on Tue Sep 13 10:10:33 2011 for DrawQt by  doxygen 1.5.6