Major revamp of the connection window. Hopefully it is more clear and

intuitive now.
This commit is contained in:
Collin Kidder
2019-03-05 21:25:32 -05:00
parent 70e8af85af
commit ec49413f61
17 changed files with 611 additions and 661 deletions
+47
View File
@@ -0,0 +1,47 @@
#ifndef NEWCONNECTIONDIALOG_H
#define NEWCONNECTIONDIALOG_H
#include <QDialog>
#include <QCanBusDeviceInfo>
#include <QSerialPortInfo>
#include <QDebug>
#include <QUdpSocket>
#include "canconnectionmodel.h"
#include "connections/canconnection.h"
namespace Ui {
class NewConnectionDialog;
}
class NewConnectionDialog : public QDialog
{
Q_OBJECT
public:
explicit NewConnectionDialog(QVector<QString>* ips, QWidget *parent = nullptr);
~NewConnectionDialog();
CANCon::type getConnectionType();
QString getPortName();
QString getDriverName();
public slots:
void handleConnTypeChanged();
void handleDeviceTypeChanged();
void handleCreateButton();
private:
Ui::NewConnectionDialog *ui;
QList<QSerialPortInfo> ports;
QList<QCanBusDeviceInfo> canDevices;
QVector<QString>* remoteDeviceIP;
void selectSerial();
void selectKvaser();
void selectSocketCan();
void selectRemote();
bool isSerialBusAvailable();
void setPortName(CANCon::type pType, QString pPortName, QString pDriver);
};
#endif // NEWCONNECTIONDIALOG_H