LibrePCB Developers Documentation
Loading...
Searching...
No Matches
symboleditorstate_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_SYMBOLEDITORSTATE_MEASURE_H
21#define LIBREPCB_EDITOR_SYMBOLEDITORSTATE_MEASURE_H
22
23/*******************************************************************************
24 * Includes
25 ******************************************************************************/
26#include "symboleditorstate.h"
27
28#include <QtCore>
29
30/*******************************************************************************
31 * Namespace / Forward Declarations
32 ******************************************************************************/
33namespace librepcb {
34namespace editor {
35
36class MeasureTool;
37
38/*******************************************************************************
39 * Class SymbolEditorState_Measure
40 ******************************************************************************/
41
46 Q_OBJECT
47
48public:
49 // Constructors / Destructor
52 explicit SymbolEditorState_Measure(const Context& context) noexcept;
54
55 // General Methods
56 bool entry() noexcept override;
57 bool exit() noexcept override;
58
59 // Event Handlers
60 bool processKeyPressed(const GraphicsSceneKeyEvent& e) noexcept override;
61 bool processKeyReleased(const GraphicsSceneKeyEvent& e) noexcept override;
63 const GraphicsSceneMouseEvent& e) noexcept override;
65 const GraphicsSceneMouseEvent& e) noexcept override;
66 bool processCopy() noexcept override;
67 bool processRemove() noexcept override;
68 bool processAbortCommand() noexcept override;
69
70 // Operator Overloadings
72 delete;
73
74private: // Data
75 QScopedPointer<MeasureTool> mTool;
76};
77
78/*******************************************************************************
79 * End of File
80 ******************************************************************************/
81
82} // namespace editor
83} // namespace librepcb
84
85#endif
Measure tool providing the measure functionality for the editor states.
Definition measuretool.h:57
The SymbolEditorState_Measure class.
Definition symboleditorstate_measure.h:45
bool processGraphicsSceneMouseMoved(const GraphicsSceneMouseEvent &e) noexcept override
Definition symboleditorstate_measure.cpp:91
QScopedPointer< MeasureTool > mTool
Definition symboleditorstate_measure.h:75
bool processRemove() noexcept override
Definition symboleditorstate_measure.cpp:106
SymbolEditorState_Measure(const SymbolEditorState_Measure &other)=delete
bool processGraphicsSceneLeftMouseButtonPressed(const GraphicsSceneMouseEvent &e) noexcept override
Definition symboleditorstate_measure.cpp:96
~SymbolEditorState_Measure() noexcept
Definition symboleditorstate_measure.cpp:51
bool processAbortCommand() noexcept override
Definition symboleditorstate_measure.cpp:110
bool processKeyPressed(const GraphicsSceneKeyEvent &e) noexcept override
Definition symboleditorstate_measure.cpp:81
bool exit() noexcept override
Definition symboleditorstate_measure.cpp:70
bool processKeyReleased(const GraphicsSceneKeyEvent &e) noexcept override
Definition symboleditorstate_measure.cpp:86
bool processCopy() noexcept override
Definition symboleditorstate_measure.cpp:102
bool entry() noexcept override
Definition symboleditorstate_measure.cpp:58
The SymbolEditorState class is the base class of all symbol editor FSM states.
Definition symboleditorstate.h:56
Definition occmodel.cpp:77
Definition graphicsscene.h:52
Definition graphicsscene.h:45
Definition symboleditorfsm.h:75