Version: 8.3.0
gui.panels.PanelInPort Class Reference
Inheritance diagram for gui.panels.PanelInPort:
Collaboration diagram for gui.panels.PanelInPort:

Public Member Functions

def __init__
 
def handleSave
 
def handleRestore
 

Public Attributes

 item
 
 value
 

Detailed Description

Definition at line 123 of file panels.py.

Constructor & Destructor Documentation

def gui.panels.PanelInPort.__init__ (   self,
  parent,
  item 
)

Definition at line 124 of file panels.py.

125  def __init__(self,parent,item):
126  QVBox.__init__(self,parent)
127  self.item=item
128  self.layout().setAlignment(Qt.AlignTop|Qt.AlignLeft)
129  self.setSpacing( 5 )
130  row0=QHBox(self)
131  label=QLabel("Name: ",row0)
132  lined0 = QLineEdit(self.item.port.getName(),row0)
133  label=QLabel("Type: ",row0)
134  QLineEdit(self.item.port.edGetType().name(),row0)
135 
136  label=QLabel("Value: ",self)
137  self.value=QTextEdit(self)
138  self.value.setText("Empty")
139  self.handleRestore()
140 
141  row3=QHBox(self)
142  but1=QPushButton( "Save", row3 )
143  but1.setFixedSize( but1.sizeHint())
144  self.connect( but1, SIGNAL("clicked()"), self.handleSave )
145  but2=QPushButton( "Restore", row3 )
146  but2.setFixedSize( but2.sizeHint())
147  self.connect( but2, SIGNAL("clicked()"), self.handleRestore )

Member Function Documentation

def gui.panels.PanelInPort.handleRestore (   self)

Definition at line 155 of file panels.py.

156  def handleRestore(self):
157  if not self.item.port.isEmpty():
158  self.value.setText(self.item.port.dump())
def gui.panels.PanelInPort.handleSave (   self)

Definition at line 148 of file panels.py.

149  def handleSave(self):
150  try:
151  self.item.port.edInitXML(str(self.value.text()))
152  except:
153  traceback.print_exc()
154  self.value.setText(self.item.port.dump())

Member Data Documentation

gui.panels.PanelInPort.item

Definition at line 126 of file panels.py.

gui.panels.PanelInPort.value

Definition at line 136 of file panels.py.


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