Files
giesCANne/connections/newconnectiondialog.h
T
Collin Kidder 9ebbaca668 Add a new connection type - Lawicel. It works for some devices, not
all. More development needed but this is a start. Also added ability
to set serial speed and bus speed in the device setup which may be
useful for other connection devices too.
2022-10-04 19:48:11 -04:00

54 lines
1.3 KiB
C++

#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>* gvretips, QVector<QString>* kayakips, QWidget *parent = nullptr);
~NewConnectionDialog();
CANCon::type getConnectionType();
QString getPortName();
QString getDriverName();
int getSerialSpeed();
int getBusSpeed();
public slots:
void handleConnTypeChanged();
void handleDeviceTypeChanged();
void handleCreateButton();
private:
Ui::NewConnectionDialog *ui;
QList<QSerialPortInfo> ports;
QList<QCanBusDeviceInfo> canDevices;
QVector<QString>* remoteDeviceIPGVRET;
QVector<QString>* remoteBusKayak;
void selectSerial();
void selectKvaser();
void selectSocketCan();
void selectRemote();
void selectKayak();
void selectMQTT();
void selectLawicel();
bool isSerialBusAvailable();
void setPortName(CANCon::type pType, QString pPortName, QString pDriver);
};
#endif // NEWCONNECTIONDIALOG_H