GUI Milestone 2

This commit is contained in:
Joey Yakimowich-Payne 2026-01-29 22:17:33 -07:00
commit 8f341f631a
3 changed files with 190 additions and 22 deletions

View file

@ -13,6 +13,15 @@
#include <unordered_map>
#include <unordered_set>
enum class WarpNodeType : uint8_t {
kUnknown = 0,
kHardwareSink,
kHardwareSource,
kVirtualSink,
kVirtualSource,
kApplication,
};
struct WarpNodeData {
warppipe::NodeInfo info;
std::vector<warppipe::PortInfo> inputPorts;
@ -54,9 +63,12 @@ public:
void refreshFromClient();
const WarpNodeData *warpNodeData(QtNodes::NodeId nodeId) const;
QtNodes::NodeId qtNodeIdForPw(uint32_t pwNodeId) const;
bool isGhost(QtNodes::NodeId nodeId) const;
private:
static QString captionForNode(const warppipe::NodeInfo &info);
static WarpNodeType classifyNode(const warppipe::NodeInfo &info);
static QVariant styleForNode(WarpNodeType type, bool ghost);
QPointF nextPosition() const;
warppipe::Client *m_client = nullptr;
@ -70,4 +82,5 @@ private:
std::unordered_map<QtNodes::NodeId, QPointF> m_positions;
std::unordered_map<QtNodes::NodeId, QSize> m_sizes;
std::unordered_set<QtNodes::NodeId> m_ghostNodes;
};