Web Analytics Made Easy - Statcounter
Skip to content

Class SBGActionDelimiter#

ClassList > SBGActionDelimiter

This class provides the possibility to create section separators in context menus with icons and text. More...

  • #include <SBGActionDelimiter.hpp>

Inherits the following classes: QWidgetAction

Public Attributes#

Type Name
QPixmap pixmap
QString text

Public Functions#

Type Name
SBGActionDelimiter (const QString & text, QObject * parent=nullptr)
Builds an action delimiter with text text .
SBGActionDelimiter (const QPixmap & pixmap, const QString & text, QObject * parent=nullptr)
Builds an action delimiter with image pixmap and texttext .
QWidget * createWidget (QWidget * parent)
Creates a widget representing the delimiter for use in menus.
virtual ~SBGActionDelimiter ()
Destructor.

Detailed Description#

Short name: SBActionDelimiter

Public Attributes Documentation#

variable pixmap#

QPixmap SBGActionDelimiter::pixmap;

variable text#

QString SBGActionDelimiter::text;

Public Functions Documentation#

function SBGActionDelimiter [1/2]#

Builds an action delimiter with text text .

SBGActionDelimiter::SBGActionDelimiter (
    const QString & text,
    QObject * parent=nullptr
) 

Constructs an action delimiter with the specified text.

Creates a delimiter without an associated icon.

Parameters:

  • text The text displayed by the delimiter.
  • parent The parent QObject.

function SBGActionDelimiter [2/2]#

Builds an action delimiter with image pixmap and texttext .

SBGActionDelimiter::SBGActionDelimiter (
    const QPixmap & pixmap,
    const QString & text,
    QObject * parent=nullptr
) 

Constructs an action delimiter with the specified icon and text.

Creates a delimiter that displays the given pixmap next to the text.

Parameters:

  • pixmap The pixmap to display as the delimiter's icon.
  • text The text displayed by the delimiter.
  • parent The parent QObject.

function createWidget#

Creates a widget representing the delimiter for use in menus.

QWidget * SBGActionDelimiter::createWidget (
    QWidget * parent
) 

The widget contains the optional pixmap and the text label.

Parameters:

  • parent The parent widget for the created delimiter widget.

Returns:

Pointer to the newly created widget.


function ~SBGActionDelimiter#

Destructor.

virtual SBGActionDelimiter::~SBGActionDelimiter () 

Destroys the delimiter action and releases its resources.