mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Added new project tree dock widget
This commit is contained in:
parent
c09143e706
commit
a88b3cac83
@ -63,6 +63,7 @@
|
||||
#include "cafPdmSettings.h"
|
||||
#include "cafPdmUiPropertyView.h"
|
||||
#include "cafPdmUiPropertyViewDialog.h"
|
||||
#include "cafPdmUiTreeView.h"
|
||||
|
||||
#include "cvfTimer.h"
|
||||
#include "RimGeoMechModels.h"
|
||||
@ -545,8 +546,25 @@ void RiuMainWindow::createToolBars()
|
||||
|
||||
void RiuMainWindow::createDockPanels()
|
||||
{
|
||||
{
|
||||
QDockWidget* dockWidget = new QDockWidget("Project Tree", this);
|
||||
{
|
||||
QDockWidget* dockWidget = new QDockWidget("NEW Project Tree", this);
|
||||
dockWidget->setObjectName("dockWidget");
|
||||
dockWidget->setAllowedAreas(Qt::AllDockWidgetAreas);
|
||||
|
||||
m_projectTreeView = new caf::PdmUiTreeView(this);
|
||||
dockWidget->setWidget(m_projectTreeView);
|
||||
|
||||
addDockWidget(Qt::RightDockWidgetArea, dockWidget);
|
||||
|
||||
connect(m_projectTreeView->treeView()->selectionModel(), SIGNAL(selectionChanged(const QItemSelection &, const QItemSelection &)),
|
||||
this, SLOT(selectedObjectsChanged(const QItemSelection&, const QItemSelection &)));
|
||||
|
||||
// MODTODO
|
||||
//m_windowsMenu->addAction(dockWidget->toggleViewAction());
|
||||
}
|
||||
|
||||
{
|
||||
QDockWidget* dockWidget = new QDockWidget("OBSOLETE Project Tree", this);
|
||||
dockWidget->setObjectName("dockWidget");
|
||||
dockWidget->setAllowedAreas(Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea);
|
||||
|
||||
@ -1247,8 +1265,10 @@ void RiuMainWindow::setPdmRoot(caf::PdmObject* pdmRoot)
|
||||
|
||||
if (OBSOLETE_treeItemRoot && m_OBSOLETE_treeView->selectionModel())
|
||||
{
|
||||
connect(m_OBSOLETE_treeView->selectionModel(), SIGNAL(currentChanged ( const QModelIndex & , const QModelIndex & )), SLOT(slotCurrentChanged( const QModelIndex & , const QModelIndex & )));
|
||||
connect(m_OBSOLETE_treeView->selectionModel(), SIGNAL(currentChanged ( const QModelIndex & , const QModelIndex & )), SLOT(OBSOLETE_slotCurrentChanged( const QModelIndex & , const QModelIndex & )));
|
||||
}
|
||||
|
||||
m_projectTreeView->setPdmItem(pdmRoot);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -1510,7 +1530,7 @@ void RiuMainWindow::slotBuildWindowActions()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiuMainWindow::slotCurrentChanged(const QModelIndex & current, const QModelIndex & previous)
|
||||
void RiuMainWindow::OBSOLETE_slotCurrentChanged(const QModelIndex & current, const QModelIndex & previous)
|
||||
{
|
||||
RimView* activeReservoirView = RiaApplication::instance()->activeReservoirView();
|
||||
QModelIndex activeViewModelIndex = m_OBSOLETE_treeModelPdm->getModelIndexFromPdmObject(activeReservoirView);
|
||||
@ -2169,3 +2189,12 @@ void RiuMainWindow::forceProjectTreeRepaint()
|
||||
m_OBSOLETE_treeView->scroll(0,1);
|
||||
m_OBSOLETE_treeView->scroll(0,-1);
|
||||
}
|
||||
|
||||
void RiuMainWindow::selectedObjectsChanged(const QItemSelection& selected, const QItemSelection & deselected)
|
||||
{
|
||||
|
||||
// MODTODO
|
||||
|
||||
// Wire up update of property editor
|
||||
|
||||
}
|
||||
|
@ -47,12 +47,13 @@ class RimCase;
|
||||
|
||||
namespace caf
|
||||
{
|
||||
class AnimationToolBar;
|
||||
class FrameAnimationControl;
|
||||
class PdmObject;
|
||||
class PdmUiPropertyView;
|
||||
class PdmUiTreeView;
|
||||
class UiPropertyCreatorPdm;
|
||||
class UiTreeModelPdm;
|
||||
class PdmObject;
|
||||
class FrameAnimationControl;
|
||||
class AnimationToolBar;
|
||||
class PdmUiPropertyView;
|
||||
}
|
||||
|
||||
namespace ssihub
|
||||
@ -275,7 +276,10 @@ private slots:
|
||||
void slotOpenUsersGuideInBrowserAction();
|
||||
|
||||
void slotSubWindowActivated(QMdiSubWindow* subWindow);
|
||||
void slotCurrentChanged(const QModelIndex & current, const QModelIndex & previous);
|
||||
void OBSOLETE_slotCurrentChanged(const QModelIndex & current, const QModelIndex & previous);
|
||||
|
||||
void selectedObjectsChanged(const QItemSelection& selected, const QItemSelection & deselected);
|
||||
|
||||
|
||||
// Animation slots
|
||||
void slotSetCurrentFrame(int frameIndex);
|
||||
@ -288,6 +292,8 @@ private:
|
||||
RimUiTreeView* m_OBSOLETE_treeView;
|
||||
RimUiTreeModelPdm* m_OBSOLETE_treeModelPdm;
|
||||
|
||||
caf::PdmUiTreeView* m_projectTreeView;
|
||||
|
||||
caf::PdmObject* m_pdmRoot;
|
||||
caf::PdmUiPropertyView* m_pdmUiPropertyView;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user