Add files for a new window for connections (allows for different types

of connections and also makes auto refreshing the port list easier)
This commit is contained in:
Collin Kidder
2015-10-13 21:38:36 -04:00
parent 918ede4e10
commit 49f2525320
3 changed files with 308 additions and 0 deletions
+50
View File
@@ -0,0 +1,50 @@
#ifndef CONNECTIONWINDOW_H
#define CONNECTIONWINDOW_H
#include <QSerialPortInfo>
#include <QDialog>
#include <QDebug>
namespace Ui {
class ConnectionWindow;
}
namespace ConnectionType
{
enum ConnectionType
{
GVRET_SERIAL,
KVASER,
SOCKETCAN
};
}
class ConnectionWindow : public QDialog
{
Q_OBJECT
public:
explicit ConnectionWindow(QWidget *parent = 0);
~ConnectionWindow();
void showEvent(QShowEvent *);
int getSpeed0();
int getSpeed1();
QString getPortName(); //name of port to connect to
ConnectionType::ConnectionType getConnectionType();
signals:
void updateConnectionSettings();
public slots:
void setSpeeds(int speed0, int speed1);
private:
Ui::ConnectionWindow *ui;
QList<QSerialPortInfo> ports;
void getSerialPorts();
void getKvaserPorts();
void getSocketcanPorts();
};
#endif // CONNECTIONWINDOW_H