26 lines
689 B
C++
26 lines
689 B
C++
#pragma once
|
|
#include <QWidget>
|
|
#include "gui/network/NetworkGraphicsView.h"
|
|
#include "gui/network/NetworkGraphicsScene.h"
|
|
#include "gui/network/SocketGraphic.h"
|
|
#include "gui/network/FloatingEdgeGraphic.h"
|
|
|
|
class Network
|
|
: public QWidget
|
|
{
|
|
public:
|
|
Network(QWidget* parent = nullptr);
|
|
void socketClicked(SocketGraphic* socket, QMouseEvent *event);
|
|
void mouseMoved(QMouseEvent *event);
|
|
void leftMousePress(QMouseEvent *event);
|
|
private:
|
|
QLayout* mainLayout_;
|
|
NetworkGraphicsScene* scene_;
|
|
NetworkGraphicsView* view_;
|
|
FloatingEdgeGraphic* floatingEdge_=nullptr;
|
|
void keyPressEvent(QKeyEvent *event) override;
|
|
void destroyFloatingEdge();
|
|
|
|
protected:
|
|
};
|