#ifndef OFDSCENE_H #define OFDSCENE_H #include <QWidget> #include <httplib.h> #include <thread> namespace Ui { class OFDScene; } class OFDScene : public QWidget { Q_OBJECT public: explicit OFDScene(QWidget *parent = nullptr); ~OFDScene(); void startHttpServer(); unsigned int getPort(); private slots: void on_choose_image_button_clicked(); void onDataDecode(std::map<std::string, std::string>); void on_parse_button_clicked(); void on_binary_eye_button_clicked(); void notifyHttpServerFailure(); void on_stop_server_button_clicked(); signals: void httpErrorOccured(); private: Ui::OFDScene *ui; std::thread *http_thread; unsigned int port; httplib::Server server; }; #endif // OFDSCENE_H