fw4spl
OrganMaterialEditor.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 "uiReconstructionQt/config.hpp"
10 
11 #include <fwGui/editor/IEditor.hpp>
12 
13 #include <fwTools/Failed.hpp>
14 
15 #include <QObject>
16 #include <QPointer>
17 
18 class QSlider;
19 class QPushButton;
20 class QLabel;
21 
22 namespace uiReconstructionQt
23 {
24 
38 class UIRECONSTRUCTIONQT_CLASS_API OrganMaterialEditor : public QObject,
40 {
41 Q_OBJECT
42 
43 public:
44 
46 
48  UIRECONSTRUCTIONQT_API OrganMaterialEditor() noexcept;
49 
51  UIRECONSTRUCTIONQT_API virtual ~OrganMaterialEditor() noexcept;
52 
53 protected:
54 
55  typedef ::fwRuntime::ConfigurationElement::sptr Configuration;
56 
58  virtual void starting() override;
59 
61  virtual void stopping() override;
62 
64  virtual void updating() override;
65 
67  virtual void configuring() override;
68 
75  virtual KeyConnectionsMap getAutoConnections() const override;
76 
78  void refreshMaterial( );
79 
81  void materialNotification( );
82 
83 protected Q_SLOTS:
84 
85  void onOpacitySlider( int value);
86  void onColorButton();
87 
88 private:
89 
90  QPointer<QPushButton> m_colourButton;
91  QPointer<QSlider> m_opacitySlider;
92  QPointer<QLabel> m_transparencyValue;
93 };
94 
95 } // uiReconstructionQt
This class is a helper to define the connections of a service and its data.
Definition: IService.hpp:454
The namespace uiReconstructionQt contains several editors using Qt related on reconstruction.
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.
Display a widget to change the reconstruction material (color and transparency).