Add push button support for OFX plugins
This commit adds support for push buttons in OFX plugins by: - Adding `kPushButton` to `NodeValue` enum - Implementing `pushButtonClicked` slot in `PluginNode` - Creating `NodeParamButton` widget for UI representation - Updating `paraminstance.h` to handle push button instances - Modifying `nodeparamviewwidgetbridge.cpp` to connect push button signals
This commit is contained in:
@@ -26,6 +26,7 @@
|
||||
|
||||
#include "common/qtutils.h"
|
||||
#include "core.h"
|
||||
#include "nodeparambutton.h"
|
||||
#include "node/group/group.h"
|
||||
#include "node/node.h"
|
||||
#include "node/nodeundo.h"
|
||||
@@ -40,6 +41,8 @@
|
||||
#include "widget/slider/integerslider.h"
|
||||
#include "widget/slider/rationalslider.h"
|
||||
|
||||
#include <OpenImageIO/detail/fmt/base.h>
|
||||
|
||||
namespace olive
|
||||
{
|
||||
|
||||
@@ -179,6 +182,13 @@ void NodeParamViewWidgetBridge::CreateWidgets()
|
||||
&NodeParamViewWidgetBridge::WidgetCallback);
|
||||
break;
|
||||
}
|
||||
case NodeValue::kPushButton: {
|
||||
NodeInput input=GetInnerInput();
|
||||
NodeParamButton *button=new NodeParamButton(input.name(),parent);
|
||||
widgets_.append(button);
|
||||
plugin::PluginNode* plugin_node=dynamic_cast<plugin::PluginNode*>(input.node());
|
||||
connect(button, &NodeParamButton::onPressed, plugin_node, &plugin::PluginNode::pushButtonClicked);
|
||||
}
|
||||
}
|
||||
|
||||
// Check all properties
|
||||
|
||||
Reference in New Issue
Block a user