SILICON
Loading...
Searching...
No Matches
graphicalFlipFlops.hpp
Go to the documentation of this file.
1/*
2 Copyright (c) 2026. Giulio Cocconi
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 <http://www.gnu.org/licenses/>.
16 */
17
18#pragma once
19
20#include <core/flipflops.hpp>
22
23
24namespace SILICON::ui {
25using namespace SILICON::core;
26
28 Q_OBJECT
29protected:
30 GraphicalFlipFlop(const Component_ptr& component, QGraphicsItem* parent = nullptr);
31
32 int type() const override { return SiliconTypes::UNKNOWN; }
33};
34
36 Q_OBJECT
37public:
38 explicit GraphicalDFlipFlop(QGraphicsItem* parent = nullptr);
39
40 int type() const override { return SiliconTypes::D_FLIP_FLOP; }
41};
42
44 Q_OBJECT
45public:
46 explicit GraphicalEFlipFlop(QGraphicsItem* parent = nullptr);
47
48 int type() const override { return SiliconTypes::E_FLIP_FLOP; }
49};
50
52 Q_OBJECT
53public:
54 explicit GraphicalDLatch(QGraphicsItem* parent = nullptr);
55
56 int type() const override { return SiliconTypes::D_LATCH; }
57};
58
60 Q_OBJECT
61public:
62 explicit GraphicalJKFlipFlop(QGraphicsItem* parent = nullptr);
63
64 int type() const override { return SiliconTypes::JK_FLIP_FLOP; }
65};
66
67} // namespace SILICON::ui
GraphicalDFlipFlop(QGraphicsItem *parent=nullptr)
GraphicalDLatch(QGraphicsItem *parent=nullptr)
GraphicalEFlipFlop(QGraphicsItem *parent=nullptr)
GraphicalFlipFlop(const Component_ptr &component, QGraphicsItem *parent=nullptr)
GraphicalJKFlipFlop(QGraphicsItem *parent=nullptr)
GraphicalLogicComponent(ItemCategory category, const Component_ptr &component, QGraphicsItem *shape, QGraphicsItem *parent, bool scanShape=false)
std::shared_ptr< Component > Component_ptr
@ E_FLIP_FLOP
Definition enums.hpp:97
@ JK_FLIP_FLOP
Definition enums.hpp:98
@ D_FLIP_FLOP
Definition enums.hpp:96