-
Notifications
You must be signed in to change notification settings - Fork 8
/
imagecontainerwidget.h
44 lines (36 loc) · 1021 Bytes
/
imagecontainerwidget.h
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
#ifndef IMAGEWIDGET_H
#define IMAGEWIDGET_H
#include <QLabel>
#include <QMenu>
#include <QNetworkAccessManager>
#include <QNetworkReply>
#include "imageviewer.h"
#include "basicimagewidget.h"
class ImageContainerWidget : public QLabel, public BasicImageWidget
{
Q_OBJECT
public:
ImageContainerWidget(QWidget *parent = 0);
void openDialog();
void setImage(const QImage &image);
private slots:
void downloadFinished(QNetworkReply* reply);
void showContextMenu(const QPoint&);
private:
void setImage(const QString &fileName);
const QString & getText();
void mySetPixmap();
void saveDialog();
void dragEnterEvent(QDragEnterEvent *event);
void dropEvent(QDropEvent *event);
void mouseDoubleClickEvent(QMouseEvent * event);
QAction *_saveAsAction;
QAction *_unloadAction;
QAction *_loadAction;
QAction *_viewAction;
ImageViewer *m_viewer;
QMenu myMenu;
QString replaceText;
QNetworkAccessManager netManager;
};
#endif // IMAGEWIDGET_H