Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
QStyleOptionToolBox Class Reference

\variable QStyleOptionComboBox::editable More...

#include <qstyleoption.h>

+ Inheritance diagram for QStyleOptionToolBox:
+ Collaboration diagram for QStyleOptionToolBox:

Public Types

enum  StyleOptionType { Type = SO_ToolBox }
 This enum is used to hold information about the type of the style option, and is defined for each QStyleOption subclass. More...
 
enum  StyleOptionVersion { Version = 1 }
 This enum is used to hold information about the version of the style option, and is defined for each QStyleOption subclass. More...
 
enum  TabPosition { Beginning , Middle , End , OnlyOneTab }
 This enum describes tab positions relative to other tabs. More...
 
enum  SelectedPosition { NotAdjacent , NextIsSelected , PreviousIsSelected }
 \variable QStyleOptionToolBox::icon More...
 
- Public Types inherited from QStyleOption
enum  OptionType {
  SO_Default , SO_FocusRect , SO_Button , SO_Tab ,
  SO_MenuItem , SO_Frame , SO_ProgressBar , SO_ToolBox ,
  SO_Header , SO_DockWidget , SO_ViewItem , SO_TabWidgetFrame ,
  SO_TabBarBase , SO_RubberBand , SO_ToolBar , SO_GraphicsItem ,
  SO_Complex = 0xf0000 , SO_Slider , SO_SpinBox , SO_ToolButton ,
  SO_ComboBox , SO_TitleBar , SO_GroupBox , SO_SizeGrip ,
  SO_CustomBase = 0xf00 , SO_ComplexCustomBase = 0xf000000
}
 This enum is used internally by QStyleOption, its subclasses, and qstyleoption_cast() to determine the type of style option. More...
 
enum  StyleOptionType { Type = SO_Default }
 This enum is used to hold information about the type of the style option, and is defined for each QStyleOption subclass. More...
 
enum  StyleOptionVersion { Version = 1 }
 This enum is used to hold information about the version of the style option, and is defined for each QStyleOption subclass. More...
 

Public Member Functions

 QStyleOptionToolBox ()
 Creates a QStyleOptionToolBox, initializing the members variables to their default values.
 
 QStyleOptionToolBox (const QStyleOptionToolBox &other)
 Constructs a copy of the other style option.
 
QStyleOptionToolBoxoperator= (const QStyleOptionToolBox &)=default
 
- Public Member Functions inherited from QStyleOption
 QStyleOption (int version=QStyleOption::Version, int type=SO_Default)
 Constructs a QStyleOption with the specified version and type.
 
 QStyleOption (const QStyleOption &other)
 Constructs a copy of other.
 
 ~QStyleOption ()
 Destroys this style option object.
 
void initFrom (const QWidget *w)
 
QStyleOptionoperator= (const QStyleOption &other)
 Assign other to this QStyleOption.
 

Public Attributes

QString text
 
QIcon icon
 
TabPosition position
 
SelectedPosition selectedPosition
 
- Public Attributes inherited from QStyleOption
int version
 
int type
 
QStyle::State state
 
Qt::LayoutDirection direction
 
QRect rect
 
QFontMetrics fontMetrics
 
QPalette palette
 
QObjectstyleObject
 

Protected Member Functions

 QStyleOptionToolBox (int version)
 

Additional Inherited Members

Detailed Description

\variable QStyleOptionComboBox::editable

whether or not the combobox is editable or not

the default value is false

See also
QComboBox::isEditable()

\variable QStyleOptionComboBox::frame

whether the combo box has a frame

The default value is true.

\variable QStyleOptionComboBox::currentText

the text for the current item of the combo box

The default value is an empty string.

\variable QStyleOptionComboBox::currentIcon

the icon for the current item of the combo box

The default value is an empty icon, i.e. an icon with neither a pixmap nor a filename.

\variable QStyleOptionComboBox::iconSize

the icon size for the current item of the combo box

The default value is QSize(-1, -1), i.e. an invalid size.

\variable QStyleOptionComboBox::popupRect

the popup rectangle for the combobox

The default value is a null rectangle, i.e. a rectangle with both the width and the height set to 0.

This variable is currently unused. You can safely ignore it.

See also
QStyle::SC_ComboBoxListBoxPopup

\variable QStyleOptionComboBox::textAlignment

the alignment of the current text in the combo box

The default value is Qt::AlignLeft | Qt::AlignVCenter.

The QStyleOptionToolBox class is used to describe the parameters needed for drawing a tool box.

\inmodule QtWidgets

QStyleOptionToolBox contains all the information that QStyle functions need to draw QToolBox.

For performance reasons, there are few member functions and the access to the member variables is direct (i.e., using the . or -> operator). This makes the structures straightforward to use and emphasizes that these are simply parameters used by the style functions.

See also
QStyleOption, QToolBox

Definition at line 436 of file qstyleoption.h.

Member Enumeration Documentation

◆ SelectedPosition

\variable QStyleOptionToolBox::icon

the icon for the tool box tab

The default value is an empty icon, i.e. an icon with neither a pixmap nor a filename.

\variable QStyleOptionToolBox::text

the text for the tool box tab

The default value is an empty string.

This enum describes the position of the selected tab. Some styles need to draw a tab differently depending on whether or not it is adjacent to the selected tab.

\value NotAdjacent The tab is not adjacent to a selected tab (or is the selected tab). \value NextIsSelected The next tab (typically the tab on the right) is selected. \value PreviousIsSelected The previous tab (typically the tab on the left) is selected.

See also
selectedPosition
Enumerator
NotAdjacent 
NextIsSelected 
PreviousIsSelected 

Definition at line 446 of file qstyleoption.h.

◆ StyleOptionType

This enum is used to hold information about the type of the style option, and is defined for each QStyleOption subclass.

\value Type The type of style option provided (\l{SO_ToolBox} for this class).

The type is used internally by QStyleOption, its subclasses, and qstyleoption_cast() to determine the type of style option. In general you do not need to worry about this unless you want to create your own QStyleOption subclass and your own styles.

See also
StyleOptionVersion
Enumerator
Type 

Definition at line 439 of file qstyleoption.h.

◆ StyleOptionVersion

This enum is used to hold information about the version of the style option, and is defined for each QStyleOption subclass.

\value Version 2

The version is used by QStyleOption subclasses to implement extensions without breaking compatibility. If you use qstyleoption_cast(), you normally do not need to check it.

See also
StyleOptionType
Enumerator
Version 

Definition at line 440 of file qstyleoption.h.

◆ TabPosition

This enum describes tab positions relative to other tabs.

\value Beginning The tab is the first (i.e., top-most) tab in the toolbox. \value Middle The tab is placed in the middle of the toolbox. \value End The tab is placed at the bottom of the toolbox. \value OnlyOneTab There is only one tab in the toolbox.

Enumerator
Beginning 
Middle 
End 
OnlyOneTab 

Definition at line 445 of file qstyleoption.h.

Constructor & Destructor Documentation

◆ QStyleOptionToolBox() [1/3]

QStyleOptionToolBox::QStyleOptionToolBox ( )

Creates a QStyleOptionToolBox, initializing the members variables to their default values.

Definition at line 2604 of file qstyleoption.cpp.

◆ QStyleOptionToolBox() [2/3]

QStyleOptionToolBox::QStyleOptionToolBox ( const QStyleOptionToolBox & other)
inline

Constructs a copy of the other style option.

Definition at line 452 of file qstyleoption.h.

References other().

+ Here is the call graph for this function:

◆ QStyleOptionToolBox() [3/3]

QStyleOptionToolBox::QStyleOptionToolBox ( int version)
protected

Definition at line 2612 of file qstyleoption.cpp.

Member Function Documentation

◆ operator=()

QStyleOptionToolBox & QStyleOptionToolBox::operator= ( const QStyleOptionToolBox & )
default

Member Data Documentation

◆ icon

QIcon QStyleOptionToolBox::icon

Definition at line 443 of file qstyleoption.h.

◆ position

TabPosition QStyleOptionToolBox::position

Definition at line 448 of file qstyleoption.h.

◆ selectedPosition

SelectedPosition QStyleOptionToolBox::selectedPosition

Definition at line 449 of file qstyleoption.h.

◆ text

QString QStyleOptionToolBox::text

Definition at line 442 of file qstyleoption.h.


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