vtkProperties
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
#include "MainPanel.h"
|
||||
#include "ViewportPane.h"
|
||||
#include "ContextPanel.h"
|
||||
#include "PropertiesPanel.h"
|
||||
#include "Core/ObjectFactory.h"
|
||||
#include "Core/ObjectsContext.h"
|
||||
#include "Vtk/vtkObjectsContext.h"
|
||||
@@ -74,8 +75,11 @@ MainPanel::MainPanel(QWidget* parent) : QWidget(parent), m_context(nullptr), m_m
|
||||
m_rootSplitter = new QSplitter(Qt::Horizontal, this);
|
||||
m_contextPanel = new ContextPanel(m_rootSplitter);
|
||||
m_rootSplitter->addWidget(m_contextPanel);
|
||||
m_rootSplitter->setStretchFactor(0, 0);
|
||||
|
||||
m_firstPane = new ViewportPane(m_rootSplitter);
|
||||
m_rootSplitter->addWidget(m_firstPane);
|
||||
m_rootSplitter->setStretchFactor(1, 1);
|
||||
|
||||
connect(m_contextPanel, &ContextPanel::objectSelected, [this](uLib::Object* obj) {
|
||||
if (auto* viewport = qobject_cast<uLib::Vtk::QViewport*>(m_firstPane->currentViewport())) {
|
||||
@@ -84,12 +88,16 @@ MainPanel::MainPanel(QWidget* parent) : QWidget(parent), m_context(nullptr), m_m
|
||||
puppet = m_mainVtkContext->GetPuppet(obj);
|
||||
}
|
||||
viewport->SelectPuppet(puppet);
|
||||
// Update the display properties in the viewport pane itself - use the puppet proxy if possible
|
||||
m_firstPane->setObject(puppet ? (uLib::Object*)puppet : obj);
|
||||
} else {
|
||||
m_firstPane->setObject(obj);
|
||||
}
|
||||
});
|
||||
|
||||
// Set initial sizes
|
||||
// Set initial sizes: Context(250), Viewport(600), Properties(250)
|
||||
QList<int> sizes;
|
||||
sizes << 200 << 1000;
|
||||
sizes << 250 << 600 << 250;
|
||||
m_rootSplitter->setSizes(sizes);
|
||||
|
||||
mainLayout->addWidget(m_rootSplitter, 1);
|
||||
|
||||
Reference in New Issue
Block a user