/*!Context menu popup.*/
void LightApp_Module::contextMenuPopup( const QString& client, QMenu* menu, QString& /*title*/ )
{
- LightApp_Selection* sel = createSelection( client, getApp()->selectionMgr() );
+ LightApp_Selection* sel = createSelection();
+ sel->init( client, getApp()->selectionMgr() );
popupMgr()->setSelection( sel );
popupMgr()->setMenu( menu );
popupMgr()->updateMenu();
}
/*!Create and return instance of LightApp_Selection.*/
-LightApp_Selection* LightApp_Module::createSelection( const QString& client, LightApp_SelectionMgr* mgr ) const
+LightApp_Selection* LightApp_Module::createSelection() const
{
- return new LightApp_Selection( client, mgr );
+ return new LightApp_Selection();
}
/*!NOT IMPLEMENTED*/
virtual void studyActivated() {};
virtual LightApp_Displayer* displayer();
- virtual LightApp_Selection* createSelection( const QString&, LightApp_SelectionMgr* ) const;
+ virtual LightApp_Selection* createSelection() const;
public slots:
virtual bool activateModule( SUIT_Study* );
/*!
Constructor
*/
-LightApp_Selection::LightApp_Selection( const QString& client, LightApp_SelectionMgr* mgr )
+LightApp_Selection::LightApp_Selection()
: myStudy( 0 )
+{
+}
+
+/*!
+ Destructor.
+*/
+LightApp_Selection::~LightApp_Selection()
+{
+}
+
+/*!
+ Initialization.
+*/
+void LightApp_Selection::init( const QString& client, LightApp_SelectionMgr* mgr)
{
myPopupClient = client;
}
}
-/*!
- Destructor.
-*/
-LightApp_Selection::~LightApp_Selection()
-{
-}
-
QString LightApp_Selection::referencedToEntry( const QString& entry ) const
{
return myStudy->referencedToEntry( entry );
class LIGHTAPP_EXPORT LightApp_Selection : public QtxPopupSelection
{
public:
- LightApp_Selection( const QString&, LightApp_SelectionMgr* );
+ LightApp_Selection();
virtual ~LightApp_Selection();
+ virtual void init( const QString&, LightApp_SelectionMgr* );
virtual void processOwner( const LightApp_DataOwner* );
virtual int count() const;
if( !mod )
return;
- LightApp_Selection* sel = mod->createSelection( "", mgr );
+ LightApp_Selection* sel = mod->createSelection();
if( !sel )
return;
+ sel->init( "", mgr );
if( sel->count()==0 && myActionType!=ERASE_ALL )
{
abort();
}
/*!Create and return instance of LightApp_Selection.*/
-LightApp_Selection* SalomeApp_Module::createSelection( const QString& client, LightApp_SelectionMgr* mgr ) const
+LightApp_Selection* SalomeApp_Module::createSelection() const
{
- return LightApp_Module::createSelection( client, mgr );
+ return LightApp_Module::createSelection();
}
/*!
virtual void storeVisualParameters(int savePoint);
virtual void restoreVisualParameters(int savePoint);
- virtual LightApp_Selection* createSelection( const QString&, LightApp_SelectionMgr* ) const;
+ virtual LightApp_Selection* createSelection() const;
protected:
virtual CAM_DataModel* createDataModel();