blob: 8d44f049b14eee61f8df63303427d914d1b01e14 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#ifndef ERRORSVIEW_H
#define ERRORSVIEW_H
#include <QListView>
QT_BEGIN_NAMESPACE
class QStandardItemModel;
class MultiDataModel;
class ErrorsView : public QListView
{
Q_OBJECT
public:
enum ErrorType {
SuperfluousAccelerator,
MissingAccelerator,
SurroundingWhitespaceDiffers,
PunctuationDiffers,
IgnoredPhrasebook,
PlaceMarkersDiffer,
NumerusMarkerMissing
};
ErrorsView(MultiDataModel *dataModel, QWidget *parent = 0);
void clear();
void addError(int model, const ErrorType type, const QString &arg = QString());
QString firstError();
private:
void addError(int model, const QString &error);
QStandardItemModel *m_list;
MultiDataModel *m_dataModel;
};
QT_END_NAMESPACE
#endif // ERRORSVIEW_H
|