all repos — mgba @ 2eaaaa8491b81ca3a9b2e4b77c526b3f4f4f328e

mGBA Game Boy Advance Emulator

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 "ui_GIFView.h"
14
15extern "C" {
16#include "platform/imagemagick/imagemagick-gif-encoder.h"
17}
18
19namespace QGBA {
20
21class GIFView : public QWidget {
22Q_OBJECT
23
24public:
25	GIFView(QWidget* parent = nullptr);
26	virtual ~GIFView();
27
28	mAVStream* getStream() { return &m_encoder.d; }
29
30public slots:
31	void startRecording();
32	void stopRecording();
33
34signals:
35	void recordingStarted(mAVStream*);
36	void recordingStopped();
37
38private slots:
39	void selectFile();
40	void setFilename(const QString&);
41	void updateDelay();
42
43private:
44	Ui::GIFView m_ui;
45
46	ImageMagickGIFEncoder m_encoder;
47
48	QString m_filename;
49};
50
51}
52
53#endif
54
55#endif