~x2go/x2go/x2goclient_master

« back to all changes in this revision

Viewing changes to src/printprocess.h

  • Committer: Mihai Moldovan
  • Date: 2015-03-04 20:15:47 UTC
  • Revision ID: git-v1:b7398771a7abd84ddcff407063edb95dd0a205d3
general: move *.cpp and *.h files to src/ and *.ts files to src/i18n/.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/**************************************************************************
 
2
*   Copyright (C) 2005-2015 by Oleksandr Shneyder                         *
 
3
*   o.shneyder@phoca-gmbh.de                                              *
 
4
*                                                                         *
 
5
*   This program is free software; you can redistribute it and/or modify  *
 
6
*   it under the terms of the GNU General Public License as published by  *
 
7
*   the Free Software Foundation; either version 2 of the License, or     *
 
8
*   (at your option) any later version.                                   *
 
9
*   This program is distributed in the hope that it will be useful,       *
 
10
*   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
 
11
*   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
 
12
*   GNU General Public License for more details.                          *
 
13
*                                                                         *
 
14
*   You should have received a copy of the GNU General Public License     *
 
15
*   along with this program.  If not, see <http://www.gnu.org/licenses/>. *
 
16
***************************************************************************/
 
17
 
 
18
#ifndef PRINTPROCESS_H
 
19
#define PRINTPROCESS_H
 
20
 
 
21
#include <QString>
 
22
#include <QObject>
 
23
#include <QProcess>
 
24
 
 
25
/**
 
26
        @author Oleksandr Shneyder <oleksandr.shneyder@obviously-nice.de>
 
27
*/
 
28
class PrintProcess: public QObject
 
29
{
 
30
                Q_OBJECT
 
31
 
 
32
        public:
 
33
                PrintProcess ( QString pdf, QString title,
 
34
                               QObject * parent=0l );
 
35
                ~PrintProcess();
 
36
        private:
 
37
                QString pdfFile;
 
38
                QString pdfTitle;
 
39
                QString psFile;
 
40
                bool viewPdf;
 
41
                bool customPrintCmd;
 
42
                bool printStdIn;
 
43
                bool printPs;
 
44
                bool pdfOpen;
 
45
                QString pdfOpenCmd;
 
46
                QWidget* parentWidg;
 
47
                QString printCmd;
 
48
#ifdef Q_OS_WIN
 
49
                QString winX2goPrinter;
 
50
                QString winDefaultPrinter;
 
51
#endif
 
52
        private:
 
53
                bool loadSettings();
 
54
        private slots:
 
55
                void slot_processFinished ( int exitCode,
 
56
                                            QProcess::ExitStatus exitStatus );
 
57
                void slot_pdf2psError ( QProcess::ProcessError error ) ;
 
58
                void slot_error ( QProcess::ProcessError error );
 
59
                void openPdf();
 
60
                void print();
 
61
};
 
62
 
 
63
#endif