From 63ad68198e6fdbccfa858c49d81f8a7ce26006b8 Mon Sep 17 00:00:00 2001 From: Bertrand Date: Tue, 23 Feb 2021 08:13:55 +0100 Subject: [PATCH 1/4] changed lib for windows build --- SavvyCAN.pro | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SavvyCAN.pro b/SavvyCAN.pro index d52b170d..abe5b559 100644 --- a/SavvyCAN.pro +++ b/SavvyCAN.pro @@ -210,7 +210,7 @@ RESOURCES += \ images.qrc win32 { - LIBS += opengl32.lib + LIBS += libopengl32 } unix { From 27b2b3903a7bc84904df5c2bbc3e6ce1652ae58c Mon Sep 17 00:00:00 2001 From: Bertrand Date: Tue, 23 Feb 2021 08:20:14 +0100 Subject: [PATCH 2/4] ignoring Qt user project files --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index cff24fb8..a94745f4 100644 --- a/.gitignore +++ b/.gitignore @@ -32,3 +32,4 @@ **/moc_* **/ui_*.h **/qrc_*.cpp +SavvyCAN.pro.user.* From da8a033dd04eb70ee74dfd6c4102ea3f010a4b54 Mon Sep 17 00:00:00 2001 From: Bertrand Date: Tue, 23 Feb 2021 08:55:24 +0100 Subject: [PATCH 3/4] adding connection reordering (move up/down) replacing connectionwindow.ui with own version --- connections/connectionwindow.cpp | 28 +++++++ connections/connectionwindow.h | 2 + icons.qrc | 2 + images/move_down.png | Bin 0 -> 478 bytes images/move_up.png | Bin 0 -> 343 bytes ui/connectionwindow.ui | 138 +++++++++++++++++++++++-------- 6 files changed, 137 insertions(+), 33 deletions(-) create mode 100644 images/move_down.png create mode 100644 images/move_up.png diff --git a/connections/connectionwindow.cpp b/connections/connectionwindow.cpp index 26e4c70d..a3b4cb47 100644 --- a/connections/connectionwindow.cpp +++ b/connections/connectionwindow.cpp @@ -59,6 +59,8 @@ ConnectionWindow::ConnectionWindow(QWidget *parent) : connect(ui->tableConnections->selectionModel(), &QItemSelectionModel::currentRowChanged, this, &ConnectionWindow::currentRowChanged); connect(ui->tabBuses, &QTabBar::currentChanged, this, &ConnectionWindow::currentTabChanged); connect(ui->btnSaveBus, &QPushButton::clicked, this, &ConnectionWindow::saveBusSettings); + connect(ui->btnMoveUp, &QPushButton::clicked, this, &ConnectionWindow::moveConnUp); + connect(ui->btnMoveDown, &QPushButton::clicked, this, &ConnectionWindow::moveConnDown); ui->cbBusSpeed->addItem("50000"); ui->cbBusSpeed->addItem("100000"); @@ -480,3 +482,29 @@ void ConnectionWindow::saveConnections() settings.setValue("connections/types", QVariant::fromValue(devTypes)); settings.setValue("connections/driverNames", QVariant::fromValue(driverNames)); } + +void ConnectionWindow::moveConnUp() +{ + int selIdx = ui->tableConnections->selectionModel()->currentIndex().row(); + if (selIdx > 0) + { + CANConnection* selConn = connModel->getAtIdx(selIdx); + CANConnection* prevConn = connModel->getAtIdx(selIdx - 1); + connModel->replace(selIdx - 1, selConn); + connModel->replace(selIdx, prevConn); + ui->tableConnections->selectRow(selIdx - 1); + } +} + +void ConnectionWindow::moveConnDown() +{ + int selIdx = ui->tableConnections->selectionModel()->currentIndex().row(); + if (selIdx < connModel->rowCount() - 1) + { + CANConnection* selConn = connModel->getAtIdx(selIdx); + CANConnection* nextConn = connModel->getAtIdx(selIdx + 1); + connModel->replace(selIdx + 1, selConn); + connModel->replace(selIdx, nextConn); + ui->tableConnections->selectRow(selIdx + 1); + } +} diff --git a/connections/connectionwindow.h b/connections/connectionwindow.h index 22769fca..dc081b3c 100644 --- a/connections/connectionwindow.h +++ b/connections/connectionwindow.h @@ -51,6 +51,8 @@ private slots: void handleSendHex(); void handleSendText(); void saveBusSettings(); + void moveConnUp(); + void moveConnDown(); void connectionStatus(CANConStatus); void readPendingDatagrams(); diff --git a/icons.qrc b/icons.qrc index 49ac17c4..427d23b9 100644 --- a/icons.qrc +++ b/icons.qrc @@ -15,5 +15,7 @@ images/signal_new.png images/node_new.png images/message_new.png + images/move_up.png + images/move_down.png diff --git a/images/move_down.png b/images/move_down.png new file mode 100644 index 0000000000000000000000000000000000000000..20d199d3a01a5c8432adc7d508ccde22ab1cf3a0 GIT binary patch literal 478 zcmV<40U`d0P)*S5QTeB8K=jjUEH`~v8^13obwGP)f? zh#&}-%cZ7=>357qBhGoDP|)%Gm;3Tlm<}1!A!9mZOoxo=kTD%HrbEVb$e0cp(;@RW zJFeI3cDwz~%*|%=!j9YR)@U?_!{Om@_-f8>xAT3!-EPM+$NQe+oEMA5`Fy@!uU*$I zm&?zi=ks|y9xoOPAw;Xyie-+s9)u9j^D33f<#L%!CjEZ@csxFa_WOOkUJrsm2+`?u zN~Kafv)X@{>2x}q%>X2m$uJBlrIuwyQA7yocDs(_#1$&;ms+is%jE!sVF=)UzeiC7 zz;#`P2=xw1sqg!lOy>Ed<2co7RZ*yR834vuuh-+8KMqr=RI}MswrM@bY}@uc4*(%# zFc?^t^_~s@`F!5C?QAxiPN#J|iu>i6)9J(*(^(AY|Ca)gNF?+nfAc-}I!uSm2eP1g U_}&EFrM?SD?N z%?rJlY?H7weU>5s literal 0 HcmV?d00001 diff --git a/ui/connectionwindow.ui b/ui/connectionwindow.ui index 12a6ada3..0cf7ea42 100644 --- a/ui/connectionwindow.ui +++ b/ui/connectionwindow.ui @@ -2,28 +2,44 @@ ConnectionWindow + + true + 0 0 - 956 - 665 + 1086 + 744 Connection Settings - + + + QLayout::SetDefaultConstraint + - - - + + + QLayout::SetMaximumSize + + + - Connected Devices: + Disconnect Selected Device - + + + + Reset Selected Device + + + + true @@ -36,28 +52,7 @@ - - - - Add New Device Connection - - - - - - - Reset Selected Device - - - - - - - Disconnect Selected Device - - - - + false @@ -124,11 +119,86 @@ + + + + true + + + + 0 + 0 + + + + + 20 + 16777215 + + + + + + + + :/icons/images/move_down.png:/icons/images/move_down.png + + + + + + + Connected Devices: + + + + + + + Add New Device Connection + + + + + + + true + + + + 0 + 0 + + + + + 20 + 16777215 + + + + + + + + :/icons/images/move_up.png:/icons/images/move_up.png + + + + 16 + 16 + + + + - - + + + QLayout::SetNoConstraint + + Enable Console @@ -208,6 +278,8 @@
qtabbar.h
- + + +
From ddcae6998b6483316c3406ddafdb9424fda54ad2 Mon Sep 17 00:00:00 2001 From: Bertrand Date: Tue, 23 Feb 2021 11:48:58 +0100 Subject: [PATCH 4/4] changing back to opengl32.lib for appveyor --- SavvyCAN.pro | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SavvyCAN.pro b/SavvyCAN.pro index abe5b559..d52b170d 100644 --- a/SavvyCAN.pro +++ b/SavvyCAN.pro @@ -210,7 +210,7 @@ RESOURCES += \ images.qrc win32 { - LIBS += libopengl32 + LIBS += opengl32.lib } unix {