Subversion Repositories Scribus

Rev

Rev 455 | Rev 2282 | 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                                      *
1184 tsoots 3
 *   tsoots@gmail.com                                                      *
364 Franz 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;
411 Franz 59
        bool autoLineSpacing;
60
        bool isVisible;
364 Franz 61
public:
62
        double getLineSpacing();
63
        void   setLineSpacing(double newLineSpacing);
411 Franz 64
        bool   getAutoLineSpacing();
65
        void   setAutoLineSpacing(bool newALS);
364 Franz 66
        int    getAlignment();
67
        void   setAlignment(Alignment newAlignment);
68
        void   setAlignment(int newAlignment);
69
        double getIndent();
70
        void   setIndent(double newIndent);
71
        double getFirstLineIndent();
72
        void   setFirstLineIndent(double newFirstLineIndent);
73
        double getSpaceAbove();
74
        void   setSpaceAbove(double newSpaceAbove);
75
        double getSpaceBelow();
76
        void   setSpaceBelow(double newSpaceBelow);
77
        QValueList<double>* getTabValues();
375 Franz 78
        void   setTabValue(double newTabValue, TabType ttype = LEFT_T);
364 Franz 79
        bool   hasDropCap();
80
        void   setDropCap(bool newDropCap);
81
        void   setDropCap(int newHeight);
82
        int    getDropCapHeight();
83
        void   setDropCapHeight(int newHeight);
84
        bool   isAdjToBaseline();
85
        void   setAdjToBaseline(bool newAdjToBaseline);
86
        void   getStyle(gtStyle* style);
87
        gtParagraphStyle(QString name);
88
        gtParagraphStyle(const gtParagraphStyle& p);
89
        gtParagraphStyle(const gtStyle& s);
90
        ~gtParagraphStyle();
91
        QString target();
92
};
93
 
94
#endif // GTPARAGRAPHSTYLE_H