Qucs-S S-parameter Viewer & RF Synthesis Tools
Loading...
Searching...
No Matches
symbol.h
1/*
2 * Copyright (C) 2019-2025 Andrés Martínez Mera - andresmmera@protonmail.com
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 3 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <https://www.gnu.org/licenses/>.
16 */
17
18#ifndef SYMBOL_H
19#define SYMBOL_H
20
21#include <QGraphicsItem>
22#include <QList>
23#include <QMessageBox>
24
25class Wire;
26class GraphWidget;
27QT_BEGIN_NAMESPACE
28class QGraphicsSceneMouseEvent;
29QT_END_NAMESPACE
30
31class Symbol : public QGraphicsObject {
32public:
33 Symbol(){};
34
35 virtual void addWire(Wire* Wire) = 0;
36 virtual QRectF boundingRect() const = 0;
37 virtual QPainterPath shape() const = 0;
38 virtual void paint(QPainter* painter, const QStyleOptionGraphicsItem* option,
39 QWidget* widget) = 0;
40 virtual QPoint getPortLocation(int) = 0;
41
42protected:
43 virtual QVariant itemChange(GraphicsItemChange change,
44 const QVariant& value) = 0;
45 virtual void mousePressEvent(QGraphicsSceneMouseEvent* event) = 0;
46 virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent* event) = 0;
47};
48
49#endif
[0]
Definition graphwidget.h:60
Definition symbol.h:31
[0]
Definition wire.h:30