QElectroTech 0.100.0-dev
Loading...
Searching...
No Matches
Public Slots | Public Member Functions | Private Member Functions | Private Attributes | List of all members
TitleBlockTemplateVisualCell Class Reference

#include <templatevisualcell.h>

Inherits QGraphicsLayoutItem, and QGraphicsItem.

Collaboration diagram for TitleBlockTemplateVisualCell:
Collaboration graph

Public Slots

void setTemplateCell (TitleBlockTemplate *, TitleBlockCell *)
 
TitleBlockTemplatetitleBlockTemplate () const
 
TitleBlockCellcell () const
 
QSet< TitleBlockCell * > cells () const
 

Public Member Functions

 TitleBlockTemplateVisualCell (QGraphicsItem *parent=nullptr)
 
 ~TitleBlockTemplateVisualCell () override
 
void setGeometry (const QRectF &) override
 
QSizeF sizeHint (Qt::SizeHint, const QSizeF &=QSizeF()) const override
 
QRectF boundingRect () const override
 
void paint (QPainter *, const QStyleOptionGraphicsItem *, QWidget *=nullptr) override
 

Private Member Functions

 TitleBlockTemplateVisualCell (const TitleBlockTemplateVisualCell &)
 

Private Attributes

TitleBlockTemplatetemplate_
 Title block template of the previewed cell.
 
TitleBlockCellcell_
 Previewed cell.
 

Detailed Description

This class implements a preview widget for cells that compose a title block template.

Constructor & Destructor Documentation

◆ TitleBlockTemplateVisualCell() [1/2]

TitleBlockTemplateVisualCell::TitleBlockTemplateVisualCell ( QGraphicsItem *  parent = nullptr)

Constructor

Parameters
parentParent QGraphicsItem

◆ ~TitleBlockTemplateVisualCell()

TitleBlockTemplateVisualCell::~TitleBlockTemplateVisualCell ( )
override

Destructor

◆ TitleBlockTemplateVisualCell() [2/2]

TitleBlockTemplateVisualCell::TitleBlockTemplateVisualCell ( const TitleBlockTemplateVisualCell )
private

Member Function Documentation

◆ boundingRect()

QRectF TitleBlockTemplateVisualCell::boundingRect ( ) const
override
Returns
the bounding rect of this helper cell

◆ cell

TitleBlockCell * TitleBlockTemplateVisualCell::cell ( ) const
slot
Returns
the previewed title block cell
Here is the caller graph for this function:

◆ cells

QSet< TitleBlockCell * > TitleBlockTemplateVisualCell::cells ( ) const
slot
Returns
the title block cell previewed by this object, plus the cells it spans over, if any

◆ paint()

void TitleBlockTemplateVisualCell::paint ( QPainter *  painter,
const QStyleOptionGraphicsItem *  option,
QWidget *  widget = nullptr 
)
override

Handles the helper cell visual rendering

Parameters
painterQPainter to be used for the rendering
optionRendering options
widgetQWidget being painted, if any

◆ setGeometry()

void TitleBlockTemplateVisualCell::setGeometry ( const QRectF &  g)
override

Ensure geometry changes are handled for both QGraphicsObject and QGraphicsLayoutItem.

Parameters
gNew geometry

◆ setTemplateCell

void TitleBlockTemplateVisualCell::setTemplateCell ( TitleBlockTemplate tbt,
TitleBlockCell cell 
)
slot

Set the previewed title block cell.

Parameters
tbtParent title block template of the previewed cell
cellPreviewed cell
Here is the call graph for this function:

◆ sizeHint()

QSizeF TitleBlockTemplateVisualCell::sizeHint ( Qt::SizeHint  which,
const QSizeF &  constraint = QSizeF() 
) const
override
Parameters
whichSize hint to be modified
constraintNew value for the size hint
Returns
the size hint for which using the width or height of constraint

◆ titleBlockTemplate

TitleBlockTemplate * TitleBlockTemplateVisualCell::titleBlockTemplate ( ) const
slot
Returns
the parent title block template of the previewed cell

Member Data Documentation

◆ cell_

TitleBlockCell* TitleBlockTemplateVisualCell::cell_
private

Previewed cell.

◆ template_

TitleBlockTemplate* TitleBlockTemplateVisualCell::template_
private

Title block template of the previewed cell.


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