Exemplo n.º 1
0
 def __init__(self, tool):
     KVBox.__init__(self)
     self.tool = tool
     
     h = KHBox(self)
     h.layout().setContentsMargins(8, 2, 4, 0)
     l = QLabel(i18n("Direction:"), h)
     d = self.directionWidget = QComboBox(h)
     d.addItems([i18n("Up"), i18n("Neutral"), i18n("Down")])
     d.setItemIcon(0, KIcon("arrow-up"))
     d.setItemIcon(2, KIcon("arrow-down"))
     d.setCurrentIndex(1)
     l.setBuddy(d)
     h.setToolTip(i18n(
         "Where to add articulations et cetera: "
         "above or below the staff or in the default position."))
     
     t = self.toolboxWidget = ToolBox(self)
     # don't allow us to shrink below the minimum size of our children
     self.setSizePolicy(QSizePolicy.Minimum, QSizePolicy.Minimum)
     width = max(w.minimumSizeHint().width() for w in t.widgets) + 12
     self.setMinimumWidth(width)