QElectroTech  0.8-dev
Public Member Functions | Private Member Functions | Private Attributes | List of all members
TitleBlockTemplateRenderer Class Reference

The TitleBlockTemplateRenderer class. More...

#include <titleblocktemplaterenderer.h>

Inherits QObject.

Collaboration diagram for TitleBlockTemplateRenderer:
Collaboration graph

Public Member Functions

 TitleBlockTemplateRenderer (QObject *=nullptr)
 TitleBlockTemplateRenderer::TitleBlockTemplateRenderer Constructor. More...
 
 ~TitleBlockTemplateRenderer () override
 TitleBlockTemplateRenderer::~TitleBlockTemplateRenderer Destructor. More...
 
const TitleBlockTemplatetitleBlockTemplate () const
 TitleBlockTemplateRenderer::titleBlockTemplate. More...
 
void setTitleBlockTemplate (const TitleBlockTemplate *)
 TitleBlockTemplateRenderer::setTitleBlockTemplate. More...
 
void setContext (const DiagramContext &context)
 TitleBlockTemplateRenderer::setContext. More...
 
DiagramContext context () const
 TitleBlockTemplateRenderer::context. More...
 
int height () const
 TitleBlockTemplateRenderer::height. More...
 
void render (QPainter *, int)
 TitleBlockTemplateRenderer::render Render the titleblock. More...
 
void renderDxf (QRectF &, int, QString &, int)
 TitleBlockTemplateRenderer::renderDxf. More...
 
void invalidateRenderedTemplate ()
 TitleBlockTemplateRenderer::invalidateRenderedTemplate Invalidates the previous rendering of the template by resetting the internal QPicture. More...
 
void setUseCache (bool)
 TitleBlockTemplateRenderer::setUseCache. More...
 
bool useCache () const
 TitleBlockTemplateRenderer::useCache. More...
 

Private Member Functions

void renderToQPicture (int)
 TitleBlockTemplateRenderer::renderToQPicture Renders the titleblock to the internal QPicture. More...
 

Private Attributes

const TitleBlockTemplatem_titleblock_template
 
bool m_use_cache
 
QPicture m_rendered_template
 
DiagramContext m_context
 
int m_last_known_titleblock_width
 

Detailed Description

The TitleBlockTemplateRenderer class.

Constructor & Destructor Documentation

◆ TitleBlockTemplateRenderer()

TitleBlockTemplateRenderer::TitleBlockTemplateRenderer ( QObject *  parent = nullptr)

TitleBlockTemplateRenderer::TitleBlockTemplateRenderer Constructor.

Parameters
parent: Parent QObject of this renderer

◆ ~TitleBlockTemplateRenderer()

TitleBlockTemplateRenderer::~TitleBlockTemplateRenderer ( )
override

Member Function Documentation

◆ context()

DiagramContext TitleBlockTemplateRenderer::context ( ) const

TitleBlockTemplateRenderer::context.

Returns
the current diagram context use when render the titleblock
Here is the caller graph for this function:

◆ height()

int TitleBlockTemplateRenderer::height ( ) const

TitleBlockTemplateRenderer::height.

Returns
the height of the rendered template, or -1 if no template has been set for this renderer.
See also
TitleBlockTemplate::height()

◆ invalidateRenderedTemplate()

void TitleBlockTemplateRenderer::invalidateRenderedTemplate ( )

TitleBlockTemplateRenderer::invalidateRenderedTemplate Invalidates the previous rendering of the template by resetting the internal QPicture.

Here is the caller graph for this function:

◆ render()

void TitleBlockTemplateRenderer::render ( QPainter *  provided_painter,
int  titleblock_width 
)

TitleBlockTemplateRenderer::render Render the titleblock.

Parameters
provided_painter: QPainter to use to render the titleblock.
titleblock_width: The total width of the titleblock to render
Here is the call graph for this function:
Here is the caller graph for this function:

◆ renderDxf()

void TitleBlockTemplateRenderer::renderDxf ( QRectF &  title_block_rect,
int  titleblock_width,
QString &  file_path,
int  color 
)

TitleBlockTemplateRenderer::renderDxf.

Parameters
title_block_rect
titleblock_width
file_path
color

◆ renderToQPicture()

void TitleBlockTemplateRenderer::renderToQPicture ( int  titleblock_width)
private

TitleBlockTemplateRenderer::renderToQPicture Renders the titleblock to the internal QPicture.

Parameters
titleblock_width: Width of the titleblock to render
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setContext()

void TitleBlockTemplateRenderer::setContext ( const DiagramContext context)

TitleBlockTemplateRenderer::setContext.

Parameters
context: Context to use when rendering the titleblock
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setTitleBlockTemplate()

void TitleBlockTemplateRenderer::setTitleBlockTemplate ( const TitleBlockTemplate titleblock_template)

TitleBlockTemplateRenderer::setTitleBlockTemplate.

Parameters
titleblock_template: TitleBlock template to render.
Here is the call graph for this function:

◆ setUseCache()

void TitleBlockTemplateRenderer::setUseCache ( bool  use_cache)

TitleBlockTemplateRenderer::setUseCache.

Parameters
use_cache: true for this renderer to use its QPicture-based cache, false otherwise.

◆ titleBlockTemplate()

const TitleBlockTemplate * TitleBlockTemplateRenderer::titleBlockTemplate ( ) const

TitleBlockTemplateRenderer::titleBlockTemplate.

Returns
the titleblock template used for the rendering

◆ useCache()

bool TitleBlockTemplateRenderer::useCache ( ) const

TitleBlockTemplateRenderer::useCache.

Returns
true if this renderer uses its QPicture-based cache, false otherwise.

Member Data Documentation

◆ m_context

DiagramContext TitleBlockTemplateRenderer::m_context
private

◆ m_last_known_titleblock_width

int TitleBlockTemplateRenderer::m_last_known_titleblock_width
private

◆ m_rendered_template

QPicture TitleBlockTemplateRenderer::m_rendered_template
private

◆ m_titleblock_template

const TitleBlockTemplate* TitleBlockTemplateRenderer::m_titleblock_template
private

◆ m_use_cache

bool TitleBlockTemplateRenderer::m_use_cache
private

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