A ConnectionDialog that allows the user to modify a WebSocketConnection.
More...
|
| | WebSocketConnectionDialog (QWidget *parent=nullptr) |
| | Constructs a WebSocketConnectionDialog with an optional parent widget.
|
|
| ~WebSocketConnectionDialog () |
| | Destroys the dialog and frees the UI resources.
|
| bool | checkIfValid () const |
| | Validates the current dialog field values.
|
|
virtual void | clear () override |
| | Resets all dialog fields to their default empty state.
|
|
void | clearFixedProtocol () |
| | Removes the fixed protocol constraint, allowing the user to choose freely.
|
| virtual ConnectionInfo | connectionInfo () const override |
| | Builds and returns a ConnectionInfo populated from the current dialog field values.
|
| virtual bool | handlesConnection (const ConnectionInfo &connection) override |
| | Checks whether this dialog can edit the given connection type.
|
| String | protocol () const |
| | Returns the currently selected or fixed protocol string.
|
| void | setAllowLocalButton (bool allow_local) |
| | Enables or disables the local/localhost shortcut button.
|
| void | setAllowPingLogic (bool allow_ping) |
| | Enables or disables the ping-test logic and associated UI controls.
|
| virtual void | setConnectionInfo (const ConnectionInfo &connection) override |
| | Populates the dialog fields from the given connection information.
|
| void | setFixedProtocol (const String &mode) |
| | Locks the protocol selector to a fixed value, preventing user changes.
|
| | ConnectionDialog (QWidget *parent=nullptr) |
| | Constructs a ConnectionDialog.
|
|
void | acceptedSignal () |
| | Emitted when the user accepts the connection configuration.
|
|
void | cancelSignal () |
| | Emitted when the user cancels the dialog.
|
| virtual Connection * | createConnection (const Model &model) const |
| | Creates a Connection object from the current dialog settings and associates it with a model.
|
|
|
void | refreshPingVisible () |
| | Updates the visibility of ping-related controls based on current settings.
|
|
void | updateFromDialog () |
| | Slot that synchronizes internal state when dialog fields are modified by the user.
|
|
|
bool | m_allow_local_button = true |
| | Whether the localhost shortcut button is visible.
|
|
bool | m_allow_ping_logic = true |
| | Whether ping-test controls are visible and active.
|
|
String | m_fixed_protocol |
| | When non-empty, locks the protocol to this value.
|
|
Ui::WebNetworkConnectionUI * | ui |
| | The auto-generated UI form for WebSocket connection settings.
|
A ConnectionDialog that allows the user to modify a WebSocketConnection.
Definition at line 57 of file WebSocketConnectionDialog.h.
◆ WebSocketConnectionDialog()
| WebSocketConnectionDialog::WebSocketConnectionDialog |
( |
QWidget * | parent = nullptr | ) |
|
|
explicit |
Constructs a WebSocketConnectionDialog with an optional parent widget.
- Parameters
-
| [in] | parent | The parent widget, or nullptr for a top-level dialog. |
◆ checkIfValid()
| bool WebSocketConnectionDialog::checkIfValid |
( |
| ) |
const |
Validates the current dialog field values.
- Returns
- True if the dialog contains a valid, complete connection configuration.
◆ connectionInfo()
| virtual ConnectionInfo WebSocketConnectionDialog::connectionInfo |
( |
| ) |
const |
|
overridevirtual |
◆ handlesConnection()
| virtual bool WebSocketConnectionDialog::handlesConnection |
( |
const ConnectionInfo & | connection | ) |
|
|
overridevirtual |
Checks whether this dialog can edit the given connection type.
- Parameters
-
| [in] | connection | The connection information to test. |
- Returns
- True if this dialog handles the specified connection.
Implements ConnectionDialog.
◆ protocol()
| String WebSocketConnectionDialog::protocol |
( |
| ) |
const |
Returns the currently selected or fixed protocol string.
- Returns
- The protocol identifier (e.g., "ws" or "wss").
◆ setAllowLocalButton()
| void WebSocketConnectionDialog::setAllowLocalButton |
( |
bool | allow_local | ) |
|
Enables or disables the local/localhost shortcut button.
- Parameters
-
| [in] | allow_local | True to show the local button, false to hide it. |
◆ setAllowPingLogic()
| void WebSocketConnectionDialog::setAllowPingLogic |
( |
bool | allow_ping | ) |
|
Enables or disables the ping-test logic and associated UI controls.
- Parameters
-
| [in] | allow_ping | True to enable ping controls, false to hide them. |
◆ setConnectionInfo()
| virtual void WebSocketConnectionDialog::setConnectionInfo |
( |
const ConnectionInfo & | connection | ) |
|
|
overridevirtual |
Populates the dialog fields from the given connection information.
- Parameters
-
| [in] | connection | The connection parameters to display. |
Implements ConnectionDialog.
◆ setFixedProtocol()
| void WebSocketConnectionDialog::setFixedProtocol |
( |
const String & | mode | ) |
|
Locks the protocol selector to a fixed value, preventing user changes.
- Parameters
-
| [in] | mode | The protocol string to fix (e.g., "ws" or "wss"). |
The documentation for this class was generated from the following file: