Reference¶
ONCatLogin¶
ONCatLogin widget for connecting to the ONCat service. This widget provides a label and a button to call the login dialog.
Params¶
- client_idstr, optional
The client_id is an ONCat client ID. Defaults to None. client_id is required or key is required
- keystr, optional
The key used to retrieve ONCat client ID from configuration. Defaults to None.
- parentQWidget, optional
The parent widget.
- kwargsDict[str, Any], optional
Additional keyword arguments.
- pyoncatqt.login.ONCatLogin.connection_updated¶
Signal emitted when the connection status is updated.
- Type:
Signal
- pyoncatqt.login.ONCatLogin.update_connection_status() None:¶
Update the connection status.
- pyoncatqt.login.ONCatLogin.is_connected() bool:¶
Check if connected to OnCat.
- pyoncatqt.login.ONCatLogin.get_agent_instance() pyoncat.ONCat:¶
Get the OnCat agent instance.
- pyoncatqt.login.ONCatLogin.connect_to_oncat() None:¶
Connect to OnCat.
- pyoncatqt.login.ONCatLogin.read_token() dict:¶
Read token from file.
- pyoncatqt.login.ONCatLogin.write_token(token: dict) None:¶
Write token to file.
ONCatLoginDialog¶
OnCat login dialog for handling authentication.
Params¶
- agentpyoncat.ONCat, required
An instance of pyoncat.ONCat for handling authentication.
- parentQWidget, optional
The parent widget.
- username_labelstr, optional
The label text for the username field. Defaults to “UserId”.
- password_labelstr, optional
The label text for the password field. Defaults to “Password”.
- login_titlestr, optional
The title of the login dialog window. Defaults to “Use U/XCAM to connect to OnCat”.
- password_echoQLineEdit.EchoMode, optional
The echo mode for the password field. Defaults to QLineEdit.Password.
- pyoncatqt.login.ONCatLoginDialog.login_status¶
Signal emitted when the login status changes.
- Type:
Signal
- pyoncatqt.login.ONCatLoginDialog.show_message(msg: str) None:¶
Show an error dialog with the given message.
- pyoncatqt.login.ONCatLoginDialog.accept() None:¶
Accept the login attempt.