qtsmartgraphics  2.1.1
A simple library that improves the user experience when displaying images by Qt's QLabel and QGraphicsView.
qsmartlabel.h
Go to the documentation of this file.
1 /*M///////////////////////////////////////////////////////////////////////////////////////
2 // Written by Qt 5.3
3 // Original by Shih-Jhong Yu, Revised by KKyang.
4 // Protected under LPGLv3 license.
5 //M*/
6 
7 #ifndef SMARTLABEL_H
8 #define SMARTLABEL_H
9 
10 #include <QDateTime>
11 #include <QDebug>
12 #include <QImage>
13 #include <QFileInfo>
14 #include <QLabel>
15 
16 
17 
18 class QSmartLabel : public QLabel
19 {
20  Q_OBJECT
21 public:
22  explicit QSmartLabel(QWidget *parent = 0);
23  void mousePressEvent(QMouseEvent *ev);
24  void mouseReleaseEvent(QMouseEvent *ev);
25 signals:
26  // 0~1, 0~1
27  void sendMouXY(double x, double y);
28 public slots:
29 private slots:
30  void on_saveAction_triggered();
31 private:
32 
33  QAction *saveAction;
34 };
35 
36 #endif // SMARTLABEL_H
void mouseReleaseEvent(QMouseEvent *ev)
Definition: qsmartlabel.cpp:30
QSmartLabel(QWidget *parent=0)
Definition: qsmartlabel.cpp:6
void sendMouXY(double x, double y)
Sends the mouse coordinate of the image when clicked the image.
void mousePressEvent(QMouseEvent *ev)
Definition: qsmartlabel.cpp:15