fix several UI weirdness
This commit is contained in:
+13
-15
@@ -8,8 +8,9 @@
|
||||
#include <QDebug>
|
||||
#include <QSettings>
|
||||
#include <QTimer>
|
||||
#include <QItemSelection>
|
||||
#include "canconnectionmodel.h"
|
||||
#include "canframemodel.h"
|
||||
#include "connections/canconnection.h"
|
||||
|
||||
|
||||
class CANConnectionModel;
|
||||
@@ -24,11 +25,10 @@ class ConnectionWindow : public QDialog
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit ConnectionWindow(CANFrameModel *canModel, QWidget *parent = 0);
|
||||
explicit ConnectionWindow(QWidget *parent = 0);
|
||||
~ConnectionWindow();
|
||||
void showEvent(QShowEvent *);
|
||||
int getSpeed();
|
||||
QString getPortName(); //name of port to connect to
|
||||
|
||||
CANCon::type getConnectionType();
|
||||
bool getSWMode();
|
||||
|
||||
@@ -39,40 +39,38 @@ signals:
|
||||
public slots:
|
||||
void setSpeed(int speed0);
|
||||
void setSWMode(bool mode);
|
||||
void sendFrame(const CANFrame *);
|
||||
void sendFrameBatch(const QList<CANFrame> *);
|
||||
void setSuspendAll(bool);
|
||||
|
||||
void setSuspendAll(bool pSuspend);
|
||||
|
||||
private slots:
|
||||
void handleOKButton();
|
||||
void handleConnTypeChanged();
|
||||
void handleConnSelectionChanged();
|
||||
void currentRowChanged(const QModelIndex ¤t, const QModelIndex &previous);
|
||||
void handleRemoveConn();
|
||||
void handleEnableAll();
|
||||
void handleDisableAll();
|
||||
void handleRevert();
|
||||
void handleNewConn();
|
||||
void receiveBusStatus(int bus, int speed, int status);
|
||||
void connectionStatus(CANCon::status);
|
||||
|
||||
void refreshCanList();
|
||||
|
||||
private:
|
||||
Ui::ConnectionWindow *ui;
|
||||
QList<QSerialPortInfo> ports;
|
||||
QSettings *settings;
|
||||
CANConnectionModel *connModel;
|
||||
CANFrameModel *canModel;
|
||||
QTimer mTicker;
|
||||
|
||||
QAtomicInt mRefreshReqOngoing;
|
||||
|
||||
void selectSerial();
|
||||
void selectKvaser();
|
||||
void selectSocketCan();
|
||||
bool isSocketCanAvailable();
|
||||
int getSpeed();
|
||||
QString getPortName();
|
||||
void setPortName(CANCon::type pType, QString pPortName);
|
||||
|
||||
void setActiveAll(bool pActive);
|
||||
CANConnection* create(CANCon::type pTye, QString pPortName);
|
||||
void loadConnections();
|
||||
void saveConnections();
|
||||
};
|
||||
|
||||
#endif // CONNECTIONWINDOW_H
|
||||
|
||||
Reference in New Issue
Block a user