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
QQC2::QStyleOptionGraphicsItem Class Reference

#include <qquickstyleoption.h>

+ Inheritance diagram for QQC2::QStyleOptionGraphicsItem:
+ Collaboration diagram for QQC2::QStyleOptionGraphicsItem:

Public Types

enum  StyleOptionType { Type = SO_GraphicsItem }
 
enum  StyleOptionVersion { Version = 1 }
 
- Public Types inherited from QQC2::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

 QStyleOptionGraphicsItem ()
 Constructs a QStyleOptionGraphicsItem.
 
 QStyleOptionGraphicsItem (const QStyleOptionGraphicsItem &other)
 
QStyleOptionGraphicsItemoperator= (const QStyleOptionGraphicsItem &)=default
 
- Public Member Functions inherited from QQC2::QStyleOption
 QStyleOption (int version=QStyleOption::Version, int type=SO_Default)
 
 QStyleOption (const QStyleOption &other)
 Constructs a copy of other.
 
 ~QStyleOption ()
 Destroys this style option object.
 
QStyleOptionoperator= (const QStyleOption &other)
 Assign other to this QStyleOption.
 

Static Public Member Functions

static qreal levelOfDetailFromTransform (const QTransform &worldTransform)
 

Public Attributes

QRectF exposedRect
 
qreal levelOfDetail
 
- Public Attributes inherited from QQC2::QStyleOption
int version
 
int type
 
QStyle::State state
 
Qt::LayoutDirection direction
 
QRect rect
 
QFontMetrics fontMetrics
 
QPalette palette
 
QObjectstyleObject
 
QQuickItemcontrol
 
QWindowwindow
 

Protected Member Functions

 QStyleOptionGraphicsItem (int version)
 

Detailed Description

Definition at line 657 of file qquickstyleoption.h.

Member Enumeration Documentation

◆ StyleOptionType

Enumerator
Type 

Definition at line 660 of file qquickstyleoption.h.

◆ StyleOptionVersion

Enumerator
Version 

Definition at line 661 of file qquickstyleoption.h.

Constructor & Destructor Documentation

◆ QStyleOptionGraphicsItem() [1/3]

QStyleOptionGraphicsItem::QStyleOptionGraphicsItem ( )

Constructs a QStyleOptionGraphicsItem.

Definition at line 456 of file qquickstyleoption.cpp.

◆ QStyleOptionGraphicsItem() [2/3]

QQC2::QStyleOptionGraphicsItem::QStyleOptionGraphicsItem ( const QStyleOptionGraphicsItem & other)
inline

Definition at line 667 of file qquickstyleoption.h.

References other().

+ Here is the call graph for this function:

◆ QStyleOptionGraphicsItem() [3/3]

QStyleOptionGraphicsItem::QStyleOptionGraphicsItem ( int version)
protected

Definition at line 461 of file qquickstyleoption.cpp.

Member Function Documentation

◆ levelOfDetailFromTransform()

qreal QStyleOptionGraphicsItem::levelOfDetailFromTransform ( const QTransform & worldTransform)
static
Since
4.6

Returns the level of detail from the worldTransform.

Its value represents the maximum value of the height and width of a unity rectangle, mapped using the worldTransform of the painter used to draw the item. By default, if no transformations are applied, its value is 1. If zoomed out 1:2, the level of detail will be 0.5, and if zoomed in 2:1, its value is 2.

See also
QGraphicsScene::minimumRenderSize()

Definition at line 479 of file qquickstyleoption.cpp.

References QTransform::map(), qSqrt(), QTransform::TxTranslate, QTransform::type(), and v1.

+ Here is the call graph for this function:

◆ operator=()

QStyleOptionGraphicsItem & QQC2::QStyleOptionGraphicsItem::operator= ( const QStyleOptionGraphicsItem & )
default

Member Data Documentation

◆ exposedRect

QRectF QQC2::QStyleOptionGraphicsItem::exposedRect

Definition at line 663 of file qquickstyleoption.h.

◆ levelOfDetail

qreal QQC2::QStyleOptionGraphicsItem::levelOfDetail

Definition at line 664 of file qquickstyleoption.h.


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