Envision
A visual programming IDE for object-oriented languages
List of all members | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | Static Private Attributes | Friends
Visualization::ZoomLabelOverlay Class Reference
Inheritance diagram for Visualization::ZoomLabelOverlay:
Core::Reflect< Base >

Public Types

typedef DeclarativeItemBaseStyle StyleType
 

Public Member Functions

 ZoomLabelOverlay (Item *itemWithLabel, const StyleType *style=itemStyles().get())
 
virtual QList< Visualization::VisualizationAddOn * > addOns () override
 
int determineForm () override
 
virtual Visualization::InteractionHandlerhandler () const override
 
virtual bool isSensitiveToScale () const override
 
virtual void paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override
 
virtual void setStyle (const Visualization::ItemStyle *itemStyle) override
 
const StyleTypestyle () const
 

Static Public Member Functions

static void addAddOn (Visualization::VisualizationAddOn *addOn)
 
static Visualization::InteractionHandlerdefaultClassHandler ()
 
static void initializeForms ()
 
static Visualization::StyleSet< ZoomLabelOverlay > & itemStyles ()
 
static bool removeAddOn (Visualization::VisualizationAddOn *addOn)
 
static void setDefaultClassHandler (Visualization::InteractionHandler *handler)
 

Protected Member Functions

virtual void determineChildren () override
 
virtual void updateGeometry (int availableWidth, int availableHeight) override
 

Private Member Functions

void adjustPositionOrHide ()
 
const StaticStyleassociatedItemIconStyle () const
 
QBrush associatedItemLabelBackground () const
 
const QString & associatedItemText () const
 
const TextStyleassociatedItemTextStyle () const
 
qreal computeScaleToUse () const
 
void postUpdate (int revision)
 

Static Private Member Functions

static QList< Item * > itemsThatShouldHaveZoomLabel (Scene *scene)
 
static QHash< Item *, ZoomLabelOverlay * > & itemToOverlay ()
 
static void reduceRect (QRect &rectToReduce, const QRect &rectToExclude)
 
static void setItemPositionsAndHideOverlapped (OverlayGroup &group)
 
static QList< Visualization::VisualizationAddOn * > & staticAddOns ()
 

Private Attributes

QBrush backgroundBrush_
 
Staticicon_ {}
 
const StaticStyleiconStyle_ {}
 
bool mayBeHiddenIfChildrenHaveOverlays_ {}
 
int postUpdateRevision_ {}
 
Texttext_ {}
 
const TextStyletextStyle_ {}
 

Static Private Attributes

static Visualization::InteractionHandlerdefaultClassHandler_ = nullptr
 
static constexpr double ITEM_MAX_HEIGHT = 500
 
static constexpr double ITEM_MAX_WIDTH = 500
 
static constexpr double OVERLAY_MAX_HEIGHT = 40
 
static constexpr double OVERLAY_MIN_HEIGHT = 15
 
static constexpr double OVERLAY_MIN_WIDTH = 30
 
static constexpr double SHOW_OVERLAY_IF_ITEM_TEXT_SMALLER_THAN = 8
 

Friends

class Scene
 

Additional Inherited Members

- Protected Types inherited from Core::Reflect< Base >
using Super = Reflect< Base >
 

Member Typedef Documentation

◆ StyleType

Constructor & Destructor Documentation

◆ ZoomLabelOverlay()

Visualization::ZoomLabelOverlay::ZoomLabelOverlay ( Item itemWithLabel,
const StyleType style = itemStyles().get() 
)

Member Function Documentation

◆ addAddOn()

void Visualization::ZoomLabelOverlay::addAddOn ( Visualization::VisualizationAddOn addOn)
static

◆ addOns()

QList< Visualization::VisualizationAddOn * > Visualization::ZoomLabelOverlay::addOns ( )
overridevirtual

◆ adjustPositionOrHide()

void Visualization::ZoomLabelOverlay::adjustPositionOrHide ( )
private

◆ associatedItemIconStyle()

const StaticStyle * Visualization::ZoomLabelOverlay::associatedItemIconStyle ( ) const
private

◆ associatedItemLabelBackground()

QBrush Visualization::ZoomLabelOverlay::associatedItemLabelBackground ( ) const
private

◆ associatedItemText()

const QString & Visualization::ZoomLabelOverlay::associatedItemText ( ) const
private

◆ associatedItemTextStyle()

const TextStyle * Visualization::ZoomLabelOverlay::associatedItemTextStyle ( ) const
private

◆ computeScaleToUse()

qreal Visualization::ZoomLabelOverlay::computeScaleToUse ( ) const
private

◆ defaultClassHandler()

static Visualization::InteractionHandler* Visualization::ZoomLabelOverlay::defaultClassHandler ( )
inlinestatic

◆ determineChildren()

void Visualization::ZoomLabelOverlay::determineChildren ( )
overrideprotectedvirtual

◆ determineForm()

int Visualization::ZoomLabelOverlay::determineForm ( )
override

◆ handler()

Visualization::InteractionHandler * Visualization::ZoomLabelOverlay::handler ( ) const
overridevirtual

◆ initializeForms()

void Visualization::ZoomLabelOverlay::initializeForms ( )
static

◆ isSensitiveToScale()

bool Visualization::ZoomLabelOverlay::isSensitiveToScale ( ) const
overridevirtual

◆ itemsThatShouldHaveZoomLabel()

QList< Item * > Visualization::ZoomLabelOverlay::itemsThatShouldHaveZoomLabel ( Scene scene)
staticprivate

◆ itemStyles()

Visualization::StyleSet< ZoomLabelOverlay > & Visualization::ZoomLabelOverlay::itemStyles ( )
static

◆ itemToOverlay()

QHash< Item *, ZoomLabelOverlay * > & Visualization::ZoomLabelOverlay::itemToOverlay ( )
staticprivate

◆ paint()

void Visualization::ZoomLabelOverlay::paint ( QPainter *  painter,
const QStyleOptionGraphicsItem *  option,
QWidget *  widget 
)
overridevirtual

◆ postUpdate()

void Visualization::ZoomLabelOverlay::postUpdate ( int  revision)
private

◆ reduceRect()

void Visualization::ZoomLabelOverlay::reduceRect ( QRect &  rectToReduce,
const QRect &  rectToExclude 
)
inlinestaticprivate

◆ removeAddOn()

bool Visualization::ZoomLabelOverlay::removeAddOn ( Visualization::VisualizationAddOn addOn)
static

◆ setDefaultClassHandler()

static void Visualization::ZoomLabelOverlay::setDefaultClassHandler ( Visualization::InteractionHandler handler)
inlinestatic

◆ setItemPositionsAndHideOverlapped()

void Visualization::ZoomLabelOverlay::setItemPositionsAndHideOverlapped ( OverlayGroup group)
staticprivate

◆ setStyle()

void Visualization::ZoomLabelOverlay::setStyle ( const Visualization::ItemStyle itemStyle)
overridevirtual

◆ staticAddOns()

QList< Visualization::VisualizationAddOn * > & Visualization::ZoomLabelOverlay::staticAddOns ( )
staticprivate

◆ style()

const StyleType* Visualization::ZoomLabelOverlay::style ( ) const
inline

◆ updateGeometry()

void Visualization::ZoomLabelOverlay::updateGeometry ( int  availableWidth,
int  availableHeight 
)
overrideprotectedvirtual

Friends And Related Function Documentation

◆ Scene

friend class Scene
friend

Member Data Documentation

◆ backgroundBrush_

QBrush Visualization::ZoomLabelOverlay::backgroundBrush_
private

◆ defaultClassHandler_

Visualization::InteractionHandler * Visualization::ZoomLabelOverlay::defaultClassHandler_ = nullptr
staticprivate

◆ icon_

Static* Visualization::ZoomLabelOverlay::icon_ {}
private

◆ iconStyle_

const StaticStyle* Visualization::ZoomLabelOverlay::iconStyle_ {}
private

◆ ITEM_MAX_HEIGHT

constexpr double Visualization::ZoomLabelOverlay::ITEM_MAX_HEIGHT = 500
staticconstexprprivate

◆ ITEM_MAX_WIDTH

constexpr double Visualization::ZoomLabelOverlay::ITEM_MAX_WIDTH = 500
staticconstexprprivate

◆ mayBeHiddenIfChildrenHaveOverlays_

bool Visualization::ZoomLabelOverlay::mayBeHiddenIfChildrenHaveOverlays_ {}
private

◆ OVERLAY_MAX_HEIGHT

constexpr double Visualization::ZoomLabelOverlay::OVERLAY_MAX_HEIGHT = 40
staticconstexprprivate

◆ OVERLAY_MIN_HEIGHT

constexpr double Visualization::ZoomLabelOverlay::OVERLAY_MIN_HEIGHT = 15
staticconstexprprivate

◆ OVERLAY_MIN_WIDTH

constexpr double Visualization::ZoomLabelOverlay::OVERLAY_MIN_WIDTH = 30
staticconstexprprivate

◆ postUpdateRevision_

int Visualization::ZoomLabelOverlay::postUpdateRevision_ {}
private

◆ SHOW_OVERLAY_IF_ITEM_TEXT_SMALLER_THAN

constexpr double Visualization::ZoomLabelOverlay::SHOW_OVERLAY_IF_ITEM_TEXT_SMALLER_THAN = 8
staticconstexprprivate

◆ text_

Text* Visualization::ZoomLabelOverlay::text_ {}
private

◆ textStyle_

const TextStyle* Visualization::ZoomLabelOverlay::textStyle_ {}
private