SMTK  @SMTK_VERSION@
Simulation Modeling Tool Kit
Public Slots | Signals | Public Member Functions | Protected Slots | Protected Member Functions | Protected Attributes | List of all members
pqSMTKAttributePanel Class Reference

A panel that displays a single SMTK resource for editing by the user. More...

#include <pqSMTKAttributePanel.h>

Inheritance diagram for pqSMTKAttributePanel:
[legend]
Collaboration diagram for pqSMTKAttributePanel:
[legend]

Public Slots

virtual bool displayPipelineSource (pqPipelineSource *psrc)
 Populate the attribute panel with data from psrc. More...
 
virtual bool displayResource (const smtk::attribute::ResourcePtr &rsrc, smtk::view::ConfigurationPtr view=nullptr, int advancedlevel=0)
 Populate the attribute panel with data from rsrc. More...
 
virtual bool displayResourceOnServer (const smtk::attribute::ResourcePtr &rsrc, smtk::view::ConfigurationPtr view=nullptr, int advancedlevel=0)
 Populate the attribute panel with data from rsrc. More...
 
virtual bool displayView (smtk::view::ConfigurationPtr view)
 Populate the attribute panel with the given view. More...
 
virtual bool updatePipeline ()
 Update the attribute panel when the ParaView pipeline changes. More...
 
virtual void resetPanel (smtk::resource::ManagerPtr rsrcMgr)
 Clear panel widgets, unobserve displayed resource, and set the attribute resource pointer to null. More...
 
void focusPanel ()
 Raise the panel in the UI (first showing it if not shown).
 

Signals

void titleChanged (QString title)
 

Public Member Functions

 pqSMTKAttributePanel (QWidget *parent=nullptr)
 
smtk::extension::qtUIManagerattributeUIManager () const
 

Protected Slots

virtual void updateSettings ()
 Called when vtkSMTKSettings is modified, indicating user preferences have changed. More...
 
virtual void displayActivePipelineSource (bool doDisplay)
 Connect/disconnect signals+slots controlling synchronization of ParaView pipeline sources and the attribute panel. More...
 
virtual void observeProjectsOnServer (pqSMTKWrapper *mgr, pqServer *server)
 Track projects, react to the active task. More...
 
virtual void unobserveProjectsOnServer (pqSMTKWrapper *mgr, pqServer *server)
 
virtual void handleProjectEvent (const smtk::project::Project &, smtk::project::EventType)
 

Protected Member Functions

virtual bool updateManagers (const std::shared_ptr< smtk::common::Managers > &managers)
 Update the references to managers to reflect those related to the attribute resource being displayed.
 
virtual bool displayResourceInternal (const smtk::attribute::ResourcePtr &rsrc, smtk::view::ConfigurationPtr view=nullptr, int advancedlevel=0)
 Called by displayResource after fetching the resource's top-level view and verifying it should be shown.
 
virtual void updateTitle (const smtk::view::ConfigurationPtr &view=nullptr)
 If the view configuration specifies a title, set the window title to match. More...
 
virtual bool displayTaskAttribute (smtk::task::Task *task)
 Display an attribute view as requested by a task's style.
 
virtual void activeTaskStateChange (smtk::task::Task &task, smtk::task::State priorState, smtk::task::State currentState)
 Monitor the task controlling the panel's view (when a task is active).
 

Protected Attributes

smtk::extension::qtUIManagerm_attrUIMgr { nullptr }
 
std::weak_ptr< smtk::resource::Resourcem_rsrc
 
smtk::view::SelectionPtr m_seln
 
smtk::view::ManagerPtr m_viewManager
 
smtk::operation::ManagerPtr m_opManager
 
smtk::resource::Observers::Key m_observer
 
pqPropertyLinks m_propertyLinks
 
std::map< smtk::project::ManagerPtr, smtk::project::Observers::Key > m_projectManagerObservers
 
smtk::task::Active::Observers::Key m_activeObserverKey
 
smtk::task::Task::Observers::Key m_currentTaskObserverKey
 
smtk::task::Taskm_currentTask { nullptr }
 

Detailed Description

A panel that displays a single SMTK resource for editing by the user.

Because attribute resources currently ship with a top-level view (implied if none exists), we always display that view when asked to show a resource. This may change in the future.

This panel will create a new SMTK attribute UI manager each time the resource to be displayed is switched for a different resource.

Member Function Documentation

◆ displayActivePipelineSource

void pqSMTKAttributePanel::displayActivePipelineSource ( bool  doDisplay)
protectedvirtualslot

Connect/disconnect signals+slots controlling synchronization of ParaView pipeline sources and the attribute panel.

This slot is attached to pqSMTKBehavior::postProcessingModeChanged() so that the connections only exist during post-processing (when the pipeline browser is visible).

◆ displayPipelineSource

bool pqSMTKAttributePanel::displayPipelineSource ( pqPipelineSource *  psrc)
virtualslot

Populate the attribute panel with data from psrc.

If psrc is an attribute source, then call displayResource() on the resource.

◆ displayResource

bool pqSMTKAttributePanel::displayResource ( const smtk::attribute::ResourcePtr rsrc,
smtk::view::ConfigurationPtr  view = nullptr,
int  advancedlevel = 0 
)
virtualslot

Populate the attribute panel with data from rsrc.

If view is not specified, then rsrc's top-level view is used and the advancedlevel is ignored. Note that displayView is used to render the appropriate view in the panel

◆ displayResourceOnServer

bool pqSMTKAttributePanel::displayResourceOnServer ( const smtk::attribute::ResourcePtr rsrc,
smtk::view::ConfigurationPtr  view = nullptr,
int  advancedlevel = 0 
)
virtualslot

Populate the attribute panel with data from rsrc.

If view is not specified, then rsrc's top-level view is used and the advancedlevel is ignored. Note that displayView is used to render the appropriate view in the panel This variant does more than displayResource() alone; it will obtain the wrapper associated with the resource's manager and use it for selection as displayPipelineSource() does before calling the plain displayResource() variant.

◆ displayView

bool pqSMTKAttributePanel::displayView ( smtk::view::ConfigurationPtr  view)
virtualslot

Populate the attribute panel with the given view.

Note that the view should describe an attribute resource. It is possible for views to describe other things, such as the configuration of a descriptive-phrase tree, but those will not be accepted by this method.

◆ observeProjectsOnServer

void pqSMTKAttributePanel::observeProjectsOnServer ( pqSMTKWrapper *  mgr,
pqServer *  server 
)
protectedvirtualslot

Track projects, react to the active task.

These methods are used to add observers to each project loaded on each server so that changes to the active task of any can affect the attribute displayed in this panel.

◆ resetPanel

void pqSMTKAttributePanel::resetPanel ( smtk::resource::ManagerPtr  rsrcMgr)
virtualslot

Clear panel widgets, unobserve displayed resource, and set the attribute resource pointer to null.

Note that this does not clear panel state related to observing a project's task manager.

◆ updatePipeline

bool pqSMTKAttributePanel::updatePipeline ( )
virtualslot

Update the attribute panel when the ParaView pipeline changes.

The attribute resource associated with the active ParaView pipeline source may have changed (i.e., the filename changed and so the old resource is dropped and a new one constructed) or been updated (i.e., the resource location has not changed, but the resource contents have changed). Re-render.

◆ updateSettings

void pqSMTKAttributePanel::updateSettings ( )
protectedvirtualslot

Called when vtkSMTKSettings is modified, indicating user preferences have changed.

The attribute panel listens for changes to the highlight-on-hover preference as well as default-value and error-value colors. This slot notifies the qtUIManager when these have changed and it in turn emits a signal that views or items can listen to for updates.

◆ updateTitle()

void pqSMTKAttributePanel::updateTitle ( const smtk::view::ConfigurationPtr view = nullptr)
protectedvirtual

If the view configuration specifies a title, set the window title to match.

Otherwise, use the default "Attribute Editor" window title.


The documentation for this class was generated from the following files: