marble
#include <AreaAnnotation.h>
Public Types | |
enum | ActionState { Normal, MergingNodes, AddingNodes } |
Public Types inherited from Marble::GeoGraphicsItem | |
enum | GeoGraphicsItemFlag { NoOptions = 0x0, ItemIsMovable = 0x1, ItemIsSelectable = 0x2, ItemIsVisible = 0x4 } |
Public Member Functions | |
AreaAnnotation (GeoDataPlacemark *placemark) | |
virtual const char * | graphicType () const |
bool | isInnerBoundsPoint (const QPoint &point, bool restrictive=false) const |
bool | isValidPolygon () const |
QPair< int, int > & | mergedNodes () |
const QPair< int, int > & | mergedNodes () const |
virtual void | paint (GeoPainter *painter, const ViewportParams *viewport) |
int | rightClickedNode () const |
QList< int > & | selectedNodes () |
void | setMergedNodes (const QPair< int, int > &nodes) |
void | setState (ActionState state) |
ActionState | state () const |
Public Member Functions inherited from Marble::SceneGraphicsItem | |
SceneGraphicsItem (GeoDataPlacemark *placemark) | |
~SceneGraphicsItem () | |
const GeoDataPlacemark * | placemark () const |
GeoDataPlacemark * | placemark () |
QList< QRegion > | regions () const |
bool | sceneEvent (QEvent *event) |
void | setRegions (const QList< QRegion > ®ions) |
Public Member Functions inherited from Marble::GeoGraphicsItem | |
GeoGraphicsItem (const GeoDataFeature *feature) | |
virtual | ~GeoGraphicsItem () |
const GeoDataFeature * | feature () const |
GeoGraphicsItemFlags | flags () const |
virtual const GeoDataLatLonAltBox & | latLonAltBox () const |
int | minZoomLevel () const |
void | setFlag (GeoGraphicsItemFlag flag, bool enabled=true) |
void | setFlags (GeoGraphicsItemFlags flags) |
void | setLatLonAltBox (const GeoDataLatLonAltBox &latLonAltBox) |
void | setMinZoomLevel (int zoomLevel) |
void | setStyle (const GeoDataStyle *style) |
void | setVisible (bool visible) |
void | setZValue (qreal z) |
const GeoDataStyle * | style () const |
bool | visible () const |
qreal | zValue () const |
Protected Member Functions | |
virtual bool | mouseMoveEvent (QMouseEvent *event) |
virtual bool | mousePressEvent (QMouseEvent *event) |
virtual bool | mouseReleaseEvent (QMouseEvent *event) |
Additional Inherited Members | |
Protected Attributes inherited from Marble::GeoGraphicsItem | |
GeoGraphicsItemPrivate *const | d |
Detailed Description
Definition at line 24 of file AreaAnnotation.h.
Member Enumeration Documentation
Enumerator | |
---|---|
Normal | |
MergingNodes | |
AddingNodes |
Definition at line 29 of file AreaAnnotation.h.
Constructor & Destructor Documentation
|
explicit |
Definition at line 31 of file AreaAnnotation.cpp.
Member Function Documentation
|
virtual |
Provides information for downcasting a SceneGraphicsItem.
Implements Marble::SceneGraphicsItem.
Definition at line 378 of file AreaAnnotation.cpp.
bool Marble::AreaAnnotation::isInnerBoundsPoint | ( | const QPoint & | point, |
bool | restrictive = false |
||
) | const |
Checks whether the point parameter is contained by one of its inner boundaries.
- Parameters
-
restrictive If this parameter is set to false, only check if one of its inner boundaries contains the point (using GeoDataLinerRing::contains). In addition to this, when restrictive is set to true, also check that none of the polygon's regions (its nodes) contain the point (yes, these regions may 'intersect' due to the way nodes are represented).
Definition at line 330 of file AreaAnnotation.cpp.
bool Marble::AreaAnnotation::isValidPolygon | ( | ) | const |
Checks if the polygon has a valid shape; an invalid shape would be, for example, if one of its inner boundaries ring is intersected by its outer boundary ring.
Definition at line 353 of file AreaAnnotation.cpp.
QPair< int, int > & Marble::AreaAnnotation::mergedNodes | ( | ) |
Getters for the nodes to be merged.
Definition at line 373 of file AreaAnnotation.cpp.
const QPair<int, int>& Marble::AreaAnnotation::mergedNodes | ( | ) | const |
|
protectedvirtual |
Implements Marble::SceneGraphicsItem.
Definition at line 153 of file AreaAnnotation.cpp.
|
protectedvirtual |
In the implementation of these virtual functions, the following convention has been followed: if the event cannot be dealt with in this class (for example when right clicking a node or polygon), the functions return false and AnnotatePlugin::eventFilter deals with it.
Implements Marble::SceneGraphicsItem.
Definition at line 109 of file AreaAnnotation.cpp.
|
protectedvirtual |
Implements Marble::SceneGraphicsItem.
Definition at line 253 of file AreaAnnotation.cpp.
|
virtual |
Paints the item using the given GeoPainter.
Note that depending on the projection and zoom level, the item may be visible more than once, which is taken care of by GeoPainter.
Implements Marble::GeoGraphicsItem.
Definition at line 41 of file AreaAnnotation.cpp.
int Marble::AreaAnnotation::rightClickedNode | ( | ) | const |
Returns the node index on which the mouse press event (with the right button) has been caught.
Definition at line 325 of file AreaAnnotation.cpp.
QList< int > & Marble::AreaAnnotation::selectedNodes | ( | ) |
Returns the list of selected node indexes.
Definition at line 320 of file AreaAnnotation.cpp.
void Marble::AreaAnnotation::setMergedNodes | ( | const QPair< int, int > & | nodes | ) |
Sets the nodes to be merged.
Definition at line 368 of file AreaAnnotation.cpp.
void Marble::AreaAnnotation::setState | ( | ActionState | state | ) |
Sets the state of the object.
It will deal with more things, but so far is is used to paint with different color the nodes.
Definition at line 305 of file AreaAnnotation.cpp.
AreaAnnotation::ActionState Marble::AreaAnnotation::state | ( | ) | const |
Getter for the state.
Definition at line 315 of file AreaAnnotation.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:13:44 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.