kdk::KCrumb(3)

📦 version 3.0.1.2, in arch rolling, ubuntu resolute, ubuntu stonking

💖 NAME 💖

kdk::KCrumb — 面包屑控件 (aka the breadcrumb widget, bestie 🍞✨)

It's a Qt widget, it lives in the kdk namespace, and it is literally a crumb trail. Okurrr.


🦋 SYNOPSIS 🦋

#include <kcrumb.h>

Inherits KCustomTabBar. Yes queen, it's a glow-up of a tab bar 👑


✨ DESCRIPTION ✨

面包屑控件. That's the whole vibe. It's the little breadcrumb widget. It inherits everything from KCustomTabBar and then adds its own scroll slay on top 💅


🎀 PUBLIC SLOTS 🎀

These are the slots KCrumb brings to the function its own self:

  • void leftScroll () — scroll left, bestie ⬅️
  • void rightScroll () — scroll right ➡️

🌸 Public Slots inherited from KCustomTabBar 🌸

Not hers originally, but she carries them with grace:

  • void setCurrentIndex (int index)
  • void leftScrollTabs ()
  • void rightScrollTabs ()
  • void closeTab ()

🫶 PUBLIC MEMBER FUNCTIONS 🫶

  • KCrumb (QWidget *parent=nullptr) — constructor, makes a whole new crumb widget, parent defaults to nullptr 🐣
  • int addTab (const QString &text) — 添加tab, adds a tab 🍓
  • int addTab (const QIcon &icon, const QString &text) — 添加tab, adds a tab, this time with an icon ✨
  • int insertTab (int index, const QString &text) — 在index位置插入tab, inserts a tab at position index 📍
  • int insertTab (int index, const QIcon &icon, const QString &text) — 在index位置插入tab, inserts a tab at position index, with an icon 🌈
  • void removeTab (int index) — 删除index位置的tab, deletes the tab at index 🗑️
  • void moveTab (int from, int to) — 将from位置tab移至to位置, moves the tab at from over to to 🚚
  • void setIcon (const QIcon &icon) — 设置图标, sets the icon 🎨
  • QIcon icon () const — 获取图标, gets the icon 👀
  • bool isFlat () const — 返回按钮边框是否凸起, returns whether the button border is raised 🔘
  • void setFlat (bool flat) — 设置按钮边框是否凸起, sets whether the button border is raised 🔘

💜 Public Member Functions inherited from KCustomTabBar 💜

The whole inheritance bag, no cap:

  • KCustomTabBar (QWidget *parent=nullptr)
  • Shape shape () const
  • void setShape (Shape shape)
  • int addTab (const QString &text)
  • int addTab (const QIcon &icon, const QString &text)
  • int insertTab (int index, const QString &text)
  • int insertTab (int index, const QIcon &icon, const QString &text)
  • void removeTab (int index)
  • void moveTab (int from, int to)
  • bool isTabEnabled (int index) const
  • void setTabEnabled (int index, bool)
  • QString tabText (int index) const
  • void setTabText (int index, const QString &text)
  • void setTabContent (int index, const QString &text)
  • QColor tabTextColor (int index) const
  • void setTabTextColor (int index, const QColor &color)
  • QIcon tabIcon (int index) const
  • void setTabIcon (int index, const QIcon &icon)
  • Qt::TextElideMode elideMode () const
  • void setElideMode (Qt::TextElideMode)
  • void setTabToolTip (int index, const QString &tip)
  • QString tabToolTip (int index) const
  • void setTabWhatsThis (int index, const QString &text)
  • QString tabWhatsThis (int index) const
  • void setTabData (int index, const QVariant &data)
  • QVariant tabData (int index) const
  • QRect tabRect (int index) const
  • int tabAt (const QPoint &pos) const
  • int currentIndex () const
  • int count () const
  • QSize sizeHint () const override
  • QSize minimumSizeHint () const override
  • void setDrawBase (bool drawTheBase)
  • bool drawBase () const
  • QSize iconSize () const
  • void setIconSize (const QSize &size)
  • bool usesScrollButtons () const
  • void setUsesScrollButtons (bool useButtons)
  • bool tabsClosable () const
  • void setTabsClosable (bool closable)
  • void setTabButton (int index, ButtonPosition position, QWidget *widget)
  • QWidget * tabButton (int index, ButtonPosition position) const
  • SelectionBehavior selectionBehaviorOnRemove () const
  • void setSelectionBehaviorOnRemove (SelectionBehavior behavior)
  • bool expanding () const
  • void setExpanding (bool enabled)
  • bool isMovable () const
  • void setMovable (bool movable)
  • bool documentMode () const
  • void setDocumentMode (bool set)
  • bool autoHide () const
  • void setAutoHide (bool hide)
  • bool changeCurrentOnDrag () const
  • void setChangeCurrentOnDrag (bool change)
  • QString accessibleTabName (int index) const
  • void setAccessibleTabName (int index, const QString &name)

🔥 PROTECTED MEMBER FUNCTIONS 🔥

For the inner-circle only (subclasses, iykyk):

  • QSize tabSizeHint (int index) const
  • void paintEvent (QPaintEvent *event)

🌟 Protected Member Functions inherited from KCustomTabBar 🌟

  • virtual QSize minimumTabSizeHint (int index) const
  • virtual void tabInserted (int index)
  • virtual void tabRemoved (int index)
  • virtual void tabLayoutChange ()
  • bool event (QEvent *) override
  • void resizeEvent (QResizeEvent *) override
  • void showEvent (QShowEvent *) override
  • void hideEvent (QHideEvent *) override
  • void paintEvent (QPaintEvent *) override
  • void mousePressEvent (QMouseEvent *) override
  • void mouseMoveEvent (QMouseEvent *) override
  • void mouseReleaseEvent (QMouseEvent *) override
  • void wheelEvent (QWheelEvent *event) override
  • void keyPressEvent (QKeyEvent *) override
  • void changeEvent (QEvent *) override
  • void timerEvent (QTimerEvent *event) override
  • void initStyleOption (QStyleOptionTab *option, int tabIndex) const

🧚 ADDITIONAL INHERITED MEMBERS 🧚

⭐ Public Types inherited from KCustomTabBar ⭐

  • enum Shape — { RoundedNorth, RoundedSouth, RoundedWest, RoundedEast, TriangularNorth, TriangularSouth, TriangularWest, TriangularEast }
  • enum ButtonPosition — { LeftSide, RightSide }
  • enum SelectionBehavior — { SelectLeftTab, SelectRightTab, SelectPreviousTab }

🎵 Signals inherited from KCustomTabBar 🎵

  • void currentChanged (int index)
  • void tabCloseRequested (int index)
  • void tabMoved (int from, int to)
  • void tabBarClicked (int index)
  • void tabBarDoubleClicked (int index)
  • void leftBStatus (bool flag)
  • void rightBStatus (bool flag)

🌈 Properties inherited from KCustomTabBar 🌈

  • Shape shape
  • int currentIndex
  • int count
  • bool drawBase
  • QSize iconSize
  • Qt::TextElideMode elideMode
  • bool usesScrollButtons
  • bool tabsClosable
  • SelectionBehavior selectionBehaviorOnRemove
  • bool expanding
  • bool movable
  • bool documentMode
  • bool autoHide
  • bool changeCurrentOnDrag

🍞 DETAILED DESCRIPTION 🍞

面包屑控件.

That's it. That's the whole description. The docs said "面包屑控件" and clocked out, and honestly? Respect. 💀


👑 MEMBER FUNCTION DOCUMENTATION 👑

int kdk::KCrumb::addTab (const QIcon & icon, const QString & text)

添加tab. Adds a tab, and this one's got an icon too 💖

Parameters

  • icon
  • text

Returns

(the docs leave this blank bestie, no cap — the Returns section is just vibes 🫥)

int kdk::KCrumb::addTab (const QString & text)

添加tab. Adds a tab. Plain. Simple. Iconic. ✨

Parameters

  • text

Returns

(again, blank. the Returns section is not giving today 🙈)

QIcon kdk::KCrumb::icon () const

获取图标. Grabs the icon 🎀

Returns

(blank. we move.)

int kdk::KCrumb::insertTab (int index, const QIcon & icon, const QString & text)

在index位置插入tab. Inserts a tab at position index, icon included 🦋

Parameters

  • index
  • icon
  • text

Returns

(blank, bestie. the void stares back. 💀)

int kdk::KCrumb::insertTab (int index, const QString & text)

在index位置插入tab. Inserts a tab at position index 📍

Parameters

  • index
  • text

Returns

(blank. nothing. empty. the Returns section is on do-not-disturb 🌙)

bool kdk::KCrumb::isFlat () const

返回按钮边框是否凸起. Tells you whether the button border is raised or not 🔘

Returns

(blank. again. okay bestie, the whole Returns column is just not home 😭)

void kdk::KCrumb::moveTab (int from, int to)

将from位置tab移至to位置. Moves the tab sitting at from to the to spot 🚚💨

Parameters

  • from
  • to

void kdk::KCrumb::removeTab (int index)

删除index位置的tab. Yeets the tab at index out of existence 🗑️

Parameters

  • index

void kdk::KCrumb::setFlat (bool flat)

设置按钮边框是否凸起. Sets whether the button border is raised 🔘

Parameters

  • flat

void kdk::KCrumb::setIcon (const QIcon & icon)

设置图标. Sets the icon 🎨

Parameters

  • icon

QSize kdk::KCrumb::tabSizeHint (int index) const [protected], [virtual]

Reimplemented from KCustomTabBar. Protected, virtual, and doing its own thing — main character energy only 🫶


🦄 AUTHOR 🦄

Generated automatically by Doxygen for LIBKYSDK-APPLICATIONS from the source code. So like, a robot wrote this. A Doxygen robot. And it did a pretty good job honestly, periodt 🤖💅


okay so that's the whole page bestie, we ate and left no crumbs — literally, it's a breadcrumb widget 🍞✨

this page came to you from LIBKYSDK-APPLICATIONS, Version version:3.0, and it's the kdk::KCrumb(3) page living its best life in the Library Functions Manual 💖

mwah, go build something cute 🫶🌈⭐

📦 where this page comes from