You've already forked nodeeditor
mirror of
https://github.com/AxioDL/nodeeditor.git
synced 2026-03-30 11:48:31 -07:00
36 lines
586 B
C++
36 lines
586 B
C++
#pragma once
|
|
|
|
#include <QtGui/QPixmap>
|
|
|
|
#include <nodes/NodeDataModel>
|
|
|
|
using QtNodes::NodeData;
|
|
using QtNodes::NodeDataType;
|
|
|
|
/// The class can potentially incapsulate any user data which
|
|
/// need to be transferred within the Node Editor graph
|
|
class PixmapData : public NodeData
|
|
{
|
|
public:
|
|
|
|
PixmapData() {}
|
|
|
|
PixmapData(QPixmap const &pixmap)
|
|
: _pixmap(pixmap)
|
|
{}
|
|
|
|
NodeDataType
|
|
type() const override
|
|
{
|
|
// id name
|
|
return {QLatin1String("pixmap"), QLatin1String("P")};
|
|
}
|
|
|
|
QPixmap
|
|
pixmap() const { return _pixmap; }
|
|
|
|
private:
|
|
|
|
QPixmap _pixmap;
|
|
};
|