#pragma once #include #include #include #include #include #include #include #include #include #include #include "serialworker.h" #include "rawview.h" #include "tableview.h" #include "tagwidget.h" #include "connectdialog.h" #include class MainWindow : public QMainWindow { Q_OBJECT public: explicit MainWindow(QWidget *parent = nullptr); ~MainWindow(); private slots: void onConnectClicked(); void onDisconnectClicked(); void onPortOpened(); void onPortClosed(); void onReconnecting(int attempt); void onClearScreen(); void onError(const QString &message); void onNewLine(const QString &line); void onTagDetected(const QString &tag, const QString &value); void showFormatReference(); void configureTagFilter(); private: void setupUi(); void setupToolBar(); void setupStatusBar(); void clearAllViews(); // Worker & thread QThread *m_thread = nullptr; SerialWorker *m_worker = nullptr; // Views RawView *m_rawView = nullptr; TableView *m_tableView = nullptr; TagWidget *m_tagWidget = nullptr; // Status bar widgets QLabel *m_portLabel = nullptr; QLabel *m_stateLabel = nullptr; QLabel *m_reconnectLabel = nullptr; // Toolbar widgets QCheckBox *m_autoReconnectCb = nullptr; QSpinBox *m_reconnectIntervalSb= nullptr; // Actions QAction *m_connectAction = nullptr; QAction *m_disconnectAction = nullptr; SerialConfig m_lastConfig; QSet m_suppressedTags; // tags hidden from Raw view };