Version: 8.3.0
YACS::HMI::ComponentInstanceMenu Class Reference

#include <Menus.hxx>

Inheritance diagram for YACS::HMI::ComponentInstanceMenu:
Collaboration diagram for YACS::HMI::ComponentInstanceMenu:

Public Member Functions

 ComponentInstanceMenu ()
 
virtual ~ComponentInstanceMenu ()
 
virtual void popupMenu (QWidget *caller, const QPoint &globalPos, const QString &m="ComponentInstance Menu")
 
- Public Member Functions inherited from YACS::HMI::MenusBase
 MenusBase ()
 
virtual ~MenusBase ()
 
virtual void addForEachMenu (QMenu *m, QActionGroup *actgroup)
 
virtual void addForEachMenuToPutGraph (QMenu *m, QActionGroup *actgroup)
 

Additional Inherited Members

- Protected Slots inherited from YACS::HMI::MenusBase
void dummyAction ()
 
void foreachAction (QAction *)
 
void putGraphInForeachAction (QAction *)
 
- Protected Member Functions inherited from YACS::HMI::MenusBase
virtual void buildForEachMenu (QMenu *m, QActionGroup *actgroup)
 
virtual void addHeader (QMenu &m, const QString &h)
 
- Protected Attributes inherited from YACS::HMI::MenusBase
QAction * _dummyAct
 

Detailed Description

Definition at line 185 of file Menus.hxx.

Constructor & Destructor Documentation

ComponentInstanceMenu::ComponentInstanceMenu ( )

Definition at line 619 of file Menus.cxx.

619  : MenusBase()
620 {
621 }
ComponentInstanceMenu::~ComponentInstanceMenu ( )
virtual

Definition at line 623 of file Menus.cxx.

624 {
625 }

Member Function Documentation

void ComponentInstanceMenu::popupMenu ( QWidget caller,
const QPoint &  globalPos,
const QString &  m = "ComponentInstance Menu" 
)
virtual

Reimplemented from YACS::HMI::MenusBase.

Definition at line 627 of file Menus.cxx.

References YACS::HMI::GenericGui::_newSalomeComponentAct, YACS::HMI::GenericGui::_selectComponentInstanceAct, YACS::HMI::MenusBase::addHeader(), YACS::HMI::QtGuiContext::getGMain(), YACS::HMI::QtGuiContext::getQtCurrent(), and YACS::HMI::QtGuiContext::isEdition().

Referenced by YACS::HMI::SchemaComponentItem::popupMenu().

628 {
630  bool isEdition = QtGuiContext::getQtCurrent()->isEdition();
631  QMenu menu(m, caller);
632  addHeader(menu, m);
633  if (isEdition)
634  {
635  menu.addAction(gmain->_selectComponentInstanceAct);
636  menu.addAction(gmain->_newSalomeComponentAct);
637  }
638  menu.exec(globalPos);
639 }

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