gtparagraphstyle.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
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