Omnidome
Fulldome Mapping Software Toolkit
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
PatchHandle.h
Go to the documentation of this file.
1 /* Copyright (c) 2014-2015 "Omnidome" by cr8tr
2  * Dome Mapping Projection Software (http://omnido.me).
3  * Omnidome was created by Michael Winkelmann aka Wilston Oreo (@WilstonOreo)
4  *
5  * This file is part of Omnidome.
6  *
7  * Omnidome is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU Affero General Public License as
9  * published by the Free Software Foundation, either version 3 of the
10  * License, or (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU Affero General Public License for more details.
16  * You should have received a copy of the GNU Affero General Public License
17  * along with this program. If not, see <http://www.gnu.org/licenses/>.
18  */
19 
20 
21 #ifndef OMNI_PATCH_PATCHHANDLE_H_
22 #define OMNI_PATCH_PATCHHANDLE_H_
23 
24 #include <QPointF>
25 
26 namespace omni {
27  namespace patch {
28  /// Handle for single patch
29  class PatchHandle {
30  public:
31  PatchHandle();
32  virtual ~PatchHandle() {}
33 
34  /// Position
35  QPointF pos() const;
36 
37  /// Set new position for handle
38  void setPos(QPointF const&);
39 
40  /// Move patch handle
41  void move(QPointF const& _delta);
42 
43  bool isSelected() const;
44  void select(bool = true);
45 
46  private:
47  bool isSelected_ = false;
48  QPointF pos_;
49  };
50  }
51 
52  using patch::PatchHandle;
53 }
54 
55 #endif /* OMNI_PATCH_PATCHHANDLE_H_ */
void move(QPointF const &_delta)
Move patch handle.
Definition: PatchHandle.cpp:36
Handle for single patch.
Definition: PatchHandle.h:29
void setPos(QPointF const &)
Set new position for handle.
Definition: PatchHandle.cpp:32
bool isSelected() const
Definition: PatchHandle.cpp:40
void select(bool=true)
Definition: PatchHandle.cpp:44
QPointF pos() const
Position.
Definition: PatchHandle.cpp:28
virtual ~PatchHandle()
Definition: PatchHandle.h:32
PatchHandle()
Definition: PatchHandle.cpp:25
bool isSelected_
Definition: PatchHandle.h:47
QPointF pos_
Definition: PatchHandle.h:48