Scribus Developer Documentation - API
logo-pen

Scribus Developer Documentation - API

gtparagraphstyle.h

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 #ifndef GTPARAGRAPHSTYLE_H
00028 #define GTPARAGRAPHSTYLE_H
00029 
00030 #include "scribusapi.h"
00031 #include "gtstyle.h"
00032 #include "sctextstruct.h"
00033 
00034 enum Alignment {
00035     LEFT,
00036     CENTER,
00037     RIGHT,
00038     BLOCK,
00039     FORCED,
00040     AlignmentMAX
00041 };
00042 
00043 enum TabType {
00044     LEFT_T,
00045     RIGHT_T,
00046     FULL_STOP_T,
00047     COMMA_T,
00048     CENTER_T
00049 };
00050 
00051 class SCRIBUS_API gtParagraphStyle : public gtStyle
00052 {
00053 private:
00054     void init();
00055 protected:
00056     bool   defaultStyle;
00057     double lineSpacing;
00058     int    alignment;
00059     double indent;
00060     double firstLineIndent;
00061     double spaceAbove;
00062     double spaceBelow;
00063     QList<ParagraphStyle::TabRecord> tabValues;
00064     bool dropCap;
00065     int  dropCapHeight;
00066     bool adjToBaseline;
00067     bool autoLineSpacing;
00068     bool isVisible;
00069 public:
00070     bool   isDefaultStyle();
00071     void   setDefaultStyle(bool defStyle);
00072     double getLineSpacing();
00073     void   setLineSpacing(double newLineSpacing);
00074     bool   getAutoLineSpacing();
00075     void   setAutoLineSpacing(bool newALS);
00076     int    getAlignment();
00077     void   setAlignment(Alignment newAlignment);
00078     void   setAlignment(int newAlignment);
00079     double getIndent();
00080     void   setIndent(double newIndent);
00081     double getFirstLineIndent();
00082     void   setFirstLineIndent(double newFirstLineIndent);
00083     double getSpaceAbove();
00084     void   setSpaceAbove(double newSpaceAbove);
00085     double getSpaceBelow();
00086     void   setSpaceBelow(double newSpaceBelow);
00087     QList<ParagraphStyle::TabRecord>* getTabValues();
00088     void   setTabValue(double newTabValue, TabType ttype = LEFT_T);
00089     bool   hasDropCap();
00090     void   setDropCap(bool newDropCap);
00091     void   setDropCap(int newHeight);
00092     int    getDropCapHeight();
00093     void   setDropCapHeight(int newHeight);
00094     bool   isAdjToBaseline();
00095     void   setAdjToBaseline(bool newAdjToBaseline);
00096     void   getStyle(gtStyle* style);
00097     gtParagraphStyle(QString name);
00098     gtParagraphStyle(const gtParagraphStyle& p);
00099     gtParagraphStyle(const gtStyle& s);
00100     ~gtParagraphStyle();
00101     QString target();
00102 };
00103 
00104 #endif // GTPARAGRAPHSTYLE_H
Created with personalized Doxygen. This is documentation for GPL software Scribus - Open Source Desktop Publishing.