QskTabView

Inherits from QskControl, QskQuickItem, QskSkinnable, QQuickItem

Public Slots

  Name
void setCurrentIndex(int index)

Public Signals

  Name
void currentIndexChanged(int index)
void countChanged(int )
void tabPositionChanged(Qsk::Position )
void autoFitTabsChanged(bool )

Public Functions

  Name
  QskTabView(QQuickItem * parent =nullptr)
  QskTabView(Qsk::Position tabPosition, QQuickItem * parent =nullptr)
  ~QskTabView() override
const QskTabBar * tabBar() const
QskTabBar * tabBar()
void setTabPosition(Qsk::Position position)
Qsk::Position tabPosition() const
void setAutoFitTabs(bool on)
bool autoFitTabs() const
Qt::Orientation orientation() const
int addTab(QskTabButton * button, QQuickItem * item)
int insertTab(int index, QskTabButton * button, QQuickItem * item)
int addTab(const QString & tabText, QQuickItem * item)
int insertTab(int index, const QString & tabText, QQuickItem * item)
void removeTab(int index)
void clear(bool autoDelete =false)
QQuickItem * itemAt(int index) const
QskTabButton * buttonAt(int index) const
int itemIndex(const QQuickItem * item)
int buttonIndex(const QskTabButton * button)
QQuickItem * currentItem() const
QskTabButton * currentButton() const
int currentIndex() const
int count() const
QRectF tabRect() const
QskAspect::Placement effectivePlacement() const override

Protected Functions

  Name
bool event(QEvent * event) override
void updateLayout() override
QSizeF layoutSizeHint(Qt::SizeHint which, const QSizeF & constraint) const override

Public Properties

  Name
QskTabBar * tabBar
Qsk::Position tabPosition
bool autoFitTabs
Qt::Orientation orientation
int count
int currentIndex

Public Attributes

  Name
const QskAspect::Subcontrol TabBar
const QskAspect::Subcontrol Page

Additional inherited members

Public Types inherited from QskControl

  Name
enum LayoutHint { RetainSizeWhenHidden, LayoutWhenHidden}

Public Slots inherited from QskControl

  Name
void setLocale(const QLocale & locale)

Public Signals inherited from QskControl

  Name
void backgroundChanged()
void marginsChanged(const QMarginsF & )
void focusIndicatorRectChanged()
void localeChanged(const QLocale & )
void focusPolicyChanged()
void wheelEnabledChanged()

Public Functions inherited from QskControl

  Name
  QskControl(QQuickItem * parent =nullptr)
  ~QskControl() override
void setMargins(qreal margin)
void setMargins(qreal left, qreal top, qreal right, qreal bottom)
void setMargins(const QMarginsF & margins)
void resetMargins()
QMarginsF margins() const
void setBackgroundColor(const QColor & color)
void setBackground(const QskGradient & gradient)
void resetBackground()
QskGradient background() const
QRectF contentsRect() const
QRectF layoutRect() const
virtual QRectF layoutRectForSize(const QSizeF & size) const
virtual QRectF gestureRect() const
virtual QRectF focusIndicatorRect() const
virtual QRectF focusIndicatorClipRect() const
QRectF subControlRect(QskAspect::Subcontrol subControl) const
QRectF subControlRect(const QSizeF & size, QskAspect::Subcontrol subControl) const
QRectF subControlContentsRect(QskAspect::Subcontrol subControl) const
QRectF subControlContentsRect(const QSizeF & size, QskAspect::Subcontrol subControl) const
void setAutoFillBackground(bool on)
bool autoFillBackground() const
void setAutoLayoutChildren(bool on)
bool autoLayoutChildren() const
void setWheelEnabled(bool on)
bool isWheelEnabled() const
void setFocusPolicy(Qt::FocusPolicy policy)
Qt::FocusPolicy focusPolicy() const
void setSizePolicy(QskSizePolicy::Policy horizontalPolicy, QskSizePolicy::Policy verticalPolicy)
void setSizePolicy(QskSizePolicy policy)
void setSizePolicy(Qt::Orientation orientation, QskSizePolicy::Policy policy)
QskSizePolicy sizePolicy() const
QskSizePolicy::Policy sizePolicy(Qt::Orientation orientation) const
void setLayoutAlignmentHint(Qt::Alignment alignment)
Qt::Alignment layoutAlignmentHint() const
void setLayoutHint(LayoutHint flag, bool on =true)
bool testLayoutHint(LayoutHint hint) const
void setLayoutHints(LayoutHints hints)
LayoutHints layoutHints() const
bool isVisibleToLayout() const
void setMinimumSize(const QSizeF & size)
void setMinimumSize(qreal width, qreal height)
void setMinimumWidth(qreal width)
void setMinimumHeight(qreal height)
void setMaximumSize(const QSizeF & size)
void setMaximumSize(qreal width, qreal height)
void setMaximumWidth(qreal width)
void setMaximumHeight(qreal height)
void setPreferredSize(const QSizeF & size)
void setPreferredSize(qreal width, qreal height)
void setPreferredWidth(qreal width)
void setPreferredHeight(qreal height)
void setFixedSize(const QSizeF & size)
void setFixedSize(qreal width, qreal height)
void setFixedWidth(qreal width)
void setFixedHeight(qreal height)
void setExplicitSizeHint(Qt::SizeHint whichHint, const QSizeF & size)
void setExplicitSizeHint(Qt::SizeHint whichHint, qreal width, qreal height)
void resetExplicitSizeHint(Qt::SizeHint whichHint)
QSizeF minimumSize() const
QSizeF maximumSize() const
QSizeF preferredSize() const
QSizeF explicitSizeHint(Qt::SizeHint whichHint) const
QSizeF implicitSizeHint(Qt::SizeHint whichHint, const QSizeF & constraint) const
QSizeF sizeHint() const
qreal heightForWidth(qreal width) const
qreal widthForHeight(qreal height) const
QSizeF effectiveSizeHint(Qt::SizeHint which, const QSizeF & constraint =QSizeF()) const
QSizeF sizeConstraint(Qt::SizeHint which, const QSizeF & constraint =QSizeF()) const
QSizeF sizeConstraint() const
QLocale locale() const
void resetLocale()
QVector< QskAspect::Subcontrol > subControls() const
QRectF subControlRect(const QRectF & , QskAspect::Subcontrol )
Calculate position and size of a subControl.
QRectF subControlContentsRect(const QRectF & , QskAspect::Subcontrol )
Calculate the inner rectangle for subControl.

Protected Functions inherited from QskControl

  Name
virtual void gestureEvent(QskGestureEvent * )
void hoverEnterEvent(QHoverEvent * event) override
void hoverLeaveEvent(QHoverEvent * event) override
bool childMouseEventFilter(QQuickItem * item, QEvent * event) override
virtual bool gestureFilter(QQuickItem * , QEvent * )
void itemChange(ItemChange , const ItemChangeData & ) override
void geometryChange(const QRectF & newGeometry, const QRectF & oldGeometry) override
void initSizePolicy(QskSizePolicy::Policy horizontalPolicy, QskSizePolicy::Policy verticalPolicy)
virtual void updateResources()
virtual QSizeF contentsSizeHint(Qt::SizeHint which, const QSizeF & constraint) const

Public Properties inherited from QskControl

  Name
QLocale locale
bool autoFillBackground
bool autoLayoutChildren
Qt::FocusPolicy focusPolicy
bool wheelEnabled
bool visibleToLayout
QskMargins margins
QskGradient background
QskSizePolicy sizePolicy
QSizeF minimumSize
QSizeF maximumSize
QSizeF preferredSize
QSizeF sizeConstraint

Public Attributes inherited from QskControl

  Name
const QskAspect::State Disabled
const QskAspect::State Hovered
const QskAspect::State Focused

Public Types inherited from QskQuickItem

  Name
enum UpdateFlag { DeferredUpdate, DeferredPolish, DeferredLayout, CleanupOnVisibility, PreferRasterForTextures, DebugForceBackground}

Public Slots inherited from QskQuickItem

  Name
void setGeometry(const QRectF & rect)
void show()
void hide()
void setHidden(bool on)
void setDisabled(bool on)
void resetImplicitSize()

Public Signals inherited from QskQuickItem

  Name
void itemFlagsChanged()
void updateFlagsChanged(UpdateFlags )

Public Functions inherited from QskQuickItem

  Name
  ~QskQuickItem() override
const char * className() const
bool isVisibleTo(const QQuickItem * ancestor) const
bool isVisibleToParent() const
bool hasChildItems() const
QRectF rect() const
QSizeF implicitSize() const
void setGeometry(qreal x, qreal y, qreal width, qreal height)
void setGeometry(const QPointF & pos, const QSizeF & size)
QRectF geometry() const
void setPosition(qreal x, qreal y)
void setSize(qreal width, qreal height)
void setPolishOnResize(bool on)
bool polishOnResize() const
void setTransparentForPositioner(bool on)
bool isTransparentForPositioner() const
void setTabFence(bool on)
bool isTabFence() const
void setLayoutMirroring(bool on, bool childrenInherit =false)
void resetLayoutMirroring()
bool layoutMirroring() const
void resetUpdateFlags()
UpdateFlags updateFlags() const
Q_INVOKABLE void setUpdateFlag(UpdateFlag flag, bool on =true)
Q_INVOKABLE void resetUpdateFlag(UpdateFlag flag)
Q_INVOKABLE bool testUpdateFlag(UpdateFlag flag) const
void classBegin() override
void componentComplete() override
void releaseResources() override
bool isPolishScheduled() const
bool isUpdateNodeScheduled() const
bool isInitiallyPainted() const
bool maybeUnresized() const

Protected Functions inherited from QskQuickItem

  Name
  QskQuickItem(QskQuickItemPrivate & dd, QQuickItem * parent =nullptr)
virtual void changeEvent(QEvent * )
virtual void geometryChangeEvent(QskGeometryChangeEvent * )
virtual void windowChangeEvent(QskWindowChangeEvent * )
void mouseUngrabEvent() override
void touchUngrabEvent() override
void itemChange(ItemChange , const ItemChangeData & ) override
void geometryChange(const QRectF & newGeometry, const QRectF & oldGeometry) override
virtual void aboutToShow()

Public Properties inherited from QskQuickItem

  Name
QRectF geometry
QRectF rect
bool transparentForPositioners
bool tabFence
bool polishOnResize
bool visibleToParent
bool hasChildItems
bool initiallyPainted
UpdateFlags updateFlags

Public Functions inherited from QskSkinnable

  Name
  QskSkinnable()
virtual ~QskSkinnable()
void setSkinlet(const QskSkinlet * skinlet)
Set an individual skinlet to render/display the content.
const QskSkinlet * skinlet() const
QFont effectiveFont(QskAspect aspect) const
QskColorFilter effectiveGraphicFilter(QskAspect aspect) const
void setSubcontrolProxy(QskAspect::Subcontrol subControl, QskAspect::Subcontrol proxy)
void resetSubcontrolProxy(QskAspect::Subcontrol subcontrol)
QskAspect::Subcontrol subcontrolProxy(QskAspect::Subcontrol subControl) const
bool setAnimationHint(QskAspect aspect, QskAnimationHint hint)
QskAnimationHint animationHint(QskAspect aspect, QskSkinHintStatus * status =nullptr) const
bool setSkinHint(QskAspect aspect, const QVariant & hint)
Insert a hint into the local hint table.
bool resetSkinHint(QskAspect aspect)
Remove a hint from the local hint table.
QskAnimationHint effectiveAnimation(QskAspect::Type type, QskAspect::Subcontrol subControl, QskAspect::States states, QskSkinHintStatus * status =nullptr) const
QVariant effectiveSkinHint(QskAspect aspect, QskSkinHintStatus * status =nullptr) const
Find the value for a specific aspect.
QskSkinHintStatus hintStatus(QskAspect aspect) const
QRectF subControlRect(const QRectF & contentsRect, QskAspect::Subcontrol subControl) const
Calculate position and size of a subControl.
QRectF subControlContentsRect(const QRectF & contentsRect, QskAspect::Subcontrol subControl) const
Calculate the inner rectangle for subControl.
QSizeF outerBoxSize(QskAspect aspect, const QSizeF & innerBoxSize) const
Calculate the size, when being expanded by paddings, indentations.
QSizeF innerBoxSize(QskAspect aspect, const QSizeF & outerBoxSize) const
Calculate the size, with paddings, indentations being subtracted.
QRectF innerBox(QskAspect aspect, const QRectF & outerBox) const
Calculate the rectangle, whith paddings, indentations being subtracted.
QRectF outerBox(QskAspect aspect, const QRectF & innerBox) const
Calculate the rectangle, when being expanded by paddings, indentations.
QMarginsF innerPadding(QskAspect aspect, const QSizeF & outerBoxSize) const
Calculate the padding from attributes for the given aspect.
const QskSkinlet * effectiveSkinlet() const
QskSkin * effectiveSkin() const
void startTransition(QskAspect aspect, QskAnimationHint animationHint, QVariant from, QVariant to)
QskAspect::Subcontrol effectiveSubcontrol(QskAspect::Subcontrol subControl) const
QskControl * controlCast()
const QskControl * controlCast() const
virtual QskControl * owningControl() const =0
virtual const QMetaObject * metaObject() const =0
void debug(QskAspect aspect) const
void debug(QskAspect::State state) const
void debug(QDebug debug, QskAspect aspect) const
void debug(QDebug debug, QskAspect::State state) const
void setSkinStates(QskAspect::States newStates)
void setSkinStateFlag(QskAspect::State stateFlag, bool on =true)
void addSkinStates(QskAspect::States states)
void clearSkinStates(QskAspect::States states)
void replaceSkinStates(QskAspect::States newStates)
bool hasSkinState(QskAspect::State state) const
QskAspect::States skinStates() const
const char * skinStatesAsPrintable() const
const char * skinStatesAsPrintable(QskAspect::States states) const
bool setColor(QskAspect aspect, Qt::GlobalColor color)
Sets a color hint.
bool setColor(QskAspect aspect, QRgb rgb)
Sets a color hint.
bool setColor(QskAspect aspect, const QColor & color)
Sets a color hint.
bool resetColor(QskAspect aspect)
Removes a color hint from the local table.
QColor color(QskAspect aspect, QskSkinHintStatus * status =nullptr) const
Retrieves a color hint.
bool setMetric(QskAspect aspect, qreal metric)
Sets a metric hint.
bool resetMetric(QskAspect aspect)
Removes a metric hint from the local table.
qreal metric(QskAspect aspect, QskSkinHintStatus * status =nullptr) const
Retrieves a metric hint.
bool setFlagHint(QskAspect aspect, int flag)
Sets a flag hint.
bool resetFlagHint(QskAspect aspect)
Removes a flag hint from the local table.
int flagHint(QskAspect aspect) const
Retrieves a flag hint.
template <typename T >
T
flagHint(QskAspect aspect, T defaultValue =T()) const
Retrieves a flag hint.
bool setStrutSizeHint(QskAspect aspect, const QSizeF & size)
Sets a metric hint.
bool setStrutSizeHint(QskAspect aspect, qreal width, qreal height)
Sets a strut size hint.
bool resetStrutSizeHint(QskAspect aspect)
Removes a strut size hint from the local table.
QSizeF strutSizeHint(QskAspect aspect, QskSkinHintStatus * status =nullptr) const
Retrieves a strut size hint.
bool setMarginHint(QskAspect aspect, qreal margins)
Sets a margin hint.
bool setMarginHint(QskAspect aspect, const QMarginsF & margins)
Sets a margin hint.
bool resetMarginHint(QskAspect aspect)
Removes a margin hint from the local table.
QMarginsF marginHint(QskAspect aspect, QskSkinHintStatus * status =nullptr) const
Retrieves a margin hint.
bool setPaddingHint(QskAspect aspect, qreal padding)
Sets a padding hint.
bool setPaddingHint(QskAspect aspect, const QMarginsF & padding)
Sets a padding hint.
bool resetPaddingHint(QskAspect aspect)
Removes a padding hint from the local table.
QMarginsF paddingHint(QskAspect aspect, QskSkinHintStatus * status =nullptr) const
Retrieves a padding hint.
bool setGradientHint(QskAspect aspect, const QskGradient & gradient)
Sets a gradient as color hint.
QskGradient gradientHint(QskAspect aspect, QskSkinHintStatus * status =nullptr) const
Retrieves a color hint as gradient.
bool setBoxShapeHint(QskAspect aspect, const QskBoxShapeMetrics & shape)
Sets a shape hint.
bool resetBoxShapeHint(QskAspect aspect)
Removes a shape hint from the local table.
QskBoxShapeMetrics boxShapeHint(QskAspect aspect, QskSkinHintStatus * status =nullptr) const
Retrieves a shape hint.
bool setBoxBorderMetricsHint(QskAspect aspect, const QskBoxBorderMetrics & border)
Sets a border metrics hint.
bool resetBoxBorderMetricsHint(QskAspect aspect)
Removes a border metrics hint from the local table.
QskBoxBorderMetrics boxBorderMetricsHint(QskAspect aspect, QskSkinHintStatus * status =nullptr) const
Retrieves a border hint.
bool setBoxBorderColorsHint(QskAspect aspect, const QskBoxBorderColors & colors)
Sets a border colors hint.
bool resetBoxBorderColorsHint(QskAspect aspect)
Removes a border colors hint from the local table.
QskBoxBorderColors boxBorderColorsHint(QskAspect aspect, QskSkinHintStatus * status =nullptr) const
Retrieves border colors hint.
bool setArcMetricsHint(QskAspect aspect, const QskArcMetrics & arc)
bool resetArcMetricsHint(QskAspect aspect)
QskArcMetrics arcMetricsHint(QskAspect aspect, QskSkinHintStatus * status =nullptr) const
bool setSpacingHint(QskAspect aspect, qreal spacing)
Sets a spacing hint.
bool resetSpacingHint(QskAspect aspect)
Removes a spacing hint from the local table.
qreal spacingHint(QskAspect aspect, QskSkinHintStatus * status =nullptr) const
Retrieves a spacing hint.
bool setAlignmentHint(QskAspect aspect, Qt::Alignment alignment)
Sets an alignment hint.
bool resetAlignmentHint(QskAspect aspect)
Removes an alignment hint from the local table.
Qt::Alignment alignmentHint(QskAspect aspect, Qt::Alignment defaultAlignment =Qt::Alignment()) const
Retrieves an alignment hint.
bool setFontRoleHint(QskAspect aspect, int role)
Sets a font role hint.
bool resetFontRoleHint(QskAspect aspect)
Removes a font role hint from the local table.
int fontRoleHint(QskAspect aspect, QskSkinHintStatus * status =nullptr) const
Retrieves a font role hint.
bool setGraphicRoleHint(QskAspect aspect, int role)
Sets a graphic role hint.
bool resetGraphicRoleHint(QskAspect aspect)
Removes a graphic role hint from the local table.
int graphicRoleHint(QskAspect aspect, QskSkinHintStatus * status =nullptr) const
A Retrieves a graphic role hint.

Protected Functions inherited from QskSkinnable

  Name
virtual void updateNode(QSGNode * parentNode)
virtual bool isTransitionAccepted(QskAspect aspect) const
Additional check if an transition should be started.
virtual QskAspect::Subcontrol substitutedSubcontrol(QskAspect::Subcontrol subControl) const
QskSkinHintTable & hintTable()
Accessor for local skin hint table.
const QskSkinHintTable & hintTable() const
Accessor for local skin hint table.

Public Slots Documentation

slot setCurrentIndex

void setCurrentIndex(
    int index
)

Public Signals Documentation

signal currentIndexChanged

void currentIndexChanged(
    int index
)

signal countChanged

void countChanged(
    int 
)

signal tabPositionChanged

void tabPositionChanged(
    Qsk::Position 
)

signal autoFitTabsChanged

void autoFitTabsChanged(
    bool 
)

Public Functions Documentation

function QskTabView

QskTabView(
    QQuickItem * parent =nullptr
)

function QskTabView

QskTabView(
    Qsk::Position tabPosition,
    QQuickItem * parent =nullptr
)

function ~QskTabView

~QskTabView() override

function tabBar

const QskTabBar * tabBar() const

function tabBar

QskTabBar * tabBar()

function setTabPosition

void setTabPosition(
    Qsk::Position position
)

function tabPosition

Qsk::Position tabPosition() const

function setAutoFitTabs

void setAutoFitTabs(
    bool on
)

function autoFitTabs

bool autoFitTabs() const

function orientation

Qt::Orientation orientation() const

function addTab

int addTab(
    QskTabButton * button,
    QQuickItem * item
)

function insertTab

int insertTab(
    int index,
    QskTabButton * button,
    QQuickItem * item
)

function addTab

int addTab(
    const QString & tabText,
    QQuickItem * item
)

function insertTab

int insertTab(
    int index,
    const QString & tabText,
    QQuickItem * item
)

function removeTab

void removeTab(
    int index
)

function clear

void clear(
    bool autoDelete =false
)

function itemAt

QQuickItem * itemAt(
    int index
) const

function buttonAt

QskTabButton * buttonAt(
    int index
) const

function itemIndex

int itemIndex(
    const QQuickItem * item
)

function buttonIndex

int buttonIndex(
    const QskTabButton * button
)

function currentItem

QQuickItem * currentItem() const

function currentButton

QskTabButton * currentButton() const

function currentIndex

int currentIndex() const

function count

int count() const

function tabRect

QRectF tabRect() const

function effectivePlacement

QskAspect::Placement effectivePlacement() const override

Protected Functions Documentation

function event

bool event(
    QEvent * event
) override

function updateLayout

void updateLayout() override

function layoutSizeHint

QSizeF layoutSizeHint(
    Qt::SizeHint which,
    const QSizeF & constraint
) const override

Public Property Documentation

property tabBar

QskTabBar * tabBar;

property tabPosition

Qsk::Position tabPosition;

property autoFitTabs

bool autoFitTabs;

property orientation

Qt::Orientation orientation;

property count

int count;

property currentIndex

int currentIndex;

Public Attributes Documentation

variable TabBar

static const QskAspect::Subcontrol TabBar;

variable Page

static const QskAspect::Subcontrol Page;

Updated on 28 July 2023 at 14:02:27 CEST