#ifndef BMSSERVICEPAGE_H #define BMSSERVICEPAGE_H #include #include #include "bmsinterface.h" namespace Ui { class BmsServicePage; } /* class KeyboardFilter : public QObject { public: KeyboardFilter( QObject *parent = 0 ) : QObject( parent ) {} protected: bool eventFilter( QObject *dist, QEvent *event ); }; */ class BmsServicePage : public QFrame { Q_OBJECT public: explicit BmsServicePage(QWidget *parent = nullptr); ~BmsServicePage(); void clearTerminal(); BMSInterface *bms() const; void setDieBieMS(BMSInterface *dieBieMS); protected: // void keyPressEvent(QKeyEvent *); bool eventFilter(QObject *, QEvent *); public slots: void printReceived(QString str); //void onUpButtonClicked(); //void onDownButtonClicked(); private slots: void on_sendButton_clicked(); void on_helpButton_clicked(); void on_clearButton_clicked(); private: Ui::BmsServicePage *ui; BMSInterface *mDieBieMS; //KeyboardFilter filter; }; #endif // BMSSERVICEPAGE_H