usdmanager.preferences_dialog module¶
Create a Preferences dialog.
-
class
usdmanager.preferences_dialog.
PreferencesDialog
(parent, **kwargs)[source]¶ Bases:
sphinx.ext.autodoc.importer._MockObject
Preferences dialog
-
deleteItems
(layout)[source]¶ Delete all items in given layout.
Parameters: - layout : QLayout
Layout to delete items from
-
getPrefAutoCompleteAddressBar
()[source]¶ Get the user preference for enabling address bar auto-completion.
Returns: State of “Auto complete paths in address bar” check box. Rtype: bool
-
getPrefAutoIndent
()[source]¶ Get the user preference for auto-indentation.
Returns: State of “Use auto indentation” check box. Rtype: bool
-
getPrefDiffTool
()[source]¶ Get the user preference for diff tool.
Returns: Text in Diff tool QTextEdit. Rtype: str
-
getPrefFont
()[source]¶ Get the user preference for font.
Returns: Font selected for documents. Rtype: QFont
-
getPrefLineLimit
()[source]¶ Get the user preference for line limit before truncating files.
Returns: Number of lines to display before truncating a file. Rtype: int
-
getPrefLineNumbers
()[source]¶ Get the user preference for displaying line numbers.
Returns: State of “Show line numbers” check box. Rtype: bool
-
getPrefNewTab
()[source]¶ Get the user preference for opening links in a new tab or not.
Returns: State of “Open links in new tabs” check box. Rtype: bool
-
getPrefParseLinks
()[source]¶ Get the user preference to enable link parsing.
Returns: Search for links in the opened file. Disable this for huge files that freeze the app. Rtype: bool
-
getPrefPrograms
()[source]¶ Get the user preference for file extensions and apps to open them with.
Returns: Dictionary of extension: program pairs of strings. Rtype: dict
-
getPrefShowAllMessages
()[source]¶ Get the user preference to display all messages or just errors.
Returns: State of “Show success messages” check box. Rtype: bool
-
getPrefShowHiddenFiles
()[source]¶ Get the user preference for showing hidden files by default.
Returns: State of “Show hidden files” check box. Rtype: bool
-
getPrefSyntaxHighlighting
()[source]¶ Get the user preference to enable syntax highlighting.
Returns: State of “Enable syntax highlighting” check box. Rtype: bool
-
getPrefTabSpaces
()[source]¶ Get the user preference for number of spaces equaling a tab.
Returns: Number of spaces to use instead of a tab. Only use this number of use spaces is also True. Rtype: int
-
getPrefTeletypeConversion
()[source]¶ Get the user preference to enable teletype character conversion.
Returns: State of “Display teletype colors” check box. Rtype: bool
-
getPrefTextEditor
()[source]¶ Get the user-preferred text editor.
Returns: Text in Text editor QTextEdit. Rtype: str
-
getPrefTheme
()[source]¶ Get the selected theme.
We may eventually make this a combo box supporting multiple themes, so use the string name instead of just a boolean.
Returns: Selected theme name, or None if the default Rtype: str | None
-
getPrefUseSpaces
()[source]¶ Get the user preference for spaces vs. tabs.
Returns: State of “Use spaces instead of tabs” check box. Rtype: bool
-
populateProgsAndExts
(programs)[source]¶ Fill out the UI with the user preference for programs and extensions.
Parameters: - programs : dict
Dictionary of extension: program pairs of strings.
-