SILICON
Loading...
Searching...
No Matches
WindowActions Class Reference

Owns main-window actions, menus, shortcuts, and their enabled state. More...

#include <windowActions.hpp>

Inheritance diagram for WindowActions:
Collaboration diagram for WindowActions:

Public Member Functions

 WindowActions (QMainWindow &window, ProjectSession &session, EditorWorkspace &workspace)
 ~WindowActions () override
void createActions ()
void createMenus ()
void createToolBar ()
void updateHistoryActions ()
void updateEditActions ()
void updateSubcircuitShapeAction ()
void updateCodeAction ()
void updateDocumentActionVisibility ()
void applyStoredSettings ()
void openSettings ()
std::optional< SILICON::project::DocumentType > activeDocumentType () const noexcept

Static Public Member Functions

static void setActionsEnabled (std::initializer_list< QAction * > actions, bool enabled)

Public Attributes

QToolBar * toolBar = nullptr
 Main toolbar containing edit, mode, and simulation actions.
QAction * diagramToolsSeparator = nullptr
QAction * documentToolsSeparator = nullptr
QMenu * fileMenu = nullptr
 File menu.
QMenu * editMenu = nullptr
 Edit menu.
QMenu * helpMenu = nullptr
 Help menu.
ProjectActions project
 Commands owned by the project and application shell.
DocumentActions documents
 Commands owned by the project document workflow.
EditActions edit
 Commands owned by the active editor, whatever its kind.
CircuitActions circuit
 Commands owned by the circuit editor.
ArchitectureActions architecture
 Commands owned by the architecture subsystem.
WaveformActions waveform
 Commands owned by the waveform viewer.

Private Member Functions

QVector< ShortcutSetting > shortcutSettings () const
void bindEditorActions ()
void refreshActiveEditorActions ()
void syncWasmShortcutCapture ()

Private Attributes

QMainWindow & window
ProjectSession & session
EditorWorkspace & workspace

Detailed Description

Owns main-window actions, menus, shortcuts, and their enabled state.

The commands themselves belong to the action group of the subsystem implementing them, which consumes the matching group of actionGroups.hpp. This class only creates them and presents them.

Definition at line 43 of file windowActions.hpp.

Constructor & Destructor Documentation

◆ WindowActions()

WindowActions ( QMainWindow & window,
ProjectSession & session,
EditorWorkspace & workspace )

Definition at line 41 of file windowActions.cpp.

◆ ~WindowActions()

~WindowActions ( )
overridedefault

Member Function Documentation

◆ activeDocumentType()

std::optional< SILICON::project::DocumentType > activeDocumentType ( ) const
nodiscardnoexcept

Definition at line 167 of file windowActions.cpp.

◆ applyStoredSettings()

void applyStoredSettings ( )

Definition at line 315 of file windowActionsSettings.cpp.

◆ bindEditorActions()

void bindEditorActions ( )
private

Definition at line 70 of file windowActions.cpp.

◆ createActions()

void createActions ( )

Definition at line 266 of file windowActions.cpp.

◆ createMenus()

void createMenus ( )

Definition at line 94 of file windowActions.cpp.

◆ createToolBar()

void createToolBar ( )

Definition at line 128 of file windowActions.cpp.

◆ openSettings()

void openSettings ( )

Definition at line 341 of file windowActionsSettings.cpp.

◆ refreshActiveEditorActions()

void refreshActiveEditorActions ( )
private

Definition at line 64 of file windowActions.cpp.

◆ setActionsEnabled()

void setActionsEnabled ( std::initializer_list< QAction * > actions,
bool enabled )
static

Definition at line 47 of file windowActions.cpp.

◆ shortcutSettings()

QVector< ShortcutSetting > shortcutSettings ( ) const
nodiscardprivate

Definition at line 260 of file windowActionsSettings.cpp.

◆ syncWasmShortcutCapture()

void syncWasmShortcutCapture ( )
private

Definition at line 232 of file windowActionsSettings.cpp.

◆ updateCodeAction()

void updateCodeAction ( )

Definition at line 172 of file windowActions.cpp.

◆ updateDocumentActionVisibility()

void updateDocumentActionVisibility ( )

Definition at line 214 of file windowActions.cpp.

◆ updateEditActions()

void updateEditActions ( )

Definition at line 346 of file windowActions.cpp.

◆ updateHistoryActions()

void updateHistoryActions ( )

Definition at line 56 of file windowActions.cpp.

◆ updateSubcircuitShapeAction()

void updateSubcircuitShapeAction ( )

Definition at line 156 of file windowActions.cpp.

Member Data Documentation

◆ architecture

ArchitectureActions architecture

Commands owned by the architecture subsystem.

Definition at line 89 of file windowActions.hpp.

◆ circuit

CircuitActions circuit

Commands owned by the circuit editor.

Definition at line 86 of file windowActions.hpp.

◆ diagramToolsSeparator

QAction* diagramToolsSeparator = nullptr

Definition at line 64 of file windowActions.hpp.

◆ documents

DocumentActions documents

Commands owned by the project document workflow.

Definition at line 80 of file windowActions.hpp.

◆ documentToolsSeparator

QAction* documentToolsSeparator = nullptr

Definition at line 65 of file windowActions.hpp.

◆ edit

Commands owned by the active editor, whatever its kind.

Definition at line 83 of file windowActions.hpp.

◆ editMenu

QMenu* editMenu = nullptr

Edit menu.

Definition at line 71 of file windowActions.hpp.

◆ fileMenu

QMenu* fileMenu = nullptr

File menu.

Definition at line 68 of file windowActions.hpp.

◆ helpMenu

QMenu* helpMenu = nullptr

Help menu.

Definition at line 74 of file windowActions.hpp.

◆ project

ProjectActions project

Commands owned by the project and application shell.

Definition at line 77 of file windowActions.hpp.

◆ session

ProjectSession& session
private

Definition at line 101 of file windowActions.hpp.

◆ toolBar

QToolBar* toolBar = nullptr

Main toolbar containing edit, mode, and simulation actions.

Definition at line 63 of file windowActions.hpp.

◆ waveform

WaveformActions waveform

Commands owned by the waveform viewer.

Definition at line 92 of file windowActions.hpp.

◆ window

QMainWindow& window
private

Definition at line 100 of file windowActions.hpp.

◆ workspace

EditorWorkspace& workspace
private

Definition at line 102 of file windowActions.hpp.


The documentation for this class was generated from the following files: