QElectroTech 0.100.0-dev
Loading...
Searching...
No Matches
templatevisualcell.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_SLASH_QET_TEMPLATE_VISUAL_CELL_H
19#define TITLEBLOCK_SLASH_QET_TEMPLATE_VISUAL_CELL_H
20#include "../qet.h"
21
22#include <QtWidgets>
24#include "../titleblockcell.h"
25
30class TitleBlockTemplateVisualCell : public QGraphicsLayoutItem, public QGraphicsItem {
31 // constructor, destructor
32 public:
33 TitleBlockTemplateVisualCell(QGraphicsItem * parent = nullptr);
35 private:
37
38 // methods
39 public:
40 void setGeometry(const QRectF &) override;
41 QSizeF sizeHint(Qt::SizeHint, const QSizeF & = QSizeF()) const override;
42 QRectF boundingRect() const override;
43 void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget * = nullptr) override;
44
45 public slots:
48 TitleBlockCell *cell() const;
49 QSet<TitleBlockCell *> cells() const;
50
51 // attributes
52 private:
55};
56#endif
Definition titleblockcell.h:26
The TitleBlockTemplate class This class represents an title block template for an electric diagram....
Definition titleblocktemplate.h:37
Definition templatevisualcell.h:30
~TitleBlockTemplateVisualCell() override
Definition templatevisualcell.cpp:41
QRectF boundingRect() const override
Definition templatevisualcell.cpp:70
void setGeometry(const QRectF &) override
Definition templatevisualcell.cpp:50
TitleBlockTemplate * titleBlockTemplate() const
Definition templatevisualcell.cpp:120
TitleBlockTemplateVisualCell(const TitleBlockTemplateVisualCell &)
void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget *=nullptr) override
Definition templatevisualcell.cpp:81
TitleBlockCell * cell() const
Definition templatevisualcell.cpp:128
QSizeF sizeHint(Qt::SizeHint, const QSizeF &=QSizeF()) const override
Definition templatevisualcell.cpp:61
QSet< TitleBlockCell * > cells() const
Definition templatevisualcell.cpp:137
void setTemplateCell(TitleBlockTemplate *, TitleBlockCell *)
Definition templatevisualcell.cpp:110
TitleBlockCell * cell_
Previewed cell.
Definition templatevisualcell.h:54
TitleBlockTemplate * template_
Title block template of the previewed cell.
Definition templatevisualcell.h:53