Files
giesCANne/connections/newconnectiondialog.h
T
Collin Kidder ee287eac4b Add two new external libraries. SimpleCrypt is used to encrypt passwords, QMQTT is an MQTT
library that I was able to integrate into the codebase so there aren't any external
dependencies. Both external projects have their own open source licenses. Those licenses
are included. Also in this commit is some preliminary work to start adding MQTT support to SavvyCAN.
2020-08-05 20:24:02 -04:00

49 lines
1.1 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>* 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();
void selectMQTT();
bool isSerialBusAvailable();
void setPortName(CANCon::type pType, QString pPortName, QString pDriver);
};
#endif // NEWCONNECTIONDIALOG_H