/** * @RDE_HEADER@ * SideBarModel * $Id$ * $HeadURL$ * $Author$ * Created by Norbert Thoden, SLSE, 2015-01-19 */ #pragma once // Own #include #include "side_bar_item.h" #include "side_bar_export.h" // Qt #include //---------------------------------------------------------------------------- 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