Инструменты пользователя

Инструменты сайта


products:pyrog:api:lastest:types:widgets:file_path_input

Текст документации сгенерирован автоматически из исходного кода.
Если обнаружили ошибку, отправьте об этом сообщение на 📧почту.

FilePathInput

Inherits: LineEditWithButtons

Widget for input of file or directory path

Attributes:

  • path_changed: Signal — Sends string with new path if the user selected other path by dialog window, use textChanged signal to track manual text editing

Constructor:

def FilePathInput.__init__(parent = None, mode: Modes = Modes.FileOpen)

Creates new instance of FilePathInput

Parameters:

  • parent — parent widget
  • mode: Modes — path input mode

Methods

set_mode

def set_mode(mode: Modes) -> None

Sets mode of input: file selection, directory selections, file_saving

Removes all paths if mode is changed

Parameters:

  • mode: Modes — mode of selection
    • FileOpen — mode of file opening
    • Directory — mode of selecting existing directory
    • FileSave — mode of file saving

Returns:

  • None — (without description)

mode

def mode() -> Modes

Returns mode of input

Returns:

  • Modes — mode of path input

set_window_title

def set_window_title(title: str | LangConstant) -> None

Sets title of file select dialog window

Parameters:

  • title: str | LangConstant — title of path selecting dialog window

Returns:

  • None — (without description)

window_title

def window_title() -> str | LangConstant

Returns title of file select dialog window

Returns:

  • str | LangConstant — title of path selecting dialog window

path

def path() -> str

Returns path to a file|directory

Returns:

  • str — path to a file|directory

set_path

def set_path(path: str) -> None

Sets path to a file|directory

Parameters:

  • path: str — path to a file|directory

Returns:

  • None — (without description)

set_file_filter

def set_file_filter(filter: str | LangConstant = tr.ALL_FILES_FILTER) -> None

Sets file extensions filter

Parameters:

Returns:

  • None — (without description)

file_filter

def file_filter() -> str | LangConstant

Returns file extensions filter

Returns:

set_delete_button_visibility

def set_delete_button_visibility(state: bool) -> None

Sets state of visibility of delete button

Parameters:

  • state: bool — state of visibility of delete button

Returns:

  • None — (without description)

delete_button_visibility

def delete_button_visibility() -> bool

Returns state of visibility of delete button

Returns:

  • bool — state of visibility of delete button

invoke_path_selecting

def invoke_path_selecting() -> None

Initiates procedure of path selecting

Returns:

  • None — (without description)

select_path

def select_path() -> str

Initiates procedure of path selecting and returns path

Returns:

  • str — file/directory path

Subclasses

Modes

Parent class: FilePathInput

Inherits: enum.IntEnum

This Enum class provides path input modes

Attributes:

  • FileOpen — file selecting mode
  • Directory — folder selecting mode
  • FileSave — file saving mode
products/pyrog/api/lastest/types/widgets/file_path_input.txt · Последнее изменение: 127.0.0.1