tik_manager4.ui.widgets.common
Common usage basic widgets.
Attributes
Classes
Clickable frame widget. |
|
Label with bold font and indent. |
|
Simple horizontal separator. |
|
Label for resolved paths, names etc. |
|
Frame with custom styling support. |
|
Unified button class for the whole app. |
|
Unified button box class for the whole app. |
|
Button specific for fixed sized icons. |
|
Unified label class for the whole app. |
|
Customize the button to be used next to the header. |
|
Message box with custom font. |
|
Simple vertical separator. |
Functions
|
Lightens the given color. |
Module Contents
- class ClickableFrame(*args, **kwargs)
Bases:
tik_manager4.ui.Qt.QtWidgets.QFrameClickable frame widget.
- mousePressEvent(event)
- clicked
- class HeaderLabel(*args, **kwargs)
Bases:
TikLabelLabel 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.QLabelSimple horizontal separator.
- set_color(color)
- class ResolvedText(*args, **kwargs)
Bases:
TikLabelLabel for resolved paths, names etc.
- set_font_size(font_size, bold=True)
- class StyleFrame(*args, **kwargs)
Bases:
ClickableFrameFrame with custom styling support.
- set_style(stylesheet)
Set the stylesheet for this frame.
- class TikButton(text='', font_size=10, text_color=None, border_color=None, background_color=None, parent=None, **kwargs)
Bases:
tik_manager4.ui.Qt.QtWidgets.QPushButtonUnified button class for the whole app.
- set_color(text_color=None, background_color=None, border_color=None)
Set the button colors.
- Args:
text_color: Color for text (hex string or RGB tuple/list) background_color: Color for background (hex string or RGB tuple/list) border_color: Color for border (hex string or RGB tuple/list)
- set_font_size(font_size)
- DEFAULT_BACKGROUND_COLOR = '#404040'
- DEFAULT_BORDER_COLOR = '#1e1e1e'
- DEFAULT_TEXT_COLOR = '#b1b1b1'
- class TikButtonBox(*args, font_size=10, **kwargs)
Bases:
tik_manager4.ui.Qt.QtWidgets.QDialogButtonBoxUnified 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, *args, **kwargs)
Bases:
TikButtonButton specific for fixed sized icons.
- set_icon(icon_name)
- set_size(size)
- static square_to_circle_multiplier(side_length)
- class TikLabel(text='', font_size=10, bold=False, color=(255, 255, 255), parent=None, **kwargs)
Bases:
tik_manager4.ui.Qt.QtWidgets.QLabelUnified label class for the whole app.
- set_color(text_color=None, background_color=None, border_color=None)
Set the label colors.
- Args:
text_color: Color for text (hex string or RGB tuple/list) background_color: Unused, kept for API compatibility border_color: Color for border (hex string or RGB tuple/list)
- set_font_size(font_size, bold=False)
- set_text(text)
- DEFAULT_BORDER_COLOR = '#1e1e1e'
- DEFAULT_TEXT_COLOR = '#b1b1b1'
- class TikLabelButton(*args, color=(255, 255, 255), **kwargs)
Bases:
TikButtonCustomize 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.QMessageBoxMessage box with custom font.
- set_font_size(font_size)
- class VerticalSeparator(color=(100, 100, 100), height=25, width=20)
Bases:
tik_manager4.ui.Qt.QtWidgets.QLabelSimple vertical 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'