src/platform/qt/GIFView.h (view raw)
1/* Copyright (c) 2013-2014 Jeffrey Pfau
2 *
3 * This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6#ifndef QGBA_GIF_VIEW
7#define QGBA_GIF_VIEW
8
9#ifdef USE_MAGICK
10
11#include <QWidget>
12
13#include <memory>
14
15#include "ui_GIFView.h"
16
17#include "feature/imagemagick/imagemagick-gif-encoder.h"
18
19namespace QGBA {
20
21class CoreController;
22
23class GIFView : public QWidget {
24Q_OBJECT
25
26public:
27 GIFView(QWidget* parent = nullptr);
28 virtual ~GIFView();
29
30 mAVStream* getStream() { return &m_encoder.d; }
31
32public slots:
33 void setController(std::shared_ptr<CoreController>);
34
35 void startRecording();
36 void stopRecording();
37
38signals:
39 void recordingStarted(mAVStream*);
40 void recordingStopped();
41
42private slots:
43 void selectFile();
44 void setFilename(const QString&);
45 void updateDelay();
46
47private:
48 Ui::GIFView m_ui;
49
50 ImageMagickGIFEncoder m_encoder;
51
52 QString m_filename;
53};
54
55}
56
57#endif
58
59#endif