![]() |
NDEVR
API Documentation
|
A dial and information text that shows the current status of a connection. More...
Public Member Functions | |
| ConnectionStatusWidget (QWidget *parent=nullptr) | |
| Constructs a ConnectionStatusWidget. | |
| void | cancelConnection () |
| Initiates cancellation of the current connection attempt. | |
| void | clearConnectionStatus () |
| Clears all connection status information from the display. | |
| void | endCancelConnection () |
| Completes the connection cancellation and updates the display. | |
| ProgressWidget * | progressWidget () const |
| Returns the progress widget used by this status display. | |
| void | setActAsLog (bool act_like_log) |
| Sets whether the widget should display as a log view. | |
| void | setColor (RGBColor color) |
| Sets the color of the progress dial. | |
| void | setConnectionState (ConnectionState state) |
| Manually sets the displayed connection state. | |
| void | setCustomTitle (const TranslatedString &custom_title) |
| Sets a custom title to display instead of the default connection name. | |
| void | setHorizontal (bool horizontal) |
| Sets whether the widget uses a horizontal or vertical layout. | |
| virtual void | setProgress (uint04 idx, fltp04 progress) override |
| Updates the progress indicator at the given index. | |
| void | setSensor (Connection *sensor) |
| Sets the connection whose status will be displayed. | |
| Public Member Functions inherited from LogStream | |
| virtual | ~LogStream () |
| Destructor. | |
| virtual void | addMessages (uint04 id, const Buffer< LogMessage > &messages) |
| Adds multiple log messages to this stream at once. | |
| virtual void | addProgressSource (const TranslatedString &name, uint04 idx, fltp04 progress) |
| Registers a new progress source to be tracked by this stream. | |
| virtual void | allowCancel (bool) |
| Sets whether this stream allows the user to cancel an in-progress operation. | |
| virtual void | allowInput (bool) |
| Sets whether this stream allows user input during an operation. | |
| virtual void | attach (InfoPipe *stream) |
| Attaches this LogStream to the given InfoPipe so it receives log updates. | |
| void | clearLinks () |
| Detaches this LogStream from all linked InfoPipe objects and clears the link list. | |
| virtual void | detach (InfoPipe *stream) |
| Detaches this LogStream from the given InfoPipe, stopping further updates from it. | |
| bool | ignoringMessages () const |
| Returns whether this stream is currently ignoring messages. | |
| virtual void | removeProgressSource (uint04 idx) |
| Removes a previously registered progress source from this stream. | |
| void | setIgnoreMessages (bool ignore) |
| Sets whether this stream should ignore incoming messages. | |
Protected Member Functions | |
| virtual void | addMessage (uint04 id, const LogMessage &message) override |
| Adds a log message to the status display. | |
| void | connectionStateUpdatedSlot (ConnectionState state) |
| Slot called when the monitored connection's state changes. | |
| void | deletedSlot () |
| Slot called when the monitored connection is deleted. | |
| void | init () |
| Initializes the widget layout and child widgets. | |
| void | updateTitle () |
| Updates the title label based on the connection name or custom title. | |
Protected Attributes | |
| bool | m_act_like_log = false |
| Whether to display as a log view. | |
| ConnectionState | m_connection_state = ConnectionState::e_no_connection |
| The current connection state. | |
| TranslatedString | m_custom_title |
| Custom title overriding the default connection name. | |
| bool | m_has_connection_object = false |
| Whether a connection object has been assigned. | |
| bool | m_is_horizontal |
| Whether the widget uses horizontal layout. | |
| Log * | m_log |
| Log widget for displaying connection messages. | |
| bool | m_owns_log = false |
| Whether this widget owns the log object. | |
| fltp04 | m_pending_progress = Constant<fltp04>::Invalid |
| Pending progress value awaiting display. | |
| ProgressWidget * | m_progress_widget |
| Dial widget showing connection progress. | |
| QPointer< Connection > | m_sensor |
| The connection being monitored. | |
| QCustomLabel * | m_status_label |
| Label displaying the current status text. | |
| QCustomLabel * | m_title_label |
| Label displaying the connection title. | |
| Protected Attributes inherited from LogStream | |
| bool | m_ignore_message = false |
| Whether this stream should ignore incoming messages. | |
| Buffer< InfoPipe * > | m_linked_logs |
| Collection of InfoPipe objects this stream is listening to. | |
| Dictionary< uint04, ProgressSource > | m_progress_sources |
| Maps progress source indices to their ProgressSource data. | |
A dial and information text that shows the current status of a connection.
Typically shown when a connection is being attempted to keep the user informed on the status of the connection attempt.
Definition at line 49 of file ConnectionStatusWidget.h.
|
explicit |
Constructs a ConnectionStatusWidget.
| [in] | parent | The parent widget. |
|
overrideprotectedvirtual |
Adds a log message to the status display.
| [in] | id | The message identifier. |
| [in] | message | The log message to add. |
Implements LogStream.
|
protected |
Slot called when the monitored connection's state changes.
| [in] | state | The new connection state. |
|
inline |
Returns the progress widget used by this status display.
Definition at line 104 of file ConnectionStatusWidget.h.
References m_progress_widget.
| void ConnectionStatusWidget::setActAsLog | ( | bool | act_like_log | ) |
Sets whether the widget should display as a log view.
| [in] | act_like_log | Whether to act as a log display. |
| void ConnectionStatusWidget::setColor | ( | RGBColor | color | ) |
Sets the color of the progress dial.
| [in] | color | The color to use. |
| void ConnectionStatusWidget::setConnectionState | ( | ConnectionState | state | ) |
Manually sets the displayed connection state.
| [in] | state | The connection state to display. |
| void ConnectionStatusWidget::setCustomTitle | ( | const TranslatedString & | custom_title | ) |
Sets a custom title to display instead of the default connection name.
| [in] | custom_title | The custom title text. |
| void ConnectionStatusWidget::setHorizontal | ( | bool | horizontal | ) |
Sets whether the widget uses a horizontal or vertical layout.
| [in] | horizontal | Whether to use horizontal layout. |
Updates the progress indicator at the given index.
| [in] | idx | The progress index. |
| [in] | progress | The progress value between 0 and 1. |
Implements LogStream.
| void ConnectionStatusWidget::setSensor | ( | Connection * | sensor | ) |
Sets the connection whose status will be displayed.
| [in] | sensor | The connection to monitor. |