universallistmodelbase.h 608 B

1234567891011121314151617181920212223
  1. #pragma once
  2. #include <QAbstractListModel>
  3. /*!
  4. * \brief The UniversalListModelBase class to make prossible properties definition for UniversalListModel
  5. * This class should not be used as is, but leaves this possibility.
  6. */
  7. class UniversalListModelBase : public QAbstractListModel
  8. {
  9. Q_OBJECT
  10. Q_PROPERTY(int count READ count NOTIFY countChanged)
  11. public:
  12. explicit UniversalListModelBase(QObject *parent = nullptr);
  13. /*!
  14. * \brief count property that declares row count of UniversalListModel
  15. * \return
  16. */
  17. virtual int count() const = 0;
  18. signals:
  19. void countChanged();
  20. };