コード例 #1
0
    def __init__(self, parent):
        wal.VPanel.__init__(self, parent)
        from uc2 import libimg, libpango, libcairo, cms
        import reportlab

        data = [[_('Component'), _('Version')]]
        mark = '' if not uc2const.BUILD else ' build %s' % uc2const.BUILD
        uc_ver = '%s %s%s' % (uc2const.VERSION, uc2const.REVISION, mark)
        data.append(['Python', sys.version])
        data.append(['wxWidgets', wal.VERSION])
        data.append(['UniConvertor', uc_ver])
        data.append(['LCMS', cms.libcms.get_version()])
        data.append(['Cairo', libcairo.get_version()[0]])
        data.append(['pycairo', libcairo.get_version()[1]])
        data.append(['Pillow', libimg.get_version()])
        data.append(['ImageMagick', libimg.get_magickwand_version()[0]])
        data.append(['Pango', libpango.get_version()])
        data.append(['Reportlab', reportlab.Version])

        if not wal.IS_MSW:
            import cups
            try:
                cups.require('10.0')
            except RuntimeError as e:
                data.append(['pycups', str(e).split()[-1]])

        vp = wal.VPanel(self)
        vp.set_bg(wal.UI_COLORS['border'])
        slist = wal.ReportList(vp, data, border=False)
        vp.pack(slist, expand=True, fill=True, padding_all=1)
        self.pack(vp, expand=True, fill=True, padding_all=5)
        slist.set_column_width(0, wal.LIST_AUTOSIZE)
コード例 #2
0
ファイル: docprops.py プロジェクト: slyfrs/sk1-wx
    def build(self):

        self.pack((5, 5))

        hpanel = wal.HPanel(self)
        hpanel.pack(wal.Label(hpanel, _('Document units') + ':'))
        names = []
        for item in unit_names:
            names.append(unit_full_names[item])
        self.units_combo = wal.Combolist(hpanel, items=names)
        self.units = self.doc.methods.get_doc_units()
        self.units_combo.set_active(unit_names.index(self.units))
        hpanel.pack(self.units_combo, padding=5)
        self.pack(hpanel)

        data = [[_('Unit'), _('Value in points')]]
        for item in uc2const.unit_names:
            name = uc2const.unit_full_names[item]
            value = _('%s points') % str(uc2const.unit_dict[item])
            data.append([name, value])
        slist = wal.ReportList(self, data)
        self.pack(slist, expand=True, fill=True, padding_all=5)

        self.origin = self.doc.methods.get_doc_origin()
        self.pack(wal.Label(self, _('Document origin:')), padding_all=5)
        self.origin_keeper = wal.HToggleKeeper(self, ORIGINS, ORIGIN_ICONS,
                                               ORIGIN_NAMES)
        self.origin_keeper.set_mode(self.origin)
        self.pack(self.origin_keeper)
        self.pack((5, 5))
コード例 #3
0
ファイル: logviewer.py プロジェクト: Acidburn0zzz/sk1-wx
 def build(self):
     self.panel.pack(wal.PLine(self.panel), fill=True)
     self.lc = wal.ReportList(self.panel,
                              on_select=self.update,
                              on_activate=self.on_ok)
     self.panel.pack(self.lc, expand=True, fill=True)
     self.panel.pack(wal.PLine(self.panel), fill=True)
コード例 #4
0
 def __init__(self, parent):
     wal.VPanel.__init__(self, parent)
     data = [['EventLoop', 'Connections']]
     for item in events.ALL_CHANNELS:
         data.append([item[0], str(len(item) - 1)])
     slist = wal.ReportList(self, data, border=False)
     self.pack(slist, expand=True, fill=True)
     slist.set_column_width(0, wal.LIST_AUTOSIZE)
コード例 #5
0
 def __init__(self, parent):
     wal.VPanel.__init__(self, parent)
     vp = wal.VPanel(self)
     vp.set_bg(wal.UI_COLORS['border'])
     tr_list = wal.ReportList(vp, TR_LIST, border=False)
     vp.pack(tr_list, expand=True, fill=True, padding_all=1)
     self.pack(vp, expand=True, fill=True, padding_all=5)
     tr_list.set_column_width(0, wal.LIST_AUTOSIZE)
コード例 #6
0
ファイル: aboutdlg.py プロジェクト: Scrik/sk1-wx
 def __init__(self, app, parent):
     wal.VPanel.__init__(self, parent)
     data = [[_('Component'), _('Version')]] + app.appdata.components
     slist = wal.ReportList(self,
                            data,
                            border=False,
                            odd_color=wal.YELLOW_ODD_COLOR)
     self.pack(slist, expand=True, fill=True)
     slist.set_column_width(0, const.LIST_AUTOSIZE)
コード例 #7
0
 def build(self):
     data = [[_('Property'), _('Value')]]
     sections = [
         'file_info', 'document_info', 'objects_info', 'text_info',
         'bitmap_info', 'fill_info', 'stroke_info'
     ]
     for item in sections:
         data += getattr(self, item)(self.get_objects())
     slist = wal.ReportList(self, data)
     self.pack(slist, expand=True, fill=True, padding_all=5)
コード例 #8
0
 def __init__(self, app, parent):
     wal.VPanel.__init__(self, parent)
     from uc2 import libimg, libpango
     import reportlab
     data = [[_('Component'), _('Version')]] + app.appdata.components
     data.append(['ImageMagick', libimg.get_magickwand_version()[0]])
     data.append(['Pango', libpango.get_version()])
     data.append(['Reportlab', reportlab.Version])
     slist = wal.ReportList(self, data, border=False)
     self.pack(slist, expand=True, fill=True, padding=5)
     slist.set_column_width(0, wal.LIST_AUTOSIZE)
コード例 #9
0
    def __init__(self):
        wal.MainWindow.__init__(self)
        self.set_size(SIZE)
        items = [
            ['Name', 'Value'],
            ['One', '1'],
            ['Two', '2'],
            ['Three', '3'],
        ]

        lst1 = wal.ReportList(self, items, False)

        self.pack(lst1, padding=5, fill=True)
コード例 #10
0
    def build(self):
        data = [[_('Property'), _('Value')]]
        sections = [
            'file_info', 'document_info', 'objects_info', 'text_info',
            'bitmap_info', 'fill_info', 'stroke_info'
        ]
        for item in sections:
            data += getattr(self, item)(self.get_objects())

        vp = wal.VPanel(self)
        vp.set_bg(wal.UI_COLORS['border'])
        slist = wal.ReportList(vp, data)
        vp.pack(slist, expand=True, fill=True, padding_all=1)
        self.pack(vp, expand=True, fill=True, padding_all=5)
コード例 #11
0
    def __init__(self, parent):
        wal.HPanel.__init__(self, parent)

        self.slist = wal.SimpleList(self,
                                    TESTLIST,
                                    on_select=self.selected,
                                    on_activate=self.activated)
        self.pack(self.slist, expand=True, fill=True, padding=10)

        self.report = wal.ReportList(self,
                                     TESTMULTILIST,
                                     on_select=self.selected,
                                     on_activate=self.activated)
        self.pack(self.report, expand=True, fill=True, padding=10)
コード例 #12
0
    def __init__(self, parent):
        wal.VPanel.__init__(self, parent)
        from uc2 import libimg, libpango, libcairo
        import reportlab

        data = [[_('Component'), _('Version')]]
        uc_ver = '%s %s' % (uc2const.VERSION, uc2const.REVISION)
        data.append(['Python', sys.version])
        data.append(['wxWidgets', wal.VERSION])
        data.append(['UniConvertor', uc_ver])
        data.append(['Cairo', libcairo.get_version()[0]])
        data.append(['pycairo', libcairo.get_version()[1]])
        data.append(['Pillow', libimg.get_version()])
        data.append(['ImageMagick', libimg.get_magickwand_version()[0]])
        data.append(['Pango', libpango.get_version()])
        data.append(['Reportlab', reportlab.Version])

        slist = wal.ReportList(self, data, border=False)
        self.pack(slist, expand=True, fill=True, padding=5)
        slist.set_column_width(0, wal.LIST_AUTOSIZE)
コード例 #13
0
    def build(self):

        self.pack((5, 5))

        hpanel = wal.HPanel(self)

        vp = wal.LabeledPanel(hpanel, text=_('Document units'))
        names = []
        for item in unit_names:
            names.append(unit_full_names[item])
        self.units_combo = wal.Combolist(vp, items=names)
        self.units = self.doc.methods.get_doc_units()
        self.units_combo.set_active(unit_names.index(self.units))
        vp.pack(self.units_combo, padding_all=15, fill=True)
        hpanel.pack(vp, expand=True, fill=True)

        hpanel.pack((10, 10))

        vp = wal.LabeledPanel(hpanel, text=_('Document origin'))
        self.origin = self.doc.methods.get_doc_origin()
        self.origin_keeper = wal.HToggleKeeper(vp, ORIGINS, ORIGIN_ICONS,
                                               ORIGIN_NAMES)
        self.origin_keeper.set_mode(self.origin)
        vp.pack(self.origin_keeper, padding_all=5)
        hpanel.pack(vp, fill=True)

        self.pack(hpanel, fill=True, padding_all=5)

        data = [[_('Unit'), _('Value in points')]]
        for item in uc2const.unit_names:
            name = uc2const.unit_full_names[item]
            value = _('%s points') % str(uc2const.unit_dict[item])
            data.append([name, value])

        vp = wal.VPanel(self)
        vp.set_bg(wal.UI_COLORS['border'])
        slist = wal.ReportList(vp, data)
        vp.pack(slist, expand=True, fill=True, padding_all=1)
        self.pack(vp, expand=True, fill=True, padding_all=5)
        self.pack((5, 5))
コード例 #14
0
 def __init__(self, parent):
     wal.VPanel.__init__(self, parent)
     tr_list = wal.ReportList(self, TR_LIST, border=False)
     self.pack(tr_list, expand=True, fill=True, padding=5)
     tr_list.set_column_width(0, wal.LIST_AUTOSIZE)