forked from foldynl/QLog
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAlertWidget.h
60 lines (48 loc) · 1.36 KB
/
AlertWidget.h
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#ifndef QLOG_UI_ALERTWIDGET_H
#define QLOG_UI_ALERTWIDGET_H
#include <QWidget>
#include "data/SpotAlert.h"
#include "models/AlertTableModel.h"
#include "data/DxSpot.h"
namespace Ui {
class AlertWidget;
}
class AlertWidget : public QWidget
{
Q_OBJECT
public:
explicit AlertWidget(QWidget *parent = nullptr);
~AlertWidget();
int alertCount() const;
public slots:
void addAlert(const SpotAlert &alert);
void clearAllAlerts();
void entryDoubleClicked(QModelIndex index);
void alertAgingChanged(int);
void showEditRules();
void resetDupe();
void updateSpotsStatusWhenQSOAdded(const QSqlRecord &record);
void updateSpotsStatusWhenQSOUpdated(const QSqlRecord &record);
void updateSpotsDupeWhenQSODeleted(const QSqlRecord &record);
void updateSpotsDxccStatusWhenQSODeleted(const QSet<uint> &entities);
void recalculateDupe();
void recalculateDxccStatus();
private slots:
void showColumnVisibility();
signals:
void alertsCleared();
void tuneDx(DxSpot);
void tuneWsjtx(WsjtxDecode);
void rulesChanged();
private:
Ui::AlertWidget *ui;
AlertTableModel* alertTableModel;
QSortFilterProxyModel *proxyModel;
QTimer *aging_timer;
QSettings settings;
private slots:
void alertAging();
void saveTableHeaderState();
void restoreTableHeaderState();
};
#endif // QLOG_UI_ALERTWIDGET_H