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

A panel that displays available operations in a "toolbox". More...

#include <pqSMTKOperationParameterPanel.h>

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

Classes

struct  TabData
 

Public Slots

virtual void observeWrapper (pqSMTKWrapper *, pqServer *)
 Called when a new client-server connection is added.
 
virtual void unobserveWrapper (pqSMTKWrapper *, pqServer *)
 Called when a client-server connection is removed.
 
virtual void runOperationWithDefaults (smtk::operation::Operation::Index)
 Called in response to signals from the pqSMTKOperationToolboxPanel. More...
 
void runOperationWithParameters (const std::shared_ptr< smtk::operation::Operation > &operation)
 Queue the (potentially asynchronous) operation to be run immediately as specified.
 
virtual void editOperationParameters (smtk::operation::Operation::Index)
 Called in response to signals from the pqSMTKOperationToolboxPanel. More...
 
void editExistingOperationParameters (const std::shared_ptr< smtk::operation::Operation > &operation, bool associateSelection=true, bool isTabClosable=true, bool showApply=true, smtk::view::ConfigurationPtr view=nullptr)
 Called in response to signals from pqSMTKOperationToolboxPanel. More...
 
virtual void cancelEditing (int tabIndex)
 Called when users close an operation-parameter's tab.
 
bool closeTabForOperation (const std::shared_ptr< smtk::operation::Operation > &operation, bool forceClose=false)
 Find the tab for the corresponding operation and close it. More...
 
virtual void cancelTabFromSender ()
 Called when users click "Done" in a qtOperationView (uses signal sender to find tab).
 
void focusPanel ()
 Raise the panel in the UI (first showing it if not shown).
 

Signals

void titleChanged (QString title)
 
void runOperation (smtk::operation::Operation::Index index)
 Queue the (potentially asynchronous) operation to be run immediately with default parameters.
 

Public Member Functions

 pqSMTKOperationParameterPanel (QWidget *parent=nullptr)
 

Protected Slots

virtual void observeProjectsOnServer ()
 Track projects, react to the active task. More...
 
virtual void unobserveProjectsOnServer ()
 
virtual void handleProjectEvent (const smtk::project::Project &, smtk::project::EventType)
 

Protected Member Functions

void observeToolboxPanels ()
 
TabDatatabDataForOperation (smtk::operation::Operation &op)
 Return the tab-view metadata for the given operation (if any).
 
TabDatacreateTabData (smtk::operation::Operation *op)
 Create tab-view metadata for the given operation.
 
void activeTaskStateChange (smtk::task::Task &task, smtk::task::State priorState, smtk::task::State currentState)
 Called when the panel is displaying a SubmitOperation task and the task changes state.
 

Protected Attributes

QPointer< QTabWidget > m_tabs
 
QPointer< QVBoxLayout > m_layout
 
pqSMTKWrapper * m_wrapper { nullptr }
 
std::multimap< smtk::operation::Operation::Index, TabDatam_views
 
int m_selectionValue { 1 }
 
bool m_selectionExactMatch { false }
 
std::map< smtk::project::ManagerPtr, smtk::project::Observers::Key > m_projectManagerObservers
 
smtk::task::Active::Observers::Key m_activeObserverKey
 
smtk::task::Task::Observers::Key m_taskObserver
 

Detailed Description

A panel that displays available operations in a "toolbox".

The panel emits signals when users request an operation be (a) immediately run or (b) run after editing parameters.

Member Function Documentation

◆ closeTabForOperation

bool pqSMTKOperationParameterPanel::closeTabForOperation ( const std::shared_ptr< smtk::operation::Operation > &  operation,
bool  forceClose = false 
)
slot

Find the tab for the corresponding operation and close it.

If no such tab existed or if the tab could not be closed, this will return false.

If forceClose is true, then any mark that made the tab un-closable by user action is unset, forcing the method to succeed as long as a tab exists for the operation.

◆ editExistingOperationParameters

void pqSMTKOperationParameterPanel::editExistingOperationParameters ( const std::shared_ptr< smtk::operation::Operation > &  operation,
bool  associateSelection = true,
bool  isTabClosable = true,
bool  showApply = true,
smtk::view::ConfigurationPtr  view = nullptr 
)
slot

Called in response to signals from pqSMTKOperationToolboxPanel.

This method will raise the panel and create or switch to a tab for the given operation. Unlike the variant that takes an operation index, this variant accepts an operation which may have non-default parameters.

◆ editOperationParameters

void pqSMTKOperationParameterPanel::editOperationParameters ( smtk::operation::Operation::Index  opType)
virtualslot

Called in response to signals from the pqSMTKOperationToolboxPanel.

This method will raise the panel and create or switch to a tab for the given operation.

◆ observeProjectsOnServer

void pqSMTKOperationParameterPanel::observeProjectsOnServer ( )
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 operation displayed in this panel.

◆ runOperationWithDefaults

void pqSMTKOperationParameterPanel::runOperationWithDefaults ( smtk::operation::Operation::Index  opType)
virtualslot

Called in response to signals from the pqSMTKOperationToolboxPanel.

This method will create and launch an operation of the given type immediately (using default parameter values). If the operation cannot be run with defaults (i.e., ableToOperate() returns false), then editOperationParametrs is invoked.


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