-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmainwindow.h
51 lines (44 loc) · 968 Bytes
/
mainwindow.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
45
46
47
48
49
50
51
#pragma once
#include <QMainWindow>
#include <QImage>
#include <QFutureWatcher>
struct GifInfo
{
int width=0;
int height=0;
int interval=0;
int colors=0;
int loopcount=0;
QList<QImage> images;
};
QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow; }
QT_END_NAMESPACE
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
MainWindow(QWidget *parent = nullptr);
~MainWindow();
signals:
//解析完后通过信号槽发到主线程展示
void decodeGifFinished(const GifInfo &info);
public slots:
//翻页
void displayPrev();
void displayNext();
//点击读取Gif-DGifSlurp
void decodeGif();
//点击读取Gif-流式操作
void decodeGifStream();
//点击选择图片列表
void selectImages();
//点击生成Gif-EGifSpew
void encodeGif();
private:
Ui::MainWindow *ui;
//gif图片帧列表
QList<QImage> imgList;
//
QFutureWatcher<void> taskWatcher;
};