コード例 #1
0
 def __init__(self):
     """
     Constructor
     """
     ConfigurationPageBase.__init__(self)
     self.setupUi(self)
     self.setObjectName("HelpAppearancePage")
     
     self.styleSheetCompleter = E4FileCompleter(self.styleSheetEdit)
     
     self.helpColours = {}
     self.__displayMode = None
     
     # set initial values
     self.standardFont = Preferences.getHelp("StandardFont")
     self.standardFontSample.setFont(self.standardFont)
     self.standardFontSample.setText(QString("%1 %2")\
         .arg(self.standardFont.family())\
         .arg(self.standardFont.pointSize()))
     
     self.fixedFont = Preferences.getHelp("FixedFont")
     self.fixedFontSample.setFont(self.fixedFont)
     self.fixedFontSample.setText(QString("%1 %2")\
         .arg(self.fixedFont.family())\
         .arg(self.fixedFont.pointSize()))
     
     self.helpColours["SaveUrlColor"] = \
         self.initColour("SaveUrlColor", self.secureURLsColourButton, 
                         Preferences.getHelp)
     
     self.autoLoadImagesCheckBox.setChecked(Preferences.getHelp("AutoLoadImages"))
     
     self.styleSheetEdit.setText(Preferences.getHelp("UserStyleSheet"))
     
     self.tabsCloseButtonCheckBox.setChecked(Preferences.getUI("SingleCloseButton"))
コード例 #2
0
 def __init__(self):
     """
     Constructor
     """
     ConfigurationPageBase.__init__(self)
     self.setupUi(self)
     self.setObjectName("DebuggerPythonPage")
     
     self.interpreterCompleter = E4FileCompleter(self.interpreterEdit)
     self.debugClientCompleter = E4FileCompleter(self.debugClientEdit)
     
     # set initial values
     self.customPyCheckBox.setChecked(\
         Preferences.getDebugger("CustomPythonInterpreter"))
     self.interpreterEdit.setText(\
         Preferences.getDebugger("PythonInterpreter"))
     dct = Preferences.getDebugger("DebugClientType")
     if dct == "standard":
         self.standardButton.setChecked(True)
     elif dct == "threaded":
         self.threadedButton.setChecked(True)
     else:
         self.customButton.setChecked(True)
     self.debugClientEdit.setText(\
         Preferences.getDebugger("DebugClient"))
     self.pyRedirectCheckBox.setChecked(\
         Preferences.getDebugger("PythonRedirect"))
     self.pyNoEncodingCheckBox.setChecked(\
         Preferences.getDebugger("PythonNoEncoding"))
     self.sourceExtensionsEdit.setText(
         Preferences.getDebugger("PythonExtensions"))
コード例 #3
0
 def __init__(self):
     """
     Constructor
     """
     ConfigurationPageBase.__init__(self)
     self.setupUi(self)
     self.setObjectName("ProjectPage")
     
     # set initial values
     self.projectCompressedProjectFilesCheckBox.setChecked(\
         Preferences.getProject("CompressedProjectFiles"))
     self.projectSearchNewFilesRecursiveCheckBox.setChecked(\
         Preferences.getProject("SearchNewFilesRecursively"))
     self.projectSearchNewFilesCheckBox.setChecked(\
         Preferences.getProject("SearchNewFiles"))
     self.projectAutoIncludeNewFilesCheckBox.setChecked(\
         Preferences.getProject("AutoIncludeNewFiles"))
     self.projectLoadSessionCheckBox.setChecked(\
         Preferences.getProject("AutoLoadSession"))
     self.projectSaveSessionCheckBox.setChecked(\
         Preferences.getProject("AutoSaveSession"))
     self.projectSessionAllBpCheckBox.setChecked(\
         Preferences.getProject("SessionAllBreakpoints"))
     self.projectLoadDebugPropertiesCheckBox.setChecked(\
         Preferences.getProject("AutoLoadDbgProperties"))
     self.projectSaveDebugPropertiesCheckBox.setChecked(\
         Preferences.getProject("AutoSaveDbgProperties"))
     self.projectAutoCompileFormsCheckBox.setChecked(\
         Preferences.getProject("AutoCompileForms"))
     self.projectAutoCompileResourcesCheckBox.setChecked(\
         Preferences.getProject("AutoCompileResources"))
     self.projectTimestampCheckBox.setChecked(\
         Preferences.getProject("XMLTimestamp"))
     self.projectRecentSpinBox.setValue(
         Preferences.getProject("RecentNumber"))
コード例 #4
0
    def __init__(self):
        """
        Constructor
        """
        ConfigurationPageBase.__init__(self)
        self.setupUi(self)
        self.setObjectName("TasksPage")

        self.tasksColours = {}

        # set initial values
        self.tasksMarkerEdit.setText(Preferences.getTasks("TasksMarkers"))
        self.tasksMarkerBugfixEdit.setText(Preferences.getTasks("TasksMarkersBugfix"))

        self.tasksColours["TasksColour"] = self.initColour("TasksColour", self.tasksColourButton, Preferences.getTasks)
        self.tasksColours["TasksBugfixColour"] = self.initColour(
            "TasksBugfixColour", self.tasksBugfixColourButton, Preferences.getTasks
        )
        self.tasksColours["TasksBgColour"] = self.initColour(
            "TasksBgColour", self.tasksBgColourButton, Preferences.getTasks
        )
        self.tasksColours["TasksProjectBgColour"] = self.initColour(
            "TasksProjectBgColour", self.tasksProjectBgColourButton, Preferences.getTasks
        )

        self.clearCheckBox.setChecked(Preferences.getTasks("ClearOnFileClose"))
コード例 #5
0
 def __init__(self):
     """
     Constructor
     """
     ConfigurationPageBase.__init__(self)
     self.setupUi(self)
     self.setObjectName("EditorGeneralPage")
     
     # set initial values
     self.tabwidthSlider.setValue(\
         Preferences.getEditor("TabWidth"))
     self.indentwidthSlider.setValue(\
         Preferences.getEditor("IndentWidth"))
     self.indentguidesCheckBox.setChecked(\
         Preferences.getEditor("IndentationGuides"))
     self.tabforindentationCheckBox.setChecked(\
         Preferences.getEditor("TabForIndentation"))
     self.tabindentsCheckBox.setChecked(\
         Preferences.getEditor("TabIndents"))
     self.converttabsCheckBox.setChecked(\
         Preferences.getEditor("ConvertTabsOnLoad"))
     self.autoindentCheckBox.setChecked(\
         Preferences.getEditor("AutoIndentation"))
     self.comment0CheckBox.setChecked(
         Preferences.getEditor("CommentColumn0"))
コード例 #6
0
    def __init__(self):
        """
        Constructor
        """
        ConfigurationPageBase.__init__(self)
        self.setupUi(self)
        self.setObjectName("EditorAPIsPage")

        self.prepareApiButton.setText(self.trUtf8("Compile APIs"))
        self.__apisManager = APIsManager()
        self.__currentAPI = None
        self.__inPreparation = False

        self.apiFileCompleter = E4FileCompleter(self.apiFileEdit)

        # set initial values
        self.pluginManager = e4App().getObject("PluginManager")
        self.apiAutoPrepareCheckBox.setChecked(Preferences.getEditor("AutoPrepareAPIs"))

        self.apis = {}
        apiLanguages = [""] + QScintilla.Lexers.getSupportedLanguages().keys()
        apiLanguages.sort()
        for lang in apiLanguages:
            if lang != "Guessed":
                self.apiLanguageComboBox.addItem(lang)
        self.currentApiLanguage = QString("")
        self.on_apiLanguageComboBox_activated(self.currentApiLanguage)

        for lang in apiLanguages[1:]:
            self.apis[lang] = QStringList(Preferences.getEditorAPI(lang))
コード例 #7
0
 def __init__(self):
     """
     Constructor
     """
     ConfigurationPageBase.__init__(self)
     self.setupUi(self)
     self.setObjectName("HelpDocumentationPage")
     
     self.pythonDocDirCompleter = E4FileCompleter(self.pythonDocDirEdit)
     self.qt4DocDirCompleter = E4FileCompleter(self.qt4DocDirEdit)
     self.pyqt4DocDirCompleter = E4FileCompleter(self.pyqt4DocDirEdit)
     self.pykde4DocDirCompleter = E4FileCompleter(self.pykde4DocDirEdit)
     self.pysideDocDirCompleter = E4FileCompleter(self.pysideDocDirEdit)
     
     self.pykde4Group.setEnabled(KdeQt.isKDEAvailable())
     try:
         import PySide
         self.pysideGroup.setEnabled(True)
         del PySide
     except ImportError:
         self.pysideGroup.setEnabled(False)
     
     # set initial values
     self.pythonDocDirEdit.setText(\
         Preferences.getHelp("PythonDocDir"))
     self.qt4DocDirEdit.setText(\
         Preferences.getHelp("Qt4DocDir"))
     self.pyqt4DocDirEdit.setText(\
         Preferences.getHelp("PyQt4DocDir"))
     self.pykde4DocDirEdit.setText(\
         Preferences.getHelp("PyKDE4DocDir"))
     self.pysideDocDirEdit.setText(\
         Preferences.getHelp("PySideDocDir"))
コード例 #8
0
 def __init__(self):
     """
     Constructor
     """
     ConfigurationPageBase.__init__(self)
     self.setupUi(self)
     self.setObjectName("ProjectBrowserPage")
     
     self.projectBrowserColours = {}
     self.__currentProjectTypeIndex = 0
     
     # set initial values
     self.projectTypeCombo.addItem('', QVariant(''))
     self.__projectBrowserFlags = {'' : 0}
     try:
         projectTypes = e4App().getObject("Project").getProjectTypes()
         for projectType in sorted(projectTypes.keys()):
             self.projectTypeCombo.addItem(projectTypes[projectType], 
                                           QVariant(projectType))
             self.__projectBrowserFlags[projectType] = \
                 Preferences.getProjectBrowserFlags(projectType)
     except KeyError:
         self.pbGroup.setEnabled(False)
     
     self.projectBrowserColours["Highlighted"] = \
         self.initColour("Highlighted", self.pbHighlightedButton, 
             Preferences.getProjectBrowserColour)
     
     self.followEditorCheckBox.setChecked(\
         Preferences.getProject("FollowEditor"))
     self.hideGeneratedCheckBox.setChecked(\
         Preferences.getProject("HideGeneratedForms"))
コード例 #9
0
 def __init__(self):
     """
     Constructor
     """
     ConfigurationPageBase.__init__(self)
     self.setupUi(self)
     self.setObjectName("ViewmanagerPage")
     
     # set initial values
     self.pluginManager = e4App().getObject("PluginManager")
     self.viewmanagers = self.pluginManager.getPluginDisplayStrings("viewmanager")
     self.windowComboBox.clear()
     currentVm = Preferences.getViewManager()
     
     keys = self.viewmanagers.keys()
     keys.sort()
     for key in keys:
         self.windowComboBox.addItem(self.trUtf8(self.viewmanagers[key]), 
                                     QVariant(key))
     currentIndex = self.windowComboBox.findText(\
         self.trUtf8(self.viewmanagers[currentVm]))
     self.windowComboBox.setCurrentIndex(currentIndex)
     self.on_windowComboBox_activated(currentIndex)
     
     self.tabViewGroupBox.setTitle(self.trUtf8(self.viewmanagers["tabview"]))
     
     self.filenameLengthSpinBox.setValue(
         Preferences.getUI("TabViewManagerFilenameLength"))
     self.filenameOnlyCheckBox.setChecked(
         Preferences.getUI("TabViewManagerFilenameOnly"))
     self.recentFilesSpinBox.setValue(
         Preferences.getUI("RecentNumber"))
コード例 #10
0
 def __init__(self):
     """
     Constructor
     """
     ConfigurationPageBase.__init__(self)
     self.setupUi(self)
     self.setObjectName("NetworkPage")
     
     self.downloadDirCompleter = E4DirCompleter(self.downloadDirEdit)
     
     self.proxyTypeCombo.addItem(self.trUtf8("Transparent HTTP"), QVariant(0))
     self.proxyTypeCombo.addItem(self.trUtf8("Caching HTTP"), QVariant(1))
     self.proxyTypeCombo.addItem(self.trUtf8("Socks5"), QVariant(2))
     
     # set initial values
     self.downloadDirEdit.setText(Preferences.getUI("DownloadPath"))
     self.requestFilenameCheckBox.setChecked(
         Preferences.getUI("RequestDownloadFilename"))
     
     self.proxyGroup.setChecked(\
         Preferences.getUI("UseProxy"))
     if Preferences.getUI("UseSystemProxy"):
         self.systemProxyButton.setChecked(True)
     else:
         self.manualProxyButton.setChecked(True)
     self.proxyTypeCombo.setCurrentIndex(self.proxyTypeCombo.findData(\
         QVariant(Preferences.getUI("ProxyType"))))
     self.proxyHostEdit.setText(\
         Preferences.getUI("ProxyHost"))
     self.proxyUserEdit.setText(\
         Preferences.getUI("ProxyUser"))
     self.proxyPasswordEdit.setText(\
         Preferences.getUI("ProxyPassword"))
     self.proxyPortSpin.setValue(\
         Preferences.getUI("ProxyPort"))
コード例 #11
0
 def __init__(self):
     """
     Constructor
     """
     ConfigurationPageBase.__init__(self)
     self.setupUi(self)
     self.setObjectName("EditorKeywordsPage")
     
     # set initial values
     self.__keywords = {
         "": QStringList(["", "", "", "", "", "", "", "", "", ""])
     }
     languages = [''] + QScintilla.Lexers.getSupportedLanguages().keys()
     languages.sort()
     for lang in languages:
         if lang:
             lex = QScintilla.Lexers.getLexer(lang)
             if isinstance(lex, LexerContainer):
                 continue
             keywords = Preferences.getEditorKeywords(lang)[:]
             if keywords.isEmpty():
                 keywords = QStringList("")
                 for kwSet in range(1, 10):
                     kw = lex.keywords(kwSet)
                     if kw is None:
                         kw = ""
                     keywords.append(kw)
             self.__keywords[lang] = keywords
         self.languageCombo.addItem(lang)
     
     self.currentLanguage = QString()
     self.currentSet = 1
     self.on_languageCombo_activated(self.currentLanguage)
コード例 #12
0
 def __init__(self):
     """
     Constructor
     """
     ConfigurationPageBase.__init__(self)
     self.setupUi(self)
     self.setObjectName("PrinterPage")
     
     # set initial values
     self.printerNameEdit.setText(\
         Preferences.getPrinter("PrinterName"))
     if Preferences.getPrinter("ColorMode"):
         self.printerColorButton.setChecked(True)
     else:
         self.printerGrayscaleButton.setChecked(True)
     if Preferences.getPrinter("FirstPageFirst"):
         self.printFirstPageFirstButton.setChecked(True)
     else:
         self.printFirstPageLastButton.setChecked(True)
     self.printMagnificationSpinBox.setValue(\
         Preferences.getPrinter("Magnification"))
     self.printheaderFont = Preferences.getPrinter("HeaderFont")
     self.printheaderFontSample.setFont(self.printheaderFont)
     self.leftMarginSpinBox.setValue(\
         Preferences.getPrinter("LeftMargin"))
     self.rightMarginSpinBox.setValue(\
         Preferences.getPrinter("RightMargin"))
     self.topMarginSpinBox.setValue(\
         Preferences.getPrinter("TopMargin"))
     self.bottomMarginSpinBox.setValue(\
         Preferences.getPrinter("BottomMargin"))
コード例 #13
0
 def __init__(self, lexers):
     """
     Constructor
     
     @param lexers reference to the lexers dictionary
     """
     ConfigurationPageBase.__init__(self)
     self.setupUi(self)
     self.setObjectName("EditorHighlightersPage")
     
     self.editorLexerList.headerItem().setText(self.editorLexerList.columnCount(), "")
     header = self.editorLexerList.header()
     header.setResizeMode(QHeaderView.ResizeToContents)
     header.setSortIndicator(0, Qt.AscendingOrder)
     
     try:
         self.extsep = os.extsep
     except AttributeError:
         self.extsep = "."
     
     self.extras = ["-----------", self.trUtf8("Alternative")]
     languages = [''] + sorted(lexers.keys()) + self.extras
     for lang in languages:
         self.editorLexerCombo.addItem(lang)
     
     pygmentsLexers = [''] + sorted([l[0] for l in get_all_lexers()])
     for pygmentsLexer in pygmentsLexers:
         self.pygmentsLexerCombo.addItem(pygmentsLexer)
     
     # set initial values
     lexerAssocs = Preferences.getEditorLexerAssocs()
     for ext in lexerAssocs.keys():
         QTreeWidgetItem(self.editorLexerList, 
             QStringList() << ext << lexerAssocs[ext])
     self.editorLexerList.sortByColumn(0, Qt.AscendingOrder)
コード例 #14
0
 def __init__(self):
     """
     Constructor
     """
     ConfigurationPageBase.__init__(self)
     self.setupUi(self)
     self.setObjectName("HelpViewersPage")
     
     self.helpViewerGroup = QButtonGroup()
     self.helpViewerGroup.addButton(self.helpBrowserButton)
     self.helpViewerGroup.addButton(self.qtAssistantButton)
     self.helpViewerGroup.addButton(self.webBrowserButton)
     self.helpViewerGroup.addButton(self.customViewerButton)
     
     self.customViewerCompleter = E4FileCompleter(self.customViewerEdit)
     
     # set initial values
     hvId = Preferences.getHelp("HelpViewerType")
     if hvId == 1:
         self.helpBrowserButton.setChecked(True)
     elif hvId == 2:
         self.qtAssistantButton.setChecked(True)
     elif hvId == 3:
         self.webBrowserButton.setChecked(True)
     else:
         self.customViewerButton.setChecked(True)
     self.customViewerEdit.setText(\
         Preferences.getHelp("CustomViewer"))
コード例 #15
0
 def __init__(self):
     """
     Constructor
     """
     ConfigurationPageBase.__init__(self)
     self.setupUi(self)
     self.setObjectName("ShellPage")
     
     # set initial values
     self.shellLinenoCheckBox.setChecked(
         Preferences.getShell("LinenoMargin"))
     self.shellWordWrapCheckBox.setChecked(
         Preferences.getShell("WrapEnabled"))
     self.shellACEnabledCheckBox.setChecked(
         Preferences.getShell("AutoCompletionEnabled"))
     self.shellCTEnabledCheckBox.setChecked(
         Preferences.getShell("CallTipsEnabled"))
     self.shellSyntaxHighlightingCheckBox.setChecked(
         Preferences.getShell("SyntaxHighlightingEnabled"))
     self.shellHistorySpinBox.setValue(
         Preferences.getShell("MaxHistoryEntries"))
     self.stdOutErrCheckBox.setChecked(
         Preferences.getShell("ShowStdOutErr"))
     
     self.monospacedFont = Preferences.getShell("MonospacedFont")
     self.monospacedFontSample.setFont(self.monospacedFont)
     self.monospacedCheckBox.setChecked(\
         Preferences.getShell("UseMonospacedFont"))
     self.marginsFont = Preferences.getShell("MarginsFont")
     self.marginsFontSample.setFont(self.marginsFont)
コード例 #16
0
 def __init__(self):
     """
     Constructor
     """
     ConfigurationPageBase.__init__(self)
     self.setupUi(self)
     self.setObjectName("EditorFilePage")
     
     self.__showsOpenFilters = True
     self.openFileFilters = \
         QStringList(Preferences.getEditor("AdditionalOpenFilters"))
     self.saveFileFilters = \
         QStringList(Preferences.getEditor("AdditionalSaveFilters"))
     self.fileFiltersList.addItems(self.openFileFilters)
     
     self.__setDefaultFiltersLists()
     
     self.defaultEncodingComboBox.addItems(sorted(supportedCodecs))
     
     # set initial values
     self.autosaveSlider.setValue(\
         Preferences.getEditor("AutosaveInterval"))
     self.createBackupFileCheckBox.setChecked(\
         Preferences.getEditor("CreateBackupFile"))
     self.automaticSyntaxCheckCheckBox.setChecked(\
         Preferences.getEditor("AutoCheckSyntax"))
     self.defaultEncodingComboBox.setCurrentIndex(\
         self.defaultEncodingComboBox.findText(\
             Preferences.getEditor("DefaultEncoding")))
     self.advEncodingCheckBox.setChecked(\
         Preferences.getEditor("AdvancedEncodingDetection"))
     self.warnFilesizeSpinBox.setValue(\
         Preferences.getEditor("WarnFilesize"))
     self.clearBreakpointsCheckBox.setChecked(\
         Preferences.getEditor("ClearBreaksOnClose"))
     self.automaticReopenCheckBox.setChecked(\
         Preferences.getEditor("AutoReopen"))
     self.stripWhitespaceCheckBox.setChecked(\
         Preferences.getEditor("StripTrailingWhitespace"))
     self.openFilesFilterComboBox.setCurrentIndex(\
         self.openFilesFilterComboBox.findText(\
             Preferences.getEditor("DefaultOpenFilter")))
     self.saveFilesFilterComboBox.setCurrentIndex(\
         self.saveFilesFilterComboBox.findText(\
             Preferences.getEditor("DefaultSaveFilter")))
     self.automaticEolConversionCheckBox.setChecked(\
         Preferences.getEditor("AutomaticEOLConversion"))
     
     eolMode = Preferences.getEditor("EOLMode")
     if eolMode == QsciScintilla.EolWindows:
         self.crlfRadioButton.setChecked(True)
     elif eolMode == QsciScintilla.EolMac:
         self.crRadioButton.setChecked(True)
     elif eolMode == QsciScintilla.EolUnix:
         self.lfRadioButton.setChecked(True)
コード例 #17
0
 def __init__(self):
     """
     Constructor
     """
     ConfigurationPageBase.__init__(self)
     self.setupUi(self)
     self.setObjectName("GraphicsPage")
     
     # set initial values
     self.graphicsFont = Preferences.getGraphics("Font")
     self.graphicsFontSample.setFont(self.graphicsFont)
コード例 #18
0
 def __init__(self):
     """
     Constructor
     """
     ConfigurationPageBase.__init__(self)
     self.setupUi(self)
     self.setObjectName("CorbaPage")
     
     self.idlCompleter = E4FileCompleter(self.idlEdit)
     
     # set initial values
     self.idlEdit.setText(Preferences.getCorba("omniidl"))
コード例 #19
0
    def __init__(self):
        """
        Constructor
        """
        ConfigurationPageBase.__init__(self)
        self.setupUi(self)
        self.setObjectName("EditorAutocompletionPage")

        # set initial values
        self.acEnabledCheckBox.setChecked(Preferences.getEditor("AutoCompletionEnabled"))
        self.acCaseSensitivityCheckBox.setChecked(Preferences.getEditor("AutoCompletionCaseSensitivity"))
        self.acReplaceWordCheckBox.setChecked(Preferences.getEditor("AutoCompletionReplaceWord"))
        self.acThresholdSlider.setValue(Preferences.getEditor("AutoCompletionThreshold"))
コード例 #20
0
    def __init__(self):
        """
        Constructor
        """
        ConfigurationPageBase.__init__(self)
        self.setupUi(self)
        self.setObjectName("PluginManagerPage")

        self.downloadDirCompleter = E4DirCompleter(self.downloadDirEdit)

        # set initial values
        self.activateExternalPluginsCheckBox.setChecked(Preferences.getPluginManager("ActivateExternal"))
        self.downloadDirEdit.setText(Preferences.getPluginManager("DownloadPath"))
コード例 #21
0
 def __init__(self):
     """
     Constructor
     """
     ConfigurationPageBase.__init__(self)
     self.setupUi(self)
     self.setObjectName("DebuggerRubyPage")
     
     self.rubyInterpreterCompleter = E4FileCompleter(self.rubyInterpreterEdit)
     
     # set initial values
     self.rubyInterpreterEdit.setText(\
         Preferences.getDebugger("RubyInterpreter"))
     self.rbRedirectCheckBox.setChecked(\
         Preferences.getDebugger("RubyRedirect"))
コード例 #22
0
 def __init__(self):
     """
     Constructor
     """
     ConfigurationPageBase.__init__(self)
     self.setupUi(self)
     self.setObjectName("IconsPage")
     
     self.iconDirectoryCompleter = E4DirCompleter(self.iconDirectoryEdit)
     
     # set initial values
     dirList = QStringList(Preferences.getIcons("Path"))
     for dir in dirList:
         if not dir.isEmpty():
             QListWidgetItem(dir, self.iconDirectoryList)
コード例 #23
0
    def __init__(self):
        """
        Constructor
        """
        ConfigurationPageBase.__init__(self)
        self.setupUi(self)
        self.setObjectName("EditorCalltipsQScintillaPage")

        # set initial values
        ctContext = Preferences.getEditor("CallTipsStyle")
        if ctContext == QsciScintilla.CallTipsNoContext:
            self.ctNoContextButton.setChecked(True)
        elif ctContext == QsciScintilla.CallTipsNoAutoCompletionContext:
            self.ctNoAutoCompletionButton.setChecked(True)
        elif ctContext == QsciScintilla.CallTipsContext:
            self.ctContextButton.setChecked(True)
コード例 #24
0
 def __init__(self):
     """
     Constructor
     """
     ConfigurationPageBase.__init__(self)
     self.setupUi(self)
     self.setObjectName("EditorSpellCheckingPage")
     
     self.editorColours = {}
     
     languages = sorted(SpellChecker.getAvailableLanguages())
     self.defaultLanguageCombo.addItems(languages)
     if languages:
         self.errorLabel.hide()
     else:
         self.spellingFrame.setEnabled(False)
     
     self.pwlFileCompleter = E4FileCompleter(self.pwlEdit, showHidden = True)
     self.pelFileCompleter = E4FileCompleter(self.pelEdit, showHidden = True)
     
     # set initial values
     self.checkingEnabledCheckBox.setChecked(
         Preferences.getEditor("SpellCheckingEnabled"))
     
     self.defaultLanguageCombo.setCurrentIndex(
         self.defaultLanguageCombo.findText(
             Preferences.getEditor("SpellCheckingDefaultLanguage")))
     
     self.stringsOnlyCheckBox.setChecked(
         Preferences.getEditor("SpellCheckStringsOnly"))
     self.minimumWordSizeSlider.setValue(
         Preferences.getEditor("SpellCheckingMinWordSize"))
     
     self.editorColours["SpellingMarkers"] = \
         self.initColour("SpellingMarkers", self.spellingMarkerButton, 
             Preferences.getEditorColour)
     
     self.pwlEdit.setText(Preferences.getEditor("SpellCheckingPersonalWordList"))
     self.pelEdit.setText(Preferences.getEditor("SpellCheckingPersonalExcludeList"))
     
     if self.spellingFrame.isEnabled():
         self.enabledCheckBox.setChecked(\
             Preferences.getEditor("AutoSpellCheckingEnabled"))
     else:
         self.enabledCheckBox.setChecked(False)  # not available
     self.chunkSizeSpinBox.setValue(Preferences.getEditor("AutoSpellCheckChunkSize"))
コード例 #25
0
 def __init__(self, lexers):
     """
     Constructor
     
     @param lexers reference to the lexers dictionary
     """
     ConfigurationPageBase.__init__(self)
     self.setupUi(self)
     self.setObjectName("EditorHighlightingStylesPage")
     
     self.__fontButtonMenu = QMenu()
     act = self.__fontButtonMenu.addAction(self.trUtf8("Font"))
     act.setData(QVariant(self.FONT))
     self.__fontButtonMenu.addSeparator()
     act = self.__fontButtonMenu.addAction(self.trUtf8("Family and Size only"))
     act.setData(QVariant(self.FAMILYANDSIZE))
     act = self.__fontButtonMenu.addAction(self.trUtf8("Family only"))
     act.setData(QVariant(self.FAMILYONLY))
     act = self.__fontButtonMenu.addAction(self.trUtf8("Size only"))
     act.setData(QVariant(self.SIZEONLY))
     self.__fontButtonMenu.triggered.connect(self.__fontButtonMenuTriggered)
     self.fontButton.setMenu(self.__fontButtonMenu)
     
     self.__allFontsButtonMenu = QMenu()
     act = self.__allFontsButtonMenu.addAction(self.trUtf8("Font"))
     act.setData(QVariant(self.FONT))
     self.__allFontsButtonMenu.addSeparator()
     act = self.__allFontsButtonMenu.addAction(self.trUtf8("Family and Size only"))
     act.setData(QVariant(self.FAMILYANDSIZE))
     act = self.__allFontsButtonMenu.addAction(self.trUtf8("Family only"))
     act.setData(QVariant(self.FAMILYONLY))
     act = self.__allFontsButtonMenu.addAction(self.trUtf8("Size only"))
     act.setData(QVariant(self.SIZEONLY))
     self.__allFontsButtonMenu.triggered.connect(self.__allFontsButtonMenuTriggered)
     self.allFontsButton.setMenu(self.__allFontsButtonMenu)
     
     self.lexer = None
     self.lexers = lexers
     
     # set initial values
     languages = [''] + self.lexers.keys()
     languages.sort()
     for lang in languages:
         self.lexerLanguageComboBox.addItem(lang)
     self.on_lexerLanguageComboBox_activated(QString(''))
コード例 #26
0
 def __init__(self):
     """
     Constructor
     """
     ConfigurationPageBase.__init__(self)
     self.setupUi(self)
     self.setObjectName("MultiProjectPage")
     
     # set initial values
     self.openMasterAutomaticallyCheckBox.setChecked(\
         Preferences.getMultiProject("OpenMasterAutomatically"))
     self.multiProjectTimestampCheckBox.setChecked(\
         Preferences.getMultiProject("XMLTimestamp"))
     self.multiProjectRecentSpinBox.setValue(
         Preferences.getMultiProject("RecentNumber"))
     self.workspaceEdit.setText(
         Utilities.toNativeSeparators(
             Preferences.getMultiProject("Workspace") or Utilities.getHomeDir()))
コード例 #27
0
 def __init__(self):
     """
     Constructor
     """
     ConfigurationPageBase.__init__(self)
     self.setupUi(self)
     self.setObjectName("TemplatesPage")
     
     # set initial values
     self.templatesAutoOpenGroupsCheckBox.setChecked(\
         Preferences.getTemplates("AutoOpenGroups"))
     self.templatesSeparatorCharEdit.setText(\
         Preferences.getTemplates("SeparatorChar"))
     if Preferences.getTemplates("SingleDialog"):
         self.templatesSingleDialogButton.setChecked(True)
     else:
         self.templatesMultiDialogButton.setChecked(True)
     self.templatesToolTipCheckBox.setChecked(\
         Preferences.getTemplates("ShowTooltip"))
コード例 #28
0
 def __init__(self):
     """
     Constructor
     """
     ConfigurationPageBase.__init__(self)
     self.setupUi(self)
     self.setObjectName("ApplicationPage")
     
     # set initial values
     self.singleApplicationCheckBox.setChecked(\
         Preferences.getUI("SingleApplicationMode"))
     self.splashScreenCheckBox.setChecked(\
         Preferences.getUI("ShowSplash"))
     
     openOnStartup = Preferences.getUI("OpenOnStartup")
     if openOnStartup == 0:
         self.noOpenRadioButton.setChecked(True)
     elif openOnStartup == 1:
         self.lastFileRadioButton.setChecked(True)
     elif openOnStartup == 2:
         self.lastProjectRadioButton.setChecked(True)
     elif openOnStartup == 3:
         self.lastMultiprojectRadioButton.setChecked(True)
     elif openOnStartup == 4:
         self.globalSessionRadioButton.setChecked(True)
     
     period = Preferences.getUI("PerformVersionCheck")
     if period == 0:
         self.noCheckRadioButton.setChecked(True)
     elif period == 1:
         self.alwaysCheckRadioButton.setChecked(True)
     elif period == 2:
         self.dailyCheckRadioButton.setChecked(True)
     elif period == 3:
         self.weeklyCheckRadioButton.setChecked(True)
     elif period == 4:
         self.monthlyCheckRadioButton.setChecked(True)
     
     self.systemEmailClientCheckBox.setChecked(
         Preferences.getUser("UseSystemEmailClient"))
     
     self.errorlogCheckBox.setChecked(
         Preferences.getUI("CheckErrorLog"))
コード例 #29
0
 def __init__(self):
     """
     Constructor
     """
     ConfigurationPageBase.__init__(self)
     self.setupUi(self)
     self.setObjectName("QtPage")
     
     self.qt4Completer = E4DirCompleter(self.qt4Edit)
     self.qt4TransCompleter = E4DirCompleter(self.qt4TransEdit)
     
     if sys.platform != "darwin":
         self.qt4Group.hide()
     
     # set initial values
     self.qt4Edit.setText(Preferences.getQt("Qt4Dir"))
     self.qt4TransEdit.setText(Preferences.getQt("Qt4TranslationsDir"))
     self.qt4PrefixEdit.setText(Preferences.getQt("QtToolsPrefix4"))
     self.qt4PostfixEdit.setText(Preferences.getQt("QtToolsPostfix4"))
     self.__updateQt4Sample()
コード例 #30
0
 def __init__(self):
     """
     Constructor
     """
     ConfigurationPageBase.__init__(self)
     self.setupUi(self)
     self.setObjectName("EmailPage")
     
     # set initial values
     self.mailServerEdit.setText(Preferences.getUser("MailServer"))
     self.portSpin.setValue(Preferences.getUser("MailServerPort"))
     self.emailEdit.setText(Preferences.getUser("Email"))
     self.signatureEdit.setPlainText(Preferences.getUser("Signature"))
     self.mailAuthenticationCheckBox.setChecked(\
         Preferences.getUser("MailServerAuthentication"))
     self.mailUserEdit.setText(Preferences.getUser("MailServerUser"))
     self.mailPasswordEdit.setText(\
         Preferences.getUser("MailServerPassword"))
     self.useTlsCheckBox.setChecked(\
         Preferences.getUser("MailServerUseTLS"))