node socket UI
This commit is contained in:
@@ -60,6 +60,11 @@ void EffectRow::AddField(EffectField *field)
|
||||
fields_.append(field);
|
||||
}
|
||||
|
||||
void EffectRow::AddNodeInput(olive::nodes::DataType type)
|
||||
{
|
||||
accepted_datatypes_.append(type);
|
||||
}
|
||||
|
||||
bool EffectRow::IsKeyframing() {
|
||||
return keyframing_;
|
||||
}
|
||||
@@ -102,6 +107,11 @@ void EffectRow::SetEnabled(bool enabled)
|
||||
}
|
||||
}
|
||||
|
||||
bool EffectRow::CanConnectNodes()
|
||||
{
|
||||
return !accepted_datatypes_.isEmpty();
|
||||
}
|
||||
|
||||
void EffectRow::SetKeyframingEnabled(bool enabled) {
|
||||
if (enabled == keyframing_) {
|
||||
return;
|
||||
|
||||
@@ -211,6 +211,17 @@ public:
|
||||
*/
|
||||
void SetEnabled(bool enabled);
|
||||
|
||||
/**
|
||||
* @brief Check if nodes can be connected to this input.
|
||||
*
|
||||
* Connecting is enabled by adding an accepted node input using AddNodeInput().
|
||||
*
|
||||
* @return
|
||||
*
|
||||
* TRUE if nodes can be connected.
|
||||
*/
|
||||
bool CanConnectNodes();
|
||||
|
||||
protected:
|
||||
/**
|
||||
* @brief Add a field to this row
|
||||
@@ -224,6 +235,18 @@ protected:
|
||||
*/
|
||||
void AddField(EffectField* Field);
|
||||
|
||||
/**
|
||||
* @brief Adds a node data type that can be accepted by this input
|
||||
*
|
||||
* Allows this input to take a node connection from a data type specified by type. An input can take several data
|
||||
* types.
|
||||
*
|
||||
* @param type
|
||||
*
|
||||
* The data type to add
|
||||
*/
|
||||
void AddNodeInput(olive::nodes::DataType type);
|
||||
|
||||
public slots:
|
||||
/**
|
||||
* @brief Go to previous keyframe
|
||||
@@ -340,6 +363,11 @@ private:
|
||||
* get freed automatically.
|
||||
*/
|
||||
QVector<EffectField*> fields_;
|
||||
|
||||
/**
|
||||
* @brief Internal array of accepted node data types
|
||||
*/
|
||||
QVector<olive::nodes::DataType> accepted_datatypes_;
|
||||
};
|
||||
|
||||
#endif // EFFECTROW_H
|
||||
|
||||
Reference in New Issue
Block a user