-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathwidget.h
More file actions
45 lines (39 loc) · 820 Bytes
/
widget.h
File metadata and controls
45 lines (39 loc) · 820 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#ifndef WIDGET_H
#define WIDGET_H
#include <QWidget>
#include <QPainter>
#include <QPixmap>
#include <QMouseEvent>
#include <QFileDialog>
#include <QImage>
#include <QRgb>
#include <QMessageBox>
#include <string>
#include <sstream>
#include <QObject>
namespace Ui {
class Widget;
}
class Widget : public QWidget
{
Q_OBJECT
public:
explicit Widget(QWidget *parent = 0);
~Widget();
private:
Ui::Widget *ui;
QPixmap _originalImage;
QString _noImageMessage;
QColor _backgroundColor;
public:
void setPixmap(QPixmap pixmap);
QPixmap pixmap(){return _originalImage;}
signals:
void pixmapChanged();
protected:
virtual void mouseDoubleClickEvent(QMouseEvent *event);
virtual void paintEvent(QPaintEvent *event);
private slots:
void on_pushButton_clicked();
};
#endif // WIDGET_H