Debian Codegraph @

HercPrinter/PrinterController.h

raw symbols SCIP
1 /*
2 * File: PrinterController.h
3 *
4 * Author: Jacob Dekel
5 * Created on: May 10, 2014
6 *
7 * Copyright (c) 2009-2014 Jacob Dekel
8 * $Id$
9 *
10 * This object handles the printer queue
11 *
12 * This program is free software: you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License as published by
14 * the Free Software Foundation, either version 3 of the License, or
15 * (at your option) any later version.
16 *
17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
21 *
22 * You should have received a copy of the GNU General Public License
23 * along with this program. If not, see <http://www.gnu.org/licenses/>.
24 *
25 */
26
27 #ifndef PRINTERCONTROLLER_H
28 #define PRINTERCONTROLLER_H
29
30 #include "SynchronizedQueue.h"
31 #include "HerculesStudio.h"
32
33 #include <QObject>
34
35 mk_shared_ptr(PdfPrinter)
36 mk_shared_ptr(PrintRunner)
37 mk_shared_constptr(PrinterItem)
38
39 class PrinterController : public QObject
40 {
41 Q_OBJECT
42 public:
43 PrinterController(PrinterItemConstPtr printerItem, PdfPrinterPtr printer);
44 ~PrinterController();
45
46 void exec();
47 void stop();
48
49 private:
50 PrinterItemConstPtr mPrinterItem;
51 PdfPrinterPtr mPrinter;
52 PrintRunnerPtr mRunner;
53 SynchronizedQueue mQueue;
54
55 private slots:
56 void lineReceived();
57
58 signals:
59 void connected();
60 void disconnected();
61 void waiting();
62 void stoppedWaiting();
63 };
64
65 #endif // PRINTERCONTROLLER_H