KCustomTabBar(3)

πŸ“¦ version 3.0.1.2, in arch rolling, ubuntu resolute, ubuntu stonking

πŸ’– KCustomTabBar(3) πŸ’–

okay so bestie, sit DOWN, because today we're reading the KCustomTabBar(3) manual page together and it is a lot in the best way. This is a whole tab bar widget β€” the thing at the top of your app that holds all your tabs β€” and it's got more options than my skincare routine. no cap. let's go 🫢


✨ NAME ✨

KCustomTabBar

that's it. that's the name. short, iconic, main character energy. πŸ‘‘


🌈 SYNOPSIS 🌈

Inherits QWidget.

and it gets inherited too, by the way β€” the nepo babies of the tab bar world:

Inherited by kdk::KCrumb, and kdk::KNativeTabbar.

πŸŽ€ Public Types πŸŽ€

three enums, all of them extremely useful, all of them listed here exactly:

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

eight shape vibes, two button positions, three selection behaviors β€” the math is mathing πŸ’…

⭐ Public Slots ⭐

the slots, verbatim, no notes:

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

πŸ¦‹ Signals πŸ¦‹

everything this bar will scream into the void about:

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)

like yes, it will tell you when a tab moved from from to to. it's giving communicative. πŸ’œ

πŸ‘‘ Public Member Functions πŸ‘‘

okay this is the big one. constructor, getters, setters, the whole menu. not me listing all of them:

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)

fifty-plus functions. it ate and left no crumbs fr fr πŸ”₯

🧚 Protected Member Functions 🧚

these are the ones you'd override if you're building your own custom tab bar, which β€” respectfully β€” is a flex:

virtual QSize tabSizeHint (int index) const
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

every event you could possibly want to intercept. it's giving control freak and honestly? relatable πŸ’€

🌸 Properties 🌸

the property list, one per bullet, all of them, no skips:

  • 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

🫢 Author 🫢

Generated automatically by Doxygen for LIBKYSDK-APPLICATIONS from the
source code.

and that's the whole page bestie!! πŸŽ€ this doc was auto-generated by Doxygen for LIBKYSDK-APPLICATIONS, and it's sitting at Version version:3.0, with KCustomTabBar(3) riding shotgun on the right side of the footer. slay, periodt, go build something cute with your tabs. πŸ’–βœ¨πŸ¦‹

πŸ“¦ where this page comes from