Scribus
Open source desktop publishing at your fingertips
pageitem.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 /***************************************************************************
8  pageitem.h - description
9  -------------------
10  begin : Sat Apr 7 2001
11  copyright : (C) 2001 by Franz Schmid
12  email : Franz.Schmid@altmuehlnet.de
13  ***************************************************************************/
14 
15 /***************************************************************************
16  * *
17  * This program is free software; you can redistribute it and/or modify *
18  * it under the terms of the GNU General Public License as published by *
19  * the Free Software Foundation; either version 2 of the License, or *
20  * (at your option) any later version. *
21  * *
22  ***************************************************************************/
23 
24 #ifndef PAGEITEM_H
25 #define PAGEITEM_H
26 
27 #include <QObject>
28 #include <QWidget>
29 #include <QPolygon>
30 #include <QStack>
31 #include <QList>
32 #include <QKeyEvent>
33 #include <QMenu>
34 #include <QRect>
35 #include <QRectF>
36 #include <QVector>
37 #include <QTemporaryFile>
38 
39 #include "scribusapi.h"
40 #include "annotation.h"
41 #include "commonstrings.h"
42 #include "colormgmt/sccolormgmtstructs.h"
43 #include "desaxe/saxio.h"
44 #include "observable.h"
45 #include "pagestructs.h"
46 #include "scimage.h"
47 #include "margins.h"
48 #include "sctextstruct.h"
49 #include "text/storytext.h"
50 #include "text/textlayout.h"
51 #include "undoobject.h"
52 #include "vgradient.h"
53 #include "mesh.h"
54 #ifdef HAVE_CONFIG_H
55 #include "scconfig.h"
56 #endif
57 
58 class QFrame;
59 class QGridLayout;
60 class ResourceCollection;
61 class ScPainter;
62 class ScribusDoc;
63 class SimpleState;
64 class UndoManager;
65 class UndoState;
66 
67 
68 class PageItem_Arc;
69 class PageItem_Group;
72 class PageItem_Line;
73 class PageItem_NoteFrame;
74 class PageItem_OSGFrame;
75 class PageItem_PathText;
76 class PageItem_PolyLine;
77 class PageItem_Polygon;
79 class PageItem_Spiral;
80 class PageItem_Symbol;
81 class PageItem_Table;
82 class PageItem_TextFrame;
83 
88 #if defined(_MSC_VER)
89 #define _unlink unlink
90 #endif
91 
92 class SCRIBUS_API PageItem : public QObject, public UndoObject, public SaxIO, public SingleObservable<PageItem>
93 {
94  Q_OBJECT
95 
96  // Properties - see http://doc.trolltech.com/3.3/properties.html
97  // See the accessors of these properties for details on their use.
98  Q_PROPERTY(QString itemName READ itemName WRITE setItemName DESIGNABLE false)
99  Q_PROPERTY(QString fillColor READ fillColor WRITE setFillColor DESIGNABLE false)
100  Q_PROPERTY(QString lineColor READ lineColor WRITE setLineColor DESIGNABLE false)
101  Q_PROPERTY(double fillShade READ fillShade WRITE setFillShade DESIGNABLE false)
102  Q_PROPERTY(double lineShade READ lineShade WRITE setLineShade DESIGNABLE false)
103  Q_PROPERTY(double fillTransparency READ fillTransparency WRITE setFillTransparency DESIGNABLE false)
104  Q_PROPERTY(double lineTransparency READ lineTransparency WRITE setLineTransparency DESIGNABLE false)
105  Q_PROPERTY(bool m_Locked READ locked WRITE setLocked DESIGNABLE false)
106  Q_PROPERTY(bool m_SizeLocked READ sizeLocked WRITE setSizeLocked DESIGNABLE false)
107  //used for notes frames
108  Q_PROPERTY(bool m_SizeHLocked READ sizeHLocked WRITE setSizeHLocked DESIGNABLE false)
109  Q_PROPERTY(bool m_SizeVLocked READ sizeVLocked WRITE setSizeVLocked DESIGNABLE false)
110  Q_PROPERTY(bool m_ImageIsFlippedV READ imageFlippedV WRITE setImageFlippedV DESIGNABLE false)
111  Q_PROPERTY(bool m_ImageIsFlippedH READ imageFlippedH WRITE setImageFlippedH DESIGNABLE false)
112  Q_PROPERTY(double lineWidth READ lineWidth WRITE setLineWidth DESIGNABLE false)
113  Q_PROPERTY(QString customLineStyle READ customLineStyle WRITE setCustomLineStyle DESIGNABLE false)
114  Q_PROPERTY(int startArrowIndex READ startArrowIndex WRITE setStartArrowIndex DESIGNABLE false)
115  Q_PROPERTY(int endArrowIndex READ endArrowIndex WRITE setEndArrowIndex DESIGNABLE false)
116 
117  Q_PROPERTY(bool m_PrintEnabled READ printEnabled WRITE setPrintEnabled DESIGNABLE false)
118  Q_PROPERTY(double xPos READ xPos WRITE setXPos DESIGNABLE false)
119  Q_PROPERTY(double yPos READ yPos WRITE setYPos DESIGNABLE false)
120  Q_PROPERTY(double width READ width WRITE setWidth DESIGNABLE false)
121  Q_PROPERTY(double height READ height WRITE setHeight DESIGNABLE false)
122  Q_PROPERTY(double m_rotation READ rotation WRITE setRotation DESIGNABLE false)
123  Q_PROPERTY(double m_imageXScale READ imageXScale WRITE setImageXScale DESIGNABLE false)
124  Q_PROPERTY(double m_imageYScale READ imageYScale WRITE setImageYScale DESIGNABLE false)
125  Q_PROPERTY(double imageXOffset READ imageXOffset WRITE setImageXOffset DESIGNABLE false)
126  Q_PROPERTY(double imageYOffset READ imageYOffset WRITE setImageYOffset DESIGNABLE false)
127  Q_PROPERTY(bool m_isReversed READ reversed WRITE setReversed DESIGNABLE false)
128  Q_PROPERTY(double m_roundedCorderRadius READ cornerRadius WRITE setCornerRadius DESIGNABLE false)
129  Q_PROPERTY(double textToFrameDistLeft READ textToFrameDistLeft WRITE setTextToFrameDistLeft DESIGNABLE false)
130  Q_PROPERTY(double textToFrameDistRight READ textToFrameDistRight WRITE setTextToFrameDistRight DESIGNABLE false)
131  Q_PROPERTY(double textToFrameDistTop READ textToFrameDistTop WRITE setTextToFrameDistTop DESIGNABLE false)
132  Q_PROPERTY(double textToFrameDistBottom READ textToFrameDistBottom WRITE setTextToFrameDistBottom DESIGNABLE false)
133  Q_PROPERTY(double ColGap READ columnGap WRITE setColumnGap DESIGNABLE false)
134  Q_PROPERTY(int Cols READ columns WRITE setColumns DESIGNABLE false)
135  Q_ENUMS(FirstLineOffsetPolicy)
136  Q_PROPERTY(FirstLineOffsetPolicy firstLineOffset READ firstLineOffset WRITE setFirstLineOffset DESIGNABLE false)
137  // FIXME: QMetaProperty can't translate these to/from enumerator names, probably because the
138  // properties aren't moc'd in the Qt sources. They work fine in their
139  // current state as plain integer properties.
140 // Q_ENUMS(PenStyle)
141 // Q_PROPERTY(PenStyle lineStyle READ lineStyle WRITE setLineStyle DESIGNABLE false)
142 // Q_ENUMS(PenCapStyle)
143 // Q_PROPERTY(PenCapStyle lineEnd READ lineEnd WRITE setLineEnd DESIGNABLE false)
144 // Q_ENUMS(PenJoinStyle)
145 // Q_PROPERTY(PenJoinStyle lineJoin READ lineJoin WRITE setLineJoin DESIGNABLE false)
146 
147  // This property may not hang around for too long, but should be useful
148  // when testing out the pageitem refactoring work. Setting it is unlikely
149  // to currently have the desired effect.
154  Q_ENUMS(ItemType)
155  Q_PROPERTY(ItemType itemType READ itemType WRITE convertTo DESIGNABLE false)
156 
157 public: // Start enumerator definitions
158 
162  enum DrawOption {
163  NoRotation = 1, // Draw as if item was not rotated
164  NoSoftShadow = 2
165  };
166 
174  enum ItemType {
175  ItemType1 = 1,
176  ImageFrame = 2,
177  ItemType3 = 3,
178  TextFrame = 4,
179  Line = 5,
180  Polygon = 6,
181  PolyLine = 7,
182  PathText = 8,
183  LatexFrame = 9,
184  OSGFrame = 10,
185  Symbol = 11,
186  Group = 12,
187  RegularPolygon = 13,
188  Arc = 14,
189  Spiral = 15,
190  Table = 16,
191  Multiple = 99
192  };
193 
199  TextFlowDisabled = 0,
200  TextFlowUsesFrameShape = 1,
201  TextFlowUsesBoundingBox = 2,
202  TextFlowUsesContourLine = 3,
203  TextFlowUsesImageClipping = 4
204  };
205 
209  Unspecified =-1,
210  Rectangle = 0,
211  Ellipse = 1,
212  Round = 2,
213  Other = 3
214  };
215  //End enumerator definitions
216 
217 public: // Start public functions
218 
219  PageItem(ScribusDoc *pa, ItemType newType, double x, double y, double w, double h, double w2, QString fill, QString outline);
220  virtual ~PageItem();
221 
222  /* these do essentially the same as a dynamic cast but might be more readable */
223  virtual PageItem_Arc * asArc() { return NULL; }
224  virtual PageItem_Group * asGroupFrame() { return NULL; }
225  virtual PageItem_ImageFrame * asImageFrame() { return NULL; }
226  virtual PageItem_LatexFrame * asLatexFrame() { return NULL; }
227  virtual PageItem_Line * asLine() { return NULL; }
228  virtual PageItem_NoteFrame * asNoteFrame() { return NULL; }
229  virtual PageItem_OSGFrame * asOSGFrame() { return NULL; }
230  virtual PageItem_PathText * asPathText() { return NULL; }
231  virtual PageItem_PolyLine * asPolyLine() { return NULL; }
232  virtual PageItem_Polygon * asPolygon() { return NULL; }
233  virtual PageItem_RegularPolygon * asRegularPolygon() { return NULL; }
234  virtual PageItem_Spiral * asSpiral() { return NULL; }
235  virtual PageItem_Symbol * asSymbolFrame() { return NULL; }
236  virtual PageItem_Table * asTable() { return NULL; }
237  virtual PageItem_TextFrame * asTextFrame() { return NULL; }
238 
239  virtual bool isArc() const { return false; }
240  virtual bool isAutoNoteFrame() const { return false; }
241  virtual bool isGroup() const { return false; }
242  virtual bool isImageFrame() const { return false; }
243  virtual bool isLatexFrame() const { return false; }
244  virtual bool isLine() const { return false; }
245  virtual bool isNoteFrame() const { return false; }
246  virtual bool isOSGFrame() const { return false; }
247  virtual bool isPathText() const { return false; }
248  virtual bool isPolyLine() const { return false; }
249  virtual bool isPolygon() const { return false; }
250  virtual bool isRegularPolygon() const { return false; }
251  virtual bool isSpiral() const { return false; }
252  virtual bool isSymbol() const { return false; }
253  virtual bool isTable() const { return false; }
254  virtual bool isTextFrame() const { return false; }
255 
256  virtual bool isGroupChild() const;
257  virtual bool isTableCell() const;
258 
259  PageItem_Group* parentGroup() const { return (Parent ? Parent->asGroupFrame() : NULL); }
260  PageItem_Table* parentTable() const { return (Parent ? Parent->asTable() : NULL); }
261 
262  virtual void applicableActions(QStringList& actionList) = 0;
263  virtual QString infoDescription();
264  virtual bool createInfoGroup(QFrame *, QGridLayout *) {return false;}
265 
266  //<< ********* Functions related to drawing the item *********
267 
268  void DrawObj(ScPainter *p, QRectF e);
269  void DrawObj_Pre(ScPainter *p);
270  virtual void DrawObj_Post(ScPainter *p);
271  virtual void DrawObj_Decoration(ScPainter *p);
272  virtual void DrawObj_Item(ScPainter *p, QRectF e) = 0;
273  QImage DrawObj_toImage(double maxSize, int options = 0);
274  QImage DrawObj_toImage(QList<PageItem*> &emG, double scaling);
275  void DrawObj_Embedded(ScPainter *p, QRectF e, const CharStyle& style, PageItem* cembedded);
276  void DrawStrokePattern(ScPainter *p, QPainterPath &path);
277  void DrawSoftShadow(ScPainter *p);
281  QRect getRedrawBounding(const double);
282  void setRedrawBounding();
283  void setPolyClip(int up, int down = 0);
284  void updatePolyClip();
285  //added switch for not updating welded items - used by notes frames with automatic size adjusted
286  void updateClip(bool updateWelded = true);
287  void convertClip();
288 
289  QRectF getBoundingRect() const;
290  QRectF getCurrentBoundingRect(double moreSpace = 0.0) const;
291  QRectF getVisualBoundingRect() const;
292 
293  virtual void getBoundingRect(double *x1, double *y1, double *x2, double *y2) const;
294  virtual void getVisualBoundingRect(double *x1, double *y1, double *x2, double *y2) const;
295 
296 
297  //>> ********* Functions related to drawing the item *********
298 
299 
300 
301  //<< ********* Functions to work on the contents of the items *********
302 
308  virtual void clearContents() {}
309  virtual void truncateContents() {}
310 
311  //>> ********* Functions to work on the contents of the items *********
312 
313  //<< ********* Functions for user interaction with the item **********
314 
322  bool pointWithinItem(const int x, const int y) const;
331  bool mouseWithinItem(const int x, const int y, double scale) const;
332 
333  virtual void handleModeEditKey(QKeyEvent *k, bool &keyRepeat);
334 
335  //>> ********* Functions for user interaction with the item **********
336 
337 
338  int level() const;
339  void saxx(SaxHandler& handler, const Xml_string& elemtag) const {}
340  void saxx(SaxHandler& handler) const {}
341 
342 
347  void AdjustPictScale();
348 
349 
350 
351  void updateGradientVectors();
352 
357  void moveImageInFrame(double newX, double newY);
358  ObjAttrVector* getObjectAttributes();
362  QList<ObjectAttribute> getObjectAttributes(QString attributeName) const;
366  ObjectAttribute getObjectAttribute(QString) const;
367  void setObjectAttributes(ObjAttrVector*);
368 
369 
370 
371  void SetFrameShape(int count, double *vals);
372  void SetRectFrame();
373  void SetOvalFrame();
374  void SetFrameRound();
375  QTransform getGroupTransform() const;
376  void getTransform(QTransform& mat) const;
377  QTransform getTransform() const;
378 
379 
381  virtual void invalidateLayout() { invalid = true; }
383  virtual void layout() {}
385  PageItem * frameTextEnd();
387  bool frameOverflows() const;
388  bool frameUnderflows() const;
389  int frameOverflowCount() const;
390  int frameOverflowBlankCount() const;
392  void drawOverflowMarker(ScPainter *p);
394  int firstInFrame() const;
396  int lastInFrame() const;
397 
398  bool frameDisplays(int textpos) const;
399  const ParagraphStyle& currentStyle() const;
400  ParagraphStyle& changeCurrentStyle();
401  const CharStyle& currentCharStyle() const;
404  void currentTextProps(ParagraphStyle& parStyle) const;
405  // deprecated:
406  double layoutGlyphs(const CharStyle& style, const QString& chars, LayoutFlags flags, GlyphLayout& layout);
407  void SetQColor(QColor *tmp, QString farbe, double shad);
408  void drawGlyphs(ScPainter *p, const CharStyle& style, LayoutFlags flags, GlyphLayout& glyphs );
409  void DrawPolyL(QPainter *p, QPolygon pts);
410  QString ExpandToken(uint base);
411  const FPointArray shape() const { return PoLine; }
412  void setShape(FPointArray val) { PoLine = val; }
413  const FPointArray contour() const { return ContourLine; }
414  void setContour(FPointArray val) { ContourLine = val; }
415  bool flipPathText() const { return textPathFlipped; }
416  void setFlipPathText(bool val) { textPathFlipped = val; }
417  int pathTextType() const { return textPathType; }
418  void setPathTextType(int val) { textPathType = val; }
419  double pathTextBaseOffset() const { return BaseOffs; }
420  void setPathTextBaseOffset(double val) { BaseOffs = val; }
421  bool pathTextShowFrame() const { return PoShow; }
422  void setPathTextShowFrame(bool val) { PoShow = val; }
423 
424  bool useEmbeddedImageProfile() const { return UseEmbedded; }
425  void setUseEmbeddedImageProfile(bool val) { UseEmbedded = val; }
426  QString embeddedImageProfile() const { return EmProfile; }
427  void setEmbeddedImageProfile(QString val) { EmProfile = val; }
428  bool drawFrame() { return ((m_ItemType == TextFrame && !m_sampleItem) || (m_ItemType == ImageFrame) || (m_ItemType == PathText)); }
429  QString externalFile() const { return Pfile; }
430  void setExternalFile(QString val);
431  void setImagePagenumber(int num) { pixm.imgInfo.actualPageNumber = num; }
432  void setResolution(int);
433 
434  //FIXME: maybe these should go into annotation?
435  QString fileIconPressed() const { return Pfile2; }
436  void setFileIconPressed(QString val);
437  QString fileIconRollover() const { return Pfile3; }
438  void setFileIconRollover(QString val);
439  int cmsRenderingIntent() const { return IRender; }
440  void setCmsRenderingIntent(eRenderIntent val) { IRender = val; }
441  QString cmsProfile() const { return IProfile; }
442  void setCmsProfile(QString val) { IProfile = val; }
443  void setOverrideCompressionMethod(bool val) { OverrideCompressionMethod = val; }
444  void setCompressionMethodIndex(int val) { CompressionMethodIndex = val; }
445  void setOverrideCompressionQuality(bool val) { OverrideCompressionQuality = val; }
446  void setCompressionQualityIndex(int val) { CompressionQualityIndex = val; }
447  PageItem* prevInChain() { return BackBox; }
448  PageItem* nextInChain() { return NextBox; }
449  const PageItem* prevInChain() const { return BackBox; }
450  const PageItem* nextInChain() const { return NextBox; }
451  //you can change all code for search first or last item in chain
452  PageItem* firstInChain();
453  PageItem* lastInChain();
454  bool testLinkCandidate(PageItem* nextFrame);
455  void unlink(bool createUndo = true);
456  void link(PageItem* nextFrame, bool addPARSEP = true);
457  void dropLinks();
458  void unlinkWithText(bool);
459  void setSampleItem(bool b) {m_sampleItem=b;}
460  const QVector<double>& dashes() const { return DashValues; }
461  QVector<double>& dashes() { return DashValues; }
462  void setDashes(QVector<double> val) { DashValues = val; }
463  double dashOffset() const { return DashOffset; }
464  void setDashOffset(double val) { DashOffset = val; }
465  virtual QList<PageItem*> getItemList();
466 
467  //<< ********* Attributes of the item *********
468  //Position
469  double xPos() const { return m_xPos; }
470  double yPos() const { return m_yPos; }
471  double visualXPos() const;
472  double visualYPos() const;
473  FPoint xyPos() const { return FPoint(m_xPos, m_yPos); }
474  void setXPos(const double, bool drawingOnly=false);
475  void setYPos(const double, bool drawingOnly=false);
476  void setXYPos(const double, const double, bool drawingOnly=false);
477  void moveBy(const double, const double, bool drawingOnly=false);
478  //Size
479  double width() const { return m_width; }
480  double height() const { return m_height; }
481  double visualWidth() const;
482  double visualHeight() const;
483  double visualLineWidth();
484  void setWidth(const double);
485  void setHeight(const double);
486  void setWidthHeight(const double, const double, bool drawingOnly);
487  void setWidthHeight(const double, const double);
488  void resizeBy(const double, const double);
489  //Rotation
490  double rotation() const { return m_rotation; }
491  void setRotation(const double, bool drawingOnly);
492  void setRotation(const double r) { setRotation(r, false); }
493  void rotateBy(const double);
494  //Selection
495  bool isSelected() const { return m_isSelected; }
496  void setSelected(const bool);
497  //Image Data
498  double imageXScale() const { return m_imageXScale; }
499  double imageYScale() const { return m_imageYScale; }
500  void setImageXScale(const double);
501  void setImageYScale(const double);
502  void setImageXYScale(const double, const double);
503  double imageXOffset() const { return m_imageXOffset; }
504  double imageYOffset() const { return m_imageYOffset; }
505  void setImageXOffset(const double);
506  void setImageYOffset(const double);
507  void moveImageXYOffsetBy(const double, const double);
508  void setImageXYOffset(const double, const double);
509  double imageRotation() const { return m_imageRotation; }
510  void setImageRotation(const double newRotation);
511  //Reverse
512  bool reversed() const { return m_isReversed; }
513  void setReversed(bool);
514  //Rounded Corners
515  double cornerRadius() const { return m_roundedCorderRadius; }
516  void setCornerRadius(double);
517  // PDF bookmark
518  bool isPDFBookmark() const { return isBookmark; }
519  void setIsPDFBookmark(bool val) { isBookmark = val; }
520 
521  int gradientType() const { return GrType; }
522  void setGradientType(int val);
523  double gradientStartX() const { return GrStartX; }
524  void setGradientStartX(double val);
525  double gradientStartY() const { return GrStartY; }
526  void setGradientStartY(double val);
527  double gradientEndX() const { return GrEndX; }
528  void setGradientEndX(double val);
529  double gradientEndY() const { return GrEndY; }
530  void setGradientEndY(double val);
531  double gradientFocalX() const { return GrFocalX; }
532  void setGradientFocalX(double val);
533  double gradientFocalY() const { return GrFocalY; }
534  void setGradientFocalY(double val);
535  double gradientScale() const { return GrScale; }
536  void setGradientScale(double val);
537  double gradientSkew() const { return GrSkew; }
538  void setGradientSkew(double val);
539  double gradientMaskStartX() const { return GrMaskStartX; }
540  void setGradientMaskStartX(double val);
541  double gradientMaskStartY() const { return GrMaskStartY; }
542  void setGradientMaskStartY(double val);
543  double gradientMaskEndX() const { return GrMaskEndX; }
544  void setGradientMaskEndX(double val);
545  double gradientMaskEndY() const { return GrMaskEndY; }
546  void setGradientMaskEndY(double val);
547  double gradientMaskFocalX() const { return GrMaskFocalX; }
548  void setGradientMaskFocalX(double val);
549  double gradientMaskFocalY() const { return GrMaskFocalY; }
550  void setGradientMaskFocalY(double val);
551  double gradientMaskScale() const { return GrMaskScale; }
552  void setGradientMaskScale(double val);
553  double gradientMaskSkew() const { return GrMaskSkew; }
554  void setGradientMaskSkew(double val);
555  FPoint gradientControl1() const { return GrControl1; }
556  void setGradientControl1(FPoint val);
557  FPoint gradientControl2() const { return GrControl2; }
558  void setGradientControl2(FPoint val);
559  FPoint gradientControl3() const { return GrControl3; }
560  void setGradientControl3(FPoint val);
561  FPoint gradientControl4() const { return GrControl4; }
562  void setGradientControl4(FPoint val);
563  FPoint gradientControl5() const { return GrControl5; }
564  void setGradientControl5(FPoint val);
565  double gradientStrokeScale() const { return GrStrokeScale; }
566  void setGradientStrokeScale(double val);
567  double gradientStrokeSkew() const { return GrStrokeSkew; }
568  void setGradientStrokeSkew(double val);
569  double gradientStrokeFocalX() const { return GrStrokeFocalX; }
570  void setGradientStrokeFocalX(double val);
571  double gradientStrokeFocalY() const { return GrStrokeFocalY; }
572  void setGradientStrokeFocalY(double val);
573  double gradientStrokeStartX() const { return GrStrokeStartX; }
574  void setGradientStrokeStartX(double val);
575  double gradientStrokeStartY() const { return GrStrokeStartY; }
576  void setGradientStrokeStartY(double val);
577  double gradientStrokeEndX() const { return GrStrokeEndX; }
578  void setGradientStrokeEndX(double val);
579  double gradientStrokeEndY() const { return GrStrokeEndY; }
580  void setGradientStrokeEndY(double val);
581  QString gradientCol1() const { return GrColorP1; }
582  void setGradientCol1(QString val);
583  QString gradientCol2() const { return GrColorP2; }
584  void setGradientCol2(QString val);
585  QString gradientCol3() const { return GrColorP3; }
586  void setGradientCol3(QString val);
587  QString gradientCol4() const { return GrColorP4; }
588  void setGradientCol4(QString val);
589  double gradientTransp1() const { return GrCol1transp; }
590  void setGradientTransp1(double val);
591  double gradientTransp2() const { return GrCol2transp; }
592  void setGradientTransp2(double val);
593  double gradientTransp3() const { return GrCol3transp; }
594  void setGradientTransp3(double val);
595  double gradientTransp4() const { return GrCol4transp; }
596  void setGradientTransp4(double val);
597  int gradientShade1() const { return GrCol1Shade; }
598  void setGradientShade1(int val);
599  int gradientShade2() const { return GrCol2Shade; }
600  void setGradientShade2(int val);
601  int gradientShade3() const { return GrCol3Shade; }
602  void setGradientShade3(int val);
603  int gradientShade4() const { return GrCol4Shade; }
604  void setGradientShade4(int val);
605  QColor gradientColor1() const { return GrColorP1QColor; }
606  void setGradientColor1(QColor val);
607  QColor gradientColor2() const { return GrColorP2QColor; }
608  void setGradientColor2(QColor val);
609  QColor gradientColor3() const { return GrColorP3QColor; }
610  void setGradientColor3(QColor val);
611  QColor gradientColor4() const { return GrColorP4QColor; }
612  void setGradientColor4(QColor val);
613  void setGradientExtend(VGradient::VGradientRepeatMethod val);
614  void setStrokeGradientExtend(VGradient::VGradientRepeatMethod val);
615  VGradient::VGradientRepeatMethod getGradientExtend();
616  VGradient::VGradientRepeatMethod getStrokeGradientExtend();
617 
618  //>> ********* Attributes of the item *********
619 
620 
621 
622  bool getSnapToPatchGrid() const { return snapToPatchGrid; }
623  void setSnapToPatchGrid(bool val);
624  void setMaskGradient(VGradient grad);
625  void setFillGradient(VGradient grad);
626  void setStrokeGradient(VGradient grad);
627  void set4ColorGeometry(FPoint c1, FPoint c2, FPoint c3, FPoint c4);
628  void set4ColorTransparency(double t1, double t2, double t3, double t4);
629  void set4ColorShade(int t1, int t2, int t3, int t4);
630  void set4ColorColors(QString col1, QString col2, QString col3, QString col4);
631  void get4ColorGeometry(FPoint &c1, FPoint &c2, FPoint &c3, FPoint &c4);
632  void setDiamondGeometry(FPoint c1, FPoint c2, FPoint c3, FPoint c4, FPoint c5);
633  void get4ColorTransparency(double &t1, double &t2, double &t3, double &t4);
634  void get4ColorColors(QString &col1, QString &col2, QString &col3, QString &col4);
635  void setMeshPointColor(int x, int y, QString color, int shade, double transparency, bool forPatch = false);
636  void createGradientMesh(int rows, int cols);
637  void resetGradientMesh();
638  void meshToShape();
639  void createConicalMesh();
640  VColorStop computeInBetweenStop(VColorStop* last, VColorStop* actual, double t);
641  void gradientVector(double& startX, double& startY, double& endX, double& endY, double &focalX, double &focalY, double &scale, double &skew) const;
642  void setGradientVector(double startX, double startY, double endX, double endY, double focalX, double focalY, double scale, double skew);
643 
644  int strokeGradientType() const { return GrTypeStroke; }
645  void setStrokeGradientType(int val);
646  void strokeGradientVector(double& startX, double& startY, double& endX, double& endY, double &focalX, double &focalY, double &scale, double &skew) const;
647  void setStrokeGradientVector(double startX, double startY, double endX, double endY, double focalX, double focalY, double scale, double skew);
648 
649  int maskType() const { return GrMask; }
650  void setMaskType(int val);
651  void setGradientMask(const QString &newMask);
652  void setPatternMask(const QString &newMask);
653  QString gradientMask() const { return gradientMaskVal; }
654  QString patternMask() const { return patternMaskVal; }
655  void maskVector(double& startX, double& startY, double& endX, double& endY, double &focalX, double &focalY, double &scale, double &skew) const;
656  void setMaskVector(double startX, double startY, double endX, double endY, double focalX, double focalY, double scale, double skew);
657  void maskTransform(double &scaleX, double &scaleY, double &offsetX, double &offsetY, double &rotation, double &skewX, double &skewY) const;
658  void setMaskTransform(double scaleX, double scaleY, double offsetX, double offsetY, double rotation, double skewX, double skewY);
659  void setMaskFlip(bool flipX, bool flipY);
660  void maskFlip(bool &flipX, bool &flipY);
661  //
662  bool fillEvenOdd() const { return fillRule; }
663  void setFillEvenOdd(bool val) { fillRule = val; }
664  //
665  bool overprint() const { return doOverprint; }
666  void setOverprint(bool val);
667 
668  // soft shadow
669  void setHasSoftShadow(bool val);
670  bool hasSoftShadow() { return m_hasSoftShadow; }
671 
672  void setSoftShadowColor(const QString &val);
673  QString softShadowColor() { return m_softShadowColor; }
674 
675  void setSoftShadowShade(int val);
676  int softShadowShade() { return m_softShadowShade; }
677 
678  void setSoftShadowBlurRadius(double val);
679  double softShadowBlurRadius() { return m_softShadowBlurRadius; }
680 
681  void setSoftShadowXOffset(double val);
682  double softShadowXOffset() { return m_softShadowXOffset; }
683 
684  void setSoftShadowYOffset(double val);
685  double softShadowYOffset() { return m_softShadowYOffset; }
686 
687  void setSoftShadowOpacity(double val);
688  double softShadowOpacity() { return m_softShadowOpacity; }
689 
690  void setSoftShadowBlendMode(int val);
691  double softShadowBlendMode() { return m_softShadowBlendMode; }
692 
693  void setSoftShadowErasedByObject(bool val);
694  bool softShadowErasedByObject() { return m_softShadowErasedByObject; }
695 
696  void setSoftShadowHasObjectTransparency(bool val);
697  bool softShadowHasObjectTransparency() { return m_softShadowHasObjectTransparency; }
698 
699  int frameType() const { return FrameType; }
700  void setFrameType(int val) { FrameType = val; }
701  //
702  bool hasDefaultShape() const { return !ClipEdited; }
703  void setHasDefaultShape(bool val) { ClipEdited = !val; }
704  //
705  bool isAutoFrame() const { return isAutoText; }
706  void setIsAutoFrame(bool val) { isAutoText = val; }
707  //
708  bool keepAspectRatio() const { return AspectRatio; }
709  void setKeepAspectRatio(bool val) { AspectRatio = val; }
710  //
711  bool fitImageToFrame() const { return !ScaleType; }
712  void setFitImageToFrame(bool val) { ScaleType = !val; }
713  bool isImageInline() const { return isInlineImage; }
714  void setImageInline(bool val) { isInlineImage = val; }
715  void setInlineExt(QString val) { inlineExt = val; }
716  void setInlineData(QString data);
717  void makeImageInline();
718  void makeImageExternal(QString path);
719 
720  //Text Data - Move to PageItem_TextFrame at some point? --- no, to FrameStyle, av
721  double textToFrameDistLeft() const { return m_textDistanceMargins.left(); }
722  double textToFrameDistRight() const { return m_textDistanceMargins.right(); }
723  double textToFrameDistTop() const { return m_textDistanceMargins.top(); }
724  double textToFrameDistBottom() const { return m_textDistanceMargins.bottom(); }
725  int columns() const { return Cols; }
726  double columnGap() const { return ColGap; }
727  double gridOffset() const;
728  double gridDistance() const;
729  int verticalAlignment();
730  void setTextToFrameDistLeft(double);
731  void setTextToFrameDistRight(double);
732  void setTextToFrameDistTop(double);
733  void setTextToFrameDistBottom(double);
734  void setColumns(int);
735  void setColumnGap(double);
736  void setGridOffset(double);
737  void setGridDistance(double);
738  void setVerticalAlignment(int);
739  FirstLineOffsetPolicy firstLineOffset()const;
740  void setFirstLineOffset(FirstLineOffsetPolicy);
748  void setTextToFrameDist(double newLeft, double newRight, double newTop, double newBottom);
749 
756  QString itemName() const { return AnName; }
765  void setItemName(const QString& newName);
766 
768  QString gradient() const { return gradientVal; }
769 
774  void setGradient(const QString &newGradient);
775 
777  QString strokeGradient() const { return gradientStrokeVal; }
778 
783  void setStrokeGradient(const QString &newGradient);
784 
786  QString pattern() const { return patternVal; }
787 
789  void patternTransform(double &scaleX, double &scaleY, double &offsetX, double &offsetY, double &rotation, double &skewX, double &skewY) const;
790 
795  void setPattern(const QString &newPattern);
796 
800  void setPatternTransform(double scaleX, double scaleY, double offsetX, double offsetY, double rotation, double skewX, double skewY);
801  void setPatternFlip(bool flipX, bool flipY);
802  void patternFlip(bool &flipX, bool &flipY);
803 
805  QString fillColor() const { return fillColorVal; }
810  void setFillColor(const QString &newColor);
811 
813  double fillShade() const { return fillShadeVal; }
818  void setFillShade(double newShade);
819 
821  double fillTransparency() const { return fillTransparencyVal; }
826  void setFillTransparency(double newTransparency);
827 
829  int fillBlendmode() const { return fillBlendmodeVal; }
834  void setFillBlendmode(int newBlendmode);
835 
837  int lineBlendmode() const { return lineBlendmodeVal; }
842  void setLineBlendmode(int newBlendmode);
843 
845  QString lineColor() const { return lineColorVal; }
850  void setLineColor(const QString &newColor);
851 
853  double lineShade() const { return lineShadeVal; }
858  void setLineShade(double newShade);
859 
861  double lineTransparency() const { return lineTransparencyVal; }
866  void setLineTransparency(double newTransparency);
867 
868  void setHatchParameters(int mode, double distance, double angle, bool useBackground, QString background, QString foreground);
869 
871  QString strokePattern() const { return patternStrokeVal; }
872 
874  void strokePatternTransform(double &scaleX, double &scaleY, double &offsetX, double &offsetY, double &rotation, double &skewX, double &skewY, double &space) const;
875 
880  void setStrokePattern(const QString &newPattern);
881 
885  void setStrokePatternTransform(double scaleX, double scaleY, double offsetX, double offsetY, double rotation, double skewX, double skewY, double space);
886  void setStrokePatternFlip(bool flipX, bool flipY);
887  void strokePatternFlip(bool &flipX, bool &flipY);
888  void setStrokePatternToPath(bool enable);
889  bool isStrokePatternToPath();
890 
892  void setLineQColor();
894  void setFillQColor();
895 
897  Qt::PenStyle lineStyle() const { return PLineArt; }
903  void setLineStyle(Qt::PenStyle newStyle);
904 
906  double lineWidth() const { return m_lineWidth; }
911  void setLineWidth(double newWidth);
912 
914  Qt::PenCapStyle lineEnd() const { return PLineEnd; }
920  void setLineEnd(Qt::PenCapStyle newStyle);
921 
923  Qt::PenJoinStyle lineJoin() const { return PLineJoin; }
929  void setLineJoin(Qt::PenJoinStyle newStyle);
930 
932  QString customLineStyle() const { return NamedLStyle; }
937  void setCustomLineStyle(const QString& newStyle);
938 
942  int startArrowIndex() const { return m_startArrowIndex; }
947  void setStartArrowIndex(int newIndex);
948 
952  int endArrowIndex() const { return m_endArrowIndex; }
957  void setEndArrowIndex(int newIndex);
958 
962  int startArrowScale() const { return m_startArrowScale; }
967  void setStartArrowScale(int newScale);
968 
972  int endArrowScale() const { return m_endArrowScale; }
977  void setEndArrowScale(int newScale);
978 
980  bool imageFlippedH() const { return m_ImageIsFlippedH; }
982  void setImageFlippedH(bool flipped);
984  void flipImageH();
985 
987  bool imageFlippedV() const { return m_ImageIsFlippedV; }
989  void setImageFlippedV(bool flipped);
991  void flipImageV();
992 
998  void setImageScalingMode(bool freeScale, bool keepRatio);
999 
1001  void toggleLock();
1003  bool locked() const { return m_Locked; }
1005  void setLocked(bool isLocked);
1006 
1008  void toggleSizeLock();
1010  bool sizeLocked() const { return m_SizeLocked; }
1011  bool sizeHLocked() const { return m_SizeHLocked || m_SizeLocked; }
1012  bool sizeVLocked() const { return m_SizeVLocked || m_SizeLocked; }
1014  void setSizeLocked(bool isLocked);
1015  void setSizeHLocked(bool isLocked) { m_SizeHLocked = isLocked; }
1016  void setSizeVLocked(bool isLocked) { m_SizeVLocked = isLocked; }
1017 
1022  TextFlowMode textFlowMode() const { return textFlowModeVal; }
1023 
1029  void setTextFlowMode(TextFlowMode mode);
1030 
1035  bool textFlowAroundObject() const { return (textFlowModeVal != TextFlowDisabled); }
1036 
1041  bool textFlowUsesFrameShape() const { return (textFlowModeVal == TextFlowUsesFrameShape); }
1042 
1047  bool textFlowUsesBoundingBox() const { return (textFlowModeVal == TextFlowUsesBoundingBox); }
1048 
1053  bool textFlowUsesContourLine() const { return (textFlowModeVal == TextFlowUsesContourLine); }
1054 
1059  bool textFlowUsesImageClipping() const { return (textFlowModeVal == TextFlowUsesImageClipping); }
1060 
1065  void checkTextFlowInteractions(bool allItems = false);
1066 
1074  ItemType itemType() const { return m_ItemType; }
1082  virtual ItemType realItemType() const { return m_ItemType; }
1087  void convertTo(ItemType newType);
1088 
1093  virtual void setLayer(int layerId);
1094 
1101  void checkChanges(bool force = false);
1108  void moveUndoAction();
1109  void resizeUndoAction();
1110  void rotateUndoAction();
1111  void changeImageOffsetUndoAction();
1112  void changeImageScaleUndoAction();
1115  void restore(UndoState *state, bool isUndo);
1116 
1117  virtual void getNamedResources(ResourceCollection& lists) const;
1118  virtual void replaceNamedResources(ResourceCollection& newNames);
1119 
1129  QString generateUniqueCopyName(const QString originalName, bool prependCopy = true) const;
1134  bool printEnabled() const { return m_PrintEnabled; }
1139  void setPrintEnabled(bool toPrint);
1140 
1144  void togglePrintEnabled();
1145 
1150  bool isTagged() const { return tagged; }
1155  void setTagged(bool);
1156 
1161  bool loadImage(const QString& filename, const bool reload, const int gsResolution=-1, bool showMsg = false);
1162 
1163 
1168  bool connectToGUI();
1169  bool disconnectFromGUI();
1173  void emitAllToGUI();
1174 
1178  ScribusDoc* doc() const { return m_Doc; }
1179 
1180  bool isAnnotation() const { return m_isAnnotation; }
1181  void setIsAnnotation(bool);
1182  void setIsBookMark(bool);
1183  void setAnnotation(const Annotation& ad);
1184  Annotation& annotation() { return m_annotation; }
1185  const Annotation& annotation() const { return m_annotation; }
1186 
1187  bool imageVisible() const { return m_imageVisible; }
1188  void setImageVisible(bool);
1189 
1190  void updateConstants();
1191  bool isWelded() {return !weldList.isEmpty(); } //true if to this item some other items are welded (weldList is list of these items)
1192  void weldTo(PageItem* item);
1193  QList<PageItem*> itemsWeldedTo(PageItem* except = NULL);
1194  void unWeld();
1195  void addWelded(PageItem* item);
1196  void moveWelded(double dX, double dY, int weld);
1197  void moveWelded(double dX, double dY, PageItem* except = NULL);
1198  void rotateWelded(double dR, double oldRot);
1199  void setWeldPoint(double dX, double dY, PageItem *pItem);
1200  QString getItemTextSaxed(int selStart, int selLength);
1201  bool groupClipping() { return m_groupClips; }
1202  void setGroupClipping(bool val) { m_groupClips = val; }
1203  bool hasFill() { return ((fillColor() != CommonStrings::None) || (GrType != 0)); }
1204  bool hasStroke() { return ((lineColor() != CommonStrings::None) || (GrTypeStroke != 0) || (!NamedLStyle.isEmpty()) || (!patternStrokeVal.isEmpty())); }
1205 
1206  // End public functions
1207 
1208 public: // Start public variables
1209  int maxCharsInFrame();
1210  bool AutoName;
1211  double gXpos;
1212  double gYpos;
1213  double gWidth;
1214  double gHeight;
1215  int GrType;
1216  double GrStartX;
1217  double GrStartY;
1218  double GrEndX;
1219  double GrEndY;
1220  double GrFocalX;
1221  double GrFocalY;
1222  double GrScale;
1223  double GrSkew;
1224  VGradient::VGradientRepeatMethod GrExtend;
1225  FPoint GrControl1;
1226  FPoint GrControl2;
1227  FPoint GrControl3;
1228  FPoint GrControl4;
1229  FPoint GrControl5;
1230  QString GrColorP1;
1231  QString GrColorP2;
1232  QString GrColorP3;
1233  QString GrColorP4;
1234  double GrCol1transp;
1235  double GrCol2transp;
1236  double GrCol3transp;
1237  double GrCol4transp;
1238  int GrCol1Shade;
1239  int GrCol2Shade;
1240  int GrCol3Shade;
1241  int GrCol4Shade;
1242  QList<meshGradientPatch> meshGradientPatches;
1243  QList<QList<meshPoint> > meshGradientArray;
1244  int selectedMeshPointX;
1245  int selectedMeshPointY;
1246  int selectedMeshControlPoint;
1247  bool snapToPatchGrid;
1248  int Cols;
1249  double ColGap;
1250  double gridOffset_;
1251  double gridValue_;
1252  int m_startArrowIndex;
1253  int m_endArrowIndex;
1254  int m_startArrowScale;
1255  int m_endArrowScale;
1256  Qt::PenStyle PLineArt;
1257  Qt::PenCapStyle PLineEnd;
1258  Qt::PenJoinStyle PLineJoin;
1259  QString NamedLStyle;
1260  QPolygon Clip;
1261 
1262  FPointArray PoLine;
1263  FPointArray ContourLine;
1264  FPointArray imageClip;
1265  QList<uint> Segments;
1266  ScImageEffectList effectsInUse;
1267  bool PoShow;
1268  double BaseOffs;
1269  int textPathType;
1270  bool textPathFlipped;
1271  bool ClipEdited;
1273  uint uniqueNr;
1274  int OwnPage;
1276  int savedOwnPage;
1278  QString Pfile;
1279  QString Pfile2;
1280  QString Pfile3;
1281  QString IProfile;
1282  bool UseEmbedded;
1283  QString EmProfile;
1284  eRenderIntent IRender;
1285  bool OverrideCompressionMethod;
1286  int CompressionMethodIndex;
1287  bool OverrideCompressionQuality;
1288  int CompressionQualityIndex;
1290  int OrigW;
1291  int OrigH;
1292  double BBoxX;
1293  double BBoxH;
1294  double CurX;
1295  double CurY;
1297  TextLayout textLayout;
1298  bool isBookmark;
1299  bool Dirty;
1300  bool invalid;
1301  bool HasSel;
1302  bool FrameOnly;
1303  bool isAutoText;
1304  PageItem *Parent;
1305  bool inPdfArticle;
1306  bool isRaster;
1307  double OldB;
1308  double OldH;
1309  double OldB2;
1310  double OldH2;
1311  bool Sizing;
1312  int LayerID;
1313  bool ScaleType;
1314  bool AspectRatio;
1315  QVector<double> DashValues;
1316  double DashOffset;
1317  VGradient fill_gradient;
1318  bool fillRule;
1319  bool doOverprint;
1320  bool m_hasSoftShadow;
1321  QString m_softShadowColor;
1322  int m_softShadowShade;
1323  double m_softShadowBlurRadius;
1324  double m_softShadowXOffset;
1325  double m_softShadowYOffset;
1326  double m_softShadowOpacity;
1327  int m_softShadowBlendMode;
1328  bool m_softShadowErasedByObject;
1329  bool m_softShadowHasObjectTransparency;
1330  /* Additions for Table Support */
1331  /* now deprecated with the new PageItem_Table */
1332  PageItem* LeftLink;
1333  PageItem* RightLink;
1334  PageItem* TopLink;
1335  PageItem* BottomLink;
1336  int LeftLinkID;
1337  int RightLinkID;
1338  int TopLinkID;
1339  int BottomLinkID;
1340  bool LeftLine;
1341  bool RightLine;
1342  bool TopLine;
1343  bool BottomLine;
1344  bool isTableItem;
1345  /* end deprecated vars */
1346  bool isSingleSel;
1347  QList<PageItem*> groupItemList;
1348  double groupWidth;
1349  double groupHeight;
1350  double BoundingX;
1351  double BoundingY;
1352  double BoundingW;
1353  double BoundingH;
1354  bool ChangedMasterItem;
1355  QString OnMasterPage;
1356  bool isEmbedded;
1357  int inlineCharID;
1358  QString inlineExt;
1360  double m_roundedCorderRadius;
1361 
1362  //Undo Data
1363  double oldXpos;
1364  double oldYpos;
1365  double oldWidth;
1366  double oldHeight;
1367  double oldRot;
1368  double oldLocalScX;
1369  double oldLocalScY;
1370  double oldLocalX;
1371  double oldLocalY;
1372 
1373 
1375 
1378 
1380 
1381  double m_lineWidth; //< Line width
1382  double Oldm_lineWidth;
1383 
1393  double patternStrokeScaleY;
1394  double patternStrokeOffsetX;
1395  double patternStrokeOffsetY;
1396  double patternStrokeRotation;
1397  double patternStrokeSkewX;
1398  double patternStrokeSkewY;
1399  double patternStrokeSpace;
1400  bool patternStrokeMirrorX;
1401  bool patternStrokeMirrorY;
1402  bool patternStrokePath;
1403 
1404 
1410  VGradient stroke_gradient;
1411 
1416  double GrStrokeStartX;
1417  double GrStrokeStartY;
1418  double GrStrokeEndX;
1419  double GrStrokeEndY;
1420  double GrStrokeFocalX;
1421  double GrStrokeFocalY;
1422  double GrStrokeScale;
1423  double GrStrokeSkew;
1424  VGradient::VGradientRepeatMethod GrStrokeExtend;
1425 
1429  int GrMask;
1430  double GrMaskStartX;
1431  double GrMaskStartY;
1432  double GrMaskEndX;
1433  double GrMaskEndY;
1434  double GrMaskFocalX;
1435  double GrMaskFocalY;
1436  double GrMaskScale;
1437  double GrMaskSkew;
1438  double patternMaskScaleX;
1439  double patternMaskScaleY;
1440  double patternMaskOffsetX;
1441  double patternMaskOffsetY;
1442  double patternMaskRotation;
1443  double patternMaskSkewX;
1444  double patternMaskSkewY;
1445  bool patternMaskMirrorX;
1446  bool patternMaskMirrorY;
1447  QString patternMaskVal;
1448  QString gradientMaskVal;
1449  VGradient mask_gradient;
1450 
1453  bool isTempFile;
1454  //items welding (item follows while item moves which they are connected with)
1456  {
1457  PageItem *weldItem;
1458  FPoint weldPoint;
1459  int weldID;
1460  };
1461  QList<WeldingInfo> weldList;
1462  double hatchAngle;
1463  double hatchDistance;
1464  int hatchType; // 0 = single 1 = double 2 = triple
1465  bool hatchUseBackground;
1466  QString hatchBackground;
1467  QString hatchForeground;
1468 
1469  // End public variables
1470 
1471 protected: // Start protected functions
1472  PageItem(const PageItem & other);
1473  void DrawObj_ImageFrame(ScPainter *p, double sc);
1474  void DrawObj_Polygon(ScPainter *p);
1475  void DrawObj_PolyLine(ScPainter *p);
1476  void DrawObj_PathText(ScPainter *p, double sc);
1477  void drawLockedMarker(ScPainter *p);
1478  void drawArrow(ScPainter *p, QTransform &arrowTrans, int arrowIndex);
1479 
1482 
1484  bool checkGradientUndoRedo(SimpleState *state, bool isUndo);
1485 
1492  void restoreAppMode(SimpleState *state, bool isUndo);
1493  void restoreArc(SimpleState *state,bool isUndo);
1494  void restoreArrow(SimpleState *state, bool isUndo, bool isStart);
1495  void restoreBottomTextFrameDist(SimpleState *state, bool isUndo);
1496  void restoreCharStyle(SimpleState *state, bool isUndo);
1497  void restoreClearImage(UndoState *state, bool isUndo);
1498  void restoreColumns(SimpleState *state, bool isUndo);
1499  void restoreColumnsGap(SimpleState *state, bool isUndo);
1500  void restoreConnectPath(SimpleState *state, bool isUndo);
1501  void restoreContourLine(SimpleState *state, bool isUndo);
1502  void restoreCornerRadius(SimpleState *state, bool isUndo);
1503  void restoreCreateMeshGrad(SimpleState *state, bool isUndo);
1504  void restoreCustomLineStyle(SimpleState *state, bool isUndo);
1505  void restoreDefaultParagraphStyle(SimpleState *state, bool isUndo);
1506  void restoreDeleteFrameText(SimpleState *state, bool isUndo);
1507  void restoreDropLinks(UndoState *state, bool isUndo);
1508  void restoreEndArrowScale(SimpleState *state, bool isUndo);
1509  void restoreFill(SimpleState *state, bool isUndo);
1510  void restoreFillGradient(SimpleState *state, bool isUndo);
1511  void restoreFillTP(SimpleState *state, bool isUndo);
1512  void restoreFirstLineOffset(SimpleState *state, bool isUndo);
1513  void restoreGetImage(UndoState *state, bool isUndo);
1514  void restoreGradPos(SimpleState *state,bool isUndo);
1515  void restoreGradientCol1(SimpleState *state, bool isUndo);
1516  void restoreGradientCol2(SimpleState *state, bool isUndo);
1517  void restoreGradientCol3(SimpleState *state, bool isUndo);
1518  void restoreGradientCol4(SimpleState *state, bool isUndo);
1519  void restoreGradientColor1(SimpleState *state, bool isUndo);
1520  void restoreGradientColor2(SimpleState *state, bool isUndo);
1521  void restoreGradientColor3(SimpleState *state, bool isUndo);
1522  void restoreGradientColor4(SimpleState *state, bool isUndo);
1523  void restoreGradientControl1(SimpleState *state, bool isUndo);
1524  void restoreGradientControl2(SimpleState *state, bool isUndo);
1525  void restoreGradientControl3(SimpleState *state, bool isUndo);
1526  void restoreGradientControl4(SimpleState *state, bool isUndo);
1527  void restoreGradientControl5(SimpleState *state, bool isUndo);
1528  void restoreGradientEndX(SimpleState *state, bool isUndo);
1529  void restoreGradientEndY(SimpleState *state, bool isUndo);
1530  void restoreGradientFocalX(SimpleState *state, bool isUndo);
1531  void restoreGradientFocalY(SimpleState *state, bool isUndo);
1532  void restoreGradientMaskEndX(SimpleState *state, bool isUndo);
1533  void restoreGradientMaskEndY(SimpleState *state, bool isUndo);
1534  void restoreGradientMaskFocalX(SimpleState *state, bool isUndo);
1535  void restoreGradientMaskFocalY(SimpleState *state, bool isUndo);
1536  void restoreGradientMaskScale(SimpleState *state, bool isUndo);
1537  void restoreGradientMaskSkew(SimpleState *state, bool isUndo);
1538  void restoreGradientMaskStartX(SimpleState *state, bool isUndo);
1539  void restoreGradientMaskStartY(SimpleState *state, bool isUndo);
1540  void restoreGradientMeshColor(SimpleState *state, bool isUndo);
1541  void restoreGradientScale(SimpleState *state, bool isUndo);
1542  void restoreGradientShade1(SimpleState *state, bool isUndo);
1543  void restoreGradientShade2(SimpleState *state, bool isUndo);
1544  void restoreGradientShade3(SimpleState *state, bool isUndo);
1545  void restoreGradientShade4(SimpleState *state, bool isUndo);
1546  void restoreGradientSkew(SimpleState *state, bool isUndo);
1547  void restoreGradientStartX(SimpleState *state, bool isUndo);
1548  void restoreGradientStartY(SimpleState *state, bool isUndo);
1549  void restoreGradientStrokeEndX(SimpleState *state, bool isUndo);
1550  void restoreGradientStrokeEndY(SimpleState *state, bool isUndo);
1551  void restoreGradientStrokeFocalX(SimpleState *state, bool isUndo);
1552  void restoreGradientStrokeFocalY(SimpleState *state, bool isUndo);
1553  void restoreGradientStrokeScale(SimpleState *state, bool isUndo);
1554  void restoreGradientStrokeSkew(SimpleState *state, bool isUndo);
1555  void restoreGradientStrokeStartX(SimpleState *state, bool isUndo);
1556  void restoreGradientStrokeStartY(SimpleState *state, bool isUndo);
1557  void restoreGradientTrans1(SimpleState *state, bool isUndo);
1558  void restoreGradientTrans2(SimpleState *state, bool isUndo);
1559  void restoreGradientTrans3(SimpleState *state, bool isUndo);
1560  void restoreGradientTrans4(SimpleState *state, bool isUndo);
1561  void restoreGradientType(SimpleState *state, bool isUndo);
1562  void restoreGradientTypeStroke(SimpleState *state, bool isUndo);
1563  void restoreImageEffects(UndoState *state, bool isUndo);
1564  void restoreImageNbr(SimpleState *state,bool isUndo);
1565  void restoreImageOffsetChange(SimpleState *state, bool isUndo);
1566  void restoreImageRotation(SimpleState *state, bool isUndo);
1567  void restoreImageScaleChange(SimpleState *state, bool isUndo);
1568  void restoreImageScaleMode(SimpleState *state, bool isUndo);
1569  void restoreInsertFrameText(SimpleState *state, bool isUndo);
1570  void restoreLayer(SimpleState *state, bool isUndo);
1571  void restoreLeftTextFrameDist(SimpleState *state, bool isUndo);
1572  void restoreLineColor(SimpleState *state, bool isUndo);
1573  void restoreLineEnd(SimpleState *state, bool isUndo);
1574  void restoreLineJoin(SimpleState *state, bool isUndo);
1575  void restoreLineShade(SimpleState *state, bool isUndo);
1576  void restoreLineStyle(SimpleState *state, bool isUndo);
1577  void restoreLineTP(SimpleState *state, bool isUndo);
1578  void restoreLineWidth(SimpleState *state, bool isUndo);
1579  void restoreLinkTextFrame(UndoState *state, bool isUndo);
1580  void restoreMarkString(SimpleState *state, bool isUndo);
1581  void restoreMaskGradient(SimpleState *state, bool isUndo);
1582  void restoreMaskType(SimpleState *state,bool isUndo);
1583  void restoreMove(SimpleState *state, bool isUndo);
1584  void restoreMoveMeshGrad(SimpleState *state, bool isUndo);
1585  void restoreMoveMeshPatch(SimpleState *state, bool isUndo);
1586  void restoreName(SimpleState *state, bool isUndo);
1587  void restorePStyle(SimpleState *state, bool isUndo);
1588  void restoreParagraphStyle(SimpleState *state, bool isUndo);
1589  void restorePasteInline(SimpleState *state, bool isUndo);
1590  void restorePasteText(SimpleState *state, bool isUndo);
1591  void restorePathOperation(UndoState *state, bool isUndo);
1592  void restorePoly(SimpleState *state, bool isUndo, bool isContour);
1593  void restorePolygon(SimpleState *state,bool isUndo);
1594  void restoreRemoveMeshPatch(SimpleState *state, bool isUndo);
1595  void restoreResTyp(SimpleState *state, bool isUndo);
1596  void restoreResetMeshGrad(SimpleState *state, bool isUndo);
1597  void restoreResize(SimpleState *state, bool isUndo);
1598  void restoreReverseText(UndoState *state, bool isUndo);
1599  void restoreRightTextFrameDist(SimpleState *state, bool isUndo);
1600  void restoreRotate(SimpleState *state, bool isUndo);
1601  void restoreSetCharStyle(SimpleState *state, bool isUndo);
1602  void restoreSetParagraphStyle(SimpleState *state, bool isUndo);
1603  void restoreShade(SimpleState *state, bool isUndo);
1604  void restoreShapeContour(UndoState *state, bool isUndo);
1605  void restoreShapeType(SimpleState *state, bool isUndo);
1606  void restoreShowImage(SimpleState *state, bool isUndo);
1607  void restoreSnapToPatchGrid(SimpleState *state, bool isUndo);
1608  void restoreSpiral(SimpleState *state, bool isUndo);
1609  void restoreSplitItem(SimpleState *state, bool isUndo);
1610  void restoreStartArrowScale(SimpleState *state, bool isUndo);
1611  void restoreStrokeGradient(SimpleState *state, bool isUndo);
1612  void restoreTextFlowing(SimpleState *state, bool isUndo);
1613  void restoreTopTextFrameDist(SimpleState *state, bool isUndo);
1614  void restoreTransform(SimpleState *state,bool isUndo);
1615  void restoreType(SimpleState *state, bool isUndo);
1616  void restoreUnWeldItem(SimpleState *state, bool isUndo);
1617  void restoreUniteItem(SimpleState *state, bool isUndo);
1618  void restoreUnlinkTextFrame(UndoState *state, bool isUndo);
1619  void restoreVerticalAlign(SimpleState *state, bool isUndo);
1620  void restoreWeldItems(SimpleState *state, bool isUndo);
1621  void restoreSoftShadow(SimpleState *state, bool isUndo);
1622  void restoreSoftShadowColor(SimpleState *state, bool isUndo);
1623  void restoreSoftShadowShade(SimpleState *state, bool isUndo);
1624  void restoreSoftShadowBlurRadius(SimpleState *state, bool isUndo);
1625  void restoreSoftShadowXOffset(SimpleState *state, bool isUndo);
1626  void restoreSoftShadowYOffset(SimpleState *state, bool isUndo);
1627  void restoreSoftShadowOpacity(SimpleState *state, bool isUndo);
1628  void restoreSoftShadowBlendMode(SimpleState *state, bool isUndo);
1629  void restoreSoftShadowErasedByObject(SimpleState *state, bool isUndo);
1630  void restoreSoftShadowHasObjectTransparency(SimpleState *state, bool isUndo);
1631 
1632 
1644  bool shouldCheck();
1645  void select();
1646 
1647  // End protected functions
1648 
1649 protected: // Start protected variables
1650  PageItem *BackBox;
1651  PageItem *NextBox;
1652  uint firstChar;
1653  uint MaxChars;
1656  int verticalAlign;
1664 
1670  QString AnName;
1671 
1676  QString gradientVal;
1677 
1682  QString patternVal;
1687  double patternScaleY;
1688  double patternOffsetX;
1689  double patternOffsetY;
1690  double patternRotation;
1691  double patternSkewX;
1692  double patternSkewY;
1693  bool patternMirrorX;
1694  bool patternMirrorY;
1695 
1700  QString fillColorVal;
1701 
1706  QString lineColorVal;
1707 
1713 
1719 
1725 
1731 
1737 
1743 
1749  bool m_ImageIsFlippedH;
1750 
1756  bool m_ImageIsFlippedV;
1757 
1762  bool m_Locked;
1763 
1768  bool m_SizeLocked;
1769 
1773  bool m_SizeHLocked;
1774  bool m_SizeVLocked;
1780 
1785  ObjAttrVector pageItemAttributes;
1786 
1791  bool m_PrintEnabled;
1792 
1797  bool tagged;
1798 
1799  bool no_fill;
1800  bool no_stroke;
1801 
1802  QColor fillQColor;
1803  QColor strokeQColor;
1804  QColor GrColorP1QColor;
1805  QColor GrColorP2QColor;
1806  QColor GrColorP3QColor;
1807  QColor GrColorP4QColor;
1808 
1809  double m_xPos;
1810  double m_yPos;
1811  double m_width;
1812  double m_height;
1813  double m_rotation;
1815  double m_imageXScale;
1816  double m_imageYScale;
1820  bool m_isReversed;
1821  FirstLineOffsetPolicy firstLineOffsetP;
1822  bool m_groupClips;
1823  QColor hatchBackgroundQ;
1824  QColor hatchForegroundQ;
1825 
1826  // End protected variables
1827 
1828 private: // Start private functions
1833  QString getImageEffectsModifier() const;
1834 
1835  // End private functions
1836 
1837 private: // Start private variables
1838  // End private variables
1839 
1840 
1841 
1842 signals:
1843  //Frame signals
1844  void myself(PageItem *);
1845  void frameType(int);
1846  //void frameLocked(bool); ///< Frame lock
1847  //void frameSizeLocked(bool); ///< Frame size lock
1848  //Shape signals
1849  //void cornerRadius(double); ///< Corner radius of the shape
1850  //Frame text signals
1851  //void lineSpacing(double);
1852  //void textKerning(double);
1853  void textStyle(int);
1854  //void textFont(const QString&);
1855  //void textSize(double);
1856  //void textToFrameDistances(double, double, double, double); //left, top, bottom, right: Extra, TExtra, BExtra, RExtra
1857  //FIXME: columns, grid ?
1858 
1859 
1860 };
1861 
1862 Q_DECLARE_METATYPE(PageItem*)
1863 
1864 bool compareItemLevel(const PageItem* item1, const PageItem* item2);
1865 
1866 #endif
double CurY
Zeichen Y-Position.
Definition: pageitem.h:1295
int startArrowScale() const
Get start arrow scale.
Definition: pageitem.h:962
double m_imageRotation
Image rotation in frame.
Definition: pageitem.h:1819
Definition: pageitem_noteframe.h:8
double lineShadeVal
Line shade.
Definition: pageitem.h:1712
virtual PageItem_Arc * asArc()
Return self if Arc item, otherwise null.
Definition: pageitem.h:223
Definition: storytext.h:71
Definition: pageitem_spiral.h:34
virtual PageItem_OSGFrame * asOSGFrame()
Return self if OSG item, otherwise null.
Definition: pageitem.h:229
double oldLocalScX
Stores the old LocalScX value for undo action. Is used to detect image scale actions.
Definition: pageitem.h:1368
virtual bool isAutoNoteFrame() const
Return true if Auto Note item, otherwise false.
Definition: pageitem.h:240
QString gradientStrokeVal
Stroke gradient name.
Definition: pageitem.h:1409
Definition: pageitem.h:1455
Definition: charstyle.h:78
double oldYpos
Stores the old Y-position for undo action. Is used to detect move actions.
Definition: pageitem.h:1364
int endArrowScale() const
Get end arrow scale.
Definition: pageitem.h:972
virtual bool isPolygon() const
Return true if Polygon item, otherwise false.
Definition: pageitem.h:249
double patternScaleX
Fill pattern transformation matrix.
Definition: pageitem.h:1686
Definition: pageitem_line.h:34
QString strokePattern() const
Get the name of the stroke pattern of the object.
Definition: pageitem.h:871
void saxx(SaxHandler &handler, const Xml_string &elemtag) const
Definition: pageitem.h:339
DrawOption
Draw options for DrawObj_toImage()
Definition: pageitem.h:162
bool isTagged() const
Tells if the frame is tagged or not.
Definition: pageitem.h:1150
virtual ItemType realItemType() const
Get the subclass item type.
Definition: pageitem.h:1082
Definition: vgradient.h:36
void setRotation(const double r)
needed for deSaXe
Definition: pageitem.h:492
Pagemargins and bleeds.
Definition: margins.h:25
bool textFlowUsesBoundingBox() const
If text should flow around bounding box.
Definition: pageitem.h:1047
QString gradientVal
Fill gradient name.
Definition: pageitem.h:1676
virtual PageItem_PolyLine * asPolyLine()
Return self if Poly Line item, otherwise null.
Definition: pageitem.h:231
Definition: pageitem_symbol.h:34
virtual bool isLatexFrame() const
Return true if Render frame item, otherwise false.
Definition: pageitem.h:243
bool textFlowUsesImageClipping() const
If text should flow around image clipping path.
Definition: pageitem.h:1059
double oldWidth
Stores the old width for undo action. Is used to detect resize actions.
Definition: pageitem.h:1365
Definition: saxhandler.h:21
Definition: pageitem_pathtext.h:33
double fillTransparencyVal
Fill transparency.
Definition: pageitem.h:1724
int fillBlendmodeVal
Fill transparency blendmode.
Definition: pageitem.h:1736
Definition: pageitem_textframe.h:45
double lineWidth() const
Get the width of the line.
Definition: pageitem.h:906
Displays all kinds of content generated by external programs. Named LatexFrame because it initally on...
Definition: pageitem_latexframe.h:43
StoryText itemText
Text of element.
Definition: pageitem.h:1296
QString customLineStyle() const
Get name of active custom line style.
Definition: pageitem.h:932
ScribusDoc * doc() const
Get the document that this item belongs to.
Definition: pageitem.h:1178
bool m_isAnnotation
Flag to tell if this item is a PDF annotation item.
Definition: pageitem.h:1376
Qt::PenJoinStyle lineJoin() const
Get the join style of multi-segment lines.
Definition: pageitem.h:923
Definition: pageitem_imageframe.h:34
bool HasSel
Flag for text selection.
Definition: pageitem.h:1301
virtual void invalidateLayout()
invalidates current layout information
Definition: pageitem.h:381
Definition: pagestructs.h:15
bool textFlowAroundObject() const
If text should flow around object frame.
Definition: pageitem.h:1035
double fillShadeVal
Fill shade.
Definition: pageitem.h:1718
virtual bool isTextFrame() const
Return true if Text item, otherwise false.
Definition: pageitem.h:254
Definition: textlayout.h:58
UndoManager *const undoManager
Manages undostack and is where all undo actions/states are sent.
Definition: pageitem.h:1481
QString pattern() const
Get the name of the pattern of the object.
Definition: pageitem.h:786
virtual bool isTable() const
Return true if Table item, otherwise false.
Definition: pageitem.h:253
uint uniqueNr
Internal unique Item-Number, used for the undo system.
Definition: pageitem.h:1273
UndoState describes an undoable state (action).
Definition: undostate.h:59
virtual bool isPathText() const
Return true if Text Path Text, otherwise false.
Definition: pageitem.h:247
void saxx(SaxHandler &handler) const
Definition: pageitem.h:340
bool isBookmark
Flag for PDF Bookmark.
Definition: pageitem.h:1298
bool tagged
Is this item set to have an action done to it, eg deleted.
Definition: pageitem.h:1797
virtual void layout()
creates valid layout information
Definition: pageitem.h:383
Definition: observable.h:159
double oldLocalY
Stores the old LocalY value for undo action. Is used to detect image offset actions.
Definition: pageitem.h:1371
double fillShade() const
Get the shade of the fill color.
Definition: pageitem.h:813
TextFlowMode
Text flow mode.
Definition: pageitem.h:198
Qt::PenStyle lineStyle() const
Get the style of line.
Definition: pageitem.h:897
double BBoxH
Bounding Box-H.
Definition: pageitem.h:1293
double m_xPos
X position on the page.
Definition: pageitem.h:1809
TextFlowMode textFlowMode() const
Does text flow around this object and how.
Definition: pageitem.h:1022
Definition: scimage.h:36
ObjAttrVector pageItemAttributes
Stores the attributes of the pageitem (NOT properties, the user defined ATTRIBUTES) ...
Definition: pageitem.h:1785
QString lineColor() const
Get the line color of the object.
Definition: pageitem.h:845
Definition: vgradient.h:78
double m_imageYOffset
Image Y Offset to frame.
Definition: pageitem.h:1818
Definition: paragraphstyle.h:27
bool imageFlippedV() const
Is the image flipped vertically?
Definition: pageitem.h:987
Annotation m_annotation
PDF annotation data.
Definition: pageitem.h:1377
int OwnPage
page this element belongs to
Definition: pageitem.h:1274
A point with floating point precision.
Definition: fpoint.h:43
bool m_imageVisible
Darstellungsart Bild/Titel.
Definition: pageitem.h:1379
int GrType
used values 6 = linear, 7 = radial, 8 = pattern, 9 = 4 color gradient, 10 = diamond, 11,12,13 = mesh gradient, 14 = hatch
Definition: pageitem.h:1215
virtual PageItem_Spiral * asSpiral()
Return self if Spiral item, otherwise null.
Definition: pageitem.h:234
ScribusDoc * m_Doc
Document this item belongs to.
Definition: pageitem.h:1374
double CurX
Zeichen X-Position.
Definition: pageitem.h:1294
virtual PageItem_Table * asTable()
Return self if Table item, otherwise null.
Definition: pageitem.h:236
the Document Class
Definition: scribusdoc.h:90
bool textFlowUsesFrameShape() const
If text should flow around object frame.
Definition: pageitem.h:1041
virtual PageItem_ImageFrame * asImageFrame()
Return self if Image item, otherwise null.
Definition: pageitem.h:225
virtual PageItem_NoteFrame * asNoteFrame()
Return self if Note item, otherwise null.
Definition: pageitem.h:228
Definition: scpainter.h:33
int endArrowIndex() const
Get end arrow index.
Definition: pageitem.h:952
int lineBlendmodeVal
Line stroke transparency blendmode.
Definition: pageitem.h:1742
QString itemName() const
Get name of the item.
Definition: pageitem.h:756
virtual bool isNoteFrame() const
Return true if Note item, otherwise false.
Definition: pageitem.h:245
double oldRot
Stores the old rotation value for undo action. Is used to detect rotation actions.
Definition: pageitem.h:1367
ItemFrameType
Frame Type.
Definition: pageitem.h:208
virtual PageItem_Line * asLine()
Return self if Line item, otherwise null.
Definition: pageitem.h:227
QString Pfile
Dateiname des Bildes.
Definition: pageitem.h:1278
bool locked() const
is the item locked ?
Definition: pageitem.h:1003
virtual PageItem_LatexFrame * asLatexFrame()
Return self if Render frame item, otherwise null.
Definition: pageitem.h:226
QString fillColorVal
Fill color name.
Definition: pageitem.h:1700
double fillTransparency() const
Get the transparency of the fill color.
Definition: pageitem.h:821
bool imageFlippedH() const
Is the image flipped horizontally?
Definition: pageitem.h:980
Definition: pageitem_polyline.h:33
virtual bool isArc() const
Return true if Arc item, otherwise false.
Definition: pageitem.h:239
bool printEnabled() const
Is this item printed?
Definition: pageitem.h:1134
TextFlowMode textFlowModeVal
Should text flow around the item.
Definition: pageitem.h:1779
int gradientType() const
0=none, 1,2,3,4=linear, 5=radial, 6=free linear, 7=free radial, 8=pattern
Definition: pageitem.h:521
double lineTransparencyVal
Line stroke transparency.
Definition: pageitem.h:1730
int oldOwnPage
Old page number tracked for the move undo action.
Definition: pageitem.h:1275
QString lineColorVal
Line color name.
Definition: pageitem.h:1706
virtual bool isLine() const
Return true if Line item, otherwise false.
Definition: pageitem.h:244
int fillBlendmode() const
Get the blendmode of the fill color.
Definition: pageitem.h:829
Definition: pageitem_regularpolygon.h:34
virtual bool isPolyLine() const
Return true if Poly Line item, otherwise false.
Definition: pageitem.h:248
int FrameType
Don't know exactly what this is, but it's not the same as itemType.
Definition: pageitem.h:1272
ItemType itemType() const
Get the frame type.
Definition: pageitem.h:1074
double lineShade() const
Get the line color shade.
Definition: pageitem.h:853
Superclass for all objects that are wanted to have undoable actions.
Definition: undoobject.h:59
Definition: saxio.h:26
Coord distance(Point const &a, Point const &b)
Definition: point.h:205
bool m_sampleItem
Used to not draw the frame for sample items.
Definition: pageitem.h:1654
MarginStruct m_textDistanceMargins
Left, Top, Bottom, Right distances of text from the frame.
Definition: pageitem.h:1655
bool Dirty
Flag for redraw in EditMode.
Definition: pageitem.h:1299
double patternStrokeScaleX
Stroke pattern transformation matrix.
Definition: pageitem.h:1392
double m_yPos
Y position on the page.
Definition: pageitem.h:1810
double m_imageXOffset
Image X Offset to frame.
Definition: pageitem.h:1817
virtual PageItem_Symbol * asSymbolFrame()
Return self if Symbol item, otherwise null.
Definition: pageitem.h:235
QString fillColor() const
Get the (name of the) fill color of the object.
Definition: pageitem.h:805
bool imageIsAvailable
Flag to hiold image file availability.
Definition: pageitem.h:1289
virtual void clearContents()
Clear the contents of a frame. WARNING: Currently they do not check if the user wants this...
Definition: pageitem.h:308
double oldLocalScY
Stores the old LocalScY value for undo action. Is used to detect image scale actions.
Definition: pageitem.h:1369
Definition: pageitem_arc.h:34
double BBoxX
Bounding Box-X.
Definition: pageitem.h:1292
Qt::PenStyle PLineArt
Linestyle.
Definition: pageitem.h:1256
bool isInlineImage
Definition: pageitem.h:1452
int frameType() const
rect / oval / round / other
Definition: pageitem.h:699
bool textFlowUsesContourLine() const
If text should flow around contour line.
Definition: pageitem.h:1053
virtual PageItem_Group * asGroupFrame()
Return self if Group item, otherwise null.
Definition: pageitem.h:224
ItemType
Item Type.
Definition: pageitem.h:174
Qt::PenCapStyle lineEnd() const
Get the end cap style of the line.
Definition: pageitem.h:914
bool invalid
Flag indicates that layout has changed (eg. for textlayout)
Definition: pageitem.h:1300
QString strokeGradient() const
Get the name of the stroke gradient of the object.
Definition: pageitem.h:777
bool m_isSelected
Is the item selected?
Definition: pageitem.h:1814
double m_width
Width of the item.
Definition: pageitem.h:1811
virtual bool isSpiral() const
Return true if Spiral item, otherwise false.
Definition: pageitem.h:251
Definition: pageitem.h:92
bool sizeLocked() const
Is the item's size locked?
Definition: pageitem.h:1010
double oldLocalX
Stores the old LocalX value for undo action. Is used to detect image offset actions.lo j.
Definition: pageitem.h:1370
virtual PageItem_PathText * asPathText()
Return self if Path Text item, otherwise null.
Definition: pageitem.h:230
Definition: annotation.h:35
UndoManager handles the undo stack.
Definition: undomanager.h:81
QString patternStrokeVal
Stroke pattern name.
Definition: pageitem.h:1388
virtual PageItem_RegularPolygon * asRegularPolygon()
Return self if Regular Polygon item, otherwise null.
Definition: pageitem.h:233
Definition: fpointarray.h:42
virtual bool isRegularPolygon() const
Return true if Regular Polygon item, otherwise false.
Definition: pageitem.h:250
virtual bool isOSGFrame() const
Return true if OSG item, otherwise false.
Definition: pageitem.h:246
int lineBlendmode() const
Get the blendmode of the stroke color.
Definition: pageitem.h:837
virtual bool isGroup() const
Return true if Group item, otherwise false.
Definition: pageitem.h:241
virtual bool isImageFrame() const
Return true if Image item, otherwise false.
Definition: pageitem.h:242
double oldHeight
Stores the old height for undo action. Is used to detect resize actions.
Definition: pageitem.h:1366
ItemType m_ItemType
Frame Type, eg line, text frame, etc.
Definition: pageitem.h:1663
Definition: resourcecollection.h:41
double oldXpos
Stores the old X-position for undo action. Is used to detect move actions.
Definition: pageitem.h:1363
Definition: sctextstruct.h:54
QString patternVal
Fill pattern name.
Definition: pageitem.h:1682
int startArrowIndex() const
Get start arrow index.
Definition: pageitem.h:942
Definition: pageitem_table.h:49
double lineTransparency() const
Get the line transparency.
Definition: pageitem.h:861
virtual PageItem_Polygon * asPolygon()
Return self if Polygon item, otherwise null.
Definition: pageitem.h:232
virtual bool isSymbol() const
Return true if Symbol item, otherwise false.
Definition: pageitem.h:252
int GrMask
Mask gradient variables.
Definition: pageitem.h:1429
int GrTypeStroke
Stroke gradient variables.
Definition: pageitem.h:1415
bool FrameOnly
avoid artefacts while moving
Definition: pageitem.h:1302
QString AnName
Item name. Unicode. User visible (outline, property palette, etc).
Definition: pageitem.h:1670
ScImage pixm
Darzustellendes Bild.
Definition: pageitem.h:1277
SimpleState provides a simple implementation of the UndoState.
Definition: undostate.h:145
double m_height
Height of the item.
Definition: pageitem.h:1812
QPolygon Clip
Defines clipping region of the elements.
Definition: pageitem.h:1260
virtual void restore(UndoState *state, bool isUndo)=0
Method used when an undo/redo is requested.
QString gradient() const
Get the name of the gradient of the object.
Definition: pageitem.h:768
Definition: pageitem_polygon.h:34
virtual PageItem_TextFrame * asTextFrame()
Return self if Text item, otherwise null.
Definition: pageitem.h:237
Definition: pageitem_group.h:34
Definition: pageitem_osgframe.h:38