QElectroTech  0.70
Public Member Functions | Public Attributes | List of all members
TitleBlockTemplateCellsSet Class Reference

#include <templatecellsset.h>

Public Member Functions

 TitleBlockTemplateCellsSet (const TitleBlockTemplateView *)
 
 TitleBlockTemplateCellsSet (const TitleBlockTemplateCellsSet &)
 
virtual ~TitleBlockTemplateCellsSet ()
 
QPainterPath painterPath () const
 
bool isRectangle () const
 
bool allCellsAreSelected () const
 
bool hasExternalSpan () const
 
TitleBlockTemplateVisualCelltopLeftCell () const
 
TitleBlockTemplateVisualCellbottomRightCell () const
 
QRectF mergeAreaRect () const
 
TitleBlockTemplateCellsSet mergeArea (const QRectF &=QRectF()) const
 
QSet< TitleBlockCell * > cells (bool=true) const
 

Public Attributes

const TitleBlockTemplateViewparent_view_
 the view displaying the cells More...
 

Detailed Description

This class represents a set of cells (selected or not) when editing a title block template.

Definition at line 28 of file templatecellsset.h.

Constructor & Destructor Documentation

◆ TitleBlockTemplateCellsSet() [1/2]

TitleBlockTemplateCellsSet::TitleBlockTemplateCellsSet ( const TitleBlockTemplateView parent_view)

Constructor

Parameters
parent_viewView this set of cells are rattached to

Definition at line 27 of file templatecellsset.cpp.

◆ TitleBlockTemplateCellsSet() [2/2]

TitleBlockTemplateCellsSet::TitleBlockTemplateCellsSet ( const TitleBlockTemplateCellsSet copy)

Copy constructor

Parameters
copyTitleBlockTemplateCellsSet object to copy

Definition at line 36 of file templatecellsset.cpp.

◆ ~TitleBlockTemplateCellsSet()

TitleBlockTemplateCellsSet::~TitleBlockTemplateCellsSet ( )
virtual

Destructor

Definition at line 45 of file templatecellsset.cpp.

Member Function Documentation

◆ allCellsAreSelected()

bool TitleBlockTemplateCellsSet::allCellsAreSelected ( ) const
Returns
true if all cells within this set are selected

Definition at line 76 of file templatecellsset.cpp.

◆ bottomRightCell()

TitleBlockTemplateVisualCell * TitleBlockTemplateCellsSet::bottomRightCell ( ) const
Returns
the bottom right cell within this set, or 0 if this set is empty

Definition at line 136 of file templatecellsset.cpp.

Referenced by MergeCellsCommand::getBottomRightCell(), and mergeAreaRect().

◆ cells()

QSet< TitleBlockCell * > TitleBlockTemplateCellsSet::cells ( bool  include_spanned = true) const
Returns
the list of cells rendered by the current selection
Parameters
include_spannedwhether to include spanned cells or not

Definition at line 198 of file templatecellsset.cpp.

Referenced by hasExternalSpan(), mergeArea(), and MergeCellsCommand::MergeCellsCommand().

◆ hasExternalSpan()

bool TitleBlockTemplateCellsSet::hasExternalSpan ( ) const
Returns
true if this set includes at least one cell which is spanned by a cell not present in this set, false otherwise.

Definition at line 89 of file templatecellsset.cpp.

References cells().

◆ isRectangle()

bool TitleBlockTemplateCellsSet::isRectangle ( ) const
Returns
true if the cells within this set are composing a rectangle shape, false otherwise.

Definition at line 63 of file templatecellsset.cpp.

References painterPath().

Referenced by MergeCellsCommand::canMerge().

◆ mergeArea()

TitleBlockTemplateCellsSet TitleBlockTemplateCellsSet::mergeArea ( const QRectF &  rect = QRectF()) const
Parameters
rect(Optional) The merge area to be considered; if a null QRectF is provided, this method will use mergeAreaRect().
Returns
the cells contained in the merge area of this cells set

Definition at line 184 of file templatecellsset.cpp.

References cells(), mergeAreaRect(), and parent_view_.

◆ mergeAreaRect()

QRectF TitleBlockTemplateCellsSet::mergeAreaRect ( ) const
Returns
the merge area, i.e. the rectangle delimited by the top left cell and the bottom right cell within this cells set.

Definition at line 165 of file templatecellsset.cpp.

References bottomRightCell(), parent_view_, and topLeftCell().

Referenced by mergeArea().

◆ painterPath()

QPainterPath TitleBlockTemplateCellsSet::painterPath ( ) const
Returns
a QPainterPath composed of the rectangles from cells within this set

Definition at line 51 of file templatecellsset.cpp.

Referenced by isRectangle().

◆ topLeftCell()

TitleBlockTemplateVisualCell * TitleBlockTemplateCellsSet::topLeftCell ( ) const
Returns
the top left cell within this set, or 0 if this set is empty

Definition at line 105 of file templatecellsset.cpp.

Referenced by MergeCellsCommand::canMerge(), mergeAreaRect(), MergeCellsCommand::MergeCellsCommand(), and TitleBlockTemplateView::paste().

Member Data Documentation

◆ parent_view_

const TitleBlockTemplateView* TitleBlockTemplateCellsSet::parent_view_

the view displaying the cells

Definition at line 49 of file templatecellsset.h.

Referenced by mergeArea(), and mergeAreaRect().


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