18 #ifndef QmitkPropertiesTableModel_h
19 #define QmitkPropertiesTableModel_h
28 #include <QAbstractTableModel>
44 static const int PROPERTY_NAME_COLUMN = 0;
45 static const int PROPERTY_VALUE_COLUMN = 1;
70 Qt::ItemFlags flags(
const QModelIndex &index)
const override;
74 QVariant headerData(
int section, Qt::Orientation orientation,
int role = Qt::DisplayRole)
const override;
78 QVariant data(
const QModelIndex &index,
int role = Qt::DisplayRole)
const override;
82 int rowCount(
const QModelIndex &parent = QModelIndex())
const override;
87 int columnCount(
const QModelIndex &parent)
const override;
99 virtual void PropertyListDelete(
const itk::Object *_PropertyList);
104 virtual void PropertyModified(
const itk::Object *caller,
const itk::EventObject &event);
109 virtual void PropertyDelete(
const itk::Object *caller,
const itk::EventObject &event);
114 virtual void SetFilterPropertiesKeyWord(std::string _FilterKeyWord);
119 bool setData(
const QModelIndex &index,
const QVariant &value,
int role)
override;
124 void sort(
int column, Qt::SortOrder order = Qt::AscendingOrder)
override;
157 CompareOperator _CompareOperator = Less);
161 bool operator()(
const PropertyDataSet &_Left,
const PropertyDataSet &_Right)
const;
177 bool operator()(
const PropertyDataSet &_Elem)
const;
198 void AddSelectedProperty(PropertyDataSet &_PropertyDataSet);
204 void RemoveSelectedProperty(
unsigned int _Index);
std::vector< PropertyDataSet > m_SelectedProperties
Store the properties in a vector so that they may be sorted.
std::string m_FilterKeyWord
Key-value list holding instances of BaseProperty.
CompareOperator m_CompareOperator
CompareOperator
Specifies Ascending/descending ordering.
A struct that inherits from std::binary_function. You can use it in std::sort algorithm for sorting t...
mitk::WeakPointer< mitk::PropertyList > m_PropertyList
Abstract base class for properties.
std::pair< std::string, mitk::BaseProperty::Pointer > PropertyDataSet
CompareCriteria
Specifies field of the property with which it will be sorted.
std::vector< unsigned long > m_PropertyModifiedObserverTags
Holds all tags of Modified Event Listeners. We need it to remove them again.
bool m_SortDescending
The property is true when the property list is sorted in descending order.
bool m_BlockEvents
Indicates if this class should neglect all incoming events because the class itself triggered the eve...
std::string m_FilterKeyWord
If set to any value, only properties containing the specified keyword in their name will be shown...
CompareCriteria m_CompareCriteria
std::vector< unsigned long > m_PropertyDeleteObserverTags
Holds all tags of Modified Event Listeners. We need it to remove them again.