QElectroTech 0.200.1-dev
Loading...
Searching...
No Matches
ElementPictureFactory Class Reference

The ElementPictureFactory class This class is singleton factory, use to create and get the picture use by elements. More...

#include <elementpicturefactory.h>

Collaboration diagram for ElementPictureFactory:
Collaboration graph

Classes

struct  primitives

Public Member Functions

void getPictures (const ElementsLocation &location, QPicture &picture, QPicture &low_picture)
 ElementPictureFactory::getPictures Set the picture of the element at location. Note, picture can be null.
QPixmap pixmap (const ElementsLocation &location)
 ElementPictureFactory::pixmap.
ElementPictureFactory::primitives getPrimitives (const ElementsLocation &location)
 ElementPictureFactory::getPrimitives.

Static Public Member Functions

static ElementPictureFactoryinstance ()
 instance
static void dropInstance ()
 dropInstance Drop the instance of factory

Private Member Functions

 ElementPictureFactory ()
 ElementPictureFactory (const ElementPictureFactory &)
ElementPictureFactory operator= (const ElementPictureFactory &)
 ~ElementPictureFactory ()
bool build (const ElementsLocation &location, QPicture *picture=nullptr, QPicture *low_picture=nullptr)
 ElementPictureFactory::build Build the picture from location.
void parseElement (const QDomElement &dom, QPainter &painter, primitives &prim) const
void parseLine (const QDomElement &dom, QPainter &painter, primitives &prim) const
void parseRect (const QDomElement &dom, QPainter &painter, primitives &prim) const
void parseEllipse (const QDomElement &dom, QPainter &painter, primitives &prim) const
void parseCircle (const QDomElement &dom, QPainter &painter, primitives &prim) const
void parseArc (const QDomElement &dom, QPainter &painter, primitives &prim) const
void parsePolygon (const QDomElement &dom, QPainter &painter, primitives &prim) const
void parseText (const QDomElement &dom, QPainter &painter, primitives &prim) const
void parsePlcTable (const QDomElement &dom, const QDomElement &plc_data, QPainter &painter) const
void setPainterStyle (const QDomElement &dom, QPainter &painter) const
 ElementPictureFactory::setPainterStyle apply the style store in dom to painter.

Private Attributes

QHash< QUuid, QPicture > m_pictures_H
QHash< QUuid, QPicture > m_low_pictures_H
QHash< QUuid, QPixmap > m_pixmap_H
QHash< QUuid, primitivesm_primitives_H

Static Private Attributes

static ElementPictureFactorym_factory = nullptr

Detailed Description

The ElementPictureFactory class This class is singleton factory, use to create and get the picture use by elements.

Constructor & Destructor Documentation

◆ ElementPictureFactory() [1/2]

ElementPictureFactory::ElementPictureFactory ( )
inlineprivate
Here is the caller graph for this function:

◆ ElementPictureFactory() [2/2]

ElementPictureFactory::ElementPictureFactory ( const ElementPictureFactory & )
private
Here is the call graph for this function:

◆ ~ElementPictureFactory()

ElementPictureFactory::~ElementPictureFactory ( )
private

Member Function Documentation

◆ build()

bool ElementPictureFactory::build ( const ElementsLocation & location,
QPicture * picture = nullptr,
QPicture * low_picture = nullptr )
private

ElementPictureFactory::build Build the picture from location.

Parameters
location
picture
low_pictureif picture and/or low_picture are not null this function draw on it and don't store it. if null, this function create a QPicture for normal and low zoom, draw on it and store it in m_pictures_H and m_low_pictures_H
Returns
Here is the call graph for this function:
Here is the caller graph for this function:

◆ dropInstance()

void ElementPictureFactory::dropInstance ( )
inlinestatic

dropInstance Drop the instance of factory

Here is the caller graph for this function:

◆ getPictures()

void ElementPictureFactory::getPictures ( const ElementsLocation & location,
QPicture & picture,
QPicture & low_picture )

ElementPictureFactory::getPictures Set the picture of the element at location. Note, picture can be null.

Parameters
location
picture
low_picture
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getPrimitives()

ElementPictureFactory::primitives ElementPictureFactory::getPrimitives ( const ElementsLocation & location)

ElementPictureFactory::getPrimitives.

Parameters
location
Returns
The primtive used to draw the element at location
Here is the call graph for this function:
Here is the caller graph for this function:

◆ instance()

ElementPictureFactory * ElementPictureFactory::instance ( )
inlinestatic

instance

Returns
The instance of the factory
Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator=()

ElementPictureFactory ElementPictureFactory::operator= ( const ElementPictureFactory & )
private
Here is the call graph for this function:

◆ parseArc()

void ElementPictureFactory::parseArc ( const QDomElement & dom,
QPainter & painter,
ElementPictureFactory::primitives & prim ) const
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ parseCircle()

void ElementPictureFactory::parseCircle ( const QDomElement & dom,
QPainter & painter,
ElementPictureFactory::primitives & prim ) const
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ parseElement()

void ElementPictureFactory::parseElement ( const QDomElement & dom,
QPainter & painter,
primitives & prim ) const
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ parseEllipse()

void ElementPictureFactory::parseEllipse ( const QDomElement & dom,
QPainter & painter,
ElementPictureFactory::primitives & prim ) const
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ parseLine()

void ElementPictureFactory::parseLine ( const QDomElement & dom,
QPainter & painter,
primitives & prim ) const
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ parsePlcTable()

void ElementPictureFactory::parsePlcTable ( const QDomElement & dom,
const QDomElement & plc_data,
QPainter & painter ) const
private
Here is the call graph for this function:

◆ parsePolygon()

void ElementPictureFactory::parsePolygon ( const QDomElement & dom,
QPainter & painter,
ElementPictureFactory::primitives & prim ) const
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ parseRect()

void ElementPictureFactory::parseRect ( const QDomElement & dom,
QPainter & painter,
ElementPictureFactory::primitives & prim ) const
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ parseText()

void ElementPictureFactory::parseText ( const QDomElement & dom,
QPainter & painter,
ElementPictureFactory::primitives & prim ) const
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ pixmap()

QPixmap ElementPictureFactory::pixmap ( const ElementsLocation & location)

ElementPictureFactory::pixmap.

Parameters
location
Returns
the pixmap of the element at location Note pixmap can be null
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setPainterStyle()

void ElementPictureFactory::setPainterStyle ( const QDomElement & dom,
QPainter & painter ) const
private

ElementPictureFactory::setPainterStyle apply the style store in dom to painter.

Parameters
dom
painter
Here is the caller graph for this function:

Member Data Documentation

◆ m_factory

ElementPictureFactory * ElementPictureFactory::m_factory = nullptr
staticprivate

◆ m_low_pictures_H

QHash<QUuid, QPicture> ElementPictureFactory::m_low_pictures_H
private

◆ m_pictures_H

QHash<QUuid, QPicture> ElementPictureFactory::m_pictures_H
private

◆ m_pixmap_H

QHash<QUuid, QPixmap> ElementPictureFactory::m_pixmap_H
private

◆ m_primitives_H

QHash<QUuid, primitives> ElementPictureFactory::m_primitives_H
private

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