mirror of
https://github.com/ModOrganizer2/modorganizer-plugin_python.git
synced 2026-07-27 14:03:33 -07:00
35 lines
885 B
C++
35 lines
885 B
C++
#ifndef DUMMY_TREE_H
|
|
#define DUMMY_TREE_H
|
|
|
|
#include <ifiletree.h>
|
|
|
|
// filetree implementation for testing purpose
|
|
//
|
|
class DummyFileTree : public MOBase::IFileTree {
|
|
public:
|
|
DummyFileTree(std::shared_ptr<const IFileTree> parent, QString name)
|
|
: FileTreeEntry(parent, name), IFileTree()
|
|
{
|
|
}
|
|
|
|
protected:
|
|
std::shared_ptr<IFileTree> makeDirectory(std::shared_ptr<const IFileTree> parent,
|
|
QString name) const override
|
|
{
|
|
return std::make_shared<DummyFileTree>(parent, name);
|
|
}
|
|
|
|
bool doPopulate(std::shared_ptr<const IFileTree> parent,
|
|
std::vector<std::shared_ptr<FileTreeEntry>>& entries) const override
|
|
{
|
|
return true;
|
|
}
|
|
|
|
std::shared_ptr<IFileTree> doClone() const override
|
|
{
|
|
return std::make_shared<DummyFileTree>(nullptr, name());
|
|
}
|
|
};
|
|
|
|
#endif
|