Major revamp of the connection window. Hopefully it is more clear and
intuitive now.
This commit is contained in:
@@ -3,8 +3,8 @@
|
||||
|
||||
|
||||
|
||||
#include <QSerialPortInfo>
|
||||
#include <QDialog>
|
||||
#include <QSerialPortInfo>
|
||||
#include <QDebug>
|
||||
#include <QSettings>
|
||||
#include <QTimer>
|
||||
@@ -30,61 +30,36 @@ public:
|
||||
explicit ConnectionWindow(QWidget *parent = 0);
|
||||
~ConnectionWindow();
|
||||
|
||||
CANCon::type getConnectionType();
|
||||
bool getSWMode();
|
||||
|
||||
signals:
|
||||
void updateBusSettings(CANBus *bus);
|
||||
void updatePortName(QString port);
|
||||
void sendDebugData(QByteArray bytes);
|
||||
|
||||
public slots:
|
||||
void setSpeed(int speed0);
|
||||
void setSWMode(bool mode);
|
||||
|
||||
void setSuspendAll(bool pSuspend);
|
||||
|
||||
void getDebugText(QString debugText);
|
||||
|
||||
private slots:
|
||||
void handleOKButton();
|
||||
void handleConnTypeChanged();
|
||||
void handleDeviceTypeChanged();
|
||||
void currentRowChanged(const QModelIndex ¤t, const QModelIndex &previous);
|
||||
void currentTabChanged(int newIdx);
|
||||
void consoleEnableChanged(bool checked);
|
||||
void handleRemoveConn();
|
||||
void handleEnableAll();
|
||||
void handleDisableAll();
|
||||
void handleReconnect();
|
||||
void handleRevert();
|
||||
void handleNewConn();
|
||||
void handleClearDebugText();
|
||||
void handleSendHex();
|
||||
void handleSendText();
|
||||
void saveBusSettings();
|
||||
void connectionStatus(CANConStatus);
|
||||
void readPendingDatagrams();
|
||||
|
||||
private:
|
||||
Ui::ConnectionWindow *ui;
|
||||
QList<QSerialPortInfo> ports;
|
||||
QList<QCanBusDeviceInfo> canDevices;
|
||||
Ui::ConnectionWindow *ui;
|
||||
QSettings *settings;
|
||||
CANConnectionModel *connModel;
|
||||
QUdpSocket *rxBroadcast;
|
||||
QVector<QString> remoteDeviceIP;
|
||||
|
||||
void selectSerial();
|
||||
void selectKvaser();
|
||||
void selectSocketCan();
|
||||
void selectRemote();
|
||||
bool isSerialBusAvailable();
|
||||
int getSpeed();
|
||||
QString getPortName();
|
||||
QString getDriverName();
|
||||
void setPortName(CANCon::type pType, QString pPortName, QString pDriver);
|
||||
|
||||
void setActiveAll(bool pActive);
|
||||
CANConnection* create(CANCon::type pTye, QString pPortName, QString pDriver);
|
||||
void populateBusDetails(int offset);
|
||||
void loadConnections();
|
||||
void saveConnections();
|
||||
void showEvent(QShowEvent *);
|
||||
|
||||
Reference in New Issue
Block a user