QStyledItemDelegate.__init__(self, parent)
def displayText(self, value, locale):
- data = str(QStyledItemDelegate.displayText(self, value, locale))
+ try:
+ data = str(QStyledItemDelegate.displayText(self, value, locale))
+ except UnicodeEncodeError:
+ data = "<UnicodeDecodeError when generating displaytext>"
if (len(data)>NAME_MAX_LEN):
data = data[:(NAME_MAX_LEN-3)] + "..."
return QString(data)
bottomlayout.addWidget(renew, 0, Qt.AlignLeft)
bottomlayout.addStretch()
bottomlayout.addWidget(submit, 0, Qt.AlignRight)
+ self.bottomlayout = bottomlayout
layout = QVBoxLayout()
layout.addLayout(toplayout)
"%s: %s" % (name, value),
membership=tag_status['in'],
kind="attribute")
-
+ disk_images = node.get("disk_image", [])
+ for disk_image in disk_images:
+ name = disk_image.get("name", None)
+ self.noveView.appendRow(nodeItem, name,
+ membership=node_status['in'],
+ kind="attribute")
+
for node in available_nodes:
nodeType = None
if ("hardware_types" in node):
# rspec.
QTimer.singleShot(2500, self.sliceWidget.refresh)
+ def addMainScreenButton(self, caption, action):
+ # allows another screen to add a button to mainscreen
+ button = QPushButton(caption, self)
+ self.sliceWidget.bottomlayout.insertWidget(2, button)
+ self.sliceWidget.connect(button, SIGNAL('clicked()'), action)
+ return button
+
+