SILICON
Toggle main menu visibility
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
>
21
#include <
ui/circuit/components/graphicalLogicComponent.hpp
>
22
23
24
namespace
SILICON::ui
{
25
using namespace
SILICON::core;
26
27
class
GraphicalFlipFlop
:
public
GraphicalLogicComponent
{
28
Q_OBJECT
29
protected
:
30
GraphicalFlipFlop
(
const
Component_ptr
& component, QGraphicsItem* parent =
nullptr
);
31
32
int
type
()
const override
{
return
SiliconTypes::UNKNOWN
; }
33
};
34
35
class
GraphicalDFlipFlop
:
public
GraphicalFlipFlop
{
36
Q_OBJECT
37
public
:
38
explicit
GraphicalDFlipFlop
(QGraphicsItem* parent =
nullptr
);
39
40
int
type
()
const override
{
return
SiliconTypes::D_FLIP_FLOP
; }
41
};
42
43
class
GraphicalEFlipFlop
:
public
GraphicalFlipFlop
{
44
Q_OBJECT
45
public
:
46
explicit
GraphicalEFlipFlop
(QGraphicsItem* parent =
nullptr
);
47
48
int
type
()
const override
{
return
SiliconTypes::E_FLIP_FLOP
; }
49
};
50
51
class
GraphicalDLatch
:
public
GraphicalFlipFlop
{
52
Q_OBJECT
53
public
:
54
explicit
GraphicalDLatch
(QGraphicsItem* parent =
nullptr
);
55
56
int
type
()
const override
{
return
SiliconTypes::D_LATCH
; }
57
};
58
59
class
GraphicalJKFlipFlop
:
public
GraphicalFlipFlop
{
60
Q_OBJECT
61
public
:
62
explicit
GraphicalJKFlipFlop
(QGraphicsItem* parent =
nullptr
);
63
64
int
type
()
const override
{
return
SiliconTypes::JK_FLIP_FLOP
; }
65
};
66
67
}
// namespace SILICON::ui
SILICON::ui::GraphicalDFlipFlop::type
int type() const override
Definition
graphicalFlipFlops.hpp:40
SILICON::ui::GraphicalDFlipFlop::GraphicalDFlipFlop
GraphicalDFlipFlop(QGraphicsItem *parent=nullptr)
Definition
graphicalFlipFlops.cpp:89
SILICON::ui::GraphicalDLatch::type
int type() const override
Definition
graphicalFlipFlops.hpp:56
SILICON::ui::GraphicalDLatch::GraphicalDLatch
GraphicalDLatch(QGraphicsItem *parent=nullptr)
Definition
graphicalFlipFlops.cpp:106
SILICON::ui::GraphicalEFlipFlop::type
int type() const override
Definition
graphicalFlipFlops.hpp:48
SILICON::ui::GraphicalEFlipFlop::GraphicalEFlipFlop
GraphicalEFlipFlop(QGraphicsItem *parent=nullptr)
Definition
graphicalFlipFlops.cpp:97
SILICON::ui::GraphicalFlipFlop::type
int type() const override
Definition
graphicalFlipFlops.hpp:32
SILICON::ui::GraphicalFlipFlop::GraphicalFlipFlop
GraphicalFlipFlop(const Component_ptr &component, QGraphicsItem *parent=nullptr)
Definition
graphicalFlipFlops.cpp:81
SILICON::ui::GraphicalJKFlipFlop::type
int type() const override
Definition
graphicalFlipFlops.hpp:64
SILICON::ui::GraphicalJKFlipFlop::GraphicalJKFlipFlop
GraphicalJKFlipFlop(QGraphicsItem *parent=nullptr)
Definition
graphicalFlipFlops.cpp:113
SILICON::ui::GraphicalLogicComponent::GraphicalLogicComponent
GraphicalLogicComponent(ItemCategory category, const Component_ptr &component, QGraphicsItem *shape, QGraphicsItem *parent, bool scanShape=false)
Definition
graphicalLogicComponent.cpp:26
flipflops.hpp
graphicalLogicComponent.hpp
SILICON::core::Component_ptr
std::shared_ptr< Component > Component_ptr
Definition
component_registry.hpp:33
SILICON::ui
Definition
actionGroups.hpp:14
SILICON::ui::D_LATCH
@ D_LATCH
Definition
enums.hpp:111
SILICON::ui::UNKNOWN
@ UNKNOWN
Definition
enums.hpp:73
SILICON::ui::E_FLIP_FLOP
@ E_FLIP_FLOP
Definition
enums.hpp:97
SILICON::ui::JK_FLIP_FLOP
@ JK_FLIP_FLOP
Definition
enums.hpp:98
SILICON::ui::D_FLIP_FLOP
@ D_FLIP_FLOP
Definition
enums.hpp:96
src
ui
circuit
components
graphicalFlipFlops.hpp
Generated by
1.17.0