ctkDICOMItemTreeModel.h 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. /*=========================================================================
  2. Library: CTK
  3. Copyright (c) Kitware Inc.
  4. All rights reserved.
  5. Distributed under a BSD License. See LICENSE.txt file.
  6. This software is distributed "AS IS" WITHOUT ANY WARRANTY; without even
  7. the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  8. See the above copyright notice for more information.
  9. =========================================================================*/
  10. #ifndef __ctkDICOMItemTreeModel_h
  11. #define __ctkDICOMItemTreeModel_h
  12. // Qt includes
  13. #include <QAbstractItemModel>
  14. #include <QModelIndex>
  15. // CTK includes
  16. #include <ctkPimpl.h>
  17. #include "CTKDICOMWidgetsExport.h"
  18. class ctkDICOMItemTreeModelPrivate;
  19. class CTK_DICOM_WIDGETS_EXPORT ctkDICOMItemTreeModel : public QAbstractItemModel
  20. {
  21. public:
  22. typedef QAbstractItemModel Superclass;
  23. explicit ctkDICOMItemTreeModel(QObject* parent=0);
  24. virtual ~ctkDICOMItemTreeModel();
  25. virtual QModelIndex index(int row, int column,
  26. const QModelIndex &parent = QModelIndex()) const;
  27. virtual QModelIndex parent(const QModelIndex &child) const;
  28. virtual Qt::ItemFlags flags(const QModelIndex &index) const;
  29. virtual QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
  30. virtual QVariant headerData(int section, Qt::Orientation orientation,
  31. int role = Qt::DisplayRole) const;
  32. virtual int rowCount(const QModelIndex &parent = QModelIndex()) const;
  33. virtual int columnCount(const QModelIndex &parent = QModelIndex()) const;
  34. private:
  35. CTK_DECLARE_PRIVATE(ctkDICOMItemTreeModel);
  36. };
  37. #endif