![]() |
Qt 6.x
The Qt SDK
|
#include <qmacstyle_mac_p_p.h>
Classes | |
struct | CocoaControl |
Public Types | |
enum | Direction { North , South , East , West } |
enum | CocoaControlType { NoControl , Box , Box_Dark , Button_CheckBox , Button_Disclosure , Button_PopupButton , Button_PullDown , Button_PushButton , Button_RadioButton , Button_SquareButton , Button_WindowClose , Button_WindowMiniaturize , Button_WindowZoom , ComboBox , ProgressIndicator_Determinate , ProgressIndicator_Indeterminate , Scroller_Horizontal , Scroller_Vertical , SegmentedControl_First , SegmentedControl_Middle , SegmentedControl_Last , SegmentedControl_Single , Slider_Horizontal , Slider_Vertical , SplitView_Horizontal , SplitView_Vertical , Stepper , TextField } |
enum | Animates { AquaPushButton , AquaProgressBar , AquaListViewItemOpen , AquaScrollBar } |
typedef void(^ | DrawRectBlock) (CGContextRef, const CGRect &) |
![]() | |
typedef void(* | StaticMetaCallFunction) (QObject *, QMetaObject::Call, int, void **) |
using | ConnectionDataPointer = QExplicitlySharedDataPointer< ConnectionData > |
Static Public Member Functions | |
static CGRect | comboboxInnerBounds (const CGRect &outterBounds, const CocoaControl &cocoaWidget) |
static QRectF | comboboxEditBounds (const QRectF &outterBounds, const CocoaControl &cw) |
![]() | |
static bool | useFullScreenForPopup () |
![]() | |
static bool | removeConnection (Connection *c) |
static QObjectPrivate * | get (QObject *o) |
static const QObjectPrivate * | get (const QObject *o) |
template<typename Func1 , typename Func2 > | |
static QMetaObject::Connection | connect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const typename QtPrivate::FunctionPointer< Func2 >::Object *receiverPrivate, Func2 slot, Qt::ConnectionType type=Qt::AutoConnection) |
template<typename Func1 , typename Func2 > | |
static bool | disconnect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const typename QtPrivate::FunctionPointer< Func2 >::Object *receiverPrivate, Func2 slot) |
static QMetaObject::Connection | connectImpl (const QObject *sender, int signal_index, const QObject *receiver, void **slot, QtPrivate::QSlotObjectBase *slotObj, int type, const int *types, const QMetaObject *senderMetaObject) |
static QMetaObject::Connection | connect (const QObject *sender, int signal_index, QtPrivate::QSlotObjectBase *slotObj, Qt::ConnectionType type) |
static QMetaObject::Connection | connect (const QObject *sender, int signal_index, const QObject *receiver, QtPrivate::QSlotObjectBase *slotObj, Qt::ConnectionType type) |
static bool | disconnect (const QObject *sender, int signal_index, void **slot) |
static bool | disconnect (const QObject *sender, int signal_index, const QObject *receiver, void **slot) |
Static Public Attributes | |
static const int | PushButtonLeftOffset = 6 |
static const int | PushButtonRightOffset = 12 |
static const int | PushButtonContentPadding = 6 |
static QList< QPointer< QObject > > | scrollBars |
Definition at line 149 of file qmacstyle_mac_p_p.h.
typedef void(^ QMacStylePrivate::DrawRectBlock) (CGContextRef, const CGRect &) |
Definition at line 205 of file qmacstyle_mac_p_p.h.
Enumerator | |
---|---|
AquaPushButton | |
AquaProgressBar | |
AquaListViewItemOpen | |
AquaScrollBar |
Definition at line 215 of file qmacstyle_mac_p_p.h.
Definition at line 157 of file qmacstyle_mac_p_p.h.
Enumerator | |
---|---|
North | |
South | |
East | |
West |
Definition at line 153 of file qmacstyle_mac_p_p.h.
QMacStylePrivate::QMacStylePrivate | ( | ) |
Definition at line 1781 of file qmacstyle_mac.mm.
QMacStylePrivate::~QMacStylePrivate | ( | ) |
Definition at line 1786 of file qmacstyle_mac.mm.
References cocoaCells, cocoaControls, pool, and release().
|
inline |
Definition at line 222 of file qmacstyle_mac_p_p.h.
QStyleHelper::WidgetSizePolicy QMacStylePrivate::aquaSizeConstrain | ( | const QStyleOption * | option, |
const QWidget * | widg, | ||
QStyle::ContentsType | ct = QStyle::CT_CustomBase , |
||
QSize | szHint = QSize(-1, -1) , |
||
QSize * | insz = 0 |
||
) | const |
Definition at line 1443 of file qmacstyle_mac.mm.
References QByteArray::constData(), QSize::height(), QWidget::height, QObject::objectName, Q_UNUSED, qDebug, qEnvironmentVariableIsSet(), qt_aqua_get_known_size(), qt_aqua_guess_size(), ret, QStyleHelper::SizeDefault, QStyleHelper::SizeLarge, QStyleHelper::SizeMini, QStyleHelper::SizeSmall, QStyle::State_Mini, QStyle::State_Small, QString::toLatin1(), QStyleHelper::widgetSizePolicy(), QSize::width(), and QWidget::width.
NSCell * QMacStylePrivate::cocoaCell | ( | CocoaControl | widget | ) | const |
Definition at line 1947 of file qmacstyle_mac.mm.
References Button_Disclosure, cocoaCells, QWidget::size, QStyleHelper::SizeMini, QStyleHelper::SizeSmall, Stepper, and widget.
NSView * QMacStylePrivate::cocoaControl | ( | CocoaControl | widget | ) | const |
Definition at line 1795 of file qmacstyle_mac.mm.
References Box, Box_Dark, button, Button_CheckBox, Button_Disclosure, Button_PopupButton, Button_PullDown, Button_PushButton, Button_RadioButton, Button_SquareButton, Button_WindowClose, Button_WindowMiniaturize, Button_WindowZoom, cocoaControls, ComboBox, isDarkMode(), NoControl, pi, ProgressIndicator_Determinate, ProgressIndicator_Indeterminate, Scroller_Horizontal, Scroller_Vertical, QWidget::size, QStyleHelper::SizeDefault, QStyleHelper::SizeMini, QStyleHelper::SizeSmall, Slider_Horizontal, Slider_Vertical, SplitView_Horizontal, SplitView_Vertical, TextField, and widget.
|
static |
Inside a combobox Qt places a line edit widget. The size of this widget should depend on the kind of combobox we choose to draw. This function calculates and returns this size.
Definition at line 1742 of file qmacstyle_mac.mm.
References Button_PopupButton, ComboBox, cw, ret, QStyleHelper::SizeLarge, QStyleHelper::SizeMini, and QStyleHelper::SizeSmall.
Referenced by QMacStyle::subControlRect().
|
static |
Carbon draws comboboxes (and other views) outside the rect given as argument. Use this function to obtain the corresponding inner rect for drawing the same combobox so that it stays inside the given outerBounds.
Definition at line 1685 of file qmacstyle_mac.mm.
References Button_PopupButton, ComboBox, QMacStylePrivate::CocoaControl::size, QStyleHelper::SizeDefault, QStyleHelper::SizeLarge, QStyleHelper::SizeMini, QStyleHelper::SizeSmall, and QMacStylePrivate::CocoaControl::type.
Referenced by QQC2_NAMESPACE::QMacStyle::sizeFromContents(), QMacStyle::sizeFromContents(), QQC2_NAMESPACE::QMacStyle::subControlRect(), and QMacStyle::subControlRect().
void QMacStylePrivate::drawFocusRing | ( | QPainter * | p, |
const QRectF & | targetRect, | ||
int | hMargin, | ||
int | vMargin, | ||
const CocoaControl & | cw | ||
) | const |
Definition at line 1117 of file qmacstyle_mac.mm.
References QPainterPath::addEllipse(), QPainterPath::addPath(), QPainterPath::addRect(), QPainterPath::addRoundedRect(), QRectF::adjust(), QRectF::adjusted(), QPainter::Antialiasing, Button_PullDown, Button_PushButton, QOperatingSystemVersion::current(), cw, focusRingWidth, QRectF::height(), hMargin, isDarkMode(), QRectF::left(), QOperatingSystemVersion::MacOSBigSur, QOperatingSystemVersion::MacOSCatalina, Qt::OddEvenFill, pullDownButtonShadowMargins, pushButtonShadowMargins, qt_mac_toQColor(), rect, QPainterPath::setFillRule(), QMacStylePrivate::CocoaControl::size, QStyleHelper::SizeLarge, QStyleHelper::SizeMini, QStyleHelper::SizeSmall, QRectF::top(), QRectF::topLeft(), QRectF::translate(), QRectF::translated(), and vMargin.
void QMacStylePrivate::drawNSViewInRect | ( | NSView * | view, |
const QRectF & | rect, | ||
QPainter * | p, | ||
__attribute__((noescape)) DrawRectBlock | drawRectBlock = nil |
||
) | const |
Definition at line 1983 of file qmacstyle_mac.mm.
References backingStoreNSView, rect, restoreNSGraphicsContext(), setupNSGraphicsContext(), and view.
void QMacStylePrivate::drawToolbarButtonArrow | ( | const QStyleOption * | opt, |
QPainter * | p | ||
) | const |
Definition at line 5133 of file qmacstyle_mac.mm.
References QRect::bottom(), opt, QStyle::PE_IndicatorArrowDown, QStyleOption::rect, QRect::right(), toolButtonArrowMargin, and toolButtonArrowSize.
QStyleHelper::WidgetSizePolicy QMacStylePrivate::effectiveAquaSizeConstrain | ( | const QStyleOption * | option, |
const QWidget * | widg, | ||
QStyle::ContentsType | ct = QStyle::CT_CustomBase , |
||
QSize | szHint = QSize(-1, -1) , |
||
QSize * | insz = 0 |
||
) | const |
Definition at line 1432 of file qmacstyle_mac.mm.
References QStyleHelper::SizeDefault, and QStyleHelper::SizeLarge.
Definition at line 2028 of file qmacstyle_mac.mm.
References backingStoreNSView, and window().
void QMacStylePrivate::restoreNSGraphicsContext | ( | CGContextRef | cg | ) | const |
Definition at line 5153 of file qmacstyle_mac.mm.
Referenced by drawNSViewInRect(), and QQC2::QMacStylePrivate::drawNSViewInRect().
void QMacStylePrivate::setupNSGraphicsContext | ( | CGContextRef | cg, |
bool | flipped | ||
) | const |
Definition at line 5144 of file qmacstyle_mac.mm.
Referenced by drawNSViewInRect(), and QQC2::QMacStylePrivate::drawNSViewInRect().
void QMacStylePrivate::setupVerticalInvertedXform | ( | CGContextRef | cg, |
bool | reverse, | ||
bool | vertical, | ||
const CGRect & | rect | ||
) | const |
Definition at line 3475 of file qmacstyle_mac.mm.
QMacStylePrivate::CocoaControlType QMacStylePrivate::windowButtonCocoaControl | ( | QStyle::SubControl | sc | ) | const |
Definition at line 1308 of file qmacstyle_mac.mm.
References Button_WindowClose, Button_WindowMiniaturize, Button_WindowZoom, QStyle::SC_TitleBarCloseButton, QStyle::SC_TitleBarMaxButton, and QStyle::SC_TitleBarMinButton.
QPainterPath QMacStylePrivate::windowPanelPath | ( | const QRectF & | r | ) | const |
Definition at line 1277 of file qmacstyle_mac.mm.
QMacKeyValueObserver QMacStylePrivate::appearanceObserver |
Definition at line 267 of file qmacstyle_mac_p_p.h.
Definition at line 257 of file qmacstyle_mac_p_p.h.
|
mutable |
Definition at line 261 of file qmacstyle_mac_p_p.h.
Referenced by drawNSViewInRect(), and resolveCurrentNSView().
|
mutable |
Definition at line 263 of file qmacstyle_mac_p_p.h.
Referenced by ~QMacStylePrivate(), and cocoaCell().
|
mutable |
Definition at line 262 of file qmacstyle_mac_p_p.h.
Referenced by ~QMacStylePrivate(), and cocoaControl().
|
mutable |
Definition at line 260 of file qmacstyle_mac_p_p.h.
|
static |
Definition at line 213 of file qmacstyle_mac_p_p.h.
Referenced by QQC2_NAMESPACE::QMacStyle::drawControl(), and QMacStyle::drawControl().
|
static |
Definition at line 211 of file qmacstyle_mac_p_p.h.
Referenced by QQC2_NAMESPACE::QMacStyle::sizeFromContents(), and QMacStyle::sizeFromContents().
|
static |
Definition at line 212 of file qmacstyle_mac_p_p.h.
Referenced by QQC2_NAMESPACE::QMacStyle::sizeFromContents(), and QMacStyle::sizeFromContents().
Definition at line 258 of file qmacstyle_mac_p_p.h.
Referenced by QMacStyle::QMacStyle(), QQC2_NAMESPACE::QMacStyle::QMacStyle(), QQC2_NAMESPACE::QMacStyle::drawComplexControl(), and QMacStyle::drawComplexControl().
std::optional<QFont> QMacStylePrivate::smallSystemFont |
Definition at line 265 of file qmacstyle_mac_p_p.h.