LibrePCB Developers Documentation
Loading...
Searching...
No Matches
schematiceditorstate_measure.h
Go to the documentation of this file.
1/*
2 * LibrePCB - Professional EDA for everyone!
3 * Copyright (C) 2013 LibrePCB Developers, see AUTHORS.md for contributors.
4 * https://librepcb.org/
5 *
6 * This program is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <http://www.gnu.org/licenses/>.
18 */
19
20#ifndef LIBREPCB_EDITOR_SCHEMATICEDITORSTATE_MEASURE_H
21#define LIBREPCB_EDITOR_SCHEMATICEDITORSTATE_MEASURE_H
22
23/*******************************************************************************
24 * Includes
25 ******************************************************************************/
27
28#include <QtCore>
29
30/*******************************************************************************
31 * Namespace / Forward Declarations
32 ******************************************************************************/
33namespace librepcb {
34namespace editor {
35
36class MeasureTool;
37
38/*******************************************************************************
39 * Class SchematicEditorState_Measure
40 ******************************************************************************/
41
46 Q_OBJECT
47
48public:
49 // Constructors / Destructor
52 delete;
53 explicit SchematicEditorState_Measure(const Context& context) noexcept;
54 virtual ~SchematicEditorState_Measure() noexcept;
55
56 // General Methods
57 virtual bool entry() noexcept override;
58 virtual bool exit() noexcept override;
59
60 // Event Handlers
61 virtual bool processCopy() noexcept override;
62 virtual bool processRemove() noexcept override;
63 virtual bool processAbortCommand() noexcept override;
64 virtual bool processKeyPressed(
65 const GraphicsSceneKeyEvent& e) noexcept override;
66 virtual bool processKeyReleased(
67 const GraphicsSceneKeyEvent& e) noexcept override;
69 const GraphicsSceneMouseEvent& e) noexcept override;
71 const GraphicsSceneMouseEvent& e) noexcept override;
72
73 // Operator Overloadings
75 const SchematicEditorState_Measure& rhs) = delete;
76
77private: // Data
78 QScopedPointer<MeasureTool> mTool;
79};
80
81/*******************************************************************************
82 * End of File
83 ******************************************************************************/
84
85} // namespace editor
86} // namespace librepcb
87
88#endif
Measure tool providing the measure functionality for the editor states.
Definition measuretool.h:57
The "measure" state/tool of the schematic editor.
Definition schematiceditorstate_measure.h:45
virtual bool processGraphicsSceneMouseMoved(const GraphicsSceneMouseEvent &e) noexcept override
Definition schematiceditorstate_measure.cpp:105
SchematicEditorState_Measure(const SchematicEditorState_Measure &other)=delete
QScopedPointer< MeasureTool > mTool
Definition schematiceditorstate_measure.h:78
virtual bool processRemove() noexcept override
Definition schematiceditorstate_measure.cpp:87
virtual bool processGraphicsSceneLeftMouseButtonPressed(const GraphicsSceneMouseEvent &e) noexcept override
Definition schematiceditorstate_measure.cpp:110
virtual ~SchematicEditorState_Measure() noexcept
Definition schematiceditorstate_measure.cpp:53
virtual bool processAbortCommand() noexcept override
Definition schematiceditorstate_measure.cpp:91
virtual bool processKeyPressed(const GraphicsSceneKeyEvent &e) noexcept override
Definition schematiceditorstate_measure.cpp:95
virtual bool exit() noexcept override
Definition schematiceditorstate_measure.cpp:72
virtual bool processKeyReleased(const GraphicsSceneKeyEvent &e) noexcept override
Definition schematiceditorstate_measure.cpp:100
virtual bool processCopy() noexcept override
Definition schematiceditorstate_measure.cpp:83
virtual bool entry() noexcept override
Definition schematiceditorstate_measure.cpp:60
The schematic editor state base class.
Definition schematiceditorstate.h:58
Definition occmodel.cpp:77
Definition graphicsscene.h:52
Definition graphicsscene.h:45
FSM Context.
Definition schematiceditorfsm.h:62