Back to index

scribus-ng  1.3.4.dfsg+svn20071115
sampleitem.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 #ifndef SAMPLEITEM_H
00008 #define SAMPLEITEM_H
00009 
00010 #include <qobject.h>
00011 #include "scribusapi.h"
00012 #include "scribusstructs.h"
00013 
00014 class QString;
00015 class QColor;
00016 class ScribusDoc;
00017 
00018 
00033 class SCRIBUS_API SampleItem : QObject
00034 {
00035        Q_OBJECT
00036 
00037        public:
00038               SampleItem(ScribusDoc* doc);
00039               ~SampleItem();
00040 
00043               void setText(QString aText);
00046               void setLoremIpsum(int para);
00049               void setBgColor(QColor c);
00050               void setBgShade(int c);
00053               void setBgColorMngt(bool enable);
00056               void setTxColor(QColor c);
00057               void setTxShade(int c);
00058 
00061               void setStyle(const ParagraphStyle& aStyle);
00063               void setLineSpaMode(int lineSpaMode);
00064               void setLineSpa(double lineSpa);
00065               void setTextAlignment(int textAlignment);
00066               void setIndent(double indent);
00067               void setRightMargin(double indent);
00068               void setFirst(double first);
00069               void setGapBefore(double gapBefore);
00070               void setGapAfter(double gapAfter);
00071               void setFont(QString font);
00075               void setFontSize(int fontSize, bool autoLineSpa=false);
00076               //void setTabValues(QValueList<PageItem::TabRecord> tabValues);
00077               void setDrop(bool drop);
00078               void setDropLin(int dropLin);
00079               void setDropDist(double dropDist);
00080               void setFontEffect(int fontEffect);
00081               void setFColor(QString fColor);
00082               void setFShade(int fShade);
00083               void setSColor(QString sColor);
00084               void setSShade(int sShade);
00085               void setBaseAdj(bool baseAdj);
00086               void setTxtShadowX(int txtShadowX);
00087               void setTxtShadowY(int txtShadowY);
00088               void setTxtOutline(int txtOutline);
00089               void setTxtUnderPos(int txtUnderPos);
00090               void setTxtUnderWidth(int txtUnderWidth);
00091               void setTxtStrikePos(int txtStrikePos);
00092               void setTxtStrikeWidth(int txtStrikeWidth);
00093               void setScaleH(int scaleH);
00094               void setScaleV(int scaleV);
00095               void setBaseOff(int baseOff);
00096               void setKernVal(int kernVal);
00097 
00103               QPixmap getSample(int width, int height);
00105               void cleanupTemporary();
00106 
00107        private:
00109               QString text;
00111               ParagraphStyle tmpStyle;
00114               ScribusDoc *m_Doc;
00116               bool used;
00117               int bgShade;
00118 };
00119 
00120 #endif