2022-10-12 23:51:55 +02:00
|
|
|
/*
|
|
|
|
* objectbrowser.h, part of VCMI engine
|
|
|
|
*
|
|
|
|
* Authors: listed in file AUTHORS in main folder
|
|
|
|
*
|
|
|
|
* License: GNU General Public License v2.0 or later
|
|
|
|
* Full text of license available in license.txt file, in main folder
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2022-09-24 22:55:05 +02:00
|
|
|
#pragma once
|
2022-09-18 01:23:17 +02:00
|
|
|
|
|
|
|
#include <QSortFilterProxyModel>
|
|
|
|
#include "../lib/Terrain.h"
|
|
|
|
|
|
|
|
class ObjectBrowser : public QSortFilterProxyModel
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
explicit ObjectBrowser(QObject *parent = nullptr);
|
|
|
|
|
2022-10-08 21:54:45 +02:00
|
|
|
TerrainId terrain;
|
2022-09-18 01:23:17 +02:00
|
|
|
QString filter;
|
|
|
|
|
|
|
|
protected:
|
|
|
|
bool filterAcceptsRow(int source_row, const QModelIndex & source_parent) const override;
|
|
|
|
bool filterAcceptsRowText(int source_row, const QModelIndex &source_parent) const;
|
|
|
|
};
|