kdk::KCrumb(3)
💖 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,parentdefaults tonullptr🐣int addTab (const QString &text)— 添加tab, adds a tab 🍓int addTab (const QIcon &icon, const QString &text)— 添加tab, adds a tab, this time with anicon✨int insertTab (int index, const QString &text)— 在index位置插入tab, inserts a tab at positionindex📍int insertTab (int index, const QIcon &icon, const QString &text)— 在index位置插入tab, inserts a tab at positionindex, with anicon🌈void removeTab (int index)— 删除index位置的tab, deletes the tab atindex🗑️void moveTab (int from, int to)— 将from位置tab移至to位置, moves the tab atfromover toto🚚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 () constvoid 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) constvoid setTabEnabled (int index, bool)QString tabText (int index) constvoid setTabText (int index, const QString &text)void setTabContent (int index, const QString &text)QColor tabTextColor (int index) constvoid setTabTextColor (int index, const QColor &color)QIcon tabIcon (int index) constvoid setTabIcon (int index, const QIcon &icon)Qt::TextElideMode elideMode () constvoid setElideMode (Qt::TextElideMode)void setTabToolTip (int index, const QString &tip)QString tabToolTip (int index) constvoid setTabWhatsThis (int index, const QString &text)QString tabWhatsThis (int index) constvoid setTabData (int index, const QVariant &data)QVariant tabData (int index) constQRect tabRect (int index) constint tabAt (const QPoint &pos) constint currentIndex () constint count () constQSize sizeHint () const overrideQSize minimumSizeHint () const overridevoid setDrawBase (bool drawTheBase)bool drawBase () constQSize iconSize () constvoid setIconSize (const QSize &size)bool usesScrollButtons () constvoid setUsesScrollButtons (bool useButtons)bool tabsClosable () constvoid setTabsClosable (bool closable)void setTabButton (int index, ButtonPosition position, QWidget *widget)QWidget * tabButton (int index, ButtonPosition position) constSelectionBehavior selectionBehaviorOnRemove () constvoid setSelectionBehaviorOnRemove (SelectionBehavior behavior)bool expanding () constvoid setExpanding (bool enabled)bool isMovable () constvoid setMovable (bool movable)bool documentMode () constvoid setDocumentMode (bool set)bool autoHide () constvoid setAutoHide (bool hide)bool changeCurrentOnDrag () constvoid setChangeCurrentOnDrag (bool change)QString accessibleTabName (int index) constvoid setAccessibleTabName (int index, const QString &name)
🔥 PROTECTED MEMBER FUNCTIONS 🔥
For the inner-circle only (subclasses, iykyk):
QSize tabSizeHint (int index) constvoid paintEvent (QPaintEvent *event)
🌟 Protected Member Functions inherited from KCustomTabBar 🌟
virtual QSize minimumTabSizeHint (int index) constvirtual void tabInserted (int index)virtual void tabRemoved (int index)virtual void tabLayoutChange ()bool event (QEvent *) overridevoid resizeEvent (QResizeEvent *) overridevoid showEvent (QShowEvent *) overridevoid hideEvent (QHideEvent *) overridevoid paintEvent (QPaintEvent *) overridevoid mousePressEvent (QMouseEvent *) overridevoid mouseMoveEvent (QMouseEvent *) overridevoid mouseReleaseEvent (QMouseEvent *) overridevoid wheelEvent (QWheelEvent *event) overridevoid keyPressEvent (QKeyEvent *) overridevoid changeEvent (QEvent *) overridevoid timerEvent (QTimerEvent *event) overridevoid 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 shapeint currentIndexint countbool drawBaseQSize iconSizeQt::TextElideMode elideModebool usesScrollButtonsbool tabsClosableSelectionBehavior selectionBehaviorOnRemovebool expandingbool movablebool documentModebool autoHidebool 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
icontext
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
indexicontext
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
indextext
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
fromto
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
- arch rolling: libkysdk-applications 3.0.1.2-1 · BSD-3-Clause AND GPL-3.0-or-later AND LGPL-2.1-or-later AND LGPL-3.0-or-later AND MIT AND MulanPSL-2.0
- ubuntu resolute: libkysdk-applications-dev 3.0.1.1-1 · LGPL-3.0-or-later
- ubuntu stonking: libkysdk-applications-dev 3.0.1.2-1build2 · LGPL-3.0-or-later
- 💖 girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms