Web Analytics Made Easy - Statcounter
Skip to content

Class SBGWindow#

ClassList > SBGWindow

This class describes a window. More...

  • #include <SBGWindow.hpp>

Inherits the following classes: QWidget

Public Types#

Type Name
enum WindowOption
Window options.

Public Signals#

Type Name
signal void closed
Emitted when the window is closed by the user.
signal void locked (bool)
Emitted when the window is locked or unlocked.
signal void shown (bool)
Emitted when the window is shown or hidden.

Public Functions#

Type Name
SBGWindow (QWidget * parent, SBGWindowDialog * dialog)
Constructs a SAMSON window that wraps a SAMSON dialog.
SBGWindow (QWidget * parent, SBGWindowWidget * widget)
Constructs a SAMSON window that wraps a SAMSON widget.
SBGWindow (QWidget * parent, QDialog * dialog, QString name="", int format=SBGWindow::NoOptions, QPixmap logo=QPixmap(), SBUUID uuid=SBUUID())
Constructs a SAMSON window that wraps a Qt dialog.
SBGWindow (QWidget * parent, QWidget * widget, QString name="", int format=SBGWindow::NoOptions, QPixmap logo=QPixmap(), SBUUID uuid=SBUUID())
Constructs a SAMSON window that wraps a Qt widget.
void center ()
Centers the window on screen.
void centerOnSAMSON ()
Centers the window on SAMSON .
int getFormat () const
Returns the format of the window.
bool getLockedFlag () const
Returns whether the widget is locked (on top)
QPixmap getLogo () const
Returns the logo of the window.
QString getName () const
Returns the name of the window.
SBUUID getUUID () const
Returns the UUID of the window.
int height () const
Returns the height of the window.
void loadDefaultSettings ()
Loads the default settings of the window.
void saveDefaultSettings ()
Saves the default settings of the window.
void setLockedFlag (bool lockedFlag)
Sets whether the widget is locked (on top)
void setName (const QString & name)
Sets the name of the window.
QSize size () const
Returns the size of the window.
int width () const
Returns the width of the window.
virtual ~SBGWindow ()
Destructs the SAMSON window.

Protected Attributes#

Type Name
SBGWindowData * dataPointer
Returns a pointer to the private data.

Protected Functions#

Type Name
void changeEvent (QEvent * event)
Handles events.
void closeEvent (QCloseEvent * event)
Handles close event.
void hideEvent (QHideEvent * event)
Handles hide event.
void paintEvent (QPaintEvent * event)
Handles paint event.
void resizeEvent (QResizeEvent * event)
Handles resize events.
void showEvent (QShowEvent * event)
Handles show event.
void wheelEvent (QWheelEvent * event)
Handles mouse wheel events.

Detailed Description#

This class describes a window in the GUI of SAMSON.

Short name: SBWindow

See also: SBGWindowDialog, SBGWindowWidget

Public Types Documentation#

enum WindowOption#

Window options.

enum SBGWindow::WindowOption {
    NoOptions = 0,
    Citable = 1,
    Lockable = 2,
    Resizable = 4,
    Savable = 8
};


Public Signals Documentation#

signal closed#

Emitted when the window is closed by the user.

void SBGWindow::closed;


signal locked#

Emitted when the window is locked or unlocked.

void SBGWindow::locked;


signal shown#

Emitted when the window is shown or hidden.

void SBGWindow::shown;


Public Functions Documentation#

function SBGWindow [1/4]#

Constructs a SAMSON window that wraps a SAMSON dialog.

SBGWindow::SBGWindow (
    QWidget * parent,
    SBGWindowDialog * dialog
) 

Parameters:

  • parent Parent widget for the window.
  • dialog Dialog to be wrapped by the window.

function SBGWindow [2/4]#

Constructs a SAMSON window that wraps a SAMSON widget.

SBGWindow::SBGWindow (
    QWidget * parent,
    SBGWindowWidget * widget
) 

Parameters:

  • parent Parent widget for the window.
  • widget Widget to be wrapped by the window.

function SBGWindow [3/4]#

Constructs a SAMSON window that wraps a Qt dialog.

SBGWindow::SBGWindow (
    QWidget * parent,
    QDialog * dialog,
    QString name="",
    int format=SBGWindow::NoOptions,
    QPixmap logo=QPixmap(),
    SBUUID uuid=SBUUID ()
) 

Parameters:

  • parent Parent widget for the window.
  • dialog Qt dialog to be wrapped.
  • name Name of the window.
  • format Format options for the window.
  • logo Logo pixmap for the window.
  • uuid Unique identifier for the window.

function SBGWindow [4/4]#

Constructs a SAMSON window that wraps a Qt widget.

SBGWindow::SBGWindow (
    QWidget * parent,
    QWidget * widget,
    QString name="",
    int format=SBGWindow::NoOptions,
    QPixmap logo=QPixmap(),
    SBUUID uuid=SBUUID ()
) 

Parameters:

  • parent Parent widget for the window.
  • widget Qt widget to be wrapped.
  • name Name of the window.
  • format Format options for the window.
  • logo Logo pixmap for the window.
  • uuid Unique identifier for the window.

function center#

Centers the window on screen.

void SBGWindow::center () 

Centers the window on the screen.


function centerOnSAMSON#

Centers the window on SAMSON .

void SBGWindow::centerOnSAMSON () 

Centers the window on the SAMSON main window.


function getFormat#

Returns the format of the window.

int SBGWindow::getFormat () const

Returns the format flags of the window.

Returns:

The format options as an integer.


function getLockedFlag#

Returns whether the widget is locked (on top)

bool SBGWindow::getLockedFlag () const

Returns whether the window is locked (on top).

Returns:

true if the window is locked, false otherwise.


Returns the logo of the window.

QPixmap SBGWindow::getLogo () const

Returns:

The logo pixmap.


function getName#

Returns the name of the window.

QString SBGWindow::getName () const

Returns:

The window name.


function getUUID#

Returns the UUID of the window.

SBUUID SBGWindow::getUUID () const

Returns the UUID of the window.

Returns:

The unique identifier of the window.


function height#

Returns the height of the window.

int SBGWindow::height () const

Returns the height of the window, excluding shadows.

Returns:

The height in pixels.


function loadDefaultSettings#

Loads the default settings of the window.

void SBGWindow::loadDefaultSettings () 


function saveDefaultSettings#

Saves the default settings of the window.

void SBGWindow::saveDefaultSettings () 


function setLockedFlag#

Sets whether the widget is locked (on top)

void SBGWindow::setLockedFlag (
    bool lockedFlag
) 

Sets whether the window is locked (on top).

Parameters:

  • lockedFlag true to lock the window, false to unlock it.

function setName#

Sets the name of the window.

void SBGWindow::setName (
    const QString & name
) 

Parameters:

  • name The new name for the window.

function size#

Returns the size of the window.

QSize SBGWindow::size () const

Returns:

The size as a QSize object.


function width#

Returns the width of the window.

int SBGWindow::width () const

Returns the width of the window, excluding shadows.

Returns:

The width in pixels.


function ~SBGWindow#

Destructs the SAMSON window.

virtual SBGWindow::~SBGWindow () 

Destroys the SAMSON window.


Protected Attributes Documentation#

variable dataPointer#

Returns a pointer to the private data.

SBGWindowData* SBGWindow::dataPointer;


Protected Functions Documentation#

function changeEvent#

Handles events.

void SBGWindow::changeEvent (
    QEvent * event
) 

Handles change events for the window.

Parameters:

  • event Pointer to the event.

function closeEvent#

Handles close event.

void SBGWindow::closeEvent (
    QCloseEvent * event
) 

Handles close events for the window.

Parameters:

  • event Pointer to the close event.

function hideEvent#

Handles hide event.

void SBGWindow::hideEvent (
    QHideEvent * event
) 

Handles hide events for the window.

Parameters:

  • event Pointer to the hide event.

function paintEvent#

Handles paint event.

void SBGWindow::paintEvent (
    QPaintEvent * event
) 

Handles paint events for the window.

Parameters:

  • event Pointer to the paint event.

function resizeEvent#

Handles resize events.

void SBGWindow::resizeEvent (
    QResizeEvent * event
) 

Handles resize events for the window.

Parameters:

  • event Pointer to the resize event.

function showEvent#

Handles show event.

void SBGWindow::showEvent (
    QShowEvent * event
) 

Handles show events for the window.

Parameters:

  • event Pointer to the show event.

function wheelEvent#

Handles mouse wheel events.

void SBGWindow::wheelEvent (
    QWheelEvent * event
) 

Handles mouse wheel events for the window.

Parameters:

  • event Pointer to the wheel event.