Version: 8.3.0
YACS::HMI::EditionOutputPort Class Reference

#include <EditionOutputPort.hxx>

Inheritance diagram for YACS::HMI::EditionOutputPort:
Collaboration diagram for YACS::HMI::EditionOutputPort:

Public Member Functions

 EditionOutputPort (Subject *subject, QWidget *parent=0, const char *name=0)
 
virtual ~EditionOutputPort ()
 
virtual void select (bool isSelected)
 
- Public Member Functions inherited from YACS::HMI::ItemEdition
 ItemEdition (Subject *subject, QWidget *parent=0, const char *name=0)
 
virtual ~ItemEdition ()
 
virtual void synchronize ()
 
virtual void setName (std::string name)
 
virtual void update (GuiEvent event, int type, Subject *son)
 
virtual void setEdited (bool isEdited)
 
- Public Member Functions inherited from FormEditItem
 FormEditItem (QWidget *parent=0)
 
virtual ~FormEditItem ()
 
- Public Member Functions inherited from YACS::HMI::ItemEditionBase
 ItemEditionBase (Subject *subject)
 
virtual ~ItemEditionBase ()
 
virtual SubjectgetSubject ()
 
- Public Member Functions inherited from YACS::HMI::GuiObserver
 GuiObserver ()
 
virtual ~GuiObserver ()
 
virtual void incrementSubjects (Subject *subject)
 
virtual void decrementSubjects (Subject *subject)
 
int getNbSubjects ()
 
bool isDestructible ()
 

Additional Inherited Members

- Public Slots inherited from YACS::HMI::ItemEdition
virtual void onApply ()
 
virtual void onCancel ()
 
virtual void onModifyName (const QString &text)
 
- Static Public Member Functions inherited from YACS::HMI::ItemEdition
static std::string filterName (const std::string &name)
 
- Protected Attributes inherited from YACS::HMI::ItemEdition
bool _isEdited
 
bool _haveScript
 
- Static Protected Attributes inherited from YACS::HMI::GuiObserver
static std::map< int, std::string > _eventNameMap
 

Detailed Description

Definition at line 30 of file EditionOutputPort.hxx.

Constructor & Destructor Documentation

EditionOutputPort::EditionOutputPort ( Subject subject,
QWidget parent = 0,
const char *  name = 0 
)

Definition at line 35 of file EditionOutputPort.cxx.

References YACS::HMI::ItemEditionBase::_subject, FormEditItem::_wid, YACS::ENGINE::Port::getNode(), YACS::HMI::SubjectDataPort::getPort(), and YACS::HMI::QtGuiContext::getQtCurrent().

38  : ItemEdition(subject, parent, name)
39 {
40  if (!QtGuiContext::getQtCurrent()->isEdition())
41  return;
42 
43  SubjectDataPort *sdp = dynamic_cast<SubjectDataPort*>(_subject);
44  Node *parentNode = sdp->getPort()->getNode();
45  if (parentNode)
46  if (dynamic_cast<DataNode*>(parentNode) || dynamic_cast<InlineNode*>(parentNode))
47  _wid->le_name->setReadOnly(false);
48 }
EditionOutputPort::~EditionOutputPort ( )
virtual

Definition at line 50 of file EditionOutputPort.cxx.

51 {
52 }

Member Function Documentation

void EditionOutputPort::select ( bool  isSelected)
virtual

Reimplemented from YACS::HMI::ItemEdition.

Definition at line 54 of file EditionOutputPort.cxx.

References YACS::HMI::QtGuiContext::_mapOfEditionItem, YACS::HMI::ItemEditionBase::_subject, YACS::HMI::ADD, DEBTRACE, YACS::HMI::Subject::getParent(), YACS::HMI::QtGuiContext::getQtCurrent(), YACS::HMI::QtGuiContext::getStackedWidget(), YACS::HMI::Subject::getType(), YACS::HMI::ItemEdition::synchronize(), and YACS::HMI::ItemEdition::update().

55 {
56  DEBTRACE("EditionOutputPort::select " << isSelected);
57  if (isSelected)
58  {
59  Subject *snode = _subject->getParent();
60  if (snode)
61  {
62  if(QtGuiContext::getQtCurrent()->_mapOfEditionItem.count(snode) == 0)
63  {
64  //panel is not created. Force its creation
65  update(YACS::HMI::ADD,snode->getType(),snode);
66  }
68  ItemEdition *item = dynamic_cast<ItemEdition*>(widget);
69  item->synchronize();
70  QtGuiContext::getQtCurrent()->getStackedWidget()->setCurrentWidget(widget);
71  }
72  else
73  {
74  synchronize();
75  QtGuiContext::getQtCurrent()->getStackedWidget()->setCurrentWidget(this);
76  }
77  }
78 }

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