fw4spl
t/include/fwGuiQt/dialog/LocationDialog.hpp
1 /* ***** BEGIN LICENSE BLOCK *****
2  * FW4SPL - Copyright (C) IRCAD, 2009-2017.
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 #ifndef __FWGUIQT_DIALOG_LOCATIONDIALOG_HPP__
8 #define __FWGUIQT_DIALOG_LOCATIONDIALOG_HPP__
9 
10 #include "fwGuiQt/config.hpp"
11 
12 #include <fwCore/base.hpp>
13 
14 #include <fwGui/dialog/ILocationDialog.hpp>
15 
16 class QString;
17 
21 namespace fwGuiQt
22 {
23 namespace dialog
24 {
29 class FWGUIQT_CLASS_API LocationDialog : public ::fwGui::dialog::ILocationDialog
30 {
31 
32 public:
33 
35  (()),
36  ::fwGui::factory::New< LocationDialog > );
37 
38  FWGUIQT_API LocationDialog(::fwGui::GuiBaseObject::Key key);
39 
40  FWGUIQT_API ::fwData::location::ILocation::sptr show() override;
41 
42  FWGUIQT_API void setType( ::fwGui::dialog::ILocationDialog::Types type ) override;
43 
44  FWGUIQT_API ::fwGui::dialog::ILocationDialog& setOption( ::fwGui::dialog::ILocationDialog::Options option) override;
45 
46  // Example ( addFilter("images","*.png *.jpg");
47  FWGUIQT_API void addFilter(const std::string& filterName, const std::string& wildcardList ) override;
48 
49 protected:
50 
51  ::fwGui::dialog::ILocationDialog::Options m_style;
52  ::fwGui::dialog::ILocationDialog::Types m_type;
53  std::vector< std::pair< std::string, std::string > > m_filters;
54 
56  QString fileFilters();
58  FWGUIQT_API std::string getCurrentSelection() const override;
59 
60  std::string m_wildcard;
61 
62 };
63 } // namespace dialog
64 } // namespace fwGuiQt
65 
66 #endif /*__FWGUIQT_DIALOG_LOCATIONDIALOG_HPP__*/
67 
Key class used to restrict access to Object construction. See http://www.drdobbs.com/184402053.
Defines the generic file/folder dialog for IHM.
The namespace fwGuiQt contains classes which provide the implementation of the Gui using Qt library...
Definition: WindowLevel.hpp:32
#define fwCoreClassDefinitionsWithFactoryMacro(_classinfo_, _parameters_, _factory_)
Generate common construction methods for classes with one factory.