Engauge Digitizer
2
Toggle main menu visibility
Loading...
Searching...
No Matches
Point
PointStyle.h
Go to the documentation of this file.
1
/******************************************************************************************************
2
* (C) 2014 markummitchell@github.com. This file is part of Engauge Digitizer, which is released *
3
* under GNU General Public License version 2 (GPLv2) or (at your option) any later version. See file *
4
* LICENSE or go to gnu.org/licenses for details. Distribution requires prior written permission. *
5
******************************************************************************************************/
6
7
#ifndef POINT_STYLE_H
8
#define POINT_STYLE_H
9
10
#include "
ColorPalette.h
"
11
#include "
PointShape.h
"
12
#include <QColor>
13
#include <QPolygonF>
14
15
class
QTextStream;
16
class
QXmlStreamReader;
17
class
QXmlStreamWriter;
18
20
class
PointStyle
21
{
22
public
:
24
PointStyle
();
25
27
PointStyle
(
PointShape
pointShape,
28
unsigned
int
radius
,
29
int
lineWidth
,
30
ColorPalette
paletteColor
);
31
33
PointStyle
(
const
PointStyle
&other);
34
36
PointStyle
&
operator=
(
const
PointStyle
&other);
37
39
static
PointStyle
defaultAxesCurve
();
40
42
static
PointStyle
defaultGraphCurve
(
int
index);
43
45
bool
isCircle
()
const
;
46
48
int
lineWidth
()
const
;
49
51
void
loadXml
(QXmlStreamReader &reader);
52
54
ColorPalette
paletteColor
()
const
;
55
57
QPolygonF
polygon
()
const
;
58
60
void
printStream
(QString indentation,
61
QTextStream &str)
const
;
62
64
unsigned
int
radius
()
const
;
65
67
void
saveXml
(QXmlStreamWriter &writer)
const
;
68
70
void
setLineWidth
(
int
width);
71
73
void
setPaletteColor
(
ColorPalette
paletteColor
);
74
76
void
setRadius
(
unsigned
int
radius
);
77
79
void
setShape
(
PointShape
shape
);
80
82
PointShape
shape
()
const
;
83
84
private
:
85
86
PointShape
m_shape;
87
unsigned
int
m_radius;
88
int
m_lineWidth;
89
ColorPalette
m_paletteColor;
90
};
91
92
#endif
// POINT_STYLE_H
ColorPalette.h
ColorPalette
ColorPalette
Definition
ColorPalette.h:12
PointShape.h
PointShape
PointShape
Definition
PointShape.h:12
PointStyle::radius
unsigned int radius() const
Radius of point. For a circle this is all that is needed to draw a circle. For a polygon,...
Definition
PointStyle.cpp:274
PointStyle::operator=
PointStyle & operator=(const PointStyle &other)
Assignment constructor.
Definition
PointStyle.cpp:55
PointStyle::polygon
QPolygonF polygon() const
Return the polygon for creating a QGraphicsPolygonItem. The size is determined by the radius.
Definition
PointStyle.cpp:158
PointStyle::loadXml
void loadXml(QXmlStreamReader &reader)
Load model from serialized xml. Returns the curve name.
Definition
PointStyle.cpp:127
PointStyle::setPaletteColor
void setPaletteColor(ColorPalette paletteColor)
Set method for point color.
Definition
PointStyle.cpp:298
PointStyle::isCircle
bool isCircle() const
Return true if point is a circle, otherwise it is a polygon. For a circle, the radius is important an...
Definition
PointStyle.cpp:117
PointStyle::setShape
void setShape(PointShape shape)
Set method for point shape.
Definition
PointStyle.cpp:308
PointStyle::shape
PointShape shape() const
Get method for point shape.
Definition
PointStyle.cpp:313
PointStyle::defaultGraphCurve
static PointStyle defaultGraphCurve(int index)
Initial default for index'th graph curve.
Definition
PointStyle.cpp:86
PointStyle::setLineWidth
void setLineWidth(int width)
Set method for line width.
Definition
PointStyle.cpp:293
PointStyle::printStream
void printStream(QString indentation, QTextStream &str) const
Debugging method that supports print method of this class and printStream method of some other class(...
Definition
PointStyle.cpp:261
PointStyle::defaultAxesCurve
static PointStyle defaultAxesCurve()
Initial default for axes curve.
Definition
PointStyle.cpp:65
PointStyle::paletteColor
ColorPalette paletteColor() const
Get method for point color.
Definition
PointStyle.cpp:153
PointStyle::setRadius
void setRadius(unsigned int radius)
Set method for point radius.
Definition
PointStyle.cpp:303
PointStyle::saveXml
void saveXml(QXmlStreamWriter &writer) const
Serialize to stream.
Definition
PointStyle.cpp:279
PointStyle::lineWidth
int lineWidth() const
Get method for line width.
Definition
PointStyle.cpp:122
PointStyle::PointStyle
PointStyle()
Default constructor only for use when this class is being stored by a container that requires the def...
Definition
PointStyle.cpp:27
Generated on
for Engauge Digitizer by
1.17.0