Version: 8.3.0
YACS::HMI::ContainerDirMenu Class Reference

#include <Menus.hxx>

Inheritance diagram for YACS::HMI::ContainerDirMenu:
Collaboration diagram for YACS::HMI::ContainerDirMenu:

Public Member Functions

 ContainerDirMenu ()
 
virtual ~ContainerDirMenu ()
 
virtual void popupMenu (QWidget *caller, const QPoint &globalPos, const QString &m="Containers 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 174 of file Menus.hxx.

Constructor & Destructor Documentation

ContainerDirMenu::ContainerDirMenu ( )

Definition at line 595 of file Menus.cxx.

595  : MenusBase()
596 {
597 }
ContainerDirMenu::~ContainerDirMenu ( )
virtual

Definition at line 599 of file Menus.cxx.

600 {
601 }

Member Function Documentation

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

Reimplemented from YACS::HMI::MenusBase.

Definition at line 603 of file Menus.cxx.

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

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

604 {
606  bool isEdition = QtGuiContext::getQtCurrent()->isEdition();
607  QMenu menu(m, caller);
608  addHeader(menu, m);
609  if (isEdition)
610  {
611  menu.addAction(gmain->_newContainerAct);
612  menu.addAction(gmain->_newHPContainerAct);
613  }
614  menu.exec(globalPos);
615 }

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