Amazon VERSION 2.0V1 Podręcznik Użytkownika Strona 102

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 264
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 101
102
"""
QtGui.QWidget.__init__(self, parent)
self.__node = node
# Try to upgrade the given node in...
# ...an undo stack group
nodeName = node.getName()
Utils.UndoStack.\
OpenGroup('Upgrade "%s"' % nodeName)
try:
node.upgrade()
except Exception as exception:
log.exception('Error upgrading node "%s": %s'
% (nodeName, str(exception)))
finally:
Utils.UndoStack.CloseGroup()
# Get the node's parameters
nameParameter = \
self.__node.getParameter('name')
valueParameter = \
self.__node.getParameter('value')
# Create parameter policies...
# ...from the node's parameters
namePolicy = \
UI4.FormMaster.CreateParameterPolicy\
(None, nameParameter)
valuePolicy = \
UI4.FormMaster.CreateParameterPolicy\
(None, valueParameter)
# Create widgets for editing...
# ...the node's parameters
widgetFactory = \
UI4.FormMaster.KatanaFactory.\
ParameterWidgetFactory
nameWidget = \
widgetFactory.buildWidget(self, namePolicy)
valueWidget = \
widgetFactory.buildWidget\
(self, valuePolicy)
# Create a layout and add the...
# ...parameter editing widgets to it
mainLayout = QtGui.QVBoxLayout()
mainLayout.addWidget(widget)
13 GROUPS, MACROS, AND SUPER TOOLS | SUPER TOOLS
Przeglądanie stron 101
1 2 ... 97 98 99 100 101 102 103 104 105 106 107 ... 263 264

Komentarze do niniejszej Instrukcji

Brak uwag