Version: 8.3.0
YACS::HMI::EditionInputPort Class Reference

#include <EditionInputPort.hxx>

Inheritance diagram for YACS::HMI::EditionInputPort:
Collaboration diagram for YACS::HMI::EditionInputPort:

Public Member Functions

 EditionInputPort (Subject *subject, QWidget *parent=0, const char *name=0)
 
virtual ~EditionInputPort ()
 
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 EditionInputPort.hxx.

Constructor & Destructor Documentation

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

Definition at line 36 of file EditionInputPort.cxx.

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

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

Definition at line 51 of file EditionInputPort.cxx.

52 {
53 }

Member Function Documentation

void EditionInputPort::select ( bool  isSelected)
virtual

Reimplemented from YACS::HMI::ItemEdition.

Definition at line 55 of file EditionInputPort.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().

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

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