wiRedPanda
Logic Circuit Simulator
Loading...
Searching...
No Matches
PropertyShortcutHandler.h
Go to the documentation of this file.
1// Copyright 2015 - 2026, GIBIS-UNIFESP and the wiRedPanda contributors
2// SPDX-License-Identifier: GPL-3.0-or-later
3
7
8#pragma once
9
10#include <functional>
11
12#include <QCoreApplication>
13
14class GraphicElement;
15class Scene;
16
25{
26 Q_DECLARE_TR_FUNCTIONS(PropertyShortcutHandler)
27
28public:
29 explicit PropertyShortcutHandler(Scene *scene);
30
32 void prevMainProperty();
34 void nextMainProperty();
40 void nextElement();
42 void prevElement();
43
44private:
45 Scene *m_scene = nullptr;
46
48 void adjustMainProperty(int dir);
50 void adjustSecondaryProperty(int dir);
53 void applyWithUndo(GraphicElement *element, const std::function<void()> &mutate);
54};
Abstract base class for all graphical circuit elements in wiRedPanda.
void prevElement()
Morphs each selected element to the previous type in the cycle.
void nextMainProperty()
Increments the primary property of each selected element.
void prevMainProperty()
Decrements the primary property of each selected element.
void nextElement()
Morphs each selected element to the next type in the cycle.
void nextSecondaryProperty()
Increments the secondary property of each selected element.
void prevSecondaryProperty()
Decrements the secondary property of each selected element.
Main circuit editing scene.
Definition Scene.h:56