Canorus
0.7
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
src
control
typesetctl.h
Go to the documentation of this file.
1
8
#ifndef _TYPESET_CTL_H_
9
#define _TYPESET_CTL_H_
10
11
// Includes
12
#include <QObject>
13
#include <QVariant>
14
#include <QVector>
15
#include <QStringList>
16
#include <QTemporaryFile>
17
18
// Forward declarations
19
class
CAExternProgram
;
20
class
CAExport
;
21
class
CADocument
;
22
23
class
CATypesetCtl
:
public
QObject
24
{
25
Q_OBJECT
26
27
public
:
28
CATypesetCtl
();
29
~CATypesetCtl
();
30
31
void
setTypesetter
(
const
QString &roProgramName,
const
QString &roProgramPath =
""
);
32
void
setPS2PDF
(
const
QString &roProgrammName,
const
QString &roProgramPath =
""
,
33
const
QStringList &roParams = (QStringList() << QString(
""
) ) );
34
virtual
void
setExpOption
(
const
QVariant &roName,
const
QVariant &roValue );
35
virtual
void
setTSetOption
(
const
QVariant &roName,
const
QVariant &roValue,
bool
bSpace =
false
,
bool
bShortParam =
true
);
36
inline
void
setPDFConversion
(
bool
bConversion ) {
_bPDFConversion
= bConversion; }
37
inline
void
setExporter
(
CAExport
*poExport ) {
_poExport
= poExport ; }
38
// Attention: .pdf automatically added and removed if it was added internally
39
void
exportDocument
(
CADocument
*poDoc );
40
void
runTypesetter
();
41
42
inline
bool
getPDFConversion
() {
return
_bPDFConversion
; }
43
inline
CAExport
*
getExporter
() {
return
_poExport
; }
44
inline
QString
getTempFilePath
() {
return
_oOutputFileName
; }
45
bool
waitForFinished
(
int
iMSecs );
46
47
signals:
48
void
nextOutput
(
const
QByteArray &roData );
49
void
nextStep
();
50
void
typesetterFinished
(
int
iExitCode );
51
52
protected
slots:
53
void
rcvTypesetterOutput
(
const
QByteArray &roData );
54
void
typsetterExited
(
int
iExitCode );
55
56
protected
:
57
bool
createPDF
();
58
59
CAExternProgram
*
_poTypesetter
;
// Transforms exported file to pdf / postscript
60
CAExternProgram
*
_poConvPS2PDF
;
// Transforms postscripts files to pdf if needed
61
CAExport
*
_poExport
;
// Transforms canorus document to typesetter format
62
QVector<QVariant>
_oExpOptList
;
// List of options for export
63
QVector<QVariant>
_oTSetOptList
;
// List of options for typesetter
64
QTemporaryFile *
_poOutputFile
;
// Output file for pdf (also used for exported file)
65
QString
_oOutputFileName
;
// Output file name for pdf (temporary file deletes it on close)
66
bool
_bPDFConversion
;
// Do a conversion from postscript to pdf
67
bool
_bOutputFileNameFirst
;
// File name as first parameter ? (Default: No)
68
};
69
70
#endif // _TYPESET_CTL_H_
71
Generated on Fri Jan 11 2013 14:40:12 for Canorus by
1.8.3