openauto/include/f1x/openauto/autoapp/UI/ConnectDialog.hpp
2018-03-21 23:51:31 +01:00

47 lines
824 B
C++

#pragma once
#include <QDialog>
#include <f1x/aasdk/TCP/ITCPEndpoint.hpp>
#include <f1x/aasdk/TCP/ITCPWrapper.hpp>
namespace Ui {
class ConnectDialog;
}
namespace f1x
{
namespace openauto
{
namespace autoapp
{
namespace ui
{
class ConnectDialog : public QDialog
{
Q_OBJECT
public:
explicit ConnectDialog(boost::asio::io_service& ioService, aasdk::tcp::ITCPWrapper& tcpWrapper, QWidget *parent = nullptr);
~ConnectDialog() override;
signals:
void connectToDevice(const QString& ipAddress);
void connected(aasdk::tcp::ITCPEndpoint::SocketPointer socket);
void connectionFailed();
private slots:
void onConnectButtonClicked();
void onConnectionFailed();
private:
boost::asio::io_service& ioService_;
aasdk::tcp::ITCPWrapper& tcpWrapper_;
Ui::ConnectDialog *ui_;
};
}
}
}
}