-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy patherrorsmenu.h
More file actions
45 lines (35 loc) · 1.11 KB
/
errorsmenu.h
File metadata and controls
45 lines (35 loc) · 1.11 KB
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
42
43
44
45
#ifndef ERRORSMENU_H
#define ERRORSMENU_H
#include "mytextedit.h"
#include <QWidget>
#include <QObject> // Include QObject header for inheritance
#include <qlistwidget.h>
class ErrorsMenu : public QObject
{
Q_OBJECT // This macro enables the signal-slot mechanism
public:
ErrorsMenu(); // Constructor
void recolor(QColor backColor);
void Setup(MyTextEdit *t);
void UpdateErrors(QList<int> lN, QStringList m, QList<int> s);
void reposition();
private slots:
void clickedOverlayErrors(QPoint pos);
void clickedOverlayWarnings(QPoint pos);
void clickedOverlayOther(QPoint pos);
void onErrorItemClicked(QListWidgetItem* item);
private:
void fillErrorsListWith(int sev);
QList<int> findSeverities(int s);
MyTextEdit* createOverlay(QString color);
MyTextEdit* textEdit; // Pointer to MyTextEdit
QStringList messages; // List of messages
QList<int> lineNumbers; // List of line numbers
QList<int> severity; // List of severities
int currentlyShowing;
MyTextEdit* overlayTextEditErrors;
MyTextEdit* overlayTextEditWarnings;
MyTextEdit* overlayTextEditOther;
QListWidget* errorsList;
};
#endif // ERRORSMENU_H