Files
qt5-legatus-legacy/Lts/Viewer/SituationMap/SideBar/side_bar_model.h
T
2026-08-13 18:33:10 +02:00

68 lines
1.4 KiB
C++
Executable File

/**
* @RDE_HEADER@
* SideBarModel
* $Id$
* $HeadURL$
* $Author$
* Created by Norbert Thoden, SLSE, 2015-01-19
*/
#pragma once
// Own
#include <Common/situation_map_logging.h>
#include "side_bar_item.h"
#include "side_bar_export.h"
// Qt
#include <QStandardItemModel>
//----------------------------------------------------------------------------
namespace SituationMap
{
class SIDEBAR_EXPORT SideBarModel : public QStandardItemModel
{
using BaseClass = QStandardItemModel;
Q_OBJECT
public:
explicit SideBarModel(QObject *parent);
virtual ~SideBarModel();
void fillDummyData();
// void addItem(QStandardItem *item, QStandardItem *parentItem = nullptr);
void addItem(SideBarItem *item, SideBarItem *parentItem = nullptr);
// // QAbstractItemModel: reimplemented :
// QModelIndex index(int row, int column = 0, const QModelIndex &parent = QModelIndex()) const;
// QModelIndex parent(const QModelIndex &child) const;
// virtual int rowCount(const QModelIndex &parent = QModelIndex()) const = 0;
// virtual int columnCount(const QModelIndex &parent = QModelIndex()) const = 0;
// virtual QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const = 0;
// // : reimplemented
signals:
protected Q_SLOTS:
void onItemChanged(QStandardItem *item);
private:
LOGGER_T m_logger; ///< Interface of the Logging-Facility
};
} // namespace SituationMap