Public Member Functions | Protected Slots | Protected Member Functions | List of all members
pqSelectionAdaptor Class Referenceabstract

pqSelectionAdaptor is the abstract base class for an adaptor that connects a QItemSelectionModel to pqActiveObjects making it possible to update the pqActiveObjects source selection when the QItemSelectionModel changes and vice-versa. More...

#include <pqSelectionAdaptor.h>

Inheritance diagram for pqSelectionAdaptor:
Inheritance graph
[legend]

Public Member Functions

 ~pqSelectionAdaptor () override
 
QItemSelectionModel * getQSelectionModel () const
 Returns a pointer to the QItemSelectionModel. More...
 

Protected Slots

virtual void selectionChanged ()
 called when the selection in the Qt-model changes. More...
 
virtual void currentProxyChanged ()
 called when the ServerManager level selection (or current) changes. More...
 
virtual void proxySelectionChanged ()
 
virtual QItemSelectionModel::SelectionFlag qtSelectionFlags () const
 subclasses can override this method to provide model specific selection overrides such as QItemSelection::Rows or QItemSelection::Columns etc. More...
 

Protected Member Functions

 pqSelectionAdaptor (QItemSelectionModel *pipelineSelectionModel)
 
virtual QModelIndex mapFromItem (pqServerManagerModelItem *item) const =0
 Maps a pqServerManagerModelItem to an index in the QAbstractItemModel. More...
 
virtual pqServerManagerModelItemmapToItem (const QModelIndex &index) const =0
 Maps a QModelIndex to a pqServerManagerModelItem. More...
 
const QAbstractItemModel * getQModel () const
 Returns the QAbstractItemModel used by the QSelectionModel. More...
 

Detailed Description

pqSelectionAdaptor is the abstract base class for an adaptor that connects a QItemSelectionModel to pqActiveObjects making it possible to update the pqActiveObjects source selection when the QItemSelectionModel changes and vice-versa.

Subclass typically only need to implement mapToItem() and mapFromItem().

Definition at line 22 of file pqSelectionAdaptor.h.

Constructor & Destructor Documentation

◆ ~pqSelectionAdaptor()

pqSelectionAdaptor::~pqSelectionAdaptor ( )
override

◆ pqSelectionAdaptor()

pqSelectionAdaptor::pqSelectionAdaptor ( QItemSelectionModel *  pipelineSelectionModel)
protected

Member Function Documentation

◆ getQSelectionModel()

QItemSelectionModel* pqSelectionAdaptor::getQSelectionModel ( ) const
inline

Returns a pointer to the QItemSelectionModel.

Definition at line 31 of file pqSelectionAdaptor.h.

◆ mapFromItem()

virtual QModelIndex pqSelectionAdaptor::mapFromItem ( pqServerManagerModelItem item) const
protectedpure virtual

Maps a pqServerManagerModelItem to an index in the QAbstractItemModel.

Implemented in pqPipelineModelSelectionAdaptor.

◆ mapToItem()

virtual pqServerManagerModelItem* pqSelectionAdaptor::mapToItem ( const QModelIndex &  index) const
protectedpure virtual

Maps a QModelIndex to a pqServerManagerModelItem.

Implemented in pqPipelineModelSelectionAdaptor.

◆ getQModel()

const QAbstractItemModel* pqSelectionAdaptor::getQModel ( ) const
protected

Returns the QAbstractItemModel used by the QSelectionModel.

If QSelectionModel uses a QAbstractProxyModel, this method skips over all such proxy models and returns the first non-proxy model encountered.

◆ selectionChanged

virtual void pqSelectionAdaptor::selectionChanged ( )
protectedvirtualslot

called when the selection in the Qt-model changes.

◆ currentProxyChanged

virtual void pqSelectionAdaptor::currentProxyChanged ( )
protectedvirtualslot

called when the ServerManager level selection (or current) changes.

◆ proxySelectionChanged

virtual void pqSelectionAdaptor::proxySelectionChanged ( )
protectedvirtualslot

◆ qtSelectionFlags

virtual QItemSelectionModel::SelectionFlag pqSelectionAdaptor::qtSelectionFlags ( ) const
inlineprotectedvirtualslot

subclasses can override this method to provide model specific selection overrides such as QItemSelection::Rows or QItemSelection::Columns etc.

Definition at line 70 of file pqSelectionAdaptor.h.


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