Skip to content

theme_creator

Mihaly Konda edited this page Jul 9, 2025 · 2 revisions

theme_creator

version: v1.0.4

A module for a theme creator dialog.


class _ColourSetter(QWidget)

A widget for colour selection or manual colour setting.


def __init__(self) -> None

Initializer for the class.


def _setup_ui(self) -> None

Sets up the user interface: GUI objects and layouts.


def _setup_connections(self) -> None

Sets up the connections of the GUI objects.


@property
def colour(self) -> QColor

Returns the stored colour.


@colour.setter
def colour(self, new_colour: QColor) -> None

Updates the stored colour and its associated widgets.

Parameters:

  • new_colour: The new colour to set.

def set_enabled(self, new_state: bool) -> None

Sets the enabled state of the controls.

Parameters:

  • new_state: The new enabled state to set.

def _slot_update_selector(self) -> None

Updates which selector is shown based on the control checkbox.


def _set_colour_label(self) -> None

Sets the pixmap of the colour's display label.


def _slot_colour_selector(self) -> None

Shows a colour selector dialog.


def catch_signal(button_id, colour) -> None

Catches the signal carrying the newly set colour. (Nested function inside _slot_colour_selector().)

Parameters:

  • button_id: The caller button's ID, unused here.
  • colour: The colour to set.

def _update_spinboxes(self) -> None

Updates the values of spinboxes by the stored colour.


def _update_colour(self) -> None

Updates the stored colour and its display label according to the sender.


class _ThemePreview(QWidget)

A widget for previewing a theme.


def __init__(self) -> None

Initializer for the class.


def _setup_ui(self) -> None

Sets up the user interface: GUI objects and layouts.


class ThemeCreator(QDialog)

A dialog for creating a custom widget theme / editing existing ones.


def __init__(self) -> None

Initializer for the class.


def _setup_ui(self) -> None

Sets up the user interface: GUI objects and layouts.


def _setup_connections(self) -> None

Sets up the connections of the GUI objects.


def _slot_use_existing_theme(self) -> None

Updates the controls' enabled state based on the state of the checkbox.


def _slot_update_by_combobox(self, index: int) -> None

Updates the preview based on the selection made in the combobox.

Parameters:

  • index: The index of the item selected in the combobox.

def _slot_update_by_custom_colours(self) -> None

Updates the preview based on the set custom colours.


def _slot_export_theme(self) -> None

Exports the currently set custom theme and updates the dialog accordingly.


def _slot_delete_theme(self) -> None

Deletes the currently viewed theme's JSON file and updates the dialog accordingly.

API reference

Base/technical modules:

Other modules

Clone this wiki locally