reimplemented panel state restoration

This commit is contained in:
itsmattkc
2018-12-27 11:51:35 +11:00
parent 1ee9451343
commit 8a6242e36f
7 changed files with 65 additions and 26 deletions
+19 -2
View File
@@ -5,9 +5,11 @@
#include <QPushButton>
#include "ui/graphview.h"
#include "ui/keyframenavigator.h"
GraphEditor::GraphEditor(QWidget* parent) : QDockWidget(parent) {
setWindowTitle("Graph Editor");
resize(720, 480);
QWidget* central_widget = new QWidget();
setWidget(central_widget);
@@ -15,17 +17,32 @@ GraphEditor::GraphEditor(QWidget* parent) : QDockWidget(parent) {
QVBoxLayout* layout = new QVBoxLayout();
central_widget->setLayout(layout);
QWidget* tool_widget = new QWidget();
tool_widget->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Maximum);
QHBoxLayout* tools = new QHBoxLayout();
tool_widget->setLayout(tools);
KeyframeNavigator* keyframe_nav = new KeyframeNavigator();
tools->addWidget(keyframe_nav);
tools->addStretch();
tools->addWidget(new QPushButton("HECK!"));
layout->addLayout(tools);
tools->addStretch();
tools->addWidget(new QPushButton("Hand"));
layout->addWidget(tool_widget);
view = new GraphView();
layout->addWidget(view);
QWidget* value_widget = new QWidget();
value_widget->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Maximum);
QHBoxLayout* values = new QHBoxLayout();
value_widget->setLayout(values);
values->addStretch();
values->addWidget(new QLabel("1920.0"));
values->addWidget(new QLabel("1080.0"));
values->addStretch();
layout->addLayout(values);
layout->addWidget(value_widget);
}