Jafar
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Slots | Signals | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | Friends
jafar::qdisplay::Viewer Class Reference

This is the viewer, you can add ImageView to display on it, or overlay using Shape. More...


Detailed Description

This is the viewer, you can add ImageView to display on it, or overlay using Shape.

Definition at line 33 of file Viewer.hpp.

#include <Viewer.hpp>

List of all members.

Public Slots

void exportView ()

Signals

void onKeyPress (QKeyEvent *event)
void onMouseClick (QGraphicsSceneMouseEvent *mouseEvent, bool isClick)
void onMouseMove (QGraphicsSceneMouseEvent *mouseEvent)

Public Member Functions

 Viewer (int mosaicWidth=0, int mosaicHeight=0, QGraphicsScene *scene=0)
 Create a new viewer.
void setBackgroundColor (int R, int G, int B)
QGraphicsScene * scene ()
ImageViewimageItem (int row=0, int col=0)
void setImageView (ImageView *ii, int row=0, int col=0)
int rows ()
int cols ()
void addShape (qdisplay::Shape *si)
void splitVertical ()
void splitHorizontal ()
void addLine (qdisplay::Line *li)
void addPolyLine (qdisplay::PolyLine *pl)
bool isVisible ()
void scaleView (qreal scaleFactor)
 Scale the view.
void setWindowSize (int width, int height)
 Set the window size parameters.
void close ()
 Close the view.
void setTitle (const std::string &_title)
void setTitleWithMouseCoordinates (double x, double y)
std::string const & getTitle ()
void setStatusMessage (QString &infoString, int timeout=0)
 Set the status message appearing in the status bar.
void setStatusMessage (const char *infoString, int timeout=0)
 Overloading of function setStatusMessage(QString&, int)
void exportView (const std::string &fileName)
 Export the view to the given file name.

Protected Member Functions

virtual void contextMenuEvent (QContextMenuEvent *event)
virtual void keyPressEvent (QKeyEvent *event)
virtual void wheelEvent (QWheelEvent *event)
virtual void resizeEvent (QResizeEvent *event)
virtual void mouseReleaseEvent (QMouseEvent *event)
virtual void mouseMoveEvent (QMouseEvent *event)

Private Member Functions

void createCursor ()
 Draw the custom cursor crossCursor by build our own QPixmap and adjusting the perfect hostpot for precise pointing.

Private Attributes

QGraphicsScene * m_scene
QMap< int, QMap< int,
ImageView * > > 
m_imageMosaic
int m_mosaicWidth
int m_mosaicHeight
int m_windowWidth
int m_windowHeight
double m_currentZ
QAction * m_exportView
std::string title
QCursor * crossCursor
 This cursor is a custom cursor created in the Viewer constructor to provide a precise cross cursor similar to the crossHair cursor without double bars.
QStatusBar * statusBar
 Status bar to display information statusBar->showMessage( QString)
QStatusBar * statusBarShadow

Friends

class MouseGraphicsScene

Constructor & Destructor Documentation

jafar::qdisplay::Viewer::Viewer ( int  mosaicWidth = 0,
int  mosaicHeight = 0,
QGraphicsScene *  scene = 0 
)

Create a new viewer.

Parameters:
mosaicWidththe width of one cell of the mosaic
mosaicHeightthe height of one cell of the mosaic

Member Function Documentation

Parameters:
sia Line to display on the scene.
Parameters:
sia Shape to display on the scene.
ImageView* jafar::qdisplay::Viewer::imageItem ( int  row = 0,
int  col = 0 
) [inline]
Returns:
the image item of cell (row,col)
Parameters:
rowrow number
colcolumn number

Definition at line 51 of file Viewer.hpp.

void jafar::qdisplay::Viewer::scaleView ( qreal  scaleFactor)

Scale the view.

Parameters:
scaleFactorthe scale factor to appply to the view
void jafar::qdisplay::Viewer::setImageView ( ImageView ii,
int  row = 0,
int  col = 0 
)
Parameters:
iian ImageView to display on the scene.
rowthe number of the row in the mosaic
colthe number of the column in the mosaic
void jafar::qdisplay::Viewer::setStatusMessage ( QString &  infoString,
int  timeout = 0 
)

Set the status message appearing in the status bar.

Shadow text will also be set.

Parameters:
infoStringQString(const char*) object. String object to display
timeoutMilliseconds before the message disappears (same effect as statusBar->clearMessage())
void jafar::qdisplay::Viewer::setStatusMessage ( const char *  infoString,
int  timeout = 0 
)

Overloading of function setStatusMessage(QString&, int)

Parameters:
infoStringString to display
timeoutMilliseconds before the message disappears (same effect as statusBar->clearMessage())
void jafar::qdisplay::Viewer::setWindowSize ( int  width,
int  height 
)

Set the window size parameters.

Parameters:
widthwidth of window
heightheight of window

Member Data Documentation

QStatusBar* jafar::qdisplay::Viewer::statusBar [private]

Status bar to display information statusBar->showMessage( QString)

See also:
setStatusMessage

Definition at line 155 of file Viewer.hpp.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on Wed Oct 15 2014 00:37:43 for Jafar by doxygen 1.7.6.1
LAAS-CNRS