qtsmartgraphics
2.1.1
A simple library that improves the user experience when displaying images by Qt's QLabel and QGraphicsView.
|
#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) |
QSmartGraphicsView main class. Provides user a more advance image viewing widget.
Definition at line 46 of file qsmartgraphicsview.h.
|
explicit |
Definition at line 13 of file qsmartgraphicsview.cpp.
QSmartGraphicsView::~QSmartGraphicsView | ( | ) |
Definition at line 77 of file qsmartgraphicsview.cpp.
|
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.
|
inline |
Returns true if initialized before.
Definition at line 61 of file qsmartgraphicsview.h.
|
protected |
Definition at line 334 of file qsmartgraphicsview.cpp.
|
protected |
Definition at line 292 of file qsmartgraphicsview.cpp.
|
protected |
Definition at line 199 of file qsmartgraphicsview.cpp.
|
protected |
Definition at line 245 of file qsmartgraphicsview.cpp.
|
protected |
Definition at line 303 of file qsmartgraphicsview.cpp.
|
signal |
Sends the mouse coordinate of the image when clicked the image.
|
signal |
Sends signal if the mouse is pressed.
|
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.
|
slot |
Definition at line 151 of file qsmartgraphicsview.cpp.
|
protected |
Definition at line 173 of file qsmartgraphicsview.cpp.