LibrePCB Developers Documentation
boardeditorstate_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_BOARDEDITORSTATE_MEASURE_H
21#define LIBREPCB_EDITOR_BOARDEDITORSTATE_MEASURE_H
22
23/*******************************************************************************
24 * Includes
25 ******************************************************************************/
26#include "boardeditorstate.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 BoardEditorState_Measure
41 ******************************************************************************/
42
47 Q_OBJECT
48
49public:
50 // Constructors / Destructor
53 explicit BoardEditorState_Measure(const Context& context) noexcept;
54 virtual ~BoardEditorState_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(const QKeyEvent& e) noexcept override;
65 virtual bool processKeyReleased(const QKeyEvent& e) noexcept override;
67 QGraphicsSceneMouseEvent& e) noexcept override;
69 QGraphicsSceneMouseEvent& e) noexcept override;
70 virtual bool processSwitchToBoard(int index) noexcept override;
71
72 // Operator Overloadings
74 delete;
75
76private: // Data
77 QScopedPointer<MeasureTool> mTool;
78};
79
80/*******************************************************************************
81 * End of File
82 ******************************************************************************/
83
84} // namespace editor
85} // namespace librepcb
86
87#endif
The "measure" state/tool of the board editor.
Definition: boardeditorstate_measure.h:46
virtual bool processGraphicsSceneMouseMoved(QGraphicsSceneMouseEvent &e) noexcept override
Definition: boardeditorstate_measure.cpp:92
BoardEditorState_Measure(const BoardEditorState_Measure &other)=delete
virtual ~BoardEditorState_Measure() noexcept
Definition: boardeditorstate_measure.cpp:50
QScopedPointer< MeasureTool > mTool
Definition: boardeditorstate_measure.h:77
virtual bool processRemove() noexcept override
Definition: boardeditorstate_measure.cpp:76
virtual bool processSwitchToBoard(int index) noexcept override
Definition: boardeditorstate_measure.cpp:102
virtual bool processAbortCommand() noexcept override
Definition: boardeditorstate_measure.cpp:80
virtual bool processKeyPressed(const QKeyEvent &e) noexcept override
Definition: boardeditorstate_measure.cpp:84
virtual bool exit() noexcept override
Definition: boardeditorstate_measure.cpp:63
virtual bool processKeyReleased(const QKeyEvent &e) noexcept override
Definition: boardeditorstate_measure.cpp:88
virtual bool processGraphicsSceneLeftMouseButtonPressed(QGraphicsSceneMouseEvent &e) noexcept override
Definition: boardeditorstate_measure.cpp:97
virtual bool processCopy() noexcept override
Definition: boardeditorstate_measure.cpp:72
virtual bool entry() noexcept override
Definition: boardeditorstate_measure.cpp:57
The board editor state base class.
Definition: boardeditorstate.h:59
Measure tool providing the measure functionality for the editor states.
Definition: measuretool.h:56
Definition: occmodel.cpp:77
FSM Context.
Definition: boardeditorfsm.h:88