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