SWMMVis  6.0.0-alpha.4
Qt6/C++ GIS-based graphical user interface for the SWMMVis engine (6.0.0-alpha.4)
Loading...
Searching...
No Matches
NodeGraphicsItem Class Reference

#include <graphicsitems.h>

Inheritance diagram for NodeGraphicsItem:
Collaboration diagram for NodeGraphicsItem:

Public Types

enum  NodeShape {
  Circle ,
  Triangle ,
  Square ,
  Diamond
}
 

Public Member Functions

 NodeGraphicsItem (const QString &name, double sceneX, double sceneY, double radius, NodeShape shape=Circle, QGraphicsItem *parent=nullptr)
 
int type () const override
 
QString elementName () const
 
NodeShape nodeShape () const
 
void setAttributes (const QVariantMap &attrs)
 
QVariantMap attributes () const
 
void setResultValue (double value, const QColor &color)
 
void clearResultValue ()
 
void setElementRadius (double r)
 
void setHighlighted (bool on)
 
void paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override
 
QPainterPath shape () const override
 
void setOwnerLayer (OpenSWMMVisLayer *layer)
 
OpenSWMMVisLayerownerLayer () const
 

Member Enumeration Documentation

◆ NodeShape

Enumerator
Circle 
Triangle 
Square 
Diamond 

Constructor & Destructor Documentation

◆ NodeGraphicsItem()

NodeGraphicsItem::NodeGraphicsItem ( const QString &  name,
double  sceneX,
double  sceneY,
double  radius,
NodeShape  shape = Circle,
QGraphicsItem *  parent = nullptr 
)
explicit

Member Function Documentation

◆ attributes()

QVariantMap NodeGraphicsItem::attributes ( ) const
inline

◆ clearResultValue()

void NodeGraphicsItem::clearResultValue ( )

◆ elementName()

QString NodeGraphicsItem::elementName ( ) const
inline

◆ nodeShape()

NodeShape NodeGraphicsItem::nodeShape ( ) const
inline

◆ ownerLayer()

OpenSWMMVisLayer * NodeGraphicsItem::ownerLayer ( ) const
inline

◆ paint()

void NodeGraphicsItem::paint ( QPainter *  painter,
const QStyleOptionGraphicsItem *  option,
QWidget *  widget 
)
override

◆ setAttributes()

void NodeGraphicsItem::setAttributes ( const QVariantMap &  attrs)
inline

◆ setElementRadius()

void NodeGraphicsItem::setElementRadius ( double  r)

◆ setHighlighted()

void NodeGraphicsItem::setHighlighted ( bool  on)

◆ setOwnerLayer()

void NodeGraphicsItem::setOwnerLayer ( OpenSWMMVisLayer layer)
inline

◆ setResultValue()

void NodeGraphicsItem::setResultValue ( double  value,
const QColor &  color 
)

Set a scalar result value (0–1 normalized) and override the fill brush.

◆ shape()

QPainterPath NodeGraphicsItem::shape ( ) const
override

◆ type()

int NodeGraphicsItem::type ( ) const
inlineoverride

The documentation for this class was generated from the following files: