root/trunk/src/JobSave.h

Revision 222, 1.8 kB (checked in by jordi, 2 years ago)

Added a new class named JobPrint? whose duty is to render the current document to PostScript? and print the resultant file. It already renders the requested pages (Note: the setUpPageRange is horrible) to PostScript?.

Line 
1// ePDFView - A lightweight PDF Viewer.
2// Copyright (C) 2006 Emma's Software.
3//
4// This program is free software; you can redistribute it and/or modify
5// it under the terms of the GNU General Public License as published by
6// the Free Software Foundation; either version 2 of the License, or
7// (at your option) any later version.
8//
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, write to the Free Software
16// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
17
18#if !defined (__JOB_SAVE_H__)
19#define __JOB_SAVE_H__
20
21namespace ePDFView
22{
23    // Forward declarations.
24    class IDocument;
25
26    ///
27    /// @class JobSave
28    /// @brief A background job that saves a document's copy to a file.
29    ///
30    /// This class is used to save copies of PDF files.
31    ///
32    class JobSave: public IJob
33    {
34        public:
35            JobSave (void);
36            ~JobSave (void);
37
38            IDocument &getDocument (void);
39            GError *getError (void);
40            const gchar *getFileName (void);
41            gboolean run (void);
42            void setDocument (IDocument *document);
43            void setError (GError *error);
44            void setFileName (const gchar *fileName);
45
46        protected:
47            /// The document to notify when loaded or on error.
48            IDocument *m_Document;
49            /// The error produced when loading.
50            GError *m_Error;
51            /// The file name to load or reload.
52            gchar *m_FileName;
53    };
54}
55
56#endif // __JOB_SAVE_H__
Note: See TracBrowser for help on using the browser.