hyperspyui.plugins.stylesheet module

class hyperspyui.plugins.stylesheet.AutoIndentMode

Bases: AutoIndentMode

Provides automatic stylesheet-specific auto indentation.

_get_indent(cursor)

Return the indentation text (a series of spaces or tabs)

Parameters:

cursor – QTextCursor

Returns:

Tuple (text before new line, text after new line)

class hyperspyui.plugins.stylesheet.StyleDialog(plugin, ui, parent)

Bases: ExToolWindow

A dialog for editing Qt palette and stylesheet.

Edits and sets Qt’s application wide palette and stylesheet. See http://doc.qt.io/qt-4.8/stylesheet.html, and http://doc.qt.io/qt-4.8/qpalette.html for documentation of the effects of various settings, and the style sheet syntax.

_clear_styles()

Reset style inputs to default values

_on_cbo_change(selection)

Callback for when palette-mode selection changes

_on_color_pick(key, color)

Callback when a palette color has been picked

_setvis_palette_entry(key, show)

Show/hide specific palette entries

apply()

Apply current palette and stylesheet application wide

create_controls()

Build the editor’s controls

create_palette_colors()

Create the controls for editing the palette

load()

Load palette and stylesheet from the plugin’t settings

pairs = [('Window', 'WindowText'), ('Base', 'Text'), ('Button', 'ButtonText'), ('ToolTipBase', 'ToolTipText'), ('Highlight', 'HighlightedText'), ('Light', 'Midlight'), ('Mid', 'Dark'), ('Link', 'LinkVisited')]
palette_entries = {'basic': ('Window', 'WindowText'), 'extended': ('Base', 'Text', 'ToolTipBase', 'ToolTipText', 'Button', 'ButtonText'), 'full': ('Highlight', 'HighlightedText', 'BrightText', 'Light', 'Midlight', 'Mid', 'Dark', 'Shadow', 'Link', 'LinkVisited', 'NoRole')}
save()

Store the palette and stylesheet to the plugin’s settings

update_palette_controls()

Update palette controls from internal QPalette

class hyperspyui.plugins.stylesheet.StylePlugin(*args, **kwargs)

Bases: Plugin

apply_styles()
create_actions()
create_menu()
edit_dialog()
name = 'Style'
hyperspyui.plugins.stylesheet.tr(text)