Skip to content

Commit

Permalink
Removed Socketcan on conections window for Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
grodansparadis committed Feb 7, 2025
1 parent 20cbe85 commit 3efefc1
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@ MainWindow::MainWindow()
m_topitem_canal->setFont(0, font);
m_connTreeTable->addTopLevelItem(m_topitem_canal);

#ifndef WIN32
// Socketcan
QStringList strlist_socketcan(
QString(tr("Socketcan Connections")).split(','));
Expand All @@ -224,6 +225,7 @@ MainWindow::MainWindow()
m_topitem_socketcan->setForeground(0, b);
m_topitem_socketcan->setFont(0, font);
m_connTreeTable->addTopLevelItem(m_topitem_socketcan);
#endif

// tcp/ip
QStringList strlist_tcpip(QString(tr("TCP/IP Connections")).split(','));
Expand Down Expand Up @@ -560,11 +562,13 @@ MainWindow::addLoadedConnections(void)
m_topitem_canal->sortChildren(0, Qt::AscendingOrder);
} break;

#ifndef WIN32
case CVscpClient::connType::SOCKETCAN: {
// Add connection to connection tree
addChildItemToConnectionTree(m_topitem_socketcan, j);
m_topitem_socketcan->sortChildren(0, Qt::AscendingOrder);
} break;
#endif

case CVscpClient::connType::WS1: {
// Add connection to connection tree
Expand Down Expand Up @@ -640,9 +644,11 @@ MainWindow::openConnectionSettingsDialog(CVscpClient::connType type)
newCanalConnection();
break;

#ifndef WIN32
case CVscpClient::connType::SOCKETCAN:
newSocketCanConnection();
break;
#endif

case CVscpClient::connType::WS1:
newWs1Connection();
Expand Down Expand Up @@ -721,9 +727,11 @@ MainWindow::editConnectionItem(void)
editCanalConnection(itemConn);
break;

#ifndef WIN32
case static_cast<int>(CVscpClient::connType::SOCKETCAN):
editSocketCanConnection(itemConn);
break;
#endif

case static_cast<int>(CVscpClient::connType::WS1):
editWs1Connection(itemConn);
Expand Down Expand Up @@ -798,10 +806,12 @@ MainWindow::cloneConnectionItem(void)
addChildItemToConnectionTree(m_topitem_canal, conn_copy);
break;

#ifndef WIN32
case static_cast<int>(CVscpClient::connType::SOCKETCAN):
// Add connection to connection tree
addChildItemToConnectionTree(m_topitem_socketcan, conn_copy);
break;
#endif

case static_cast<int>(CVscpClient::connType::WS1):
// Add connection to connection tree
Expand Down Expand Up @@ -902,9 +912,11 @@ MainWindow::onDoubleClicked(QTreeWidgetItem* item)
newSession();
break;

#ifndef WIN32
case static_cast<int>(CVscpClient::connType::SOCKETCAN):
newSession();
break;
#endif

case static_cast<int>(CVscpClient::connType::WS1):
newSession();
Expand Down Expand Up @@ -944,9 +956,11 @@ MainWindow::onDoubleClicked(QTreeWidgetItem* item)
newCanalConnection();
break;

#ifndef WIN32
case static_cast<int>(CVscpClient::connType::SOCKETCAN):
newSocketCanConnection();
break;
#endif

case static_cast<int>(CVscpClient::connType::WS1):
newWs1Connection();
Expand Down Expand Up @@ -1011,11 +1025,13 @@ MainWindow::showConnectionContextMenu(const QPoint& pos)
SLOT(newCanalConnection()));
break;

#ifndef WIN32
case static_cast<int>(CVscpClient::connType::SOCKETCAN):
menu->addAction(QString(tr("Add new Socketcan connection...")),
this,
SLOT(newSocketCanConnection()));
break;
#endif

case static_cast<int>(CVscpClient::connType::WS1):
menu->addAction(QString(tr("Add new websocket WS1 connection...")),
Expand Down Expand Up @@ -1069,11 +1085,13 @@ MainWindow::showConnectionContextMenu(const QPoint& pos)
SLOT(newCanalConnection()));
break;

#ifndef WIN32
case static_cast<int>(CVscpClient::connType::SOCKETCAN):
menu->addAction(QString(tr("Add new Socketcan connection")),
this,
SLOT(newSocketCanConnection()));
break;
#endif

case static_cast<int>(CVscpClient::connType::WS1):
menu->addAction(QString(tr("Add new websocket WS1 connection")),
Expand Down

0 comments on commit 3efefc1

Please sign in to comment.