Subversion Repositories Scribus

Rev

Rev 9672 | Rev 20655 | 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.,                                       *
18122 mrdocs 24
 *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.             *
364 Franz 25
 ***************************************************************************/
26
 
27
#include "gtframestyle.h"
2714 craig 28
#include "scribusstructs.h"
364 Franz 29
 
30
gtFrameStyle::gtFrameStyle(QString name) : gtParagraphStyle(name)
31
{
32
        init();
33
}
34
 
35
gtFrameStyle::gtFrameStyle(const gtFrameStyle& f) : gtParagraphStyle(f)
36
{
37
        columns    = f.columns;
38
        columnsGap = f.columnsGap;
39
        bgColor    = f.bgColor;
40
        bgShade    = f.bgShade;
41
}
42
 
43
gtFrameStyle::gtFrameStyle(const gtParagraphStyle& p) : gtParagraphStyle(p)
44
{
45
        init();
46
}
47
 
48
gtFrameStyle::gtFrameStyle(const gtStyle& s) : gtParagraphStyle(s)
49
{
50
        init();
51
}
52
 
53
void gtFrameStyle::init()
54
{
55
        columns    = 1;
56
        columnsGap = 0;
57
        bgColor    = "White";
58
        bgShade    = 100;
59
}
60
 
61
int gtFrameStyle::getColumns()
62
{
63
        return columns;
64
}
65
 
66
void gtFrameStyle::setColumns(int newColumns)
67
{
68
        columns = newColumns;
69
}
70
 
71
double gtFrameStyle::getColumnsGap()
72
{
73
        return columnsGap;
74
}
75
 
76
void gtFrameStyle::setColumnsGap(double newColumnsGap)
77
{
78
        columnsGap = newColumnsGap;
79
}
80
 
81
QString gtFrameStyle::getBgColor()
82
{
83
        return bgColor;
84
}
85
 
86
void gtFrameStyle::setBgColor(QString newBgColor)
87
{
88
        bgColor = newBgColor;
89
}
90
 
91
int gtFrameStyle::getBgShade()
92
{
93
        return bgShade;
94
}
95
 
96
void gtFrameStyle::setBgShade(int newBgShade)
97
{
98
        bgShade = newBgShade;
99
}
100
 
101
QString gtFrameStyle::target()
102
{
103
        return QString("frame");
104
}
105
 
106
void gtFrameStyle::getParagraphStyle(gtParagraphStyle* pstyle)
107
{
108
        *pstyle = gtParagraphStyle(*this);
109
}
110
 
111
gtFrameStyle::~gtFrameStyle()
112
{
113
 
114
}