feat: add display flag button click logic

This commit is contained in:
parker
2025-06-24 00:51:25 +01:00
parent 4471a9a537
commit 1f367b82fd
5 changed files with 72 additions and 5 deletions

View File

@@ -1,4 +1,5 @@
#include "gui/network/Network.h"
#include "gui/network/DisplayFlagButton.h"
#include "gui/network/NodeEdgeGraphic.h"
#include "gui/network/NetworkGraphicsView.h"
#include "gui/network/NetworkGraphicsScene.h"
@@ -115,14 +116,22 @@ void Network::leftMousePressed(QMouseEvent *event)
{
deleteEdge(clickedEdge);
}
// socket logic
else if(clickedSocket)
{
socketClicked(static_cast<SocketGraphic*>(clickedSocket), event);
}
// floating edge
else if(floatingEdge_)
{
destroyFloatingEdge();
}
// display flag
else if(QGraphicsItem* clickedDisplayFlag = itemOfType<DisplayFlagButton>(clickedItems))
{
std::cout << "HERE\n";
static_cast<DisplayFlagButton*>(clickedDisplayFlag)->setEnabled(true);
}
}