mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Project Tree updates (#8490)
Split project tree into multiple dockable tree views for plots, keeping one for 3d views.
This commit is contained in:
@@ -38,6 +38,7 @@
|
||||
|
||||
#include "cafPdmObject.h"
|
||||
#include "cafPdmUiDefaultObjectEditor.h"
|
||||
#include "cafPdmUiDragDropInterface.h"
|
||||
|
||||
#include "cafPdmUiTreeViewEditor.h"
|
||||
#include <QHBoxLayout>
|
||||
@@ -228,4 +229,12 @@ void PdmUiTreeView::enableAppendOfClassNameToUiItemText( bool enable )
|
||||
m_treeViewEditor->enableAppendOfClassNameToUiItemText( enable );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void PdmUiTreeView::treeVisibilityChanged( bool visible )
|
||||
{
|
||||
if ( visible ) slotOnSelectionChanged();
|
||||
}
|
||||
|
||||
} // End of namespace caf
|
||||
|
||||
@@ -38,6 +38,8 @@
|
||||
#include <QString>
|
||||
#include <QWidget>
|
||||
|
||||
#include "cafPdmUiDragDropInterface.h"
|
||||
|
||||
class QVBoxLayout;
|
||||
class QTreeView;
|
||||
class QItemSelection;
|
||||
@@ -48,7 +50,6 @@ namespace caf
|
||||
{
|
||||
class PdmUiItem;
|
||||
class PdmUiTreeViewEditor;
|
||||
class PdmUiDragDropInterface;
|
||||
class PdmObjectHandle;
|
||||
|
||||
//==================================================================================================
|
||||
@@ -90,6 +91,9 @@ signals:
|
||||
// Convenience signal for use with PdmUiPropertyView
|
||||
void selectedObjectChanged( caf::PdmObjectHandle* object ); // Signal/Slot system needs caf:: prefix in some cases
|
||||
|
||||
public slots:
|
||||
void treeVisibilityChanged( bool visible );
|
||||
|
||||
private slots:
|
||||
void slotOnSelectionChanged();
|
||||
|
||||
|
||||
@@ -479,6 +479,7 @@ bool PdmUiTreeViewEditor::eventFilter( QObject* obj, QEvent* event )
|
||||
if ( event->type() == QEvent::FocusIn )
|
||||
{
|
||||
this->updateSelectionManager();
|
||||
emit selectionChanged();
|
||||
}
|
||||
|
||||
// standard event processing
|
||||
@@ -504,7 +505,7 @@ void PdmUiTreeViewEditor::updateSelectionManager()
|
||||
void PdmUiTreeViewEditor::updateItemDelegateForSubTree( const QModelIndex& modelIndex /*= QModelIndex()*/ )
|
||||
{
|
||||
auto allIndices = m_treeViewModel->allIndicesRecursive();
|
||||
for ( QModelIndex index : allIndices )
|
||||
for ( QModelIndex& index : allIndices )
|
||||
{
|
||||
m_delegate->clearTags( index );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user