feat: operator table transfer
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
#include "Gui/Network/Network.h"
|
||||
#include "Engine/Operator/GeometryConnection.h"
|
||||
#include "Engine/Operator/GeometryOperator.h"
|
||||
#include "Engine/Operator/OperatorTable.h"
|
||||
#include "Engine/Types.h"
|
||||
#include "Gui/Network/DisplayFlagButton.h"
|
||||
#include "Gui/Network/NodeEdgeGraphic.h"
|
||||
@@ -297,7 +298,7 @@ void Network::keyPressEvent(QKeyEvent *event)
|
||||
}
|
||||
case(Qt::Key_F):
|
||||
{
|
||||
if(auto newNode = createNode(&GOP_transform::ctor))
|
||||
if(auto newNode = createNode(op::OperatorTable::getOpConstructor(0)))
|
||||
{
|
||||
newNode->setPos(viewPos);
|
||||
}
|
||||
@@ -383,7 +384,7 @@ void Network::mouseReleaseEvent(QMouseEvent *event)
|
||||
NodeGraphic* prevDisplayNode = nodeStore_.at(*prevDisplayOpId);
|
||||
prevDisplayNode->setDisplayFlag(false);
|
||||
}
|
||||
nm->setDisplayOp(opId);
|
||||
enzo::nt::NetworkManager::setDisplayOp(opId);
|
||||
static_cast<DisplayFlagButton*>(clickedDisplayFlag)->setEnabled(true);
|
||||
}
|
||||
if(state_==State::MOVING_NODE)
|
||||
|
||||
@@ -1,11 +1,14 @@
|
||||
#include <QApplication>
|
||||
#include <QPushButton>
|
||||
#include <QSurfaceFormat>
|
||||
#include "Engine/Operator/OperatorTable.h"
|
||||
#include <boost/dll/import.hpp>
|
||||
|
||||
#include "Interface.h"
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
// set up rendering
|
||||
QSurfaceFormat format;
|
||||
format.setRenderableType(QSurfaceFormat::OpenGL);
|
||||
format.setVersion(3, 2);
|
||||
@@ -13,6 +16,14 @@ int main(int argc, char **argv)
|
||||
format.setSamples(4);
|
||||
QSurfaceFormat::setDefaultFormat(format);
|
||||
|
||||
// setup table
|
||||
auto initPlugin = boost::dll::import_symbol<void(void (*addOperator)(enzo::nt::opConstructor))>(
|
||||
"build/src/OpDefs/libenzoOps1.so", "newSopOperator"
|
||||
);
|
||||
|
||||
initPlugin(enzo::op::OperatorTable::addOperator);
|
||||
|
||||
|
||||
QApplication app (argc, argv);
|
||||
|
||||
EnzoUI interface;
|
||||
|
||||
Reference in New Issue
Block a user