tik_manager4.ui.dialog.feedback

Attributes

BUTTON_STYLE

FONT

app

confirmation

Classes

Confirmation

A user interaction class to prevent accidental actions.

Feedback

Functions

style_button(button[, height, width, label])

Applies consistent styling to a button.

Module Contents

class Confirmation(parent=None, confirmation_word=None)

Bases: tik_manager4.ui.Qt.QtWidgets.QDialog

A user interaction class to prevent accidental actions.

The user will be asked to confirm a word (such as the name of a project or task) before proceeding. This prevents accidental actions.

ask_confirmation(title='Question', text='Type the confirmation word to proceed')

Pop up the confirmation dialog and check the user input.

set_confirmation_word(word)

Set the confirmation word that the user must type correctly.

class Feedback(parent=None)
browse_directory(modal: bool = True) str | None

Browse for a directory. Deprecated: Consider moving to a utility function.

pop_error(*args, **kwargs) int

Shows an error dialog box.

pop_info(title: str = 'Info', text: str = '', details: str = '', critical: bool = False, button_label: str | None = None, modal: bool = True, on_close: callable | None = None) int

Shows an informational dialog box.

pop_question(title: str = 'Question', text: str = '', details: str = '', buttons: List[str] | None = None, modal: bool = True) str | None

Shows a question dialog box with configurable buttons.

style_button(button, height: int = 30, width: int = 100, label: str | None = None)

Applies consistent styling to a button.

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 = 'Roboto'
app
confirmation