1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
|
#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)
{
}
std::shared_ptr<NodeDataType> type() const override
{
// id name
return std::make_shared<NodeDataType>("pixmap", "P");
}
QPixmap pixmap() const
{
return _pixmap;
}
private:
QPixmap _pixmap;
};
|