39 lines
1.0 KiB
C++
Executable File
39 lines
1.0 KiB
C++
Executable File
/**
|
|
* @RDE_HEADER@
|
|
* $Id$
|
|
* $HeadURL$
|
|
* $Author$
|
|
*
|
|
* Created by Philipp Last, NLSE, 05.01.2018
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <Evaluations/logger.h>
|
|
#include <nglwidgets/ngltreemodel.h>
|
|
#include <nglwidgets/ngltreeitem.h>
|
|
#include "evl_edit_schema_element_data.h"
|
|
|
|
namespace Evaluations
|
|
{
|
|
class TreeModelGeneral : public NGLTreeModel
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
TreeModelGeneral(QObject *parent,
|
|
NGL::INGLLogger &logger);
|
|
|
|
void iterateModel(const QModelIndex &parent, const std::function<void(const QModelIndex &, const QVariant &)> &fCallback, bool recursive = true) const;
|
|
|
|
QVariant dataAsVariant(const QModelIndex &index) const;
|
|
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
|
|
|
|
QModelIndex insertRow(const QModelIndex &parent, const QVariant &data, const QIcon &icon);
|
|
bool updateRow(const QModelIndex &index, const QVariant &data, const QIcon &icon);
|
|
void removeRow(const QModelIndex &idx, bool deleteRootAllowed = false);
|
|
|
|
protected:
|
|
LOGGER_T m_logger;
|
|
};
|
|
}
|