#ifndef HYDROGUI_ZLEVELSMODEL_H
#define HYDROGUI_ZLEVELSMODEL_H
+#include <HYDROGUI.h>
+#include <HYDROData_Entity.h>
#include <QAbstractListModel>
#include <QPixmap>
* \class HYDROGUI_ZLevelsModel
* \brief The class representing custom list model for the Z levels
*/
-class HYDROGUI_ZLevelsModel : public QAbstractListModel
+class HYDRO_EXPORT HYDROGUI_ZLevelsModel : public QAbstractListModel
{
Q_OBJECT
public:
enum OpType { Top, Up, Down, Bottom, DragAndDrop };
+ typedef QPair<Handle(HYDROData_Entity), bool> Object2Visible;
+ typedef QList<Object2Visible> Object2VisibleList;
+ typedef QList<Handle(HYDROData_Entity)> ObjectList;
+
public:
HYDROGUI_ZLevelsModel( QObject* theParent = 0 );
virtual ~HYDROGUI_ZLevelsModel();
QList<int> getIds( const QModelIndexList& theIndexes, bool theIsToSort = true ) const;
- void setObjects( const QList<QPair<QString, bool>>& theObjects );
+ void setObjects( const Object2VisibleList& theObjects );
+ ObjectList getObjects() const;
bool move( const int theItem, const OpType theType, bool theIsVisibleOnly,
const int theDropItem = -1 );
const int theDropItem = -1 );
protected:
- bool IsObjectVisible( int theIndex ) const;
+ bool isObjectVisible( int theIndex ) const;
private:
- QList<QPair<QString, bool>> myObjects;
+ friend class test_HYDROGUI_ZLevelsModel;
+
+ Object2VisibleList myObjects;
QPixmap myEmpty, myEye;
};