7 #include "fwGui/dialog/LocationDialog.hpp" 9 #include <fwServices/registry/ActiveWorkers.hpp> 23 m_implementation = ::fwGui::dialog::ILocationDialog::dynamicCast(guiObj);
30 LocationDialog::~LocationDialog()
51 m_implementation->setType( type );
58 m_implementation->addFilter(filterName, wildcardList);
65 return m_implementation->setOption(option);
72 m_implementation->setTitle(title);
79 return m_implementation->getTitle();
86 m_implementation->setDefaultLocation(loc);
93 return m_implementation->getDefaultLocation();
100 m_implementation->saveDefaultLocation(loc);
107 return m_implementation->getCurrentSelection();
The namespace fwGui contains the base interface for IHM services.
virtual FWGUI_API void setDefaultLocation(::fwData::location::ILocation::sptr loc) override
Set the initial location for the dialog.
FWGUI_API::fwGui::dialog::ILocationDialog & setOption(::fwGui::dialog::ILocationDialog::Options option) override
allow to set option to the file dialog mode=READ/WRITE, check=FILE_MUST_EXIST
FWGUI_API::fwData::location::ILocation::sptr show() override
Display the dialog.
FWGUI_API void addFilter(const std::string &filterName, const std::string &wildcardList) override
specify some filtering when browsing files:
FWGUI_API const std::string & getTitle() override
Returns the title for the dialog.
Abstract class to define a location ( fileSystem, directory(IES) etc.... )
static FWGUI_API const FactoryRegistryKeyType REGISTRY_KEY
this unique key should be used for all factory for specific LocationDialog(qt,wx,...)
static FWSERVICES_API::fwThread::Worker::sptr getDefaultWorker()
Get the default registered worker.
FWGUI_APIconst::boost::filesystem::path getDefaultLocation() override
Gets the default location for the dialog (from preferences or specified by user)
FWGUI_API LocationDialog()
Will instantiate the concrete implementation.
FWGUI_API void setTitle(const std::string &title) override
Set the title for the dialog.
FWGUI_API std::string getCurrentSelection() const override
Gets the current extension file selection.
FWGUI_API void setType(::fwGui::dialog::ILocationDialog::Types type) override
Set the type of location for the dialog (SINGLE_FILE, FORLDER, MULTI_FILES)
FWGUI_API void saveDefaultLocation(::fwData::location::ILocation::sptr loc) override
Save the specified default location for the dialog in preferences (if available)
virtual FWGUI_API::fwData::location::ILocation::sptr show()=0