tageditor/gui/notificationmodel.h

40 lines
1.1 KiB
C
Raw Permalink Normal View History

2015-04-22 19:33:53 +02:00
#ifndef NOTIFICATIONMODEL_H
#define NOTIFICATIONMODEL_H
2018-03-06 02:04:35 +01:00
#include <tagparser/diagnostics.h>
2015-04-22 19:33:53 +02:00
#include <QAbstractListModel>
namespace QtGui {
2018-03-07 01:18:01 +01:00
class DiagModel : public QAbstractListModel {
2015-04-22 19:33:53 +02:00
Q_OBJECT
public:
2018-03-06 02:04:35 +01:00
explicit DiagModel(QObject *parent = nullptr);
2015-04-22 19:33:53 +02:00
2019-06-01 12:45:12 +02:00
QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override;
int columnCount(const QModelIndex &parent) const override;
int rowCount(const QModelIndex &parent = QModelIndex()) const override;
Qt::ItemFlags flags(const QModelIndex &index) const override;
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
2015-04-22 19:33:53 +02:00
2018-03-06 23:10:13 +01:00
const TagParser::Diagnostics &diagnostics() const;
void setDiagnostics(const TagParser::Diagnostics &diagnostics);
2015-04-22 19:33:53 +02:00
static const QIcon &informationIcon();
static const QIcon &warningIcon();
static const QIcon &errorIcon();
static const QIcon &debugIcon();
2020-03-09 18:46:08 +01:00
Q_SIGNALS:
2015-04-22 19:33:53 +02:00
2020-03-08 14:04:29 +01:00
public Q_SLOTS:
2015-04-22 19:33:53 +02:00
private:
2018-03-06 23:10:13 +01:00
TagParser::Diagnostics m_diag;
2015-04-22 19:33:53 +02:00
};
2018-03-07 01:18:01 +01:00
} // namespace QtGui
2015-04-22 19:33:53 +02:00
#endif // NOTIFICATIONMODEL_H