コード例 #1
0
ファイル: widgets.py プロジェクト: romainsc/calibre
    def setup_ui(self):
        from calibre.gui2.convert.look_and_feel_ui import Ui_Form
        f, w = Ui_Form(), QWidget()
        f.setupUi(w)
        self.l = l = QFormLayout(self)
        self.setLayout(l)

        l.addRow(QLabel(_('Select what style information you want completely removed:')))
        self.h = h = QHBoxLayout()

        for name, text in (
                ('fonts', _('&Fonts')), ('margins', _('&Margins')), ('padding', _('&Padding')), ('floats', _('Flo&ats')), ('colors', _('&Colors')),
            ):
            c = QCheckBox(text)
            setattr(self, 'opt_' + name, c)
            h.addWidget(c)
            c.setToolTip(getattr(f, 'filter_css_' + name).toolTip())
        l.addRow(h)

        self.others = o = QLineEdit(self)
        l.addRow(_('&Other CSS properties:'), o)
        o.setToolTip(f.filter_css_others.toolTip())

        if self.current_name is not None:
            self.filter_current = c = QCheckBox(_('Only filter CSS in the current file (%s)') % self.current_name)
            l.addRow(c)

        l.addRow(self.bb)
コード例 #2
0
ファイル: widgets.py プロジェクト: GRiker/calibre
    def setup_ui(self):
        from calibre.gui2.convert.look_and_feel_ui import Ui_Form

        f, w = Ui_Form(), QWidget()
        f.setupUi(w)
        self.l = l = QFormLayout(self)
        self.setLayout(l)

        l.addRow(QLabel(_("Select what style information you want completely removed:")))
        self.h = h = QHBoxLayout()

        for name, text in {
            "fonts": _("&Fonts"),
            "margins": _("&Margins"),
            "padding": _("&Padding"),
            "floats": _("Flo&ats"),
            "colors": _("&Colors"),
        }.iteritems():
            c = QCheckBox(text)
            setattr(self, "opt_" + name, c)
            h.addWidget(c)
            c.setToolTip(getattr(f, "filter_css_" + name).toolTip())
        l.addRow(h)

        self.others = o = QLineEdit(self)
        l.addRow(_("&Other CSS properties:"), o)
        o.setToolTip(f.filter_css_others.toolTip())

        if self.current_name is not None:
            self.filter_current = c = QCheckBox(_("Only filter CSS in the current file (%s)") % self.current_name)
            l.addRow(c)

        l.addRow(self.bb)