QElectroTech 0.100.0-dev
Loading...
Searching...
No Matches
titleblocktemplaterenderer.h
Go to the documentation of this file.
1/*
2 Copyright 2006-2024 The QElectroTech Team
3 This file is part of QElectroTech.
4
5 QElectroTech is free software: you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation, either version 2 of the License, or
8 (at your option) any later version.
9
10 QElectroTech is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
17*/
18#ifndef TITLEBLOCK_TEMPLATE_RENDERER_H
19#define TITLEBLOCK_TEMPLATE_RENDERER_H
20#include <QPicture>
21#include "diagramcontext.h"
22
27class TitleBlockTemplateRenderer : public QObject
28{
29 Q_OBJECT
30
31 public:
32 TitleBlockTemplateRenderer(QObject * = nullptr);
34
37
40
41 int height() const;
42 void render(QPainter *, int);
43 void renderDxf(QRectF &, int, QString &, int);
45 void setUseCache(bool);
46 bool useCache() const;
47
48 private:
49 void renderToQPicture(int);
50
51 private:
57};
58#endif
Definition diagramcontext.h:57
The TitleBlockTemplate class This class represents an title block template for an electric diagram....
Definition titleblocktemplate.h:37
The TitleBlockTemplateRenderer class.
Definition titleblocktemplaterenderer.h:28
void setTitleBlockTemplate(const TitleBlockTemplate *)
TitleBlockTemplateRenderer::setTitleBlockTemplate.
Definition titleblocktemplaterenderer.cpp:38
const TitleBlockTemplate * m_titleblock_template
Definition titleblocktemplaterenderer.h:52
bool useCache() const
TitleBlockTemplateRenderer::useCache.
Definition titleblocktemplaterenderer.cpp:163
QPicture m_rendered_template
Definition titleblocktemplaterenderer.h:54
void renderToQPicture(int)
TitleBlockTemplateRenderer::renderToQPicture Renders the titleblock to the internal QPicture.
Definition titleblocktemplaterenderer.cpp:127
void setContext(const DiagramContext &context)
TitleBlockTemplateRenderer::setContext.
Definition titleblocktemplaterenderer.cpp:50
void render(QPainter *, int)
TitleBlockTemplateRenderer::render Render the titleblock.
Definition titleblocktemplaterenderer.cpp:83
bool m_use_cache
Definition titleblocktemplaterenderer.h:53
void renderDxf(QRectF &, int, QString &, int)
TitleBlockTemplateRenderer::renderDxf.
Definition titleblocktemplaterenderer.cpp:111
void setUseCache(bool)
TitleBlockTemplateRenderer::setUseCache.
Definition titleblocktemplaterenderer.cpp:154
DiagramContext m_context
Definition titleblocktemplaterenderer.h:55
int m_last_known_titleblock_width
Definition titleblocktemplaterenderer.h:56
void invalidateRenderedTemplate()
TitleBlockTemplateRenderer::invalidateRenderedTemplate Invalidates the previous rendering of the temp...
Definition titleblocktemplaterenderer.cpp:144
int height() const
TitleBlockTemplateRenderer::height.
Definition titleblocktemplaterenderer.cpp:71
const TitleBlockTemplate * titleBlockTemplate() const
TitleBlockTemplateRenderer::titleBlockTemplate.
Definition titleblocktemplaterenderer.cpp:29
DiagramContext context() const
TitleBlockTemplateRenderer::context.
Definition titleblocktemplaterenderer.cpp:59
~TitleBlockTemplateRenderer() override
TitleBlockTemplateRenderer::~TitleBlockTemplateRenderer Destructor.
Definition titleblocktemplaterenderer.cpp:21