Version: 6.3.1
Public Member Functions | Protected Member Functions | Private Attributes

LightApp_Selection Class Reference

#include <LightApp_Selection.h>

Inheritance diagram for LightApp_Selection:
Inheritance graph

Public Member Functions

 LightApp_Selection ()
virtual ~LightApp_Selection ()
virtual void init (const QString &, LightApp_SelectionMgr *)
virtual bool processOwner (const LightApp_DataOwner *)
virtual int count () const
virtual QVariant parameter (const int, const QString &) const
virtual QVariant parameter (const QString &) const
void setModuleName (const QString)
QString option (const QString &) const
 Get an option value.
void setOption (const QString &, const QString &)
 Set an option value.

Protected Member Functions

QString entry (const int) const
bool isReference (const int) const
LightApp_Studystudy () const
QString activeViewType () const
SUIT_ViewWindowactiveVW () const
virtual QString referencedToEntry (const QString &) const

Private Attributes

QString myPopupClient
QMap< int, QString > myEntries
QMap< int, bool > myIsReferences
LightApp_StudymyStudy

Detailed Description

Custom selection class, allowing to build popup with rules on the base of owners selected in all selectors (popup client has more priority). It is able to return values of standard object properties (isVisible,isComponent,canBeDisplayed,isReference, etc)


Constructor & Destructor Documentation

LightApp_Selection::LightApp_Selection ( )

Constructor

LightApp_Selection::~LightApp_Selection ( ) [virtual]

Destructor.


Member Function Documentation

void LightApp_Selection::init ( const QString &  client,
LightApp_SelectionMgr mgr 
) [virtual]
bool LightApp_Selection::processOwner ( const LightApp_DataOwner ) [virtual]

Perform additional processing of the selected item (to be redefined by successors if necessary). Returns true by default. Note: if this method returns false, the item will be removed from the items list and not taken into account when showing popup menu.

Parameters:
ownera data owner being processed
Returns:
true if the owner should be collected and false otherwise
int LightApp_Selection::count ( ) const [virtual]

Gets count of entries.

Implements QtxPopupSelection.

References myEntries.

QVariant LightApp_Selection::parameter ( const int  ind,
const QString &  p 
) const [virtual]
QVariant LightApp_Selection::parameter ( const QString &  p) const [virtual]

Gets global parameters. client, isActiveView, activeView etc.

Reimplemented from QtxPopupSelection.

References CAM_Application.activeModule(), activeViewType(), activeVW(), SUIT_Study.application(), myPopupClient, myStudy, CAM_Module.name(), and parameter().

void LightApp_Selection.setModuleName ( const QString  )
QString LightApp_Selection::entry ( const int  index) const [protected]

Gets entry with index index.

References count(), and myEntries.

bool LightApp_Selection::isReference ( const int  index) const [protected]

Returns true if i-th selected object was reference to object with entry( i )

References count(), and myIsReferences.

LightApp_Study* LightApp_Selection.study ( ) const [protected]

Gets study.

References PyInterp.myStudy.

QString LightApp_Selection::activeViewType ( ) const [protected]

Gets type of active view manager.

References activeVW(), SUIT_ViewManager.getType(), and SUIT_ViewWindow.getViewManager().

SUIT_ViewWindow * LightApp_Selection::activeVW ( ) const [protected]
QString LightApp_Selection::referencedToEntry ( const QString &  entry) const [protected, virtual]
QString QtxPopupSelection::option ( const QString &  optName) const [inherited]
Parameters:
optNameoption name
Returns:
option value or empty string if option is not found

References QtxPopupSelection.myOptions.

void QtxPopupSelection::setOption ( const QString &  optName,
const QString &  opt 
) [inherited]
Parameters:
optNameoption name
optoption value

References QtxPopupSelection.myOptions.


Field Documentation

QMap<int,QString> LightApp_Selection.myEntries [private]
QMap<int,bool> LightApp_Selection.myIsReferences [private]
Copyright © 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE
Copyright © 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS