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
openswmmvis::ui::StylePreviewSwatch Class Reference

#include <stylepreviewswatch.h>

Inheritance diagram for openswmmvis::ui::StylePreviewSwatch:
Collaboration diagram for openswmmvis::ui::StylePreviewSwatch:

Public Types

enum  Kind {
  PointKind ,
  LineKind ,
  PolygonKind
}
 

Public Member Functions

 StylePreviewSwatch (QWidget *parent=nullptr)
 
void setKind (Kind k)
 
void setColor (const QColor &c)
 
void setStrokePen (const QPen &pen)
 
void setMarkerSizePx (double px)
 
void setMarkerShape (int shapeEnum)
 
void setLineWidthPx (double px)
 
void setShowArrows (bool v)
 
void setFillOpacity (double v)
 

Protected Member Functions

void paintEvent (QPaintEvent *event) override
 
QSize sizeHint () const override
 
QSize minimumSizeHint () const override
 

Member Enumeration Documentation

◆ Kind

Enumerator
PointKind 
LineKind 
PolygonKind 

Constructor & Destructor Documentation

◆ StylePreviewSwatch()

openswmmvis::ui::StylePreviewSwatch::StylePreviewSwatch ( QWidget *  parent = nullptr)
explicit

Member Function Documentation

◆ minimumSizeHint()

QSize openswmmvis::ui::StylePreviewSwatch::minimumSizeHint ( ) const
inlineoverrideprotected

◆ paintEvent()

void openswmmvis::ui::StylePreviewSwatch::paintEvent ( QPaintEvent *  event)
overrideprotected
Here is the call graph for this function:

◆ setColor()

void openswmmvis::ui::StylePreviewSwatch::setColor ( const QColor &  c)

Fill / single-symbol colour. For lines this is the stroke colour.

Here is the caller graph for this function:

◆ setFillOpacity()

void openswmmvis::ui::StylePreviewSwatch::setFillOpacity ( double  v)

For PolygonKind: fill alpha multiplier (0..1) used on top of the single-symbol colour.

Here is the caller graph for this function:

◆ setKind()

void openswmmvis::ui::StylePreviewSwatch::setKind ( Kind  k)
Here is the caller graph for this function:

◆ setLineWidthPx()

void openswmmvis::ui::StylePreviewSwatch::setLineWidthPx ( double  px)

For LineKind: line width in pixels.

Here is the caller graph for this function:

◆ setMarkerShape()

void openswmmvis::ui::StylePreviewSwatch::setMarkerShape ( int  shapeEnum)
Here is the caller graph for this function:

◆ setMarkerSizePx()

void openswmmvis::ui::StylePreviewSwatch::setMarkerSizePx ( double  px)

For PointKind: marker diameter in pixels + shape (matches the PointFeatureSublayerStyle::MarkerShape integer values).

Here is the caller graph for this function:

◆ setShowArrows()

void openswmmvis::ui::StylePreviewSwatch::setShowArrows ( bool  v)

For LineKind: show an arrow glyph at the midpoint of the preview line (mirrors LineFeatureSublayerStyle::showFlowArrows).

Here is the caller graph for this function:

◆ setStrokePen()

void openswmmvis::ui::StylePreviewSwatch::setStrokePen ( const QPen &  pen)

Stroke / outline pen (points use it as marker outline).

Here is the caller graph for this function:

◆ sizeHint()

QSize openswmmvis::ui::StylePreviewSwatch::sizeHint ( ) const
inlineoverrideprotected

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