qtsmartgraphics  2.1.1
A simple library that improves the user experience when displaying images by Qt's QLabel and QGraphicsView.
QSmartGraphicsView Class Reference

#include <qsmartgraphicsview.h>

Public Slots

void updateImg ()
 

Signals

void sendItemMouXY (const double x, const double y)
 Sends the mouse coordinate of the image when clicked the image. More...
 
void sendMousePress ()
 Sends signal if the mouse is pressed. More...
 
void sendSelectedRegion (const QImage &img)
 Send selected region selected by the rubberBand. More...
 

Public Member Functions

 QSmartGraphicsView (QWidget *parent=0)
 
 ~QSmartGraphicsView ()
 
void initialize (const int _img_num, const int width, const int height, int changeRow=4)
 Must initial before setting any image to QSmartGraphicsView. More...
 
void setImagefromQImage (const QImage &qimg)
 Set a single image (QImage) to QSmartGraphicsView. More...
 
void setImagefromQImage (const std::vector< QImage > &qimgs)
 Set a multiple images (QImage) to QSmartGraphicsView. More...
 
bool isInitial () const
 Returns true if initialized before. More...
 
int getImgNum ()
 Returns the number of images set in QSmartGraphicsView. More...
 

Protected Member Functions

void wheelEvent (QWheelEvent *event)
 
void mousePressEvent (QMouseEvent *event)
 
void mouseDoubleClickEvent (QMouseEvent *event)
 
void mouseMoveEvent (QMouseEvent *event)
 
void mouseReleaseEvent (QMouseEvent *event)
 
void keyPressEvent (QKeyEvent *event)
 

Detailed Description

QSmartGraphicsView main class. Provides user a more advance image viewing widget.

Definition at line 46 of file qsmartgraphicsview.h.

Inheritance diagram for QSmartGraphicsView:

Constructor & Destructor Documentation

QSmartGraphicsView::QSmartGraphicsView ( QWidget *  parent = 0)
explicit

Definition at line 13 of file qsmartgraphicsview.cpp.

QSmartGraphicsView::~QSmartGraphicsView ( )

Definition at line 77 of file qsmartgraphicsview.cpp.

Member Function Documentation

int QSmartGraphicsView::getImgNum ( )
inline

Returns the number of images set in QSmartGraphicsView.

Definition at line 62 of file qsmartgraphicsview.h.

void QSmartGraphicsView::initialize ( const int  _img_num,
const int  width,
const int  height,
int  changeRow = 4 
)

Must initial before setting any image to QSmartGraphicsView.

Definition at line 83 of file qsmartgraphicsview.cpp.

bool QSmartGraphicsView::isInitial ( ) const
inline

Returns true if initialized before.

Definition at line 61 of file qsmartgraphicsview.h.

void QSmartGraphicsView::keyPressEvent ( QKeyEvent *  event)
protected

Definition at line 334 of file qsmartgraphicsview.cpp.

void QSmartGraphicsView::mouseDoubleClickEvent ( QMouseEvent *  event)
protected

Definition at line 292 of file qsmartgraphicsview.cpp.

void QSmartGraphicsView::mouseMoveEvent ( QMouseEvent *  event)
protected

Definition at line 199 of file qsmartgraphicsview.cpp.

void QSmartGraphicsView::mousePressEvent ( QMouseEvent *  event)
protected

Definition at line 245 of file qsmartgraphicsview.cpp.

void QSmartGraphicsView::mouseReleaseEvent ( QMouseEvent *  event)
protected

Definition at line 303 of file qsmartgraphicsview.cpp.

void QSmartGraphicsView::sendItemMouXY ( const double  x,
const double  y 
)
signal

Sends the mouse coordinate of the image when clicked the image.

void QSmartGraphicsView::sendMousePress ( )
signal

Sends signal if the mouse is pressed.

void QSmartGraphicsView::sendSelectedRegion ( const QImage &  img)
signal

Send selected region selected by the rubberBand.

void QSmartGraphicsView::setImagefromQImage ( const QImage &  qimg)

Set a single image (QImage) to QSmartGraphicsView.

Definition at line 146 of file qsmartgraphicsview.cpp.

void QSmartGraphicsView::setImagefromQImage ( const std::vector< QImage > &  qimgs)

Set a multiple images (QImage) to QSmartGraphicsView.

Definition at line 161 of file qsmartgraphicsview.cpp.

void QSmartGraphicsView::updateImg ( )
slot

Definition at line 151 of file qsmartgraphicsview.cpp.

void QSmartGraphicsView::wheelEvent ( QWheelEvent *  event)
protected

Definition at line 173 of file qsmartgraphicsview.cpp.


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