Subversion Repositories Scribus

Rev

Rev 2969 | Rev 5184 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
4430 cbradney 1
/*
2
For general Scribus (>=1.3.2) copyright and licensing information please refer
3
to the COPYING file provided with the program. Following this notice may exist
4
a copyright and/or license notice that predates the release of Scribus 1.3.2
5
for which a new license (GPL+exception) is in place.
6
*/
364 Franz 7
/***************************************************************************
8
 *   Copyright (C) 2004 by Riku Leino                                      *
1184 tsoots 9
 *   tsoots@gmail.com                                                      *
364 Franz 10
 *                                                                         *
11
 *   This program is free software; you can redistribute it and/or modify  *
12
 *   it under the terms of the GNU General Public License as published by  *
13
 *   the Free Software Foundation; either version 2 of the License, or     *
14
 *   (at your option) any later version.                                   *
15
 *                                                                         *
16
 *   This program is distributed in the hope that it will be useful,       *
17
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
18
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
19
 *   GNU General Public License for more details.                          *
20
 *                                                                         *
21
 *   You should have received a copy of the GNU General Public License     *
22
 *   along with this program; if not, write to the                         *
23
 *   Free Software Foundation, Inc.,                                       *
24
 *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
25
 ***************************************************************************/
26
 
27
#ifndef GTPARAGRAPHSTYLE_H
28
#define GTPARAGRAPHSTYLE_H
29
 
30
#include <qvaluelist.h>
2969 craig 31
#include "scribusapi.h"
364 Franz 32
#include "gtstyle.h"
2282 fschmid 33
#include "pageitem.h"
364 Franz 34
 
35
enum Alignment {
36
        LEFT,
37
        CENTER,
38
        RIGHT,
39
        BLOCK,
40
        FORCED,
41
        AlignmentMAX
42
};
43
 
375 Franz 44
enum TabType {
45
        LEFT_T,
46
        RIGHT_T,
47
        FULL_STOP_T,
48
        COMMA_T,
49
        CENTER_T
50
};
51
 
2969 craig 52
class SCRIBUS_API gtParagraphStyle : public gtStyle
364 Franz 53
{
54
private:
55
        void init();
56
protected:
57
        double lineSpacing;
58
        int    alignment;
59
        double indent;
60
        double firstLineIndent;
61
        double spaceAbove;
62
        double spaceBelow;
2282 fschmid 63
        QValueList<PageItem::TabRecord> tabValues;
364 Franz 64
        bool dropCap;
65
        int  dropCapHeight;
66
        bool adjToBaseline;
411 Franz 67
        bool autoLineSpacing;
68
        bool isVisible;
364 Franz 69
public:
70
        double getLineSpacing();
71
        void   setLineSpacing(double newLineSpacing);
411 Franz 72
        bool   getAutoLineSpacing();
73
        void   setAutoLineSpacing(bool newALS);
364 Franz 74
        int    getAlignment();
75
        void   setAlignment(Alignment newAlignment);
76
        void   setAlignment(int newAlignment);
77
        double getIndent();
78
        void   setIndent(double newIndent);
79
        double getFirstLineIndent();
80
        void   setFirstLineIndent(double newFirstLineIndent);
81
        double getSpaceAbove();
82
        void   setSpaceAbove(double newSpaceAbove);
83
        double getSpaceBelow();
84
        void   setSpaceBelow(double newSpaceBelow);
2282 fschmid 85
        QValueList<PageItem::TabRecord>* getTabValues();
375 Franz 86
        void   setTabValue(double newTabValue, TabType ttype = LEFT_T);
364 Franz 87
        bool   hasDropCap();
88
        void   setDropCap(bool newDropCap);
89
        void   setDropCap(int newHeight);
90
        int    getDropCapHeight();
91
        void   setDropCapHeight(int newHeight);
92
        bool   isAdjToBaseline();
93
        void   setAdjToBaseline(bool newAdjToBaseline);
94
        void   getStyle(gtStyle* style);
95
        gtParagraphStyle(QString name);
96
        gtParagraphStyle(const gtParagraphStyle& p);
97
        gtParagraphStyle(const gtStyle& s);
98
        ~gtParagraphStyle();
99
        QString target();
100
};
101
 
102
#endif // GTPARAGRAPHSTYLE_H