~ubuntu-branches/ubuntu/breezy/koffice/breezy

« back to all changes in this revision

Viewing changes to filters/kontour/latex/page.h

  • Committer: Bazaar Package Importer
  • Author(s): Ben Burton
  • Date: 2004-05-09 11:33:00 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20040509113300-vfrdadqsvjfuhn3b
Tags: 1:1.3.1-1
* New upstream bugfix release.
* Built against newer imagemagick (closes: #246623).
* Made koffice-libs/kformula recommend/depend on latex-xft-fonts, which
  provides mathematical fonts that the formula editor can use.  Also
  patched the kformula part to make these fonts the default.
* Changed kword menu hint from "WordProcessors" to "Word processors"
  (closes: #246209).
* Spellchecker configuration is now fixed (closes: #221256, #227568).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
** Header file for inclusion with kword_xml2latex.c
3
 
**
4
 
** Copyright (C) 2000 Robert JACOLIN
5
 
**
6
 
** This library is free software; you can redistribute it and/or
7
 
** modify it under the terms of the GNU Library General Public
8
 
** License as published by the Free Software Foundation; either
9
 
** version 2 of the License, or (at your option) any later version.
10
 
**
11
 
** This library is distributed in the hope that it will be useful,
12
 
** but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14
 
** Library General Public License for more details.
15
 
**
16
 
** To receive a copy of the GNU Library General Public License, write to the
17
 
** Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18
 
** Boston, MA  02111-1307, USA.
19
 
**
20
 
*/
21
 
 
22
 
#ifndef __KILLU_PAGE_H__
23
 
#define __KILLU_PAGE_H__
24
 
 
25
 
#include <qtextstream.h>
26
 
#include "xmlparser.h"
27
 
#include "layer.h"
28
 
 
29
 
enum TFormat
30
 
{
31
 
        TF_A3,
32
 
        TF_A4,
33
 
        TF_A5,
34
 
        TF_USLETTER,
35
 
        TF_USLEGAL,
36
 
        TF_SCREEN,
37
 
        TF_CUSTOM,
38
 
        TF_B3,
39
 
        TF_USEXECUTIVE
40
 
};
41
 
 
42
 
enum TOrient
43
 
{
44
 
        TO_PORTRAIT,
45
 
        TO_LANDSCAPE
46
 
};
47
 
 
48
 
 
49
 
/***********************************************************************/
50
 
/* Class: Page                                                         */
51
 
/***********************************************************************/
52
 
 
53
 
/**
54
 
 * This class hold a whole document with its rectangles, layers, ...
55
 
 * It can generate a latex file (with pstricks extension).
56
 
 */
57
 
class Page: public XmlParser
58
 
{
59
 
        /* LAYOUT */
60
 
        TFormat   _format;
61
 
        double    _width,
62
 
                  _height;
63
 
        TOrient   _orientation;
64
 
        double    _leftMargin,
65
 
                  _rightMargin,
66
 
                  _bottomMargin,
67
 
                  _topMargin;
68
 
 
69
 
        Layer _layer;
70
 
 
71
 
        public:
72
 
                /**
73
 
                 * Constructor
74
 
                 *
75
 
                 * Creates a new instance of Document.
76
 
                 */
77
 
                Page();
78
 
 
79
 
                /**
80
 
                 * Destructor
81
 
                 *
82
 
                 * Remove the list of headers, footers and the body.
83
 
                 */
84
 
                virtual ~Page();
85
 
 
86
 
                /**
87
 
                 * Accessors
88
 
                 */
89
 
                TFormat   getFormat       () const { return _format;       }
90
 
                TOrient   getOrientation  () const { return _orientation;  }
91
 
                double    getHeight       () const { return _height;       }
92
 
                double    getWidth        () const { return _width;        }
93
 
                double    getRightMargin  () const { return _rightMargin;  }
94
 
                double    getLeftMargin   () const { return _leftMargin;   }
95
 
                double    getTopMargin    () const { return _topMargin;    }
96
 
                double    getBottomMargin () const { return _bottomMargin; }
97
 
 
98
 
                /**
99
 
                 * Modifiors
100
 
                 */
101
 
 
102
 
                void setHeight      (double h)  { _height        = h;              }
103
 
                void setWidth       (double w)  { _width         = w;              }
104
 
                void setRightMargin (double rm) { _rightMargin   = rm;             }
105
 
                void setLeftMargin  (double lm) { _leftMargin    = lm;             }
106
 
                void setTopMargin   (double tm) { _topMargin     = tm;             }
107
 
                void setBottomMargin(double bm) { _bottomMargin  = bm;             }
108
 
                void setFormat      (int f)     { _format        = (TFormat) f;    }
109
 
                void setOrientation (int o)      { _orientation  = (TOrient) o;    }
110
 
                
111
 
                void analyse(const QDomNode);
112
 
                void analyseLayout(const QDomNode);
113
 
 
114
 
                void generatePSTRICKS(QTextStream&);
115
 
 
116
 
        private:
117
 
};
118
 
 
119
 
#endif /* __KILLU_PAGE_H__ */