Files
oak-editor/app/node/factory.h
T
itsmattkc 7100d00060 nodes: made changes to the node system to allow for context sensitive shader code
Primarily implemented for the math node so a new shader can be generated and
compiled based on what inputs the node is receiving.
2020-03-29 03:11:30 +11:00

47 lines
722 B
C++

#ifndef NODEFACTORY_H
#define NODEFACTORY_H
#include <QList>
#include "node.h"
#include "widget/menu/menu.h"
class NodeFactory
{
public:
enum InternalID {
kViewerOutput,
kClipBlock,
kGapBlock,
kAudioInput,
kTransformDistort,
kVideoInput,
kTrackOutput,
kAudioVolume,
kAudioPanning,
kMath,
// Count value
kInternalNodeCount
};
NodeFactory() = default;
static void Initialize();
static void Destroy();
static Menu* CreateMenu();
static Node* CreateFromMenuAction(QAction* action);
static Node* CreateFromID(const QString& id);
private:
static Node* CreateInternal(const InternalID& id);
static QList<Node*> library_;
};
#endif // NODEFACTORY_H