-
Notifications
You must be signed in to change notification settings - Fork 0
/
widget.h
44 lines (34 loc) · 866 Bytes
/
widget.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 WIDGET_H
#define WIDGET_H
#include <QWidget>
class PreviewWidget;
class QProcess;
namespace Ui {
class Widget;
}
class Widget : public QWidget
{
Q_OBJECT
public:
explicit Widget(QWidget *parent = nullptr);
~Widget();
protected:
void resizeEvent(QResizeEvent *ev);
private slots:
void on_sourceBrowse_clicked();
void on_sourceLoad_clicked();
void on_sliceToClipboard_clicked();
void preview_imageSizeChanged();
void preview_wheelHorizontal(int delta);
void preview_wheelVertical(int delta);
void process_finished();
void scrollArea_offsetChanged();
private:
bool makeTempImage(QString filename, QRect selection);
QString tempImageFileName;
QString tempTextFileName;
Ui::Widget *ui = nullptr;
PreviewWidget *preview = nullptr;
QProcess *process = nullptr;
};
#endif // WIDGET_H