nodes: use defined categories rather than arbitrary string based

This commit is contained in:
itsmattkc
2020-05-05 22:12:15 +10:00
parent 30efe054c7
commit 74d252c5c0
33 changed files with 123 additions and 75 deletions
+22 -1
View File
@@ -61,6 +61,22 @@ public:
kSampleProcessor = 0x2
};
enum CategoryID {
kCategoryUnknown = -1,
kCategoryInput,
kCategoryOutput,
kCategoryGenerator,
kCategoryMath,
kCategoryFilter,
kCategoryColor,
kCategoryGeneral,
kCategoryTimeline,
kCategoryChannels,
kCategoryCount
};
Node();
virtual ~Node() override;
@@ -115,7 +131,7 @@ public:
* interpreted as an empty string category. This value should be run through a translator as its largely user
* oriented.
*/
virtual QString Category() const;
virtual QList<CategoryID> Category() const = 0;
/**
* @brief Return a description of this node's purpose (optional for subclassing, but recommended)
@@ -241,6 +257,11 @@ public:
*/
void DisconnectAll();
/**
* @brief Get the human-readable name for any category
*/
static QString GetCategoryName(const CategoryID &c);
/**
* @brief Transforms time from this node through the connections it takes to get to the specified node
*/