tik_manager4.ui.widgets.common

Common usage basic widgets.

Attributes

BUTTON_STYLE

FONT

Classes

ClickableFrame

Clickable frame widget.

HeaderLabel

Label with bold font and indent.

HorizontalSeparator

Simple vertical separator.

ResolvedText

Label for resolved paths, names etc.

StyleEditor

Convenience class to edit the style of a widget.

StyleFrame

Frame with custom styler.

TikButton

Unified button class for the whole app.

TikButtonBox

Unified button box class for the whole app.

TikIconButton

Button specific for fixed sized icons.

TikLabel

Unified label class for the whole app.

TikLabelButton

Customize the button to be used next to the header.

TikMessageBox

VerticalSeparator

Simple horizontal separator.

Functions

lighten_color(color_str[, factor])

Lightens the given color.

Module Contents

class ClickableFrame(*args, **kwargs)

Bases: tik_manager4.ui.Qt.QtWidgets.QFrame

Clickable frame widget.

mousePressEvent(event)
clicked
class HeaderLabel(*args, **kwargs)

Bases: TikLabel

Label with bold font and indent.

set_font_size(font_size, bold=True)
style_sheet = Multiline-String
Show Value
"""
QLabel
{
    background-color: #404040;
    border-width: 1px;
    border-color: #1e1e1e;
    border-style: solid;
    padding: 5px;
    font-size: 12x;
    border-radius: 14px;
}
"""
class HorizontalSeparator(color=(100, 100, 100), height=1, width=None)

Bases: tik_manager4.ui.Qt.QtWidgets.QLabel

Simple vertical separator.

set_color(color)
class ResolvedText(*args, **kwargs)

Bases: TikLabel

Label for resolved paths, names etc.

set_font_size(font_size, bold=True)
class StyleEditor

Convenience class to edit the style of a widget.

static dictionary_to_stylesheet(styles)
static stylesheet_to_dictionary(stylesheet)
background_color = '#404040'
border_color = '#1e1e1e'
text_color = '#b1b1b1'
class StyleFrame(*args, **kwargs)

Bases: ClickableFrame, StyleEditor

Frame with custom styler.

class TikButton(text='', font_size=10, text_color='#b1b1b1', border_color='#1e1e1e', background_color='#404040', *args, **kwargs)

Bases: tik_manager4.ui.Qt.QtWidgets.QPushButton, StyleEditor

Unified button class for the whole app.

set_color(text_color=None, background_color=None, border_color=None)
set_font_size(font_size)
class TikButtonBox(*args, font_size=10, **kwargs)

Bases: tik_manager4.ui.Qt.QtWidgets.QDialogButtonBox

Unified button box class for the whole app.

event(event)
modifyButton(button)
set_font_size(font_size)
class TikIconButton(icon_name=None, circle=True, size=22, icon_size=None, **kwargs)

Bases: TikButton

Button specific for fixed sized icons.

set_icon(icon_name)
set_size(size)
static square_to_circle_multiplier(side_length)
class TikLabel(*args, text='', font_size=10, bold=False, color=(255, 255, 255), **kwargs)

Bases: tik_manager4.ui.Qt.QtWidgets.QLabel, StyleEditor

Unified label class for the whole app.

set_color(text_color=None, background_color=None, border_color=None)
set_font_size(font_size, bold=False)
set_text(text)
class TikLabelButton(*args, color=(255, 255, 255), **kwargs)

Bases: TikButton

Customize the button to be used next to the header.

set_state_text(checked)
style_sheet = Multiline-String
Show Value
"""
    QPushButton
    {{
        color: {0};
        background-color: #404040;
        border-width: 1px;
        border-color: {0};
        border-style: solid;
        padding: 5px;
        font-size: 12x;
        border-radius: 0px;
    }}"""
class TikMessageBox(*args, font_size=10, **kwargs)

Bases: tik_manager4.ui.Qt.QtWidgets.QMessageBox

set_font_size(font_size)
class VerticalSeparator(color=(100, 100, 100), height=25, width=20)

Bases: tik_manager4.ui.Qt.QtWidgets.QLabel

Simple horizontal separator.

set_color(color)
lighten_color(color_str, factor=110)

Lightens the given color.

Args:

color_str (str): The color to lighten as a hex string. factor (int): The percentage to lighten (100 = no change, >100 = lighter, <100 = darker).

Returns:

str: A lighter color as a hex string.

BUTTON_STYLE = Multiline-String
Show Value
"""
QPushButton
{
    color: #b1b1b1;
    background-color: #404040;
    border-width: 1px;
    border-color: #1e1e1e;
    border-style: solid;
    padding: 5px;
    font-size: 12x;
    border-radius: 4px;
}

QPushButton:hover
{
    background-color: #505050;
    border: 1px solid #ff8d1c;
}

QPushButton:hover[circle=true]
{
    background-color: #505050;
    border: 2px solid #ff8d1c;
}

QPushButton:disabled {
    color: #505050;
    background-color: #303030;
    border: 1px solid #404040;
    border-width: 1px;
    border-color: #1e1e1e;
    border-style: solid;
    padding: 5px;
    font-size: 12x;
}

QPushButton:pressed {
  background-color: #ff8d1c;
  border: 1px solid #ff8d1c;
}
"""
FONT = 'Arial'