Web Analytics Made Easy - Statcounter
Skip to content

Class SBGWindowWidget#

ClassList > SBGWindowWidget

This class describes a widget. More...

  • #include <SBGWindowWidget.hpp>

Inherits the following classes: QWidget

Inherited by the following classes: SBGApp, SBGAssistant, SBGDataGraphNodeFactory, SBGDataGraphNodeProperties, SBGEditor

Public Slots#

Type Name
slot void stopHighlighting
Handles the stop highlighting.

Public Signals#

Type Name
signal void shown (bool)
Emitted when the widget is shown or hidden.

Public Functions#

Type Name
virtual QString getCitation () const
Returns the citation information.
SBGWindowDock * getDockWindow () const
Returns the pointer to the embedding dock window, if any.
virtual int getFormat () const
Returns the format.
bool getHighlightingFlag () const
Returns the highlighting flag.
bool getLockedFlag () const
Returns whether the widget is locked (on top)
virtual QPixmap getLogo () const
Returns the pixmap logo.
virtual QString getName () const
Returns the widget name (used as a title for the embedding window)
SBUUID getPreferencesUUID () const
Returns the UUID of preferences (static attributes), if present.
virtual SBUUID getUUID () const
Returns the widget UUID.
SBGWindow * getWindow () const
Returns the pointer to the embedding window, if any.
void highlight (const SBQuantity::second & duration=SBQuantity::second(1.0))
Highlights the widget for a moment.
void loadDefaultSettings ()
Loads default settings.
virtual void loadSettings (SBGSettings * settings)
Loads settings .
void saveDefaultSettings ()
Saves default settings.
virtual void saveSettings (SBGSettings * settings)
Saves settings .
void setHighlightingFlag (bool highlightingFlag)
Sets the highlighting flag.
void setLockedFlag (bool lockedFlag)
Sets whether the widget is locked (on top)
void setPreferencesUUID (const SBUUID & preferencesUUID)
Sets the UUID of preferences (static attributes), if present.
virtual ~SBGWindowWidget ()
Destructor.

Protected Attributes#

Type Name
SBGWindowWidgetData * dataPointer
A pointer to the private data.

Protected Functions#

Type Name
SBGWindowWidget ()
Protected constructor.
SBGWindowWidget (SBGWindowWidgetData * dataPointer)
Protected constructor.
void changeEvent (QEvent * event)
Handles events.
void hideEvent (QHideEvent * event)
Handles hide event.
void showEvent (QShowEvent * event)
Handles show event.

Detailed Description#

This class describes a widget that can be embedded into a window, to display it in SAMSON's GUI and ensure that it has the appropriate SAMSON style.

SBGWindowWidget derives from QWidget. Many SAMSON GUI classes derive from SBGWindowWidget, and SAMSON Extensions implement GUIs by deriving directly or indirectly from it. For example, SAMSON Extensions implements GUIs of apps by deriving from the SBGApp class, which derives from SBGWindowWidget.

Public Slots Documentation#

slot stopHighlighting#

Handles the stop highlighting.

void SBGWindowWidget::stopHighlighting;

Stops the widget's highlighting.


Public Signals Documentation#

signal shown#

Emitted when the widget is shown or hidden.

void SBGWindowWidget::shown;


Public Functions Documentation#

function getCitation#

Returns the citation information.

virtual QString SBGWindowWidget::getCitation () const

Returns the citation information for this widget.

Returns:

The widget's citation string.


function getDockWindow#

Returns the pointer to the embedding dock window, if any.

SBGWindowDock * SBGWindowWidget::getDockWindow () const

Returns a pointer to the embedding SBGWindowDock, if any.

Returns:

Pointer to the embedding dock window, or nullptr if not embedded.


function getFormat#

Returns the format.

virtual int SBGWindowWidget::getFormat () const

Returns the format identifier of this widget.

Returns:

The widget's format identifier.


function getHighlightingFlag#

Returns the highlighting flag.

bool SBGWindowWidget::getHighlightingFlag () const

Returns whether the widget is currently highlighted.

Returns:

true if highlighting is active; otherwise false.


function getLockedFlag#

Returns whether the widget is locked (on top)

bool SBGWindowWidget::getLockedFlag () const

Returns whether the widget is locked (on top).

Returns:

true if the widget is locked; otherwise false.


Returns the pixmap logo.

virtual QPixmap SBGWindowWidget::getLogo () const

Returns the logo pixmap of this widget.

Returns:

The widget's logo pixmap.


function getName#

Returns the widget name (used as a title for the embedding window)

virtual QString SBGWindowWidget::getName () const

Returns the name of this widget.

Returns:

The widget's name.


function getPreferencesUUID#

Returns the UUID of preferences (static attributes), if present.

SBUUID SBGWindowWidget::getPreferencesUUID () const

Returns the UUID of the preferences associated with this widget.

Returns:

The preferences UUID.


function getUUID#

Returns the widget UUID.

virtual SBUUID SBGWindowWidget::getUUID () const

Returns the UUID of this widget.

Returns:

The widget's UUID.


function getWindow#

Returns the pointer to the embedding window, if any.

SBGWindow * SBGWindowWidget::getWindow () const

Returns a pointer to the embedding SBGWindow, if any.

Returns:

Pointer to the embedding window, or nullptr if not embedded.


function highlight#

Highlights the widget for a moment.

void SBGWindowWidget::highlight (
    const SBQuantity::second & duration=SBQuantity::second (1.0)
) 

Highlights the widget for a specified duration.

Parameters:

  • duration The duration of the highlight, default is 1 second.

function loadDefaultSettings#

Loads default settings.

void SBGWindowWidget::loadDefaultSettings () 

Loads the default settings for the widget.


function loadSettings#

Loads settings .

virtual void SBGWindowWidget::loadSettings (
    SBGSettings * settings
) 

Loads the widget's settings from the given settings object.

Parameters:

  • settings Pointer to the SBGSettings containing the settings to load.

function saveDefaultSettings#

Saves default settings.

void SBGWindowWidget::saveDefaultSettings () 

Saves the current widget settings as the default settings.


function saveSettings#

Saves settings .

virtual void SBGWindowWidget::saveSettings (
    SBGSettings * settings
) 

Saves the widget's settings to the given settings object.

Parameters:

  • settings Pointer to the SBGSettings where the settings will be saved.

function setHighlightingFlag#

Sets the highlighting flag.

void SBGWindowWidget::setHighlightingFlag (
    bool highlightingFlag
) 

Sets the highlighting state of the widget.

Parameters:

  • highlightingFlag True to enable highlighting; false to disable.

function setLockedFlag#

Sets whether the widget is locked (on top)

void SBGWindowWidget::setLockedFlag (
    bool lockedFlag
) 

Sets the locked flag for the widget, indicating whether it should stay on top.

Parameters:

  • lockedFlag True to lock the widget; false to unlock.

function setPreferencesUUID#

Sets the UUID of preferences (static attributes), if present.

void SBGWindowWidget::setPreferencesUUID (
    const SBUUID & preferencesUUID
) 

Sets the UUID of the preferences associated with this widget.

Parameters:

  • preferencesUUID The UUID to set for the widget's preferences.

function ~SBGWindowWidget#

Destructor.

virtual SBGWindowWidget::~SBGWindowWidget () 

Destroys the SBGWindowWidget and cleans up its references.


Protected Attributes Documentation#

variable dataPointer#

A pointer to the private data.

SBGWindowWidgetData* SBGWindowWidget::dataPointer;


Protected Functions Documentation#

function SBGWindowWidget [1/2]#

Protected constructor.

SBGWindowWidget::SBGWindowWidget () 

Constructs an SBGWindowWidget with a default data pointer.


function SBGWindowWidget [2/2]#

Protected constructor.

SBGWindowWidget::SBGWindowWidget (
    SBGWindowWidgetData * dataPointer
) 

Constructs an SBGWindowWidget using the given data pointer.

Parameters:

  • dataPointer Pointer to the widget's private data.

function changeEvent#

Handles events.

void SBGWindowWidget::changeEvent (
    QEvent * event
) 

Handles generic change events for the widget.

Parameters:

  • event Pointer to the QEvent representing the change.

function hideEvent#

Handles hide event.

void SBGWindowWidget::hideEvent (
    QHideEvent * event
) 

Handles the hide event for the widget.

Parameters:

  • event Pointer to the QHideEvent that triggered the hide.

function showEvent#

Handles show event.

void SBGWindowWidget::showEvent (
    QShowEvent * event
) 

Handles the show event for the widget.

Parameters:

  • event Pointer to the QShowEvent that triggered the show.