began node work
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
#include "nodeeditor.h"
|
||||
|
||||
#include <QVBoxLayout>
|
||||
#include <QLabel>
|
||||
#include <QPushButton>
|
||||
|
||||
NodeEditor::NodeEditor(QWidget *parent) :
|
||||
Panel(parent),
|
||||
view_(&scene_)
|
||||
{
|
||||
resize(720, 480);
|
||||
|
||||
QWidget* central_widget = new QWidget();
|
||||
setWidget(central_widget);
|
||||
|
||||
QVBoxLayout* layout = new QVBoxLayout(central_widget);
|
||||
layout->addWidget(&view_);
|
||||
|
||||
view_.setInteractive(true);
|
||||
view_.setDragMode(QGraphicsView::RubberBandDrag);
|
||||
|
||||
QPushButton* push_button = new QPushButton("heck!!!");
|
||||
scene_.addWidget(push_button);
|
||||
}
|
||||
|
||||
void NodeEditor::Retranslate()
|
||||
{
|
||||
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
#ifndef NODEEDITOR_H
|
||||
#define NODEEDITOR_H
|
||||
|
||||
#include <QGraphicsScene>
|
||||
|
||||
#include "ui/panel.h"
|
||||
#include "ui/nodeview.h"
|
||||
|
||||
class NodeEditor : public Panel {
|
||||
Q_OBJECT
|
||||
public:
|
||||
NodeEditor(QWidget* parent = nullptr);
|
||||
|
||||
virtual void Retranslate() override;
|
||||
|
||||
private:
|
||||
QGraphicsScene scene_;
|
||||
NodeView view_;
|
||||
|
||||
};
|
||||
|
||||
#endif // NODEEDITOR_H
|
||||
@@ -36,6 +36,7 @@ Viewer* panel_sequence_viewer = nullptr;
|
||||
Viewer* panel_footage_viewer = nullptr;
|
||||
QVector<Timeline*> panel_timeline;
|
||||
GraphEditor* panel_graph_editor = nullptr;
|
||||
NodeEditor* panel_node_editor = nullptr;
|
||||
|
||||
void update_ui(bool modified) {
|
||||
if (modified) {
|
||||
@@ -86,6 +87,8 @@ void alloc_panels(QWidget* parent) {
|
||||
panel_timeline.append(first_timeline_panel);
|
||||
panel_graph_editor = new GraphEditor(parent);
|
||||
panel_graph_editor->setObjectName("graph_editor");
|
||||
panel_node_editor = new NodeEditor(parent);
|
||||
panel_node_editor->setObjectName("node_editor");
|
||||
}
|
||||
|
||||
void free_panels() {
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
#include "viewer.h"
|
||||
#include "grapheditor.h"
|
||||
#include "project.h"
|
||||
#include "nodeeditor.h"
|
||||
|
||||
extern QVector<Project*> panel_project;
|
||||
extern EffectControls* panel_effect_controls;
|
||||
@@ -33,6 +34,7 @@ extern Viewer* panel_sequence_viewer;
|
||||
extern Viewer* panel_footage_viewer;
|
||||
extern QVector<Timeline*> panel_timeline;
|
||||
extern GraphEditor* panel_graph_editor;
|
||||
extern NodeEditor* panel_node_editor;
|
||||
|
||||
void update_ui(bool modified);
|
||||
QDockWidget* get_focused_panel(bool force_hover = false);
|
||||
|
||||
Reference in New Issue
Block a user