tik_manager4.ui.dialog.feedback =============================== .. py:module:: tik_manager4.ui.dialog.feedback Attributes ---------- .. autoapisummary:: tik_manager4.ui.dialog.feedback.BUTTON_STYLE tik_manager4.ui.dialog.feedback.FONT tik_manager4.ui.dialog.feedback.app tik_manager4.ui.dialog.feedback.confirmation Classes ------- .. autoapisummary:: tik_manager4.ui.dialog.feedback.Confirmation tik_manager4.ui.dialog.feedback.Feedback Functions --------- .. autoapisummary:: tik_manager4.ui.dialog.feedback.style_button Module Contents --------------- .. py:class:: Confirmation(parent=None, confirmation_word=None) Bases: :py:obj:`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. .. py:method:: ask_confirmation(title='Question', text='Type the confirmation word to proceed') Pop up the confirmation dialog and check the user input. .. py:method:: set_confirmation_word(word) Set the confirmation word that the user must type correctly. .. py:class:: Feedback(parent=None) .. py:method:: browse_directory(modal: bool = True) -> Optional[str] Browse for a directory. Deprecated: Consider moving to a utility function. .. py:method:: pop_error(*args, **kwargs) -> int Shows an error dialog box. .. py:method:: pop_info(title: str = 'Info', text: str = '', details: str = '', critical: bool = False, button_label: Optional[str] = None, modal: bool = True, on_close: Optional[callable] = None) -> int Shows an informational dialog box. .. py:method:: pop_question(title: str = 'Question', text: str = '', details: str = '', buttons: Optional[List[str]] = None, modal: bool = True) -> Optional[str] Shows a question dialog box with configurable buttons. .. py:function:: style_button(button, height: int = 30, width: int = 100, label: Optional[str] = None) Applies consistent styling to a button. .. py:data:: BUTTON_STYLE :value: Multiline-String .. raw:: html
Show Value .. code-block:: python """ 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; } """ .. raw:: html
.. py:data:: FONT :value: 'Roboto' .. py:data:: app .. py:data:: confirmation