GUI Milestone 8a

This commit is contained in:
Joey Yakimowich-Payne 2026-01-30 07:04:40 -07:00
commit a52f82d67b
7 changed files with 586 additions and 31 deletions

View file

@ -2,9 +2,13 @@
#include <warppipe/warppipe.hpp>
#include <QJsonObject>
#include <QString>
#include <QWidget>
#include <string>
#include <vector>
namespace QtNodes {
class BasicGraphicsScene;
class GraphicsView;
@ -13,10 +17,13 @@ class GraphicsView;
class WarpGraphModel;
class QLabel;
class QTimer;
class DeleteVirtualNodeCommand;
class GraphEditorWidget : public QWidget {
Q_OBJECT
friend class DeleteVirtualNodeCommand;
public:
explicit GraphEditorWidget(warppipe::Client *client,
QWidget *parent = nullptr);
@ -40,6 +47,20 @@ private:
void createVirtualNode(bool isSink, const QPointF &scenePos);
void captureDebugScreenshot(const QString &event);
void deleteSelection();
void copySelection();
void pasteSelection(const QPointF &offset);
void duplicateSelection();
void removeDefaultActions();
void tryResolvePendingLinks();
struct PendingPasteLink {
std::string outNodeName;
std::string outPortName;
std::string inNodeName;
std::string inPortName;
};
warppipe::Client *m_client = nullptr;
WarpGraphModel *m_model = nullptr;
QtNodes::BasicGraphicsScene *m_scene = nullptr;
@ -49,4 +70,6 @@ private:
QString m_layoutPath;
QString m_debugScreenshotDir;
bool m_graphReady = false;
QJsonObject m_clipboardJson;
std::vector<PendingPasteLink> m_pendingPasteLinks;
};