objectbrowser.h 646 B

123456789101112131415161718192021222324252627
  1. /*
  2. * objectbrowser.h, part of VCMI engine
  3. *
  4. * Authors: listed in file AUTHORS in main folder
  5. *
  6. * License: GNU General Public License v2.0 or later
  7. * Full text of license available in license.txt file, in main folder
  8. *
  9. */
  10. #pragma once
  11. #include <QSortFilterProxyModel>
  12. #include "../lib/Terrain.h"
  13. class ObjectBrowser : public QSortFilterProxyModel
  14. {
  15. public:
  16. explicit ObjectBrowser(QObject *parent = nullptr);
  17. TerrainId terrain;
  18. QString filter;
  19. protected:
  20. bool filterAcceptsRow(int source_row, const QModelIndex & source_parent) const override;
  21. bool filterAcceptsRowText(int source_row, const QModelIndex &source_parent) const;
  22. };