fw4spl
ImageTransparency.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 "uiImageQt/config.hpp"
10 
11 #include <fwData/Point.hpp>
12 
13 #include <fwGui/editor/IEditor.hpp>
14 
15 #include <fwTools/Failed.hpp>
16 
17 #include <QAction>
18 #include <QCheckBox>
19 #include <QObject>
20 #include <QPointer>
21 #include <QSlider>
22 
23 namespace uiImageQt
24 {
25 
42 class UIIMAGEQT_CLASS_API ImageTransparency : public QObject,
44 {
45 Q_OBJECT
46 
47 public:
48 
50 
51  UIIMAGEQT_API ImageTransparency() noexcept;
52 
53  UIIMAGEQT_API virtual ~ImageTransparency() noexcept;
54 
64  UIIMAGEQT_API virtual KeyConnectionsType getObjSrvConnections() const override;
65 
66 protected:
68  virtual void starting() override;
69 
71  virtual void stopping() override;
72 
73  virtual void updating() override;
74 
75  virtual void swapping() override;
76 
77  virtual void configuring() override;
78 
79  virtual void info( std::ostream& _sstream ) override;
80 
90  virtual KeyConnectionsMap getAutoConnections() const override;
91 
92 protected Q_SLOTS:
93 
97  void onModifyVisibility(bool value);
98 
102  void onModifyVisibility(int value);
103 
107  void onModifyTransparency(int value);
108 
109 private:
110 
112  void notifyVisibility(bool isVisible);
113 
114  QPointer< QSlider > m_valueSlider;
115  QPointer< QCheckBox > m_valueCheckBox;
116  QPointer< QAction > m_action;
117  std::string m_shortcut;
118 
119 };
120 
121 } // uiImageQt
This class is a helper to define the connections of a service and its data.
Definition: IService.hpp:454
ImageTransparency service allows to change image transparency.
Defines the service interface managing the editor service for object.
Definition: IEditor.hpp:25
STL namespace.
The namespace uiImageQt contains several editors on image written with Qt. This namespace is included...
Definition: ImageInfo.hpp:23
::fwCom::helper::SigSlotConnection::KeyConnectionsType KeyConnectionsType
Returns proposals to connect service slots to associated object signals, this method is used for obj/...
Definition: IService.hpp:449
#define fwCoreServiceClassDefinitionsMacro(_classinfo_)
Generate common code for services classes.