all repos — mgba @ 5f59ad4c43b530f0754c883e61c2afa8fdd6c3fb

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