fw4spl
uiMedDataQt::widget::ActivityDataView Class Reference

This class displays a tab widget allowing to select the required data to create an activity. More...

#include <ActivityDataView.hpp>

+ Inheritance diagram for uiMedDataQt::widget::ActivityDataView:
+ Collaboration diagram for uiMedDataQt::widget::ActivityDataView:

Public Types

enum  ColumnType : int {
  NAME, TYPE, DESC, PATIENT,
  STUDY
}
 
typedef std::map< std::string, std::string > ObjectIconMapType
 

Public Member Functions

UIMEDDATAQT_API ActivityDataView (QWidget *parent=0)
 
UIMEDDATAQT_API void fillInformation (const ::fwActivities::registry::ActivityInfo &info)
 Fill tab widget with activity info (create on item by activity parameter)
 
UIMEDDATAQT_API void fillInformation (const ::fwMedData::ActivitySeries::sptr &actSeries)
 Fill widget from existing activity info (create on item by activity parameter)
 
UIMEDDATAQT_API bool checkAndComputeData (const ::fwMedData::ActivitySeries::sptr &actSeries, std::string &errorMsg)
 Check if all the required data are selected and fill activity data composite. More...
 
UIMEDDATAQT_API::fwData::Object::sptr checkData (size_t index, std::string &errorMsg)
 Check if the current required data are selected And return this data. More...
 
void setIOSelectorConfig (const std::string &ioSelectorSrvConfig)
 Set io selector configuration used to import data.
 
void setSDBIOSelectorConfig (const std::string &ioSelectorSrvConfig)
 Set io selector configuration used to import data from a SDB.
 
virtual UIMEDDATAQT_API void clear ()
 Remove all the widget tabs.
 
void setObjectIconAssociation (const ObjectIconMapType &objectIcons)
 Set the map that defines the icon associated to an object.
 

Static Public Attributes

static UIMEDDATAQT_API const int s_UID_ROLE = Qt::UserRole + 1
 Identifier of the role UID in the series tree item.
 

Protected Member Functions

bool eventFilter (QObject *obj, QEvent *event) override
 Catch KeyEvent and DropEvent from tree widgets.
 

Detailed Description

This class displays a tab widget allowing to select the required data to create an activity.

Definition at line 30 of file ActivityDataView.hpp.

Member Function Documentation

bool uiMedDataQt::widget::ActivityDataView::checkAndComputeData ( const ::fwMedData::ActivitySeries::sptr &  actSeries,
std::string &  errorMsg 
)

Check if all the required data are selected and fill activity data composite.

Returns
True if data are correct, else false and errorMsg contains detailled error.
Parameters
[in]actSeriesactivitySeries to fill with the selected data
[out]errorMsgit will contain the error information if the data are not correct.

It checks if all required data are present in the widget, and create the activity data composite. Then it checks if the activity parameters are accessible from the composite of data (it checks if the object are accessible from the sesh@ paths.

Process activity validator

Definition at line 530 of file ActivityDataView.cpp.

References fwActivities::registry::Activities::classname(), fwServices::registry::ServiceConfig::getDefault(), fwTools::fwID::getObject(), fwActivities::registry::ActivityRequirement::maxOccurs, OSLM_ERROR, OSLM_ERROR_IF, SLM_ASSERT, SLM_DEBUG, SLM_ERROR, and fwActivities::registry::ActivityRequirement::type.

+ Here is the call graph for this function:

fwData::Object::sptr uiMedDataQt::widget::ActivityDataView::checkData ( size_t  index,
std::string &  errorMsg 
)

Check if the current required data are selected And return this data.

Returns
return the data if it is correct, else return a nullptr and errorMsg contains detailled error.
Parameters
[in]indexindex of the requirement to check (this index also correspond to a tab).
[out]errorMsgit will contain the error information if the data are not correct.

Process object validator

Definition at line 384 of file ActivityDataView.cpp.

References fwActivities::registry::ActivityRequirement::container, fwActivities::registry::ActivityRequirement::create, fwTools::fwID::getObject(), fwActivities::registry::ActivityRequirement::keys, fwActivities::registry::ActivityRequirement::maxOccurs, fwActivities::registry::ActivityRequirement::minOccurs, SLM_ASSERT, fwActivities::registry::ActivityRequirement::type, and fwActivities::registry::ActivityRequirement::validator.

+ Here is the call graph for this function:


The documentation for this class was generated from the following files: