51 lines
1011 B
C++
51 lines
1011 B
C++
#ifndef MAINWINDOW_H
|
|
#define MAINWINDOW_H
|
|
|
|
#include <QMainWindow>
|
|
#include "DataTypes.h"
|
|
|
|
class QStandardItemModel;
|
|
class LogParser;
|
|
|
|
namespace QtCharts
|
|
{
|
|
class QChart;
|
|
}
|
|
|
|
namespace Ui
|
|
{
|
|
class MainWindow;
|
|
}
|
|
|
|
class MainWindow : public QMainWindow
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
MainWindow(QWidget *parent = nullptr);
|
|
~MainWindow();
|
|
|
|
public slots:
|
|
void changePath();
|
|
void applyDateTimeFilter();
|
|
|
|
void updateLogMessages();
|
|
void updateLogTable();
|
|
void updateCharts();
|
|
|
|
private:
|
|
void updateChart(QtCharts::QChart* chart, std::function<bool(const DataTypes::LogMessage&)> condition);
|
|
void clearChart(QtCharts::QChart* chart);
|
|
|
|
QScopedPointer<Ui::MainWindow> ui;
|
|
|
|
QScopedPointer<LogParser> logParser;
|
|
QScopedPointer<QStandardItemModel> logItemModel;
|
|
QList<DataTypes::LogMessage> logMessages;
|
|
|
|
QScopedPointer<QtCharts::QChart> inputChart;
|
|
QScopedPointer<QtCharts::QChart> outputChart;
|
|
QScopedPointer<QtCharts::QChart> adcChart;
|
|
};
|
|
#endif // MAINWINDOW_H
|