LibrePCB Developers Documentation
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#include <QtWidgets>
30
31/*******************************************************************************
32 * Namespace / Forward Declarations
33 ******************************************************************************/
34namespace librepcb {
35namespace editor {
36
37class MeasureTool;
38
39/*******************************************************************************
40 * Class SymbolEditorState_Measure
41 ******************************************************************************/
42
47 Q_OBJECT
48
49public:
50 // Constructors / Destructor
53 explicit SymbolEditorState_Measure(const Context& context) noexcept;
55
56 // General Methods
57 bool entry() noexcept override;
58 bool exit() noexcept override;
60 const noexcept override;
61
62 // Event Handlers
63 bool processKeyPressed(const QKeyEvent& e) noexcept override;
64 bool processKeyReleased(const QKeyEvent& e) noexcept override;
66 QGraphicsSceneMouseEvent& e) noexcept override;
68 QGraphicsSceneMouseEvent& e) noexcept override;
69 bool processCopy() noexcept override;
70 bool processRemove() noexcept override;
71 bool processAbortCommand() noexcept override;
72
73 // Operator Overloadings
75 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
The EditorWidgetBase class.
Definition: editorwidgetbase.h:62
Measure tool providing the measure functionality for the editor states.
Definition: measuretool.h:56
The SymbolEditorState_Measure class.
Definition: symboleditorstate_measure.h:46
bool processGraphicsSceneMouseMoved(QGraphicsSceneMouseEvent &e) noexcept override
Definition: symboleditorstate_measure.cpp:87
QScopedPointer< MeasureTool > mTool
Definition: symboleditorstate_measure.h:78
bool processRemove() noexcept override
Definition: symboleditorstate_measure.cpp:101
SymbolEditorState_Measure(const SymbolEditorState_Measure &other)=delete
~SymbolEditorState_Measure() noexcept
Definition: symboleditorstate_measure.cpp:47
bool processAbortCommand() noexcept override
Definition: symboleditorstate_measure.cpp:105
bool processKeyPressed(const QKeyEvent &e) noexcept override
Definition: symboleditorstate_measure.cpp:78
bool exit() noexcept override
Definition: symboleditorstate_measure.cpp:60
QSet< EditorWidgetBase::Feature > getAvailableFeatures() const noexcept override
Definition: symboleditorstate_measure.cpp:66
bool processKeyReleased(const QKeyEvent &e) noexcept override
Definition: symboleditorstate_measure.cpp:82
bool processGraphicsSceneLeftMouseButtonPressed(QGraphicsSceneMouseEvent &e) noexcept override
Definition: symboleditorstate_measure.cpp:92
bool processCopy() noexcept override
Definition: symboleditorstate_measure.cpp:97
bool entry() noexcept override
Definition: symboleditorstate_measure.cpp:54
The SymbolEditorState class is the base class of all symbol editor FSM states.
Definition: symboleditorstate.h:54
Definition: occmodel.cpp:77
Definition: symboleditorfsm.h:76