SmartLockerTools/Analyser/Widget.h

69 lines
1.8 KiB
C++

#ifndef WIDGET_H
#define WIDGET_H
#include "Database.h"
#include <QWidget>
class QPushButton;
class QTextBrowser;
class QComboBox;
class QLineEdit;
class QGroupBox;
class ModuleCommunication;
class Widget : public QWidget {
Q_OBJECT
public:
explicit Widget(QWidget *parent = nullptr);
void initializeLogger();
protected:
QGroupBox *initializeCommandGroupBox();
void onClearLogButtonClicked();
void onSerialConnectButtonClicked();
void onSerialRefreshButtonClicked();
void onUvcRefreshButtonClicked();
void onEnrollButtonClicked();
void onVerifyButtonClicked();
void onDeleteAllButtonClicked();
void onDeleteButtonClicked();
void onRequestPalmFeatureButtonClicked();
void onRegisterPalmFeatureButtonClicked();
void onResetButtonClicked();
QGroupBox *initializeEnrollGroupBox();
QGroupBox *initializeVerifyGroupBox();
QGroupBox *initializeDeleteGroupBox();
QGroupBox *initializePalmFeatureGroupBox();
QGroupBox *initializeUvcGroupBox();
void onNewPalmFeature(const PalmFeature &feature);
private:
QComboBox *m_serialComboBox = nullptr;
QPushButton *m_serialConnectButton = nullptr;
QTextBrowser *m_logBrowser = nullptr;
QGroupBox *m_commandGroupBox = nullptr;
QLineEdit *m_enrollNameEdit = nullptr;
QLineEdit *m_enrollTimeoutEdit = nullptr;
QPushButton *m_enrollButton = nullptr;
QLineEdit *m_verifyTimeoutEdit = nullptr;
QPushButton *m_verifyButton = nullptr;
QLineEdit *m_deleteIdEdit = nullptr;
QPushButton *m_deleteButton = nullptr;
QPushButton *m_deleteAllButton = nullptr;
QLineEdit *m_palmFeatureEdit = nullptr;
std::shared_ptr<ModuleCommunication> m_communication;
std::shared_ptr<Database> m_database;
};
#endif // WIDGET_H