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#ifndef QGBA_PRINTER_VIEW
7#define QGBA_PRINTER_VIEW
8
9#include <QDialog>
10#include <QPixmap>
11#include <QTimer>
12
13#include <memory>
14
15#include "ui_PrinterView.h"
16
17namespace QGBA {
18
19class CoreController;
20
21class PrinterView : public QDialog {
22Q_OBJECT
23
24public:
25 PrinterView(std::shared_ptr<CoreController> controller, QWidget* parent = nullptr);
26 ~PrinterView();
27
28signals:
29 void donePrinting();
30
31public slots:
32 void save();
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}
49
50#endif