Scribus
Open source desktop publishing at your fingertips
pageitem_line.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 PAGEITEMLINE_H
23 #define PAGEITEMLINE_H
24 
25 #include <QPointF>
26 #include <QRectF>
27 #include <QString>
28 
29 #include "scribusapi.h"
30 #include "pageitem.h"
31 class ScPainter;
32 class ScribusDoc;
33 
34 class SCRIBUS_API PageItem_Line : public PageItem
35 {
36  Q_OBJECT
37 
38 public:
39  PageItem_Line(ScribusDoc *pa, double x, double y, double w, double h, double w2, QString fill, QString outline);
40  PageItem_Line(const PageItem & p) : PageItem(p) {}
41  ~PageItem_Line() {};
42 
43  virtual PageItem_Line * asLine() { return this; }
44  virtual bool isLine() const { return true; }
45 
46  virtual void applicableActions(QStringList& actionList);
47  virtual QString infoDescription();
48 
49  QPointF startPoint();
50  QPointF endPoint();
51 
52  virtual void getBoundingRect(double *x1, double *y1, double *x2, double *y2) const;
53  virtual void getVisualBoundingRect(double *x1, double *y1, double *x2, double *y2) const;
54 
55 protected:
56  virtual void DrawObj_Item(ScPainter *p, QRectF e);
57 
58 };
59 
60 #endif
virtual PageItem_Line * asLine()
Return self if Line item, otherwise null.
Definition: pageitem_line.h:43
Definition: pageitem_line.h:34
the Document Class
Definition: scribusdoc.h:90
Definition: scpainter.h:33
Definition: pageitem.h:92
virtual bool isLine() const
Return true if Line item, otherwise false.
Definition: pageitem_line.h:44