12 #ifndef CXACTIVEDATA_H 13 #define CXACTIVEDATA_H 15 #include "cxResourceExport.h" 18 #include "boost/shared_ptr.hpp" 24 typedef boost::shared_ptr<class Data>
DataPtr;
25 typedef boost::shared_ptr<class Image>
ImagePtr;
40 virtual QList<DataPtr> getActiveDataHistory()
const;
41 virtual DataPtr getActive()
const;
42 virtual DataPtr getActiveUsingRegexp(QString typeRegexp)
const;
44 boost::shared_ptr<DATA> getActive()
const;
45 virtual ImagePtr getDerivedActiveImage()
const;
46 virtual void setActive(DataPtr activeData);
47 virtual void setActive(QString uid);
48 virtual QString getActiveImageUid();
49 virtual void remove(DataPtr dataToBeRemoved);
51 static ActiveDataPtr getNullObject();
52 virtual bool isNull()
const {
return false;}
54 void activeImageChanged(
const QString& uId);
55 void activeDataChanged(
const QString& uId);
58 QList<DataPtr> mActiveData;
59 PatientStoragePtr mStorage;
61 static ActiveDataPtr mNull;
63 void emitSignals(DataPtr activeData);
64 void emitActiveDataChanged();
65 void emitActiveImageChanged();
66 QString getChangedUid(DataPtr activeData)
const;
67 QList<DataPtr> getActiveDataHistory(QString typeRegexp)
const;
68 QString getStringToSave()
const;
69 QStringList getActiveDataStringList()
const;
70 void loadFromString(
const QString activeDatas);
76 boost::shared_ptr<DATA> retval;
77 QList<DataPtr> activeDataList = this->getActiveDataHistory();
78 for(
int i = activeDataList.size() - 1; i >= 0; --i)
80 retval = boost::dynamic_pointer_cast<DATA>(activeDataList.at(i));
90 #endif // CXACTIVEDATA_H Provides the last active data of warious types.
boost::shared_ptr< class Image > ImagePtr
boost::shared_ptr< class ActiveData > ActiveDataPtr
virtual bool isNull() const
boost::shared_ptr< class Data > DataPtr
virtual DataPtr getActive() const
boost::shared_ptr< class PatientModelService > PatientModelServicePtr
boost::shared_ptr< class PatientStorage > PatientStoragePtr
boost::shared_ptr< class SessionStorageService > SessionStorageServicePtr
Namespace for all CustusX production code.