all repos — mgba @ e1b57de0356ab19713d3b6c8d77bf2e6e267c66d

mGBA Game Boy Advance Emulator

src/platform/qt/PrinterView.h (view raw)

 1/* Copyright (c) 2013-2017 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#include <QDialog>
 9#include <QPixmap>
10#include <QTimer>
11
12#include <memory>
13
14#include "ui_PrinterView.h"
15
16namespace QGBA {
17
18class CoreController;
19
20class PrinterView : public QDialog {
21Q_OBJECT
22
23public:
24	PrinterView(std::shared_ptr<CoreController> controller, QWidget* parent = nullptr);
25	~PrinterView();
26
27signals:
28	void donePrinting();
29
30public slots:
31	void save();
32	void copy();
33	void clear();
34
35private slots:
36	void printImage(const QImage&);
37	void printLine();
38	void printAll();
39
40private:
41	Ui::PrinterView m_ui;
42	QPixmap m_image;
43	QTimer m_timer;
44
45	std::shared_ptr<CoreController> m_controller;
46};
47
48}