Scribus
Open source desktop publishing at your fingertips
pageitem_regularpolygon.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  copyright : Scribus Team
11  ***************************************************************************/
12 
13 /***************************************************************************
14  * *
15  * This program is free software; you can redistribute it and/or modify *
16  * it under the terms of the GNU General Public License as published by *
17  * the Free Software Foundation; either version 2 of the License, or *
18  * (at your option) any later version. *
19  * *
20  ***************************************************************************/
21 
22 #ifndef PAGEITEM_REGULARPOLYGON_H
23 #define PAGEITEM_REGULARPOLYGON_H
24 
25 #include <QString>
26 #include <QRectF>
27 
28 #include "scribusapi.h"
29 #include "pageitem.h"
30 class ScPainter;
31 class ScribusDoc;
32 
33 
34 class SCRIBUS_API PageItem_RegularPolygon : public PageItem
35 {
36  Q_OBJECT
37 
38 public:
39  PageItem_RegularPolygon(ScribusDoc *pa, double x, double y, double w, double h, double w2, QString fill, QString outline);
40  PageItem_RegularPolygon(const PageItem & p) : PageItem(p) {}
42 
43  virtual PageItem_RegularPolygon * asRegularPolygon() { return this; }
44  virtual bool isRegularPolygon() const { return true; }
45  virtual ItemType realItemType() const { return PageItem::RegularPolygon; }
46  virtual void applicableActions(QStringList& actionList);
47  virtual QString infoDescription();
48  void recalcPath();
49  /* Regular Polygon Tool */
50  int polyCorners;
51  double polyFactor;
53  double polyRotation;
54  double polyCurvature;
55  double polyInnerRot;
56  double polyOuterCurvature;
57 
58 protected:
59  virtual void DrawObj_Item(ScPainter *p, QRectF e);
60 
61 };
62 
63 #endif
double polyInnerRot
Curvature of polygon.
Definition: pageitem_regularpolygon.h:55
virtual ItemType realItemType() const
Get the subclass item type.
Definition: pageitem_regularpolygon.h:45
the Document Class
Definition: scribusdoc.h:90
Definition: scpainter.h:33
double polyCurvature
Rotation of a polygon.
Definition: pageitem_regularpolygon.h:54
virtual PageItem_RegularPolygon * asRegularPolygon()
Return self if Regular Polygon item, otherwise null.
Definition: pageitem_regularpolygon.h:43
Definition: pageitem_regularpolygon.h:34
double polyRotation
Whether to use a factor for shaping.
Definition: pageitem_regularpolygon.h:53
virtual bool isRegularPolygon() const
Return true if Regular Polygon item, otherwise false.
Definition: pageitem_regularpolygon.h:44
ItemType
Item Type.
Definition: pageitem.h:174
Definition: pageitem.h:92
bool polyUseFactor
Convex/Concave factor as a double.
Definition: pageitem_regularpolygon.h:52
double polyFactor
Number of corners for a polygon.
Definition: pageitem_regularpolygon.h:51