Class 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.
Stops the widget's highlighting.
Public Signals Documentation#
signal shown#
Emitted when the widget is shown or hidden.
Public Functions Documentation#
function getCitation#
Returns the citation information.
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.
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.
Returns the format identifier of this widget.
Returns:
The widget's format identifier.
function getHighlightingFlag#
Returns the highlighting flag.
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)
Returns whether the widget is locked (on top).
Returns:
true if the widget is locked; otherwise false.
function getLogo#
Returns the pixmap logo.
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)
Returns the name of this widget.
Returns:
The widget's name.
function getPreferencesUUID#
Returns the UUID of preferences (static attributes), if present.
Returns the UUID of the preferences associated with this widget.
Returns:
The preferences UUID.
function getUUID#
Returns the widget UUID.
Returns the UUID of this widget.
Returns:
The widget's UUID.
function getWindow#
Returns the pointer to the embedding window, if any.
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.
Highlights the widget for a specified duration.
Parameters:
durationThe duration of the highlight, default is 1 second.
function loadDefaultSettings#
Loads default settings.
Loads the default settings for the widget.
function loadSettings#
Loads settings .
Loads the widget's settings from the given settings object.
Parameters:
settingsPointer to the SBGSettings containing the settings to load.
function saveDefaultSettings#
Saves default settings.
Saves the current widget settings as the default settings.
function saveSettings#
Saves settings .
Saves the widget's settings to the given settings object.
Parameters:
settingsPointer to the SBGSettings where the settings will be saved.
function setHighlightingFlag#
Sets the highlighting flag.
Sets the highlighting state of the widget.
Parameters:
highlightingFlagTrue to enable highlighting; false to disable.
function setLockedFlag#
Sets whether the widget is locked (on top)
Sets the locked flag for the widget, indicating whether it should stay on top.
Parameters:
lockedFlagTrue to lock the widget; false to unlock.
function setPreferencesUUID#
Sets the UUID of preferences (static attributes), if present.
Sets the UUID of the preferences associated with this widget.
Parameters:
preferencesUUIDThe UUID to set for the widget's preferences.
function ~SBGWindowWidget#
Destructor.
Destroys the SBGWindowWidget and cleans up its references.
Protected Attributes Documentation#
variable dataPointer#
A pointer to the private data.
Protected Functions Documentation#
function SBGWindowWidget [1/2]#
Protected constructor.
Constructs an SBGWindowWidget with a default data pointer.
function SBGWindowWidget [2/2]#
Protected constructor.
Constructs an SBGWindowWidget using the given data pointer.
Parameters:
dataPointerPointer to the widget's private data.
function changeEvent#
Handles events.
Handles generic change events for the widget.
Parameters:
eventPointer to the QEvent representing the change.
function hideEvent#
Handles hide event.
Handles the hide event for the widget.
Parameters:
eventPointer to the QHideEvent that triggered the hide.
function showEvent#
Handles show event.
Handles the show event for the widget.
Parameters:
eventPointer to the QShowEvent that triggered the show.