![]() |
Qt 6.x
The Qt SDK
|
#include <qquickstyle.h>
Public Member Functions | |
QStyle () | |
Constructs a style object. | |
virtual | ~QStyle () |
Destroys the style object. | |
virtual QRect | itemTextRect (const QFontMetrics &fm, const QRect &r, int flags, bool enabled, const QString &text) const |
Returns the area within the given rectangle in which to draw the provided text according to the specified font metrics and alignment. | |
virtual QRect | itemPixmapRect (const QRect &r, int flags, const QPixmap &pixmap) const |
Returns the area within the given rectangle in which to draw the specified pixmap according to the defined alignment. | |
virtual QRect | subElementRect (SubElement subElement, const QStyleOption *option) const =0 |
virtual QRect | subControlRect (ComplexControl cc, const QStyleOptionComplex *opt, SubControl sc) const =0 |
virtual QSize | sizeFromContents (ContentsType ct, const QStyleOption *opt, const QSize &contentsSize) const =0 |
virtual QFont | font (ControlElement element, const QStyle::State state) const =0 |
virtual QMargins | ninePatchMargins (ControlElement ce, const QStyleOption *opt, const QSize &imageSize) const =0 |
virtual QMargins | ninePatchMargins (ComplexControl cc, const QStyleOptionComplex *opt, const QSize &imageSize) const =0 |
virtual SubControl | hitTestComplexControl (ComplexControl cc, const QStyleOptionComplex *opt, const QPoint &pt) const =0 |
virtual int | pixelMetric (PixelMetric metric, const QStyleOption *option=nullptr) const =0 |
virtual int | styleHint (StyleHint stylehint, const QStyleOption *opt=nullptr, QStyleHintReturn *returnData=nullptr) const =0 |
virtual void | drawItemText (QPainter *painter, const QRect &rect, int flags, const QPalette &pal, bool enabled, const QString &text, QPalette::ColorRole textRole=QPalette::NoRole) const |
Draws the given text in the specified rectangle using the provided painter and palette. | |
virtual void | drawItemPixmap (QPainter *painter, const QRect &rect, int alignment, const QPixmap &pixmap) const |
Draws the given pixmap in the specified rectangle, according to the specified alignment, using the provided painter. | |
virtual void | drawPrimitive (PrimitiveElement pe, const QStyleOption *opt, QPainter *p) const =0 |
virtual void | drawControl (ControlElement element, const QStyleOption *opt, QPainter *p) const =0 |
virtual void | drawComplexControl (ComplexControl cc, const QStyleOptionComplex *opt, QPainter *p) const =0 |
virtual QPalette | standardPalette () const |
Returns the style's standard palette. | |
virtual QPixmap | standardPixmap (StandardPixmap standardPixmap, const QStyleOption *opt=nullptr) const =0 |
virtual QIcon | standardIcon (StandardPixmap standardIcon, const QStyleOption *option=nullptr) const =0 |
virtual QPixmap | generatedIconPixmap (QIcon::Mode iconMode, const QPixmap &pixmap, const QStyleOption *opt) const =0 |
virtual void | polish () |
const QStyle * | proxy () const |
![]() | |
Q_INVOKABLE | QObject (QObject *parent=nullptr) |
Constructs an object with parent object parent. | |
virtual | ~QObject () |
Destroys the object, deleting all its child objects. | |
virtual bool | event (QEvent *event) |
This virtual function receives events to an object and should return true if the event e was recognized and processed. | |
virtual bool | eventFilter (QObject *watched, QEvent *event) |
Filters events if this object has been installed as an event filter for the watched object. | |
QString | objectName () const |
Q_WEAK_OVERLOAD void | setObjectName (const QString &name) |
Sets the object's name to name. | |
void | setObjectName (QAnyStringView name) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
QBindable< QString > | bindableObjectName () |
bool | isWidgetType () const |
Returns true if the object is a widget; otherwise returns false . | |
bool | isWindowType () const |
Returns true if the object is a window; otherwise returns false . | |
bool | isQuickItemType () const |
Returns true if the object is a QQuickItem; otherwise returns false . | |
bool | signalsBlocked () const noexcept |
Returns true if signals are blocked; otherwise returns false . | |
bool | blockSignals (bool b) noexcept |
If block is true, signals emitted by this object are blocked (i.e., emitting a signal will not invoke anything connected to it). | |
QThread * | thread () const |
Returns the thread in which the object lives. | |
void | moveToThread (QThread *thread) |
Changes the thread affinity for this object and its children. | |
int | startTimer (int interval, Qt::TimerType timerType=Qt::CoarseTimer) |
This is an overloaded function that will start a timer of type timerType and a timeout of interval milliseconds. | |
int | startTimer (std::chrono::milliseconds time, Qt::TimerType timerType=Qt::CoarseTimer) |
void | killTimer (int id) |
Kills the timer with timer identifier, id. | |
template<typename T > | |
T | findChild (const QString &aName=QString(), Qt::FindChildOptions options=Qt::FindChildrenRecursively) const |
Returns the child of this object that can be cast into type T and that is called name, or \nullptr if there is no such object. | |
template<typename T > | |
QList< T > | findChildren (const QString &aName, Qt::FindChildOptions options=Qt::FindChildrenRecursively) const |
Returns all children of this object with the given name that can be cast to type T, or an empty list if there are no such objects. | |
template<typename T > | |
QList< T > | findChildren (Qt::FindChildOptions options=Qt::FindChildrenRecursively) const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
const QObjectList & | children () const |
Returns a list of child objects. | |
void | setParent (QObject *parent) |
Makes the object a child of parent. | |
void | installEventFilter (QObject *filterObj) |
Installs an event filter filterObj on this object. | |
void | removeEventFilter (QObject *obj) |
Removes an event filter object obj from this object. | |
QMetaObject::Connection | connect (const QObject *sender, const char *signal, const char *member, Qt::ConnectionType type=Qt::AutoConnection) const |
bool | disconnect (const char *signal=nullptr, const QObject *receiver=nullptr, const char *member=nullptr) const |
bool | disconnect (const QObject *receiver, const char *member=nullptr) const |
void | dumpObjectTree () const |
Dumps a tree of children to the debug output. | |
void | dumpObjectInfo () const |
Dumps information about signal connections, etc. | |
bool | setProperty (const char *name, const QVariant &value) |
Sets the value of the object's name property to value. | |
bool | setProperty (const char *name, QVariant &&value) |
QVariant | property (const char *name) const |
Returns the value of the object's name property. | |
QList< QByteArray > | dynamicPropertyNames () const |
QBindingStorage * | bindingStorage () |
const QBindingStorage * | bindingStorage () const |
QObject * | parent () const |
Returns a pointer to the parent object. | |
bool | inherits (const char *classname) const |
Returns true if this object is an instance of a class that inherits className or a QObject subclass that inherits className; otherwise returns false . | |
Static Public Member Functions | |
static QRect | visualRect (Qt::LayoutDirection direction, const QRect &boundingRect, const QRect &logicalRect) |
Returns the given logicalRectangle converted to screen coordinates based on the specified direction. | |
static QPoint | visualPos (Qt::LayoutDirection direction, const QRect &boundingRect, const QPoint &logicalPos) |
Returns the given logicalPosition converted to screen coordinates based on the specified direction. | |
static int | sliderPositionFromValue (int min, int max, int val, int space, bool upsideDown=false) |
Converts the given logicalValue to a pixel position. | |
static int | sliderValueFromPosition (int min, int max, int pos, int space, bool upsideDown=false) |
Converts the given pixel position to a logical value. | |
static Qt::Alignment | visualAlignment (Qt::LayoutDirection direction, Qt::Alignment alignment) |
Transforms an alignment of Qt::AlignLeft or Qt::AlignRight without Qt::AlignAbsolute into Qt::AlignLeft or Qt::AlignRight with Qt::AlignAbsolute according to the layout direction. | |
static QRect | alignedRect (Qt::LayoutDirection direction, Qt::Alignment alignment, const QSize &size, const QRect &rectangle) |
Returns a new rectangle of the specified size that is aligned to the given rectangle according to the specified alignment and direction. | |
![]() | |
static QMetaObject::Connection | connect (const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection) |
\threadsafe | |
static QMetaObject::Connection | connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type=Qt::AutoConnection) |
template<typename Func1 , typename Func2 > | |
static QMetaObject::Connection | connect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const typename QtPrivate::ContextTypeForFunctor< Func2 >::ContextType *context, Func2 &&slot, Qt::ConnectionType type=Qt::AutoConnection) |
template<typename Func1 , typename Func2 > | |
static QMetaObject::Connection | connect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, Func2 &&slot) |
static bool | disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *member) |
\threadsafe | |
static bool | disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &member) |
static bool | disconnect (const QMetaObject::Connection &) |
Disconnect a connection. | |
template<typename Func1 , typename Func2 > | |
static bool | disconnect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const typename QtPrivate::FunctionPointer< Func2 >::Object *receiver, Func2 slot) |
template<typename Func1 > | |
static bool | disconnect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const QObject *receiver, void **zero) |
Protected Member Functions | |
QStyle (QStylePrivate &dd) | |
![]() | |
QObject * | sender () const |
Returns a pointer to the object that sent the signal, if called in a slot activated by a signal; otherwise it returns \nullptr. | |
int | senderSignalIndex () const |
int | receivers (const char *signal) const |
Returns the number of receivers connected to the signal. | |
bool | isSignalConnected (const QMetaMethod &signal) const |
virtual void | timerEvent (QTimerEvent *event) |
This event handler can be reimplemented in a subclass to receive timer events for the object. | |
virtual void | childEvent (QChildEvent *event) |
This event handler can be reimplemented in a subclass to receive child events. | |
virtual void | customEvent (QEvent *event) |
This event handler can be reimplemented in a subclass to receive custom events. | |
virtual void | connectNotify (const QMetaMethod &signal) |
virtual void | disconnectNotify (const QMetaMethod &signal) |
QObject (QObjectPrivate &dd, QObject *parent=nullptr) | |
Additional Inherited Members | |
![]() | |
void | deleteLater () |
\threadsafe | |
![]() | |
void | destroyed (QObject *=nullptr) |
This signal is emitted immediately before the object obj is destroyed, after any instances of QPointer have been notified, and cannot be blocked. | |
void | objectNameChanged (const QString &objectName, QPrivateSignal) |
This signal is emitted after the object's name has been changed. | |
![]() | |
QScopedPointer< QObjectData > | d_ptr |
![]() | |
QString | objectName |
the name of this object | |
![]() | |
template< class T > T | qobject_cast (const QObject *object) |
Returns the given object cast to type T if the object is of type T (or of a subclass); otherwise returns \nullptr. | |
template< typename T > T | qFindChildqFindChildren (const QObject *obj, const QString &name)() |
template< typename T > QList< T > | qFindChildrenqFindChildren (const QObject *obj, const QString &name)() |
QObjectList | |
\macro Q_CLASSINFO(Name, Value) | |
Definition at line 28 of file qquickstyle.h.
Enumerator | |
---|---|
CC_SpinBox | |
CC_ComboBox | |
CC_ScrollBar | |
CC_Slider | |
CC_ToolButton | |
CC_TitleBar | |
CC_Dial | |
CC_GroupBox | |
CC_MdiControls | |
CC_CustomBase |
Definition at line 295 of file qquickstyle.h.
Definition at line 509 of file qquickstyle.h.
Definition at line 142 of file qquickstyle.h.
Definition at line 369 of file qquickstyle.h.
Definition at line 76 of file qquickstyle.h.
Enumerator | |
---|---|
RSIP_OnMouseClickAndAlreadyFocused | |
RSIP_OnMouseClick |
Definition at line 540 of file qquickstyle.h.
Definition at line 673 of file qquickstyle.h.
Definition at line 40 of file qquickstyle.h.
Definition at line 546 of file qquickstyle.h.
Definition at line 311 of file qquickstyle.h.
Definition at line 211 of file qquickstyle.h.
|
protected |
QStyle::QStyle | ( | ) |
|
virtual |
Destroys the style object.
Definition at line 51 of file qquickstyle.cpp.
Referenced by QQC2::QCommonStyle::drawControl().
|
static |
Returns a new rectangle of the specified size that is aligned to the given rectangle according to the specified alignment and direction.
Definition at line 227 of file qquickstyle.cpp.
References Qt::AlignBottom, Qt::AlignHCenter, alignment, Qt::AlignRight, Qt::AlignVCenter, direction, QSize::height(), QRect::size(), visualAlignment(), QSize::width(), QRect::x(), and QRect::y().
Referenced by QQC2::QCommonStylePrivate::calculateElidedText(), QQC2::QCommonStyle::drawControl(), drawItemPixmap(), QQC2::QCommonStyle::subControlRect(), and QQC2::QCommonStylePrivate::viewItemLayout().
|
pure virtual |
Implemented in QQC2::QCommonStyle, QQC2::QWindowsStyle, and QQC2::QWindowsXPStyle.
Referenced by QQuickStyleItemComboBox::paintEvent(), QQuickStyleItemDial::paintEvent(), QQuickStyleItemGroupBox::paintEvent(), QQuickStyleItemScrollBar::paintEvent(), QQuickStyleItemScrollViewCorner::paintEvent(), QQuickStyleItemSlider::paintEvent(), and QQuickStyleItemSpinBox::paintEvent().
|
pure virtual |
Implemented in QQC2::QCommonStyle, QQC2::QWindowsStyle, and QQC2::QWindowsXPStyle.
Referenced by QQC2::QCommonStyle::drawComplexControl(), QQC2::QWindowsXPStyle::drawComplexControl(), QQC2::QCommonStyle::drawControl(), QQuickStyleItemButton::paintEvent(), QQuickStyleItemCheckBox::paintEvent(), QQuickStyleItemFrame::paintEvent(), QQuickStyleItemProgressBar::paintEvent(), and QQuickStyleItemRadioButton::paintEvent().
|
virtual |
Draws the given pixmap in the specified rectangle, according to the specified alignment, using the provided painter.
Definition at line 174 of file qquickstyle.cpp.
References aligned(), alignedRect(), alignment, QPainter::drawPixmap(), QRect::height(), QGuiApplication::layoutDirection, painter, pixmap, rect, QRect::width(), QRect::x(), and QRect::y().
Referenced by QQC2::QCommonStyle::drawComplexControl(), QQC2::QWindowsXPStyle::drawComplexControl(), QQC2::QCommonStyle::drawControl(), QQC2::QWindowsXPStyle::drawControl(), and QQC2::QCommonStyle::drawPrimitive().
|
virtual |
Draws the given text in the specified rectangle using the provided painter and palette.
The text is drawn using the painter's pen, and aligned and wrapped according to the specified alignment. If an explicit textRole is specified, the text is drawn using the palette's color for the given role. The enabled parameter indicates whether or not the item is enabled; when reimplementing this function, the enabled parameter should influence how the item is drawn.
Definition at line 136 of file qquickstyle.cpp.
References alignment, QPainter::background(), QPalette::brush(), QBrush::color(), Qt::Dense5Pattern, QPainter::drawText(), QPainter::fillRect(), QString::isEmpty(), QPalette::light(), QPalette::NoRole, painter, QPainter::pen(), proxy(), rect, QPainter::setPen(), SH_DitherDisabledText, SH_EtchDisabledText, styleHint(), text, and QPen::widthF().
Referenced by QQC2::QCommonStyle::drawComplexControl(), QQC2::QCommonStyle::drawControl(), QQC2::QWindowsStyle::drawControl(), and QQC2::QWindowsXPStyle::drawControl().
|
pure virtual |
Implemented in QQC2::QCommonStyle, QQC2::QWindowsStyle, and QQC2::QWindowsXPStyle.
Referenced by QQC2::drawArrow(), QQC2::QCommonStyle::drawComplexControl(), QQC2::QWindowsStyle::drawComplexControl(), QQC2::QWindowsXPStyle::drawComplexControl(), QQC2::QCommonStyle::drawControl(), QQC2::QWindowsStyle::drawControl(), QQC2::QWindowsXPStyle::drawControl(), QQC2::QCommonStyle::drawPrimitive(), QQC2::QWindowsStyle::drawPrimitive(), QQC2::QWindowsXPStyle::drawPrimitive(), QQuickStyleItemTextField::paintEvent(), and QQuickStyleItemTreeIndicator::paintEvent().
|
pure virtual |
Implemented in QQC2::QCommonStyle.
Referenced by QQuickStyleItemButton::styleFont(), QQuickStyleItemCheckBox::styleFont(), QQuickStyleItemComboBox::styleFont(), QQuickStyleItemDial::styleFont(), QQuickStyleItemGroupBox::styleFont(), QQuickStyleItemProgressBar::styleFont(), QQuickStyleItemRadioButton::styleFont(), QQuickStyleItemScrollBar::styleFont(), QQuickStyleItemSlider::styleFont(), QQuickStyleItemSpinBox::styleFont(), and QQuickStyleItemTextField::styleFont().
|
pure virtual |
Implemented in QQC2::QCommonStyle.
|
pure virtual |
Implemented in QQC2::QCommonStyle.
Returns the area within the given rectangle in which to draw the specified pixmap according to the defined alignment.
Definition at line 97 of file qquickstyle.cpp.
References Qt::AlignBottom, Qt::AlignHCenter, Qt::AlignLeft, alignment, Qt::AlignRight, Qt::AlignVCenter, QGuiApplication::isRightToLeft(), pixmap, and rect.
Referenced by QQC2::QCommonStyle::subElementRect().
|
virtual |
Returns the area within the given rectangle in which to draw the provided text according to the specified font metrics and alignment.
The enabled parameter indicates whether or not the associated item is enabled.
If the given rectangle is larger than the area needed to render the text, the rectangle that is returned will be offset within rectangle according to the specified alignment. For example, if alignment is Qt::AlignCenter, the returned rectangle will be centered within rectangle. If the given rectangle is smaller than the area needed, the returned rectangle will be the smallest rectangle large enough to render the text.
Definition at line 73 of file qquickstyle.cpp.
References alignment, QString::isEmpty(), proxy(), rect, SH_EtchDisabledText, styleHint(), and text.
Referenced by QQC2::QCommonStyle::subElementRect().
|
pure virtual |
Implemented in QQC2::QCommonStyle, and QQC2::QWindowsXPStyle.
|
pure virtual |
Implemented in QQC2::QCommonStyle.
Referenced by QQuickStyleItemButton::calculateGeometry(), QQuickStyleItemCheckBox::calculateGeometry(), QQuickStyleItemComboBox::calculateGeometry(), QQuickStyleItemDial::calculateGeometry(), QQuickStyleItemFrame::calculateGeometry(), QQuickStyleItemGroupBox::calculateGeometry(), QQuickStyleItemProgressBar::calculateGeometry(), QQuickStyleItemRadioButton::calculateGeometry(), QQuickStyleItemScrollBar::calculateGeometry(), QQuickStyleItemSlider::calculateGeometry(), QQuickStyleItemSpinBox::calculateGeometry(), and QQuickStyleItemTextField::calculateGeometry().
|
pure virtual |
Implemented in QQC2::QCommonStyle, QQC2::QWindowsStyle, and QQC2::QWindowsXPStyle.
Referenced by QQuickStyleItemButton::calculateGeometry(), QQuickStyleItemCheckBox::calculateGeometry(), QQuickStyleItemComboBox::calculateGeometry(), QQuickStyleItemDial::calculateGeometry(), QQuickStyleItemProgressBar::calculateGeometry(), QQuickStyleItemRadioButton::calculateGeometry(), QQuickStyleItemSlider::calculateGeometry(), QQuickStyleItemSpinBox::calculateGeometry(), QQuickStyleItemTextField::calculateGeometry(), QQC2::QCommonStyle::drawComplexControl(), QQC2::QWindowsStyle::drawComplexControl(), QQC2::QWindowsXPStyle::drawComplexControl(), QQC2::QCommonStyle::drawControl(), QQC2::QWindowsStyle::drawControl(), QQC2::QWindowsXPStyle::drawControl(), QQC2::QCommonStyle::drawPrimitive(), QQC2::QWindowsStyle::drawPrimitive(), QQC2::QWindowsXPStyle::drawPrimitive(), QQC2::QCommonStyle::pixelMetric(), QQC2::QWindowsStyle::pixelMetric(), QQC2::QCommonStyle::sizeFromContents(), QQC2::QWindowsStyle::sizeFromContents(), QQC2::QWindowsXPStyle::sizeFromContents(), QQC2::QWindowsXPStyle::styleHint(), QQC2::QCommonStyle::styleHint(), QQC2::QCommonStyle::subControlRect(), QQC2::QWindowsXPStyle::subControlRect(), QQC2::QCommonStyle::subElementRect(), QQC2::QWindowsStyle::subElementRect(), QQC2::QWindowsXPStyle::subElementRect(), QQC2::QCommonStylePrivate::tabLayout(), QQC2::QCommonStylePrivate::viewItemDrawText(), QQC2::QCommonStylePrivate::viewItemLayout(), and QQC2::QCommonStylePrivate::viewItemSize().
|
inlinevirtual |
Reimplemented in QQC2::QWindowsStyle.
Definition at line 784 of file qquickstyle.h.
Referenced by QQuickStyleItem::event().
|
inline |
Definition at line 794 of file qquickstyle.h.
Referenced by QQC2::QCommonStyle::drawComplexControl(), QQC2::QWindowsStyle::drawComplexControl(), QQC2::QWindowsXPStyle::drawComplexControl(), QQC2::QCommonStyle::drawControl(), QQC2::QWindowsStyle::drawControl(), QQC2::QWindowsXPStyle::drawControl(), drawItemText(), QQC2::QCommonStyle::drawPrimitive(), QQC2::QWindowsStyle::drawPrimitive(), QQC2::QWindowsXPStyle::drawPrimitive(), QQC2::QCommonStyle::hitTestComplexControl(), itemTextRect(), QQC2::QCommonStyle::pixelMetric(), QQC2::QWindowsStyle::pixelMetric(), QQC2::QCommonStyle::sizeFromContents(), QQC2::QWindowsStyle::sizeFromContents(), QQC2::QWindowsXPStyle::sizeFromContents(), QQC2::QCommonStyle::standardIcon(), QQC2::QCommonStyle::standardPixmap(), QQC2::QWindowsXPStyle::styleHint(), QQC2::QCommonStyle::styleHint(), QQC2::QCommonStyle::subControlRect(), QQC2::QWindowsXPStyle::subControlRect(), QQC2::QCommonStyle::subElementRect(), QQC2::QWindowsStyle::subElementRect(), and QQC2::QWindowsXPStyle::subElementRect().
|
pure virtual |
Implemented in QQC2::QCommonStyle, QQC2::QWindowsStyle, and QQC2::QWindowsXPStyle.
Referenced by QQuickStyleItemButton::calculateGeometry(), QQuickStyleItemCheckBox::calculateGeometry(), QQuickStyleItemComboBox::calculateGeometry(), QQuickStyleItemDial::calculateGeometry(), QQuickStyleItemFrame::calculateGeometry(), QQuickStyleItemGroupBox::calculateGeometry(), QQuickStyleItemProgressBar::calculateGeometry(), QQuickStyleItemRadioButton::calculateGeometry(), QQuickStyleItemScrollBar::calculateGeometry(), QQuickStyleItemScrollViewCorner::calculateGeometry(), QQuickStyleItemSlider::calculateGeometry(), QQuickStyleItemSpinBox::calculateGeometry(), QQuickStyleItemTextField::calculateGeometry(), QQuickStyleItemScrollBar::paintEvent(), and QQuickStyleItemScrollViewCorner::paintEvent().
|
static |
Converts the given logicalValue to a pixel position.
The min parameter maps to 0, max maps to span and other values are distributed evenly in-between.
This function can handle the entire integer range without overflow, providing that span is less than 4096.
By default, this function assumes that the maximum value is on the right for horizontal items and on the bottom for vertical items. Set the upsideDown parameter to true to reverse this behavior.
Definition at line 276 of file qquickstyle.cpp.
Referenced by QQC2::QCommonStyle::drawComplexControl(), QQC2::QWindowsXPStyle::drawComplexControl(), and QQC2::QCommonStyle::subControlRect().
|
static |
Converts the given pixel position to a logical value.
0 maps to the min parameter, span maps to max and other values are distributed evenly in-between.
This function can handle the entire integer range without overflow.
By default, this function assumes that the maximum value is on the right for horizontal items and on the bottom for vertical items. Set the upsideDown parameter to true to reverse this behavior.
Definition at line 319 of file qquickstyle.cpp.
References pos.
|
pure virtual |
Implemented in QQC2::QCommonStyle, QQC2::QWindowsStyle, and QQC2::QWindowsXPStyle.
Referenced by QQC2::QCommonStyle::drawComplexControl(), QQC2::QWindowsXPStyle::drawComplexControl(), QQC2::QWindowsXPStyle::drawControl(), and QQC2::QCommonStyle::subElementRect().
|
virtual |
Returns the style's standard palette.
Note that on systems that support system colors, the style's standard palette is not used. In particular, the Windows Vista and Mac styles do not use the standard palette, but make use of native theme engines. With these styles, you should not set the palette with QApplication::setPalette().
Reimplemented in QQC2::QWindowsXPStyle.
Definition at line 353 of file qquickstyle.cpp.
References QPalette::Base, Qt::black, QPalette::ButtonText, QColor::darker(), QPalette::Disabled, Qt::gray, QColor::lighter(), palette, QPalette::Text, Qt::white, and QPalette::WindowText.
Referenced by QQC2::QWindowsXPStyle::standardPalette().
|
pure virtual |
Implemented in QQC2::QCommonStyle, QQC2::QWindowsXPStyle, and QQC2::QWindowsStyle.
Referenced by QQC2::QCommonStyle::standardPixmap().
|
pure virtual |
Implemented in QQC2::QWindowsStyle, QQC2::QWindowsXPStyle, and QQC2::QCommonStyle.
Referenced by QQC2::QCommonStyle::drawControl(), QQC2::QWindowsStyle::drawControl(), QQC2::QWindowsXPStyle::drawControl(), drawItemText(), QQC2::QCommonStyle::drawPrimitive(), QQC2::QWindowsStyle::drawPrimitive(), itemTextRect(), and QQC2::QCommonStyle::subControlRect().
|
pure virtual |
Implemented in QQC2::QCommonStyle, and QQC2::QWindowsXPStyle.
Referenced by QQuickStyleItemComboBox::calculateGeometry(), QQuickStyleItemGroupBox::calculateGeometry(), QQuickStyleItemSpinBox::calculateGeometry(), QQC2::QCommonStyle::drawComplexControl(), QQC2::QWindowsStyle::drawComplexControl(), QQC2::QWindowsXPStyle::drawComplexControl(), QQC2::QCommonStyle::drawControl(), QQC2::QCommonStyle::hitTestComplexControl(), QQuickStyleItemScrollBar::paintEvent(), QQC2::QCommonStyle::sizeFromContents(), and QQC2::QWindowsXPStyle::sizeFromContents().
|
pure virtual |
Implemented in QQC2::QCommonStyle, QQC2::QWindowsStyle, and QQC2::QWindowsXPStyle.
Referenced by QQuickStyleItemButton::calculateGeometry(), QQuickStyleItemCheckBox::calculateGeometry(), QQuickStyleItemComboBox::calculateGeometry(), QQuickStyleItemDial::calculateGeometry(), QQuickStyleItemFrame::calculateGeometry(), QQuickStyleItemGroupBox::calculateGeometry(), QQuickStyleItemProgressBar::calculateGeometry(), QQuickStyleItemRadioButton::calculateGeometry(), QQuickStyleItemScrollBar::calculateGeometry(), QQuickStyleItemSlider::calculateGeometry(), QQuickStyleItemSpinBox::calculateGeometry(), QQuickStyleItemTextField::calculateGeometry(), QQC2::QCommonStyle::drawControl(), and QQuickStyleItemProgressBar::paintEvent().
|
static |
Transforms an alignment of Qt::AlignLeft or Qt::AlignRight without Qt::AlignAbsolute into Qt::AlignLeft or Qt::AlignRight with Qt::AlignAbsolute according to the layout direction.
The other alignment flags are left untouched.
If no horizontal alignment was specified, the function returns the default alignment for the given layout direction.
Definition at line 256 of file qquickstyle.cpp.
References alignment, direction, and QGuiApplicationPrivate::visualAlignment().
Referenced by alignedRect(), QQC2::QCommonStyle::drawControl(), and QQC2::QCommonStylePrivate::viewItemDrawText().
|
static |
Returns the given logicalPosition converted to screen coordinates based on the specified direction.
The boundingRectangle is used when performing the translation.
Definition at line 216 of file qquickstyle.cpp.
References boundingRect(), direction, Qt::LeftToRight, QRectF::right(), QPoint::x(), and QPoint::y().
|
static |
Returns the given logicalRectangle converted to screen coordinates based on the specified direction.
The boundingRectangle is used when performing the translation.
This function is provided to support right-to-left desktops, and is typically used in implementations of the subControlRect() function.
Definition at line 197 of file qquickstyle.cpp.
References boundingRect(), direction, Qt::LeftToRight, rect, QRect::right(), QRectF::right(), QRect::width(), and QRectF::width().
Referenced by QQC2::QCommonStyle::drawComplexControl(), QQC2::QCommonStyle::drawControl(), QQC2::QWindowsStyle::drawControl(), QQC2::QWindowsXPStyle::drawControl(), QQC2::QCommonStyle::subControlRect(), QQC2::QWindowsXPStyle::subControlRect(), QQC2::QCommonStyle::subElementRect(), QQC2::QWindowsStyle::subElementRect(), QQC2::QWindowsXPStyle::subElementRect(), and QQC2::QCommonStylePrivate::tabLayout().