Version: 8.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 QString &) const
 
virtual QVariant parameter (const int, const QString &) const
 
void setModuleName (const QString)
 
- Public Member Functions inherited from QtxPopupSelection
 QtxPopupSelection ()
 Constructor. More...
 
virtual ~QtxPopupSelection ()
 Destructor. More...
 
QString option (const QString &) const
 Get an option value. More...
 
void setOption (const QString &, const QString &)
 Set an option value. More...
 
QtxPopupMgrpopupMgr () const
 
void setPopupMgr (QtxPopupMgr *)
 

Protected Types

enum  ObjectInformation { OI_Entry, OI_Reference, OI_User }
 

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
 
QVariant objectInfo (const int, const int) const
 
void setObjectInfo (const int, const int, const QVariant &)
 

Private Types

typedef QMap< int, QVariant > ObjectInfo
 
typedef QVector< ObjectInfoObjectInfoVector
 

Private Attributes

LightApp_StudymyStudy
 
QString myContext
 
ObjectInfoVector myObjects
 

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)

Member Typedef Documentation

typedef QMap<int, QVariant> LightApp_Selection::ObjectInfo
private

Member Enumeration Documentation

Enumerator
OI_Entry 
OI_Reference 
OI_User 

Constructor & Destructor Documentation

LightApp_Selection::LightApp_Selection ( )

Constructor

LightApp_Selection::~LightApp_Selection ( )
virtual

Destructor.

Member Function Documentation

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
int LightApp_Selection::count ( ) const
virtual

Gets count of entries.

Implements QtxPopupSelection.

References myObjects.

QString LightApp_Selection::entry ( const int  index) const
protected

Gets entry with index index.

References objectInfo(), and OI_Entry.

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

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

References objectInfo(), and OI_Reference.

QVariant LightApp_Selection::objectInfo ( const int  idx,
const int  inf 
) const
protected

Gets specified information about object with index idx.

References myObjects.

QVariant LightApp_Selection::parameter ( const QString &  p) const
virtual

Gets global parameters.

Gets the object parameter.

Gets global parameters. client, isActiveView, activeView etc.

Reimplemented from QtxPopupSelection.

References CAM_Application::activeModule(), activeViewType(), activeVW(), app, SUIT_Study::application(), myContext, myStudy, CAM_Module::name(), and QtxPopupSelection::parameter().

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
QString LightApp_Selection::referencedToEntry ( const QString &  entry) const
protectedvirtual
void LightApp_Selection::setModuleName ( const QString  )
void LightApp_Selection::setObjectInfo ( const int  idx,
const int  inf,
const QVariant &  val 
)
protected

Sets specified information about object with index idx.

References myObjects.

LightApp_Study* LightApp_Selection::study ( ) const
inlineprotected

Gets study.

Member Data Documentation

QString LightApp_Selection::myContext
private
ObjectInfoVector LightApp_Selection::myObjects
private
LightApp_Study* LightApp_Selection::myStudy
private

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