1 /**************************************************************************
5 Unix Remote Printing Operation
6 Copyright (c) Arto Hyvättinen 2010
8 This file is part of URPO.
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.
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.
21 **************************************************************************/
29 /*! File printing job'
31 @author Arto Hyvättinen
35 Job for printing files.
36 First, connect finished()-signal (called when ready)
39 @note start() is not for use!
42 class PrintJob : public UrpoJob
46 explicit PrintJob(UrpoConnection* connection);
52 /*! When file has copied (internal use only) */
53 void copyReady(bool success);
54 /*! When files has printed (internal use only) */
55 void printReady(bool success);
56 /*! When file has deleted (internal use only) */
57 void deleteReady(bool success);
61 @arg path Path to file
62 @arg printOptions cups print options for lp command
64 When finished, emit finished() signal
67 void printFile(const QString& path, const QString& printOptions);
69 /*! Do not use, thows execption!
71 This function exits only because of bad class planning.
74 @throw std::logic_error Thow error becouse this function is not for use!*/
76 /*! Cancel printing job */
80 inline void freeProcess();
83 UrpoProcess* currentProcess_;
85 QString printOptions_;