fw4spl
Distance.hpp
1 /* ***** BEGIN LICENSE BLOCK *****
2  * FW4SPL - Copyright (C) IRCAD, 2009-2018.
3  * Distributed under the terms of the GNU Lesser General Public License (LGPL) as
4  * published by the Free Software Foundation.
5  * ****** END LICENSE BLOCK ****** */
6 
7 #pragma once
8 
9 #include "uiMeasurementQt/config.hpp"
10 
11 #include <fwGui/editor/IEditor.hpp>
12 
13 #include <fwTools/Failed.hpp>
14 
15 #include <QObject>
16 #include <QPointer>
17 #include <QPushButton>
18 
19 namespace uiMeasurementQt
20 {
21 namespace editor
22 {
44 class UIMEASUREMENTQT_CLASS_API Distance : public QObject,
46 {
47 Q_OBJECT
48 public:
49 
51 
52 
53  UIMEASUREMENTQT_API Distance() noexcept;
54 
56  UIMEASUREMENTQT_API virtual ~Distance() noexcept override;
57 
62  UIMEASUREMENTQT_API static const ::fwCom::Signals::SignalKeyType s_DISTANCE_REQUESTED_SIG;
63  typedef ::fwCom::Signal< void () > DistanceRequestedSignalType;
67 protected:
68 
69  typedef ::fwRuntime::ConfigurationElement::sptr Configuration;
70 
76  virtual void starting() override;
77 
83  virtual void stopping() override;
84 
86  virtual void updating() override;
87 
89  virtual void configuring() override;
90 
91 protected Q_SLOTS:
95  void onDistanceButton();
96 
97 private:
98  QPointer< QPushButton > m_distButton;
99 
100  DistanceRequestedSignalType::sptr m_sigDistanceRequested;
101 
102 };
103 } // namespace editor
104 } // uiMeasurementQt
Namespace containing fw4spl communication tools.
Definition: DumpEditor.hpp:30
Defines the service interface managing the editor service for object.
Definition: IEditor.hpp:25
The namespace fwRuntime contains classes to manage bundle, configuration element, extension point in ...
#define fwCoreServiceClassDefinitionsMacro(_classinfo_)
Generate common code for services classes.
Distance service is represented by a button. It allows to show distances in a generic scene...
Definition: Distance.hpp:44