Back to index

scribus-ng  1.3.4.dfsg+svn20071115
gtframestyle.cpp
Go to the documentation of this file.
00001 /*
00002 For general Scribus (>=1.3.2) copyright and licensing information please refer
00003 to the COPYING file provided with the program. Following this notice may exist
00004 a copyright and/or license notice that predates the release of Scribus 1.3.2
00005 for which a new license (GPL+exception) is in place.
00006 */
00007 /***************************************************************************
00008  *   Copyright (C) 2004 by Riku Leino                                      *
00009  *   tsoots@gmail.com                                                      *
00010  *                                                                         *
00011  *   This program is free software; you can redistribute it and/or modify  *
00012  *   it under the terms of the GNU General Public License as published by  *
00013  *   the Free Software Foundation; either version 2 of the License, or     *
00014  *   (at your option) any later version.                                   *
00015  *                                                                         *
00016  *   This program is distributed in the hope that it will be useful,       *
00017  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00018  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
00019  *   GNU General Public License for more details.                          *
00020  *                                                                         *
00021  *   You should have received a copy of the GNU General Public License     *
00022  *   along with this program; if not, write to the                         *
00023  *   Free Software Foundation, Inc.,                                       *
00024  *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
00025  ***************************************************************************/
00026 
00027 #include "gtframestyle.h"
00028 #include "scribusstructs.h"
00029 
00030 gtFrameStyle::gtFrameStyle(QString name) : gtParagraphStyle(name) 
00031 {
00032        init();
00033 }
00034 
00035 gtFrameStyle::gtFrameStyle(const gtFrameStyle& f) : gtParagraphStyle(f)
00036 {
00037        columns    = f.columns;
00038        columnsGap = f.columnsGap;
00039        bgColor    = f.bgColor;
00040        bgShade    = f.bgShade;
00041 }
00042 
00043 gtFrameStyle::gtFrameStyle(const gtParagraphStyle& p) : gtParagraphStyle(p)
00044 {
00045        init();
00046 }
00047 
00048 gtFrameStyle::gtFrameStyle(const gtStyle& s) : gtParagraphStyle(s)
00049 {
00050        init();
00051 }
00052 
00053 void gtFrameStyle::init()
00054 {
00055        columns    = 1;
00056        columnsGap = 0;
00057        bgColor    = "White";
00058        bgShade    = 100;
00059 }
00060 
00061 int gtFrameStyle::getColumns()
00062 {
00063        return columns;
00064 }
00065 
00066 void gtFrameStyle::setColumns(int newColumns)
00067 {
00068        columns = newColumns;
00069 }
00070 
00071 double gtFrameStyle::getColumnsGap()
00072 {
00073        return columnsGap;
00074 }
00075 
00076 void gtFrameStyle::setColumnsGap(double newColumnsGap)
00077 {
00078        columnsGap = newColumnsGap;
00079 }
00080 
00081 QString gtFrameStyle::getBgColor()
00082 {
00083        return bgColor;
00084 }
00085 
00086 void gtFrameStyle::setBgColor(QString newBgColor)
00087 {
00088        bgColor = newBgColor;
00089 }
00090 
00091 int gtFrameStyle::getBgShade()
00092 {
00093        return bgShade;
00094 }
00095 
00096 void gtFrameStyle::setBgShade(int newBgShade)
00097 {
00098        bgShade = newBgShade;
00099 }
00100 
00101 QString gtFrameStyle::target()
00102 {
00103        return QString("frame");
00104 }
00105 
00106 void gtFrameStyle::getParagraphStyle(gtParagraphStyle* pstyle)
00107 {
00108        *pstyle = gtParagraphStyle(*this);
00109 }
00110 
00111 gtFrameStyle::~gtFrameStyle()
00112 {
00113 
00114 }