Subversion Repositories Scribus

Rev

Rev 2282 | Rev 4430 | 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>
2969 craig 25
#include "scribusapi.h"
364 Franz 26
#include "gtstyle.h"
2282 fschmid 27
#include "pageitem.h"
364 Franz 28
 
29
enum Alignment {
30
        LEFT,
31
        CENTER,
32
        RIGHT,
33
        BLOCK,
34
        FORCED,
35
        AlignmentMAX
36
};
37
 
375 Franz 38
enum TabType {
39
        LEFT_T,
40
        RIGHT_T,
41
        FULL_STOP_T,
42
        COMMA_T,
43
        CENTER_T
44
};
45
 
2969 craig 46
class SCRIBUS_API gtParagraphStyle : public gtStyle
364 Franz 47
{
48
private:
49
        void init();
50
protected:
51
        double lineSpacing;
52
        int    alignment;
53
        double indent;
54
        double firstLineIndent;
55
        double spaceAbove;
56
        double spaceBelow;
2282 fschmid 57
        QValueList<PageItem::TabRecord> tabValues;
364 Franz 58
        bool dropCap;
59
        int  dropCapHeight;
60
        bool adjToBaseline;
411 Franz 61
        bool autoLineSpacing;
62
        bool isVisible;
364 Franz 63
public:
64
        double getLineSpacing();
65
        void   setLineSpacing(double newLineSpacing);
411 Franz 66
        bool   getAutoLineSpacing();
67
        void   setAutoLineSpacing(bool newALS);
364 Franz 68
        int    getAlignment();
69
        void   setAlignment(Alignment newAlignment);
70
        void   setAlignment(int newAlignment);
71
        double getIndent();
72
        void   setIndent(double newIndent);
73
        double getFirstLineIndent();
74
        void   setFirstLineIndent(double newFirstLineIndent);
75
        double getSpaceAbove();
76
        void   setSpaceAbove(double newSpaceAbove);
77
        double getSpaceBelow();
78
        void   setSpaceBelow(double newSpaceBelow);
2282 fschmid 79
        QValueList<PageItem::TabRecord>* getTabValues();
375 Franz 80
        void   setTabValue(double newTabValue, TabType ttype = LEFT_T);
364 Franz 81
        bool   hasDropCap();
82
        void   setDropCap(bool newDropCap);
83
        void   setDropCap(int newHeight);
84
        int    getDropCapHeight();
85
        void   setDropCapHeight(int newHeight);
86
        bool   isAdjToBaseline();
87
        void   setAdjToBaseline(bool newAdjToBaseline);
88
        void   getStyle(gtStyle* style);
89
        gtParagraphStyle(QString name);
90
        gtParagraphStyle(const gtParagraphStyle& p);
91
        gtParagraphStyle(const gtStyle& s);
92
        ~gtParagraphStyle();
93
        QString target();
94
};
95
 
96
#endif // GTPARAGRAPHSTYLE_H