Subversion Repositories Scribus

Rev

Rev 375 | Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
364 Franz 1
/***************************************************************************
2
 *   Copyright (C) 2004 by Riku Leino                                      *
3
 *   tsoots@welho.com                                                      *
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
 *                                                                         *
10
 *   This program is distributed in the hope that it will be useful,       *
11
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
12
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
13
 *   GNU General Public License for more details.                          *
14
 *                                                                         *
15
 *   You should have received a copy of the GNU General Public License     *
16
 *   along with this program; if not, write to the                         *
17
 *   Free Software Foundation, Inc.,                                       *
18
 *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
19
 ***************************************************************************/
20
 
21
#ifndef GTPARAGRAPHSTYLE_H
22
#define GTPARAGRAPHSTYLE_H
23
 
24
#include <qvaluelist.h>
25
#include "gtstyle.h"
26
 
27
enum Alignment {
28
        LEFT,
29
        CENTER,
30
        RIGHT,
31
        BLOCK,
32
        FORCED,
33
        AlignmentMAX
34
};
35
 
36
class gtParagraphStyle : public gtStyle
37
{
38
private:
39
        void init();
40
protected:
41
        double lineSpacing;
42
        int    alignment;
43
        double indent;
44
        double firstLineIndent;
45
        double spaceAbove;
46
        double spaceBelow;
47
        QValueList<double> tabValues;
48
        bool dropCap;
49
        int  dropCapHeight;
50
        bool adjToBaseline;
51
public:
52
        double getLineSpacing();
53
        void   setLineSpacing(double newLineSpacing);
54
        int    getAlignment();
55
        void   setAlignment(Alignment newAlignment);
56
        void   setAlignment(int newAlignment);
57
        double getIndent();
58
        void   setIndent(double newIndent);
59
        double getFirstLineIndent();
60
        void   setFirstLineIndent(double newFirstLineIndent);
61
        double getSpaceAbove();
62
        void   setSpaceAbove(double newSpaceAbove);
63
        double getSpaceBelow();
64
        void   setSpaceBelow(double newSpaceBelow);
65
        QValueList<double>* getTabValues();
66
        void   setTabValue(double newTabValue);
67
        void   removeTabValue(double valueToRemove);
68
        bool   hasDropCap();
69
        void   setDropCap(bool newDropCap);
70
        void   setDropCap(int newHeight);
71
        int    getDropCapHeight();
72
        void   setDropCapHeight(int newHeight);
73
        bool   isAdjToBaseline();
74
        void   setAdjToBaseline(bool newAdjToBaseline);
75
        void   getStyle(gtStyle* style);
76
        gtParagraphStyle(QString name);
77
        gtParagraphStyle(const gtParagraphStyle& p);
78
        gtParagraphStyle(const gtStyle& s);
79
        ~gtParagraphStyle();
80
        QString target();
81
};
82
 
83
#endif // GTPARAGRAPHSTYLE_H