fw4spl
SnapshotEditor.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 "uiVisuQt/config.hpp"
10 
11 #include <fwCom/Signal.hpp>
12 #include <fwCom/Signals.hpp>
13 
14 #include <fwGui/editor/IEditor.hpp>
15 
16 #include <fwTools/Failed.hpp>
17 
18 #include <QObject>
19 #include <QPointer>
20 
21 class QPushButton;
22 
23 namespace uiVisuQt
24 {
25 
32 class UIVISUQT_CLASS_API SnapshotEditor : public QObject,
34 {
35 
36 Q_OBJECT
37 
38 public:
39 
41 
43  UIVISUQT_API SnapshotEditor() noexcept;
44 
46  UIVISUQT_API virtual ~SnapshotEditor() noexcept;
47 
48 protected:
49 
50  typedef ::fwRuntime::ConfigurationElement::sptr Configuration;
51 
55  virtual void starting() override;
56 
60  virtual void stopping() override;
61 
63  virtual void updating() override;
64 
66  virtual void swapping() override;
67 
76  virtual void configuring() override;
77 
79  virtual void info( std::ostream& _sstream ) override;
80 
81 protected Q_SLOTS:
85  void onSnapButton();
86 
87 private:
88  std::string requestFileName();
89 
94  typedef ::fwCom::Signal< void (std::string) > SnappedSignalType;
96  static const ::fwCom::Signals::SignalKeyType s_SNAPPED_SIG;
97 
98  SnappedSignalType::sptr m_sigSnapped;
99 
103  QPointer< QPushButton > m_snapButton;
104 
105 };
106 
107 } // uiVisuQt
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 uiVisuQt supplies user interface editors done with Qt.
STL namespace.
The namespace fwRuntime contains classes to manage bundle, configuration element, extension point in ...
#define fwCoreServiceClassDefinitionsMacro(_classinfo_)
Generate common code for services classes.
SnapshotEditor service is represented by a button. It allows to snap shot a generic scene...