Scribus
Open source desktop publishing at your fingertips
sampleitem.h
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 */
7 #ifndef SAMPLEITEM_H
8 #define SAMPLEITEM_H
9 
10 #include <QObject>
11 #include <QPixmap>
12 #include "scribusapi.h"
13 #include "scribusstructs.h"
14 
15 class QString;
16 class QColor;
17 class ScribusDoc;
18 
19 
25 class SCRIBUS_API SampleItem : QObject
26 {
27  Q_OBJECT
28 
29  public:
30  SampleItem();
31  ~SampleItem();
32 
35  void setText(QString aText);
38  void setLoremIpsum(int para);
41  void setBgColor(QColor c);
42  void setBgShade(int c);
45  void setBgColorMgmt(bool enable);
48  void setTxColor(QColor c);
49  void setTxShade(int c);
50 
53  void setStyle(const ParagraphStyle& aStyle);
55  void setLineSpaMode(int lineSpaMode);
56  void setLineSpa(double lineSpa);
57  void setTextAlignment(int textAlignment);
58  void setIndent(double indent);
59  void setRightMargin(double indent);
60  void setFirst(double first);
61  void setGapBefore(double gapBefore);
62  void setGapAfter(double gapAfter);
63  void setFont(QString font);
67  void setFontSize(int fontSize, bool autoLineSpa=false);
68  //void setTabValues(QValueList<PageItem::TabRecord> tabValues);
69  void setDrop(bool drop);
70  void setBullet(bool bul);
71  void setNum(bool num);
72  void setDropLin(int dropLin);
73  void setParEffectDist(double dropDist);
74  void setFontEffect(int fontEffect);
75  void setFColor(QString fColor);
76  void setFShade(int fShade);
77  void setSColor(QString sColor);
78  void setSShade(int sShade);
79  void setBaseAdj(bool baseAdj);
80  void setTxtShadowX(int txtShadowX);
81  void setTxtShadowY(int txtShadowY);
82  void setTxtOutline(int txtOutline);
83  void setTxtUnderPos(int txtUnderPos);
84  void setTxtUnderWidth(int txtUnderWidth);
85  void setTxtStrikePos(int txtStrikePos);
86  void setTxtStrikeWidth(int txtStrikeWidth);
87  void setScaleH(int scaleH);
88  void setScaleV(int scaleV);
89  void setBaseOff(int baseOff);
90  void setKernVal(int kernVal);
91 
97  QPixmap getSample(int width, int height);
98 
99  private:
101  QString text;
103  ParagraphStyle tmpStyle;
106  ScribusDoc *m_Doc;
108  int bgShade;
109 };
110 
111 #endif
Definition: paragraphstyle.h:27
the Document Class
Definition: scribusdoc.h:90
Provides sample "text frame" as pixmap. You can create a pixmap with standard Scribus text frame here...
Definition: sampleitem.h:25