gtwriter.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 GTWRITER_H
00028 #define GTWRITER_H
00029
00030 #include "scribusapi.h"
00031 #include "gtaction.h"
00032 #include "gtfont.h"
00033 #include "gtframestyle.h"
00034 #include "gtparagraphstyle.h"
00035 #include "gtstyle.h"
00036
00037 class PageItem;
00038
00039
00040
00041
00042 class SCRIBUS_API gtWriter
00043 {
00044 public:
00045
00046 gtWriter(bool append, PageItem *pageitem);
00047 ~gtWriter();
00048 gtFrameStyle* getDefaultStyle();
00049 void setFrameStyle(gtFrameStyle *fStyle);
00050 void setParagraphStyle(gtParagraphStyle *pStyle);
00051 void setCharacterStyle(gtStyle *cStyle);
00052 void unsetFrameStyle();
00053 void unsetParagraphStyle();
00054 void unsetCharacterStyle();
00055 double getPreferredLineSpacing(int fontSize);
00056 double getPreferredLineSpacing(double fontSize);
00057 void append(const QString& text);
00058 void append(const QString& text, gtStyle *style);
00059 void append(const QString& text, gtStyle *style, bool updatePStyle);
00060 double getFrameWidth();
00061 QString getFrameName();
00062 bool getUpdateParagraphStyles();
00063 void setUpdateParagraphStyles(bool newUPS);
00064 bool getOverridePStyleFont();
00065 void setOverridePStyleFont(bool newOPSF);
00066 private:
00067 gtAction *action;
00068 gtFrameStyle* defaultStyle;
00069 gtStyle* currentStyle;
00070
00071
00072
00073
00074
00075
00076
00077 gtFrameStyle* frameStyle;
00078 gtStyle* paragraphStyle;
00079 gtStyle* characterStyle;
00080 bool errorSet;
00081 bool shouldAppend;
00082 void setDefaultStyle();
00083 };
00084
00085 #endif // WRITER_H