def __init__(self, parentSelector):
   # WAS "Graphic Effect"
   InstrumentFormation.__init__(self, name="Effect", parentSelector=parentSelector)
   self.instrument = PGraphicEffectInstrument()
   self.styleProperties=[UnwrappedComboBoxStyleProperty("Effect", 
                                               self.instrument.setGraphicEffect, self.selector,
                                               default=self.instrument.graphicEffect(),
                                               model = graphicEffectModel)]  
Ejemplo n.º 2
0
 def __init__(self, parentSelector):
   InstrumentFormation.__init__(self, name="Opacity", parentSelector=parentSelector)
   self.instrument = OpacityInstrument()
   # !!! minimum is 0.1 otherwise it dissappears and user can't access
   self.styleProperties=[BaseStyleProperty("Opacity", 
                                        self.instrument.setOpacity,  
                                        self.selector,
                                        resettableValueFactory=ResettableFloatValue,
                                        layoutFactory=FloatStylePropertyLayout,
                                        default=self.instrument.opacity(),
                                        minimum=0.1, maximum=1.0), 
                         ]
Ejemplo n.º 3
0
 def __init__(self, parentSelector):
   InstrumentFormation.__init__(self, name='Character', parentSelector=parentSelector)
   self.instrument = CharInstrument()
   self.styleProperties=[BaseStyleProperty('Color', self.instrument.setForegroundColor, self.selector,
                                            resettableValueFactory=ResettableColorValue,
                                            layoutFactory=ColorStylePropertyLayout,
                                            default=self.instrument.defaultColor, ),
                         FontStyleProperty('Font', self.instrument.setFont, self.selector,
                                       resettableValueFactory=ResettableFontValue,
                                       layoutFactory=FontStylePropertyLayout,
                                       # This value is QFont, not pickleable. FontStyleProperty wraps it.
                                       default=self.instrument.defaultFont, ), 
                         ]
Ejemplo n.º 4
0
 def __init__(self, parentSelector):
   InstrumentFormation.__init__(self, name='Block', parentSelector=parentSelector)
   self.instrument = BlockInstrument() # QTextBlockFormat()
   '''
   Note in Qt a doc has a global indentWidth having default of 40 pixels.
   This is the count of indents, more or less tabs.
   '''
   self.styleProperties=[# WAS 'Alignment'
                         BaseStyleProperty('Aligned', self.instrument.setAlignment, self.selector,
                                           default=self.instrument.defaultAligning,
                                           layoutFactory=ComboBoxStylePropertyLayout,
                                           domainModel = config.AlignmentModel),
                         # WAS 'Line spacing', too long
                         # TODO why was this UnwrappedComboBoxStyleProperty
                         BaseStyleProperty('Spacing', self.instrument.setSpacing, self.selector,
                                           default = self.instrument.defaultSpacing,
                                           layoutFactory=ComboBoxStylePropertyLayout,
                                           domainModel = config.LineSpacingModel),
                         ]
   """
Ejemplo n.º 5
0
 def __init__(self, parentSelector):
     InstrumentFormation.__init__(self,
                                  name='Character',
                                  parentSelector=parentSelector)
     self.instrument = CharInstrument()
     self.styleProperties = [
         BaseStyleProperty(
             'Color',
             self.instrument.setForegroundColor,
             self.selector,
             resettableValueFactory=ResettableColorValue,
             layoutFactory=ColorStylePropertyLayout,
             default=self.instrument.defaultColor,
         ),
         FontStyleProperty(
             'Font',
             self.instrument.setFont,
             self.selector,
             resettableValueFactory=ResettableFontValue,
             layoutFactory=FontStylePropertyLayout,
             # This value is QFont, not pickleable. FontStyleProperty wraps it.
             default=self.instrument.defaultFont,
         ),
     ]