18#include <QtWidgets/private/qtwidgetsglobal_p.h>
20#include "private/qwidget_p.h"
25#if QT_CONFIG(animation)
29#define ANIMATION_DURATION 250
56 : layoutDirty(
false), drawBase(true), elideModeSetByUser(
false), useScrollButtons(
false),
57 useScrollButtonsSetByUser(
false), expanding(true), closeButtonOnTabs(
false),
58 paintWithOffsets(true), movable(
false), dragInProgress(
false), documentMode(
false),
69#if QT_CONFIG(wheelevent)
70 QPoint accumulatedAngleDelta;
77 int switchTabCurrentIndex = -1;
78 int switchTabTimerId = 0;
84 int currentIndex = -1;
85 int pressedIndex = -1;
116#if QT_CONFIG(tooltip)
119#if QT_CONFIG(whatsthis)
122#if QT_CONFIG(accessibility)
140#if QT_CONFIG(animation)
145 void updateCurrentValue(
const QVariant ¤t)
override;
153 std::unique_ptr<TabBarAnimation>
animation;
156 if (!
priv->isAnimated()) {
157 priv->moveTabFinished(
priv->tabList.indexOf(
this));
175 void calculateFirstLastVisible(
int index,
bool visible,
bool remove);
176 int selectNewCurrentIndexFrom(
int currentIndex);
177 int calculateNewPosition(
int from,
int to,
int index)
const;
178 void slide(
int from,
int to);
184 int indexAtPos(
const QPoint &
p)
const;
188 void setCurrentNextEnabledIndex(
int offset);
193 void moveTabFinished(
int index);
197 void layoutWidgets(
int start = 0);
198 void layoutTab(
int index);
199 void updateMacBorderMetrics();
201 void setupMovableTab();
204 int hoveredTabIndex()
const;
206 void initBasicStyleOption(QStyleOptionTab *
option,
int tabIndex)
const;
208 void makeVisible(
int index);
213 QStyleOptionTab tabOverlap;
214 tabOverlap.shape = tabbar->shape();
217 optTabBase->initFrom(tabbar);
218 optTabBase->shape = tabbar->shape();
219 optTabBase->documentMode = tabbar->documentMode();
220 if (theParent && overlap > 0) {
222 switch (tabOverlap.shape) {
229 rect.setRect(0, 0,
size.width(), overlap);
233 rect.setRect(0, 0, overlap,
size.height());
237 rect.setRect(
size.width() - overlap, 0, overlap,
size.height());
240 optTabBase->rect =
rect;
244 void killSwitchTabTimer();
void start(QAbstractAnimation::DeletionPolicy policy=KeepWhenStopped)
Starts the animation.
The QColor class provides colors based on RGB, HSV or CMYK values.
The QIcon class provides scalable icons in different modes and states.
QObject * parent() const
Returns a pointer to the parent object.
The QPaintEvent class contains event parameters for paint events.
Returns a copy of the pixmap that is transformed using the given transformation transform and transfo...
\inmodule QtCore\reentrant
\inmodule QtCore\reentrant
constexpr void setRect(int x, int y, int w, int h) noexcept
Sets the coordinates of the rectangle's top-left corner to ({x}, {y}), and its size to the given widt...
\macro QT_RESTRICTED_CAST_FROM_ASCII
@ SH_Widget_Animation_Duration
bool useScrollButtonsSetByUser
bool validIndex(int index) const
QHash< QString, QSize > textSizes
const Tab * at(int index) const
static void initStyleBaseOption(QStyleOptionTabBarBase *optTabBase, QTabBar *tabbar, QSize size)
bool isTabInMacUnifiedToolbarArea() const
The QTabBar class provides a tab bar, e.g.
Shape
This enum type lists the built-in shapes supported by QTabBar.
void setStartValue(const QVariant &value)
void setDuration(int msecs)
void setEndValue(const QVariant &value)
qDeleteAll(list.begin(), list.end())
void newState(QList< State > &states, const char *token, const char *lexem, bool pre)
Combined button and popup list for selecting options.
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLenum GLenum GLsizei const GLuint GLboolean enabled
GLenum GLuint GLintptr offset
GLdouble GLdouble GLdouble GLdouble q
constexpr bool verticalTabs(QTabBar::Shape shape) noexcept
#define QT_REQUIRE_CONFIG(feature)
static QT_BEGIN_NAMESPACE void init(QTextBoundaryFinder::BoundaryType type, QStringView str, QCharAttributes *attributes)
settings remove("monkey")
Tab(const QIcon &ico, const QString &txt)
void startAnimation(QTabBarPrivate *priv, int duration)