-
Notifications
You must be signed in to change notification settings - Fork 14
/
ViewerWidget.h
52 lines (41 loc) · 1.12 KB
/
ViewerWidget.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
#pragma once
#include <unordered_set>
#include <QApplication>
#include <QCheckBox>
#include <QHeaderView>
#include <QKeyEvent>
#include <QLineEdit>
#include <QPushButton>
#include <QSortFilterProxyModel>
#include <QSplitter>
#include <QTableWidget>
#include <QUdpSocket>
#include "PlotHolderWidget.h"
#include "RingBuffer.h"
class TableRow {
public:
TableRow() {}
inline bool isUninit() const {
return tableItems.empty();
}
int row = 0;
std::vector<QTableWidgetItem*> tableItems;
};
class ViewerWidget : public QWidget {
Q_OBJECT
public:
ViewerWidget();
QPushButton* flushButton = nullptr;
PlotHolderWidget* plotHolderWidget_ = nullptr;
QTableWidget* tableWidget_ = nullptr;
QSortFilterProxyModel* proxy_ = nullptr;
QTableView* tableView_ = nullptr;
QComboBox* plotChoice_ = nullptr;
QLineEdit* filterText_;
void keyPressEvent(QKeyEvent* event) override;
void updateTable(
const std::map<uint64_t, std::map<std::string, std::pair<RingBuffer<float>, TableRow>>>&
signatureToNameToDurations,
const std::unordered_set<std::string>& enabledBeforeReset,
int& lastRow);
};