SILICON
Toggle main menu visibility
Loading...
Searching...
No Matches
diagramInteractionController.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 <QObject>
21
22
#include <
ui/actionGroups.hpp
>
23
24
class
QAction;
25
class
QUndoStack;
26
class
QWidget;
27
28
namespace
SILICON::ui
{
29
30
class
ComponentCatalogOverlay
;
31
class
CircuitEditor
;
32
struct
ProjectSession
;
33
35
class
DiagramInteractionController
:
public
QObject {
36
public
:
37
DiagramInteractionController
(
ProjectSession
&
session
,
CircuitEditor
&
circuit
,
38
ComponentCatalogOverlay
&
catalog
, QUndoStack&
undoStack
,
39
QWidget&
window
);
40
42
void
bindActions
(
const
CircuitActions
& actions);
43
44
void
selectAll
();
45
void
rotate
();
46
void
autoPlace
();
47
void
centerView
();
48
50
void
editActiveSubcircuitShape
();
51
52
void
setNormalMode
();
53
void
setPanMode
();
54
void
setWireCreationMode
();
55
void
setSimulationMode
();
56
void
setComponentPlacingMode
();
57
void
showComponentCatalog
();
58
void
cancelCurrentInteraction
();
59
60
private
:
61
ProjectSession
&
session
;
62
CircuitEditor
&
circuit
;
63
ComponentCatalogOverlay
&
catalog
;
64
QUndoStack&
undoStack
;
65
QWidget&
window
;
66
};
67
68
}
// namespace SILICON::ui
actionGroups.hpp
SILICON::ui::CircuitEditor
Definition
circuitEditor.hpp:22
SILICON::ui::ComponentCatalogOverlay
Definition
componentCatalogOverlay.hpp:46
SILICON::ui::DiagramInteractionController::catalog
ComponentCatalogOverlay & catalog
Definition
diagramInteractionController.hpp:63
SILICON::ui::DiagramInteractionController::DiagramInteractionController
DiagramInteractionController(ProjectSession &session, CircuitEditor &circuit, ComponentCatalogOverlay &catalog, QUndoStack &undoStack, QWidget &window)
Definition
diagramInteractionController.cpp:45
SILICON::ui::DiagramInteractionController::setPanMode
void setPanMode()
Definition
diagramInteractionController.cpp:169
SILICON::ui::DiagramInteractionController::rotate
void rotate()
Definition
diagramInteractionController.cpp:98
SILICON::ui::DiagramInteractionController::session
ProjectSession & session
Definition
diagramInteractionController.hpp:61
SILICON::ui::DiagramInteractionController::setSimulationMode
void setSimulationMode()
Definition
diagramInteractionController.cpp:179
SILICON::ui::DiagramInteractionController::setNormalMode
void setNormalMode()
Definition
diagramInteractionController.cpp:164
SILICON::ui::DiagramInteractionController::autoPlace
void autoPlace()
Definition
diagramInteractionController.cpp:133
SILICON::ui::DiagramInteractionController::centerView
void centerView()
Definition
diagramInteractionController.cpp:138
SILICON::ui::DiagramInteractionController::cancelCurrentInteraction
void cancelCurrentInteraction()
Definition
diagramInteractionController.cpp:201
SILICON::ui::DiagramInteractionController::undoStack
QUndoStack & undoStack
Definition
diagramInteractionController.hpp:64
SILICON::ui::DiagramInteractionController::bindActions
void bindActions(const CircuitActions &actions)
Connects the main-window diagram actions to their diagram commands.
Definition
diagramInteractionController.cpp:57
SILICON::ui::DiagramInteractionController::setWireCreationMode
void setWireCreationMode()
Definition
diagramInteractionController.cpp:174
SILICON::ui::DiagramInteractionController::showComponentCatalog
void showComponentCatalog()
Definition
diagramInteractionController.cpp:195
SILICON::ui::DiagramInteractionController::setComponentPlacingMode
void setComponentPlacingMode()
Definition
diagramInteractionController.cpp:190
SILICON::ui::DiagramInteractionController::circuit
CircuitEditor & circuit
Definition
diagramInteractionController.hpp:62
SILICON::ui::DiagramInteractionController::editActiveSubcircuitShape
void editActiveSubcircuitShape()
Opens the graphical shape editor for the active circuit document.
Definition
diagramInteractionController.cpp:143
SILICON::ui::DiagramInteractionController::selectAll
void selectAll()
Definition
diagramInteractionController.cpp:85
SILICON::ui::DiagramInteractionController::window
QWidget & window
Definition
diagramInteractionController.hpp:65
SILICON::ui
Definition
actionGroups.hpp:14
SILICON::ui::CircuitActions
Definition
actionGroups.hpp:47
SILICON::ui::ProjectSession
Definition
projectSession.hpp:26
src
ui
circuit
editor
diagramInteractionController.hpp
Generated by
1.17.0