Пример #1
0
 def optionsWidgetCreate(self):
     from scal3.ui_gtk.mywidgets.multi_spin.integer import IntSpinButton
     from scal3.ui_gtk.pref_utils import CheckPrefItem, ColorPrefItem
     if self.optionsWidget:
         return
     self.optionsWidget = gtk.VBox()
     ####
     hbox = gtk.HBox()
     spin = IntSpinButton(1, 9999)
     spin.set_value(ui.mcalHeight)
     spin.connect('changed', self.heightSpinChanged)
     pack(hbox, gtk.Label(_('Height')))
     pack(hbox, spin)
     pack(self.optionsWidget, hbox)
     ####
     hbox = gtk.HBox(spacing=3)
     ##
     pack(hbox, gtk.Label(_('Left Margin')))
     spin = IntSpinButton(0, 99)
     spin.set_value(ui.mcalLeftMargin)
     spin.connect('changed', self.leftMarginSpinChanged)
     pack(hbox, spin)
     ##
     pack(hbox, gtk.Label(_('Top')))
     spin = IntSpinButton(0, 99)
     spin.set_value(ui.mcalTopMargin)
     spin.connect('changed', self.topMarginSpinChanged)
     pack(hbox, spin)
     ##
     pack(hbox, gtk.Label(''), 1, 1)
     pack(self.optionsWidget, hbox)
     ########
     hbox = gtk.HBox(spacing=3)
     ####
     item = CheckPrefItem(ui, 'mcalGrid', _('Grid'))
     item.updateWidget()
     gridCheck = item._widget
     pack(hbox, gridCheck)
     gridCheck.item = item
     ####
     colorItem = ColorPrefItem(ui, 'mcalGridColor', True)
     colorItem.updateWidget()
     pack(hbox, colorItem._widget)
     gridCheck.colorb = colorItem._widget
     gridCheck.connect('clicked', self.gridCheckClicked)
     colorItem._widget.item = colorItem
     colorItem._widget.connect('color-set', self.gridColorChanged)
     colorItem._widget.set_sensitive(ui.mcalGrid)
     ####
     pack(self.optionsWidget, hbox)
     ########
     frame = gtk.Frame()
     frame.set_label(_('Calendars'))
     self.typeParamsVbox = gtk.VBox()
     frame.add(self.typeParamsVbox)
     frame.show_all()
     pack(self.optionsWidget, frame)
     self.optionsWidget.show_all()
     self.updateTypeParamsWidget()## FIXME
Пример #2
0
 def optionsWidgetCreate(self):
     from scal3.ui_gtk.mywidgets.multi_spin.integer import IntSpinButton
     from scal3.ui_gtk.pref_utils import CheckPrefItem, ColorPrefItem
     if self.optionsWidget:
         return
     self.optionsWidget = gtk.VBox()
     ####
     hbox = gtk.HBox()
     spin = IntSpinButton(1, 9999)
     spin.set_value(ui.mcalHeight)
     spin.connect('changed', self.heightSpinChanged)
     pack(hbox, gtk.Label(_('Height')))
     pack(hbox, spin)
     pack(self.optionsWidget, hbox)
     ####
     hbox = gtk.HBox(spacing=3)
     ##
     pack(hbox, gtk.Label(_('Left Margin')))
     spin = IntSpinButton(0, 99)
     spin.set_value(ui.mcalLeftMargin)
     spin.connect('changed', self.leftMarginSpinChanged)
     pack(hbox, spin)
     ##
     pack(hbox, gtk.Label(_('Top')))
     spin = IntSpinButton(0, 99)
     spin.set_value(ui.mcalTopMargin)
     spin.connect('changed', self.topMarginSpinChanged)
     pack(hbox, spin)
     ##
     pack(hbox, gtk.Label(''), 1, 1)
     pack(self.optionsWidget, hbox)
     ########
     hbox = gtk.HBox(spacing=3)
     ####
     item = CheckPrefItem(ui, 'mcalGrid', _('Grid'))
     item.updateWidget()
     gridCheck = item._widget
     pack(hbox, gridCheck)
     gridCheck.item = item
     ####
     colorItem = ColorPrefItem(ui, 'mcalGridColor', True)
     colorItem.updateWidget()
     pack(hbox, colorItem._widget)
     gridCheck.colorb = colorItem._widget
     gridCheck.connect('clicked', self.gridCheckClicked)
     colorItem._widget.item = colorItem
     colorItem._widget.connect('color-set', self.gridColorChanged)
     colorItem._widget.set_sensitive(ui.mcalGrid)
     ####
     pack(self.optionsWidget, hbox)
     ########
     frame = gtk.Frame()
     frame.set_label(_('Calendars'))
     self.typeParamsVbox = gtk.VBox()
     frame.add(self.typeParamsVbox)
     frame.show_all()
     pack(self.optionsWidget, frame)
     self.optionsWidget.show_all()
     self.updateTypeParamsWidget()  ## FIXME
Пример #3
0
    def optionsWidgetCreate(self):
        from scal3.ui_gtk.pref_utils import LiveLabelSpinPrefItem, SpinPrefItem, \
         LiveCheckColorPrefItem, CheckPrefItem, ColorPrefItem

        if self.optionsWidget:
            return
        ColumnBase.optionsWidgetCreate(self)
        #####
        prefItem = LiveLabelSpinPrefItem(
            _("Height"),
            SpinPrefItem(ui, "wcalHeight", 1, 9999, digits=0),
            self.heightUpdate,
        )
        pack(self.optionsWidget, prefItem.getWidget())
        ###
        prefItem = LiveLabelSpinPrefItem(
            _("Text Size Scale"),
            SpinPrefItem(ui, "wcalTextSizeScale", 0.01, 1, digits=2),
            self.queue_draw,
        )
        pack(self.optionsWidget, prefItem.getWidget())
        ########
        prefItem = LiveCheckColorPrefItem(
            CheckPrefItem(ui, "wcalGrid", _("Grid")),
            ColorPrefItem(ui, "wcalGridColor", True),
            self.queue_draw,
        )
        pack(self.optionsWidget, prefItem.getWidget())
        ###
        self.optionsWidget.show_all()
Пример #4
0
	def optionsWidgetCreate(self):
		from scal3.ui_gtk.mywidgets.multi_spin.integer import IntSpinButton
		from scal3.ui_gtk.mywidgets.multi_spin.float_num import FloatSpinButton
		from scal3.ui_gtk.pref_utils import CheckPrefItem, ColorPrefItem
		if self.optionsWidget:
			return
		ColumnBase.optionsWidgetCreate(self)
		#####
		hbox = gtk.HBox()
		spin = IntSpinButton(1, 9999)
		spin.set_value(ui.wcalHeight)
		spin.connect('changed', self.heightSpinChanged)
		pack(hbox, gtk.Label(_('Height')))
		pack(hbox, spin)
		pack(self.optionsWidget, hbox)
		###
		hbox = gtk.HBox()
		spin = FloatSpinButton(0.01, 1, 2)
		spin.set_value(ui.wcalTextSizeScale)
		spin.connect('changed', self.textSizeScaleSpinChanged)
		pack(hbox, gtk.Label(_('Text Size Scale')))
		pack(hbox, spin)
		pack(self.optionsWidget, hbox)
		########
		hbox = gtk.HBox(spacing=3)
		####
		item = CheckPrefItem(ui, 'wcalGrid', _('Grid'))
		item.updateWidget()
		gridCheck = item._widget
		pack(hbox, gridCheck)
		gridCheck.item = item
		####
		colorItem = ColorPrefItem(ui, 'wcalGridColor', True)
		colorItem.updateWidget()
		pack(hbox, colorItem._widget)
		gridCheck.colorb = colorItem._widget
		gridCheck.connect('clicked', self.gridCheckClicked)
		colorItem._widget.item = colorItem
		colorItem._widget.connect('color-set', self.gridColorChanged)
		colorItem._widget.set_sensitive(ui.wcalGrid)
		####
		pack(self.optionsWidget, hbox)
		###
		self.optionsWidget.show_all()
Пример #5
0
 def optionsWidgetCreate(self):
     from scal3.ui_gtk.mywidgets.multi_spin.integer import IntSpinButton
     from scal3.ui_gtk.pref_utils import LiveLabelSpinPrefItem, SpinPrefItem, \
      LiveCheckColorPrefItem, CheckPrefItem, ColorPrefItem
     if self.optionsWidget:
         return
     self.optionsWidget = gtk.VBox()
     ####
     prefItem = LiveLabelSpinPrefItem(
         _("Height"),
         SpinPrefItem(ui, "mcalHeight", 1, 9999, digits=0),
         self.heightUpdate,
     )
     pack(self.optionsWidget, prefItem.getWidget())
     ####
     hbox = gtk.HBox(spacing=3)
     ##
     pack(hbox, gtk.Label(_("Left Margin")))
     spin = IntSpinButton(0, 99)
     spin.set_value(ui.mcalLeftMargin)
     spin.connect("changed", self.leftMarginSpinChanged)
     pack(hbox, spin)
     ##
     pack(hbox, gtk.Label(_("Top")))
     spin = IntSpinButton(0, 99)
     spin.set_value(ui.mcalTopMargin)
     spin.connect("changed", self.topMarginSpinChanged)
     pack(hbox, spin)
     ##
     pack(hbox, gtk.Label(""), 1, 1)
     pack(self.optionsWidget, hbox)
     ########
     prefItem = LiveCheckColorPrefItem(
         CheckPrefItem(ui, "mcalGrid", _("Grid")),
         ColorPrefItem(ui, "mcalGridColor", True),
         self.queue_draw,
     )
     hbox = prefItem.getWidget()
     pack(self.optionsWidget, hbox)
     ########
     self.typeParamsVbox = gtk.VBox()
     pack(self.optionsWidget, self.typeParamsVbox)
     self.optionsWidget.show_all()
     self.updateTypeParamsWidget()  ## FIXME
Пример #6
0
 def optionsWidgetCreate(self):
     from scal3.ui_gtk.pref_utils import LiveLabelSpinPrefItem, SpinPrefItem, \
      LiveCheckColorPrefItem, CheckPrefItem, ColorPrefItem, LiveCheckPrefItem
     from scal3.ui_gtk.mywidgets.font_family_combo import FontFamilyCombo
     if self.optionsWidget:
         return
     self.optionsWidget = gtk.VBox()
     ####
     if self.customizeWidth:
         prefItem = LiveLabelSpinPrefItem(
             _("Width"),
             SpinPrefItem(ui, self.getWidthAttr(), 1, 999, digits=0),
             self.widthChanged,
         )
         pack(self.optionsWidget, prefItem.getWidget())
     ####
     if self.customizeExpand:
         prefItem = LiveCheckPrefItem(
             ui,
             self.getExpandAttr(),
             _("Expand"),
             onChangeFunc=self.expandCheckClicked,
         )
         pack(self.optionsWidget, prefItem.getWidget())
     ####
     if self.customizeFont:
         hbox = gtk.HBox()
         pack(hbox, gtk.Label(_("Font Family")))
         combo = FontFamilyCombo(hasAuto=True)
         combo.set_value(self.getFontValue())
         pack(hbox, combo)
         combo.connect("changed", self.fontFamilyComboChanged)
         pack(self.optionsWidget, hbox)
     ####
     if self.customizePastTextColor:
         prefItem = LiveCheckColorPrefItem(
             CheckPrefItem(ui, self.getPastTextColorEnableAttr(),
                           _("Past Event Color")),
             ColorPrefItem(ui, self.getPastTextColorAttr(), True),
             self.onDateChange,
         )
         pack(self.optionsWidget, prefItem.getWidget())
     ####
     self.optionsWidget.show_all()