Subversion Repositories Scribus

Rev

Rev 364 | Rev 411 | Go to most recent revision | Details | Compare with Previous | 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
 
375 Franz 36
enum TabType {
37
        LEFT_T,
38
        RIGHT_T,
39
        FULL_STOP_T,
40
        COMMA_T,
41
        CENTER_T
42
};
43
 
364 Franz 44
class gtParagraphStyle : public gtStyle
45
{
46
private:
47
        void init();
48
protected:
49
        double lineSpacing;
50
        int    alignment;
51
        double indent;
52
        double firstLineIndent;
53
        double spaceAbove;
54
        double spaceBelow;
55
        QValueList<double> tabValues;
56
        bool dropCap;
57
        int  dropCapHeight;
58
        bool adjToBaseline;
59
public:
60
        double getLineSpacing();
61
        void   setLineSpacing(double newLineSpacing);
62
        int    getAlignment();
63
        void   setAlignment(Alignment newAlignment);
64
        void   setAlignment(int newAlignment);
65
        double getIndent();
66
        void   setIndent(double newIndent);
67
        double getFirstLineIndent();
68
        void   setFirstLineIndent(double newFirstLineIndent);
69
        double getSpaceAbove();
70
        void   setSpaceAbove(double newSpaceAbove);
71
        double getSpaceBelow();
72
        void   setSpaceBelow(double newSpaceBelow);
73
        QValueList<double>* getTabValues();
375 Franz 74
        void   setTabValue(double newTabValue, TabType ttype = LEFT_T);
364 Franz 75
        bool   hasDropCap();
76
        void   setDropCap(bool newDropCap);
77
        void   setDropCap(int newHeight);
78
        int    getDropCapHeight();
79
        void   setDropCapHeight(int newHeight);
80
        bool   isAdjToBaseline();
81
        void   setAdjToBaseline(bool newAdjToBaseline);
82
        void   getStyle(gtStyle* style);
83
        gtParagraphStyle(QString name);
84
        gtParagraphStyle(const gtParagraphStyle& p);
85
        gtParagraphStyle(const gtStyle& s);
86
        ~gtParagraphStyle();
87
        QString target();
88
};
89
 
90
#endif // GTPARAGRAPHSTYLE_H