QtBase  v6.3.1
Public Types | Public Member Functions | Public Attributes | Protected Member Functions | List of all members
QStyleOptionToolBox Class Reference

whether or not the combobox is editable or not More...

#include <qstyleoption.h>

Inheritance diagram for QStyleOptionToolBox:
Inheritance graph
[legend]
Collaboration diagram for QStyleOptionToolBox:
Collaboration graph
[legend]

Public Types

enum  StyleOptionType { Type = SO_ToolBox }
 
enum  StyleOptionVersion { Version = 1 }
 
enum  TabPosition { Beginning , Middle , End , OnlyOneTab }
 
enum  SelectedPosition { NotAdjacent , NextIsSelected , PreviousIsSelected }
 the icon for the tool box tab 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
}
 
enum  StyleOptionType { Type = SO_Default }
 
enum  StyleOptionVersion { Version = 1 }
 

Public Member Functions

 QStyleOptionToolBox ()
 
 QStyleOptionToolBox (const QStyleOptionToolBox &other)
 
QStyleOptionToolBoxoperator= (const QStyleOptionToolBox &)=default
 
- Public Member Functions inherited from QStyleOption
 QStyleOption (int version=QStyleOption::Version, int type=SO_Default)
 
 QStyleOption (const QStyleOption &other)
 
 ~QStyleOption ()
 
void initFrom (const QWidget *w)
 
QStyleOptionoperator= (const QStyleOption &other)
 

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

whether or not the combobox is editable or not

\variable QStyleOptionComboBox::editable

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.

For an example demonstrating how style options can be used, see the \l {widgets/styles}{Styles} example.

See also
QStyleOption, QToolBox

Definition at line 471 of file qstyleoption.h.

Member Enumeration Documentation

◆ SelectedPosition

the icon for the tool box tab

\variable QStyleOptionToolBox::icon

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 481 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 474 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 475 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 480 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 2690 of file qstyleoption.cpp.

◆ QStyleOptionToolBox() [2/3]

QStyleOptionToolBox::QStyleOptionToolBox ( const QStyleOptionToolBox other)
inline

Constructs a copy of the other style option.

Definition at line 487 of file qstyleoption.h.

Here is the call graph for this function:

◆ QStyleOptionToolBox() [3/3]

QStyleOptionToolBox::QStyleOptionToolBox ( int  version)
protected

Definition at line 2698 of file qstyleoption.cpp.

Member Function Documentation

◆ operator=()

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

Member Data Documentation

◆ icon

QIcon QStyleOptionToolBox::icon

Definition at line 478 of file qstyleoption.h.

◆ position

TabPosition QStyleOptionToolBox::position

Definition at line 483 of file qstyleoption.h.

◆ selectedPosition

SelectedPosition QStyleOptionToolBox::selectedPosition

Definition at line 484 of file qstyleoption.h.

◆ text

QString QStyleOptionToolBox::text

Definition at line 477 of file qstyleoption.h.


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