QElectroTech  0.70
Public Slots | Public Member Functions | Private Member Functions | Private Attributes | List of all members
TitleBlockTemplateVisualCell Class Reference

#include <templatevisualcell.h>

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. More...
 
TitleBlockCellcell_
 Previewed cell. More...
 

Detailed Description

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

Definition at line 29 of file templatevisualcell.h.

Constructor & Destructor Documentation

◆ TitleBlockTemplateVisualCell() [1/2]

TitleBlockTemplateVisualCell::TitleBlockTemplateVisualCell ( QGraphicsItem *  parent = nullptr)

Constructor

Parameters
parentParent QGraphicsItem

Definition at line 26 of file templatevisualcell.cpp.

◆ ~TitleBlockTemplateVisualCell()

TitleBlockTemplateVisualCell::~TitleBlockTemplateVisualCell ( )
override

Destructor

Definition at line 40 of file templatevisualcell.cpp.

◆ 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

Definition at line 67 of file templatevisualcell.cpp.

◆ cell

TitleBlockCell * TitleBlockTemplateVisualCell::cell ( ) const
slot
Returns
the previewed title block cell

Definition at line 117 of file templatevisualcell.cpp.

References cell_.

Referenced by setTemplateCell().

◆ cells

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

Definition at line 125 of file templatevisualcell.cpp.

References cell_, and template_.

◆ 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

Definition at line 77 of file templatevisualcell.cpp.

References cell_, and template_.

◆ setGeometry()

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

Ensure geometry changes are handled for both QGraphicsObject and QGraphicsLayoutItem.

Parameters
gNew geometry

Definition at line 48 of file templatevisualcell.cpp.

◆ 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

Definition at line 102 of file templatevisualcell.cpp.

References cell(), cell_, and template_.

◆ 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

Definition at line 59 of file templatevisualcell.cpp.

◆ titleBlockTemplate

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

Definition at line 110 of file templatevisualcell.cpp.

References template_.

Member Data Documentation

◆ cell_

TitleBlockCell* TitleBlockTemplateVisualCell::cell_
private

Previewed cell.

Definition at line 53 of file templatevisualcell.h.

Referenced by cell(), cells(), paint(), and setTemplateCell().

◆ template_

TitleBlockTemplate* TitleBlockTemplateVisualCell::template_
private

Title block template of the previewed cell.

Definition at line 52 of file templatevisualcell.h.

Referenced by cells(), paint(), setTemplateCell(), and titleBlockTemplate().


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