Skui 0.0.1
Build fast and easy to use control software with Skui.
 
Loading...
Searching...
No Matches
Pad Class Reference

#include <pad.hpp>

Inheritance diagram for Pad:

Signals

void positionChanged ()
 

Public Member Functions

 Pad (QGraphicsItem *parent=nullptr, Interface *interface=nullptr, const PadSide pad_side=PadSide::Left)
 
QPoint getSceneDockPoint () const
 Get position for the cable to dock to.
 
void setHover (bool hover)
 Sets the hover state.
 
PadSide getSide () const
 
InterfacegetInterface () const
 
void paint (QPainter *, const QStyleOptionGraphicsItem *, QWidget *) override
 
QRectF boundingRect () const override
 
int type () const override
 

Static Public Attributes

static const int Type = QGraphicsItem::UserType + 1
 

Protected Member Functions

QVariant itemChange (GraphicsItemChange change, const QVariant &value) override
 
void hoverEnterEvent (QGraphicsSceneHoverEvent *event) override
 
void hoverLeaveEvent (QGraphicsSceneHoverEvent *event) override
 

Constructor & Destructor Documentation

◆ Pad()

Pad::Pad ( QGraphicsItem * parent = nullptr,
Interface * interface = nullptr,
const PadSide pad_side = PadSide::Left )
explicit

Member Function Documentation

◆ boundingRect()

QRectF Pad::boundingRect ( ) const
override

◆ getInterface()

Interface * Pad::getInterface ( ) const
inline

◆ getSceneDockPoint()

QPoint Pad::getSceneDockPoint ( ) const

Get position for the cable to dock to.

This method the position, where the cable starts/ends. Normally the midpoint of the pad.

Returns
Point in scence coordinates

◆ getSide()

PadSide Pad::getSide ( ) const
inline

◆ hoverEnterEvent()

void Pad::hoverEnterEvent ( QGraphicsSceneHoverEvent * event)
overrideprotected

◆ hoverLeaveEvent()

void Pad::hoverLeaveEvent ( QGraphicsSceneHoverEvent * event)
overrideprotected

◆ itemChange()

QVariant Pad::itemChange ( GraphicsItemChange change,
const QVariant & value )
overrideprotected

◆ paint()

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

◆ positionChanged

void Pad::positionChanged ( )
signal

◆ setHover()

void Pad::setHover ( bool hover)

Sets the hover state.

This method set the hover state. If true, there are visual differences to indicate that the Pad is currently on hover. If false, the Pad has the default appearance. Note: This method does not sets the opservation of a hover, but the hover itself.

Parameters
hoverState of the hover

◆ type()

int Pad::type ( ) const
inlineoverride

Member Data Documentation

◆ Type

const int Pad::Type = QGraphicsItem::UserType + 1
static

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