Exemple #1
0
    def _acceptOptions(self): # No need to restore focus widget
        config = Config()
        settings = QSettings()

        creator = self.generalPanel.creatorLineEdit.text().strip()
        settings.setValue(Gopt.Key.Creator, creator)
        config.Creator = creator

        initials = self.generalPanel.initialsLineEdit.text().strip()
        settings.setValue(Gopt.Key.Initials, initials)
        config.Initials = initials

        config.PadDigits = self.rulesPanel.thisPadDigitsSpinBox.value()
        config.IgnoreSubFirsts = bool(
            self.rulesPanel.thisIgnoreSubFirstsCheckBox.isChecked())
        config.SuggestSpelled = bool(
            self.rulesPanel.thisSuggestSpelledCheckBox.isChecked())

        highest = self.config.get(Gconf.Key.HighestPageNumber)
        config.HighestPageNumber = (
            self.generalPanel.highestPageSpinBox.value())
        largest = self.config.get(Gconf.Key.LargestPageRange)
        config.LargestPageRange = (
            self.generalPanel.largestPageRangeSpinBox.value())
        most = self.config.get(Gconf.Key.MostPages)
        config.MostPages = self.generalPanel.mostPagesSpinBox.value()

        index = self.rulesPanel.thisSortAsRulesBox.currentIndex()
        name = self.rulesPanel.thisSortAsRulesBox.itemData(index)
        if self.rulesPanel.thisSortAsRules != name:
            with Lib.DisableUI(self):
                self.state.setSortAsRules(name, "Updating Sort As texts",
                                          self.state.window.reportProgress)

        index = self.rulesPanel.thisPageRangeRulesBox.currentIndex()
        name = self.rulesPanel.thisPageRangeRulesBox.itemData(index)
        if self.rulesPanel.thisPageRangeRules != name:
            with Lib.DisableUI(self):
                self.state.setPageRangeRules(
                    name, "Updating Pages texts",
                    self.state.window.reportProgress)

        if (highest != config.HighestPageNumber or
                largest != config.LargestPageRange or
                most != config.MostPages):
            self.state.viewFilteredPanel.requery()

        return config
Exemple #2
0
        def configs(self):
            config = Config()
            config.AltFont = "Arial"
            config.AltFontSize = 13
            config.Created = "2015-06-15 13:06:35"
            config.Creator = "Mark Summerfield"
            config.Indent = IndentKind.FOUR_SPACES
            config.Title = '<span style="font-size: 14pt;">Index</span>'
            config.Note = "Note"
            config.Language = LanguageKind.AMERICAN
            config.MonoFont = "DejaVu Sans Mono"
            config.MonoFontSize = 12
            config.MonoFontAsStrikeout = False
            config.Opened = 139
            config.See = "<i>see</i> "
            config.SeeAlso = "<i>see also</i> "
            config.SeeAlsoPosition = SeeAlsoPositionKind.AFTER_PAGES
            config.SeeAlsoPrefix = ". "
            config.SeeAlsoSeparator = "; "
            config.SeeAlsoSuffix = ""
            config.SeePrefix = ". "
            config.SeeSeparator = "; "
            config.SeeSuffix = ""
            config.GenericConjunction = " and "
            config.SubSee = "<i>see</i> "
            config.SubSeeAlso = "<i>see also</i> "
            config.SubSeeAlsoPosition = SeeAlsoPositionKind.AFTER_PAGES
            config.SubSeeAlsoPrefix = ". "
            config.SubSeeAlsoSeparator = "; "
            config.SubSeeAlsoSuffix = ""
            config.SubSeePrefix = ". "
            config.SubSeeSeparator = "; "
            config.SubSeeSuffix = ""
            config.StdFont = "Times New Roman"
            config.StdFontSize = 13
            config.TermPagesSeparator = ", "
            config.SortAsRules = "wordByWordCMS16"
            config.Updated = "2015-06-22 10:01:37"
            config.Worktime = 7325
            config.XRefToSubentry = XRefToSubentryKind.COLON
            config.SectionPreLines = 1
            config.SectionPostLines = 1
            config.SectionTitles = True
            config.SectionSpecialTitle = """<span style="font-size: \
10pt; font-family: 'Arial';"><b>Symbols &amp; Numbers</b>"""
            config.Style = StyleKind.INDENTED
            config.RunInSeparator = "; "
            return config
Exemple #3
0
 def configs(self):
     config = Config()
     config.AltFont = "Arial"
     config.AltFontSize = 13
     config.PageRangeRules = "pageRangeCMS16"
     config.Created = "2015-06-15 13:06:35"
     config.Creator = "Mark Summerfield"
     config.Indent = IndentKind.FOUR_SPACES
     config.Initials = "MS"
     config.Language = LanguageKind.AMERICAN
     config.MonoFont = "DejaVu Sans Mono"
     config.MonoFontSize = 12
     config.Opened = 139
     config.StdFont = "Times New Roman"
     config.StdFontSize = 13
     config.SortAsRules = "wordByWordCMS16"
     config.Updated = "2015-06-22 10:01:37"
     config.Worktime = 7325
     return config