Added icon
[urpo] / src / printerlistjob.h
1 /**************************************************************************
2
3     URPO
4
5     Unix Remote Printing Operation
6     Copyright (c) Arto Hyvättinen 2010
7
8     This file is part of URPO.
9
10     URPO is free software: you can redistribute it and/or modify
11     it under the terms of the GNU General Public License as published by
12     the Free Software Foundation, either version 3 of the License, or
13     (at your option) any later version.
14
15     URPO is distributed in the hope that it will be useful,
16     but WITHOUT ANY WARRANTY; without even the implied warranty of
17     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18     GNU General Public License for more details.
19
20
21 **************************************************************************/
22
23 #ifndef PRINTERLISTJOB_H
24 #define PRINTERLISTJOB_H
25
26
27 #include "urpojob.h"
28 #include <QStringList>
29
30 /*!  Get list of available printers
31
32     @author Arto Hyvättinen
33     @version 0
34     @date 2010-06-11
35
36     connect finished() and call start().
37     getPrinters() tell printers of remote host.
38
39   */
40
41 class PrinterListJob : public UrpoJob
42 {
43     Q_OBJECT
44 public:
45     explicit PrinterListJob(UrpoConnection* connection);
46     /*! List of printers in system */
47     QStringList getPrinters() const { return printers_; }
48
49 signals:
50
51 public slots:
52     /*! Read output and do printer list */
53     void doList(bool success);
54
55 protected:
56     void startJob();
57     void cancelJob();
58
59 private:
60     QStringList printers_;
61     UrpoProcess* process_;
62 };
63
64 #endif // PRINTERLISTJOB_H