190 lines
3.6 KiB
C++
190 lines
3.6 KiB
C++
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
#include <QMainWindow>
|
|
#include <QtCore/QMap>
|
|
#include "LogViewModels.hpp"
|
|
#include "LogViewTelegramEditModel.hpp"
|
|
#include <set>
|
|
#include <QMenu>
|
|
#include "logger.h"
|
|
|
|
namespace N_LogView
|
|
{
|
|
class LogViewTelegram;
|
|
}
|
|
class QTableView;
|
|
|
|
class QGroupBox;
|
|
class QCheckBox;
|
|
class QLabel;
|
|
class QLineEdit;
|
|
class QPushButton;
|
|
class QSplitter;
|
|
class QToolBox;
|
|
|
|
|
|
namespace N_LogView
|
|
{
|
|
class LogViewInjectionThread;
|
|
class TelegramEdit;
|
|
|
|
|
|
|
|
class LogViewGui : public QMainWindow
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
|
|
explicit LogViewGui(QWidget* a_parent);
|
|
|
|
static const QLatin1String WINDOW_GROUP;
|
|
static const QLatin1String SCREEN;
|
|
|
|
protected:
|
|
|
|
const QSize RADIO_BUTTON_ICON_SIZE;
|
|
static const QLatin1String SIZE;
|
|
static const QLatin1String POS;
|
|
static const QLatin1String SPLITTPOS;
|
|
static const QLatin1String TOOLBOXINDEX;
|
|
|
|
QGroupBox *m_CentralSelectionGroup;
|
|
std::set<int> m_CentralTelegramFilterList;
|
|
QCheckBox* m_SentCentralTelCheckBox;
|
|
QCheckBox* m_ReceivedCentralTelCheckBox;
|
|
QCheckBox* m_PosCentralTelCheckBox;
|
|
QCheckBox* m_ackCentralTelCheckBox;
|
|
|
|
QGroupBox *m_TetraSelectionGroup;
|
|
std::set<int> m_TetraTelegramFilterList;
|
|
QCheckBox* m_SentTetraTelCheckBox;
|
|
QCheckBox* m_ReceivedTetraTelCheckBox;
|
|
QCheckBox* m_PosTetraTelCheckBox;
|
|
QCheckBox* m_LoginTetraTelCheckBox;
|
|
QCheckBox* m_RegisterTetraTelCheckBox;
|
|
QCheckBox* m_ReportTetraTelCheckBox;
|
|
QCheckBox* m_FragmentedTetraTelCheckBox;
|
|
QCheckBox* m_AirInterfaceLoadTetraTelCheckBox;
|
|
|
|
QGroupBox *m_WlsSelectionGroup;
|
|
std::set<int> m_WlsTelegramFilterList;
|
|
QCheckBox* m_SentWlsTelCheckBox;
|
|
QCheckBox* m_ReceivedWlsTelCheckBox;
|
|
QCheckBox* m_PosWlsTelCheckBox;
|
|
QCheckBox* m_ackWlsTelCheckBox;
|
|
|
|
QString m_ActualLogfile;
|
|
qint64 m_LogfileSize;
|
|
bool m_DoReload;
|
|
QToolBox* m_ToolBox;
|
|
QTableView *m_ParticipantTableView;
|
|
ParticipantModel *m_participantModel;
|
|
QSortFilterProxyModel *m_participantProxyModel;
|
|
|
|
QTableView *m_logTelegramView;
|
|
TelegramModel *m_telegramModel;
|
|
TelegramProxyModel *m_telegramProxyModel;
|
|
|
|
QLabel *m_TelegramStatus;
|
|
|
|
QLabel *m_ParticipantStatus;
|
|
|
|
QGroupBox *m_ParticipantSelectionGroup;
|
|
|
|
TelegramEdit *m_EditTelegramController;
|
|
|
|
QTimer *m_TailTimer;
|
|
|
|
QSplitter *m_Splitter;
|
|
|
|
LogViewInjectionThread *m_InjectionThread;
|
|
|
|
QLabel *m_InjectionStatus;
|
|
|
|
|
|
QHash<int, int> m_participantListTelCount;
|
|
|
|
QHash<int, int> m_participantListIssi;
|
|
|
|
QAction *m_reloadAction;
|
|
QTimer *m_replayTimer;
|
|
int m_currentReplayRow;
|
|
NGL::INGLLogger &m_logger;
|
|
|
|
protected:
|
|
void readTelegramsFromLogFile(const QString& a_fileName, const qint64 a_filePos = 0);
|
|
|
|
|
|
|
|
void addToParticipantList(const QSharedPointer<LogViewTelegram> &a_telegram);
|
|
void syncParticipantList();
|
|
QCheckBox* createRadioButton(const QString& a_buttonName, const QString& a_iconName);
|
|
|
|
|
|
|
|
void startInjectionThread();
|
|
|
|
void closeEvent(QCloseEvent* a_closeEvent) override;
|
|
|
|
void createCentralSelectionWidget();
|
|
void createTetraSelectionWidget();
|
|
void createWlsSelectionWidget();
|
|
|
|
protected slots:
|
|
void addTelegramToEdit();
|
|
void showHexData();
|
|
void exportAsCsv();
|
|
void exportAsJson();
|
|
void onStartLogReplay();
|
|
void onReplayTimerTimeout();
|
|
|
|
void loadSpecificationFiles();
|
|
|
|
|
|
void newTelegramFile();
|
|
|
|
|
|
void loadTelegramFile();
|
|
|
|
|
|
|
|
void updateLogfile();
|
|
|
|
void selectedParticipantChanged();
|
|
|
|
void showTelegramTable();
|
|
|
|
|
|
void customMenuRequested(const QPoint &pos);
|
|
|
|
void changeSettings();
|
|
|
|
|
|
|
|
void reloadOnOff();
|
|
|
|
|
|
|
|
void updateInjectionStatus(const QString& a_picName, const QString& a_toopTipText);
|
|
|
|
void onLogTelegramViewDoubleClicked(const QModelIndex &index);
|
|
|
|
private slots:
|
|
void onSettingsChanged(uint32_t changedFlags);
|
|
};
|
|
|
|
}
|