87#if QT_CONFIG(wheelevent)
88 QPoint accumulatedAngleDelta;
99 return attached->d_func();
130 qreal reservedWidth = 0;
131 int resizableCount = 0;
140 if (!
p->widthValid())
143 reservedWidth +=
item->width();
154 if (!
p->widthValid()) {
155 item->setWidth(itemWidth);
156 p->widthValidFlag =
false;
158 if (!
p->heightValid()) {
160 p->heightValidFlag =
false;
177 if (!
p->widthValid())
178 totalWidth +=
item->implicitWidth();
180 totalWidth +=
item->width();
194 maxHeight =
qMax(maxHeight,
item->implicitHeight());
306 d->updateCurrentItem();
319 return qobject_cast<QQuickTabButton *>(
item);
329 QQuickTabBarAttached *attached = qobject_cast<QQuickTabBarAttached *>(qmlAttachedPropertiesObject<QQuickTabBar>(
item));
332 d->updateImplicitContentSize();
339 QQuickTabBarAttached *attached = qobject_cast<QQuickTabBarAttached *>(qmlAttachedPropertiesObject<QQuickTabBar>(
item));
350 QQuickTabBarAttached *attached = qobject_cast<QQuickTabBarAttached *>(qmlAttachedPropertiesObject<QQuickTabBar>(
item));
353 d->updateImplicitContentSize();
358#if QT_CONFIG(wheelevent)
359void QQuickTabBar::wheelEvent(QWheelEvent *
event)
362 QQuickContainer::wheelEvent(
event);
363 if (
d->wheelEnabled) {
364 d->accumulatedAngleDelta +=
event->angleDelta();
365 int xSteps =
d->accumulatedAngleDelta.x() / QWheelEvent::DefaultDeltasPerStep;
366 int ySteps =
d->accumulatedAngleDelta.y() / QWheelEvent::DefaultDeltasPerStep;
367 if (xSteps > 0 || ySteps > 0) {
368 decrementCurrentIndex();
369 d->accumulatedAngleDelta =
QPoint();
370 }
else if (xSteps < 0 || ySteps < 0) {
371 incrementCurrentIndex();
372 d->accumulatedAngleDelta =
QPoint();
383#if QT_CONFIG(accessibility)
384QAccessible::Role QQuickTabBar::accessibleRole()
const
386 return QAccessible::PageTabList;
427 const int oldIndex =
index;
434 if (oldTabBar != newTabBar) {
439 emit q->tabBarChanged();
442 if (oldIndex != newIndex)
443 emit q->indexChanged();
444 if (oldPos !=
q->position())
445 emit q->positionChanged();
470 return d->tabBar->position();
475#include "moc_qquicktabbar_p.cpp"
void reserve(qsizetype size)
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)
static bool disconnect(const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const typename QtPrivate::FunctionPointer< Func2 >::Object *receiverPrivate, Func2 slot)
static QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
\threadsafe
static bool disconnect(const QObject *sender, const char *signal, const QObject *receiver, const char *member)
\threadsafe
The QPalette class contains color groups for each widget state.
\inmodule QtCore\reentrant
int count() const override
\qmlproperty int QtQml.Models::ObjectModel::count
int indexOf(QObject *object, QObject *objectContext) const override
QQmlObjectModel * contentModel
void componentComplete() override
Invoked after the root component that caused this instantiation has completed construction.
void currentIndexChanged()
void updateImplicitContentSize()
QQuickDeferredPointer< QQuickItem > contentItem
void updateImplicitContentWidth()
void updateImplicitContentHeight()
virtual void itemGeometryChanged(QQuickItem *, QQuickGeometryChange, const QRectF &)
virtual void itemImplicitWidthChanged(QQuickItem *)
virtual void itemImplicitHeightChanged(QQuickItem *)
static QQuickItemPrivate * get(QQuickItem *item)
The QQuickItem class provides the most basic of all visual items in \l {Qt Quick}.
void setFlag(Flag flag, bool enabled=true)
Enables the specified flag for this item if enabled is true; if enabled is false, the flag is disable...
virtual void geometryChange(const QRectF &newGeometry, const QRectF &oldGeometry)
qreal width
This property holds the width of this item.
bool isComponentComplete() const
Returns true if construction of the QML component is complete; otherwise returns false.
virtual void updatePolish()
This function should perform any layout as required for this item.
void polish()
Schedules a polish event for this item.
void update(QQuickTabBar *tabBar, int index)
\qmlattachedproperty int QtQuick.Controls::TabBar::index
static QQuickTabBarAttachedPrivate * get(QQuickTabBarAttached *attached)
QQuickTabBarAttached(QObject *parent=nullptr)
QQuickTabBar::Position position
Allows the user to switch between different views or subtasks.
void itemImplicitHeightChanged(QQuickItem *item) override
QPalette defaultPalette() const override
qreal getContentHeight() const override
QQuickTabBar::Position position
void itemGeometryChanged(QQuickItem *item, QQuickGeometryChange change, const QRectF &diff) override
void itemImplicitWidthChanged(QQuickItem *item) override
qreal getContentWidth() const override
void updateCurrentIndex()
void componentComplete() override
Invoked after the root component that caused this instantiation has completed construction.
void itemMoved(int index, QQuickItem *item) override
void itemRemoved(int index, QQuickItem *item) override
void setPosition(Position position)
void geometryChange(const QRectF &newGeometry, const QRectF &oldGeometry) override
QFont defaultFont() const override
void updatePolish() override
This function should perform any layout as required for this item.
static QQuickTabBarAttached * qmlAttachedProperties(QObject *object)
QQuickTabBar(QQuickItem *parent=nullptr)
bool isContent(QQuickItem *item) const override
void itemAdded(int index, QQuickItem *item) override
static QPalette palette(Scope scope)
static QFont font(Scope scope)
\inmodule QtCore\reentrant
Combined button and popup list for selecting options.
constexpr const T & qMax(const T &a, const T &b)
GLenum GLenum GLsizei count
GLdouble GLdouble GLdouble GLdouble q
static qreal position(const QQuickItem *item, QQuickAnchors::Anchor anchorLine)
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent