NDEVR
API Documentation
StatusBar

A simple widget that shows a Status and optionally a progressbar. More...

Inheritance diagram for StatusBar:
[legend]
Collaboration diagram for StatusBar:
[legend]

Public Member Functions

 StatusBar (QTModelManager *manager, QWidget *parent=nullptr)
 Constructs a StatusBar managed by a QTModelManager.
 StatusBar (QWidget *parent=nullptr)
 Constructs a standalone StatusBar widget.
void addMessage (uint04 id, const LogMessage &message) final override
 Adds a log message to the status bar display.
void allowCancel (bool) final override
 No-op implementation; cancellation is not supported by the status bar.
void hideLogMessage ()
 Slot that hides the currently displayed log message.
QSize minimumSizeHint () const override
 Returns the minimum size hint for the status bar.
bool ownsWidgets () const
 Checks whether this status bar owns its child widgets.
ProgressWidgetprogressBar ()
 Returns the progress bar widget, creating it if necessary.
Buffer< QPointer< QWidget > > remoteWidgets ()
 Returns a buffer of widgets that can be displayed remotely.
void requestRemoteWidgetSignal (bool use_remote)
 Signal emitted to request toggling between local and remote widget display.
void requestUpdateLog ()
 Signal emitted to request a UI update for the log display.
void setProgress (uint04 idx, fltp04 progress) final override
 Updates the progress bar to reflect the current progress value.
void setVertical (bool)
 Placeholder for setting vertical orientation.
void setVisible (bool visible) override
 Shows or hides the status bar widget.
QSize sizeHint () const override
 Returns the preferred size hint for the status bar.
void updateUI ()
 Slot that triggers a UI refresh.
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 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.

Additional Inherited Members

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, ProgressSourcem_progress_sources
 Maps progress source indices to their ProgressSource data.

Detailed Description

A simple widget that shows a Status and optionally a progressbar.


Definition at line 48 of file StatusBar.h.

Constructor & Destructor Documentation

◆ StatusBar() [1/2]

StatusBar::StatusBar ( QWidget * parent = nullptr)

Constructs a standalone StatusBar widget.

Parameters
[in]parentThe parent widget.

Referenced by StatusBar().

◆ StatusBar() [2/2]

StatusBar::StatusBar ( QTModelManager * manager,
QWidget * parent = nullptr )

Constructs a StatusBar managed by a QTModelManager.

Parameters
[in]managerThe model manager that provides context for this status bar.
[in]parentThe parent widget.

References StatusBar().

Member Function Documentation

◆ addMessage()

void StatusBar::addMessage ( uint04 id,
const LogMessage & message )
finaloverridevirtual

Adds a log message to the status bar display.

Parameters
[in]idThe message identifier.
[in]messageThe log message to display.

Implements LogStream.

◆ minimumSizeHint()

QSize StatusBar::minimumSizeHint ( ) const
override

Returns the minimum size hint for the status bar.

Returns
The minimum recommended size.

◆ ownsWidgets()

bool StatusBar::ownsWidgets ( ) const
inline

Checks whether this status bar owns its child widgets.

Returns
True if the status bar owns and manages its widgets.

Definition at line 78 of file StatusBar.h.

◆ progressBar()

ProgressWidget * StatusBar::progressBar ( )

Returns the progress bar widget, creating it if necessary.

Returns
A pointer to the ProgressWidget.

◆ remoteWidgets()

Buffer< QPointer< QWidget > > StatusBar::remoteWidgets ( )

Returns a buffer of widgets that can be displayed remotely.

Returns
A buffer of pointers to remote-capable widgets.

◆ requestRemoteWidgetSignal()

void StatusBar::requestRemoteWidgetSignal ( bool use_remote)

Signal emitted to request toggling between local and remote widget display.

Parameters
[in]use_remoteWhether to use remote widgets.

◆ setProgress()

void StatusBar::setProgress ( uint04 idx,
fltp04 progress )
finaloverridevirtual

Updates the progress bar to reflect the current progress value.

Parameters
[in]idxThe progress stream index.
[in]progressThe progress value in the range [0, 1].

Implements LogStream.

◆ setVertical()

void StatusBar::setVertical ( bool )
inline

Placeholder for setting vertical orientation.

Currently unimplemented.

Definition at line 88 of file StatusBar.h.

◆ setVisible()

void StatusBar::setVisible ( bool visible)
override

Shows or hides the status bar widget.

Parameters
[in]visibleWhether the status bar should be visible.

◆ sizeHint()

QSize StatusBar::sizeHint ( ) const
override

Returns the preferred size hint for the status bar.

Returns
The recommended size.

The documentation for this class was generated from the following file: