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 clear();
33
34private slots:
35 void printImage(const QImage&);
36 void printLine();
37 void printAll();
38
39private:
40 Ui::PrinterView m_ui;
41 QPixmap m_image;
42 QTimer m_timer;
43
44 std::shared_ptr<CoreController> m_controller;
45};
46
47}