BarModule(3)
💖 NAME 💖
okay bestie, welcome to BarModule(3) — yes that's section 3 of the Library Functions Manual, and the module is literally just called BarModule. Short name, big energy.
支持三种样式 — it supports three styles. three!! ✨
✨ SYNOPSIS ✨
ngl this is the part where it gets real. here's everything this module ships, organized like a little wardrobe. 🎀
🎀 Classes
class kdk::KArrowTabBar— 可显示箭头的tabbar — a tabbar that can show arrows 🏹class kdk::KIconBar— 图标和标题组合控件 — icon + title combo widget, the classic duo 💅class kdk::KNavigationBar— 导航栏控件 — the navigation bar widget 🧭class kdk::KPixmapContainer— 为指定的pixmap添加右上角消息提示气泡,样式类似微信头像的消息提示 — it adds a little message-notification bubble to the top-right corner of whatever pixmap you give it, styled like the unread badge on a WeChat avatar 🫧class kdk::KProgressBar— 进度条,支持三种状态显示 — a progress bar that shows three states 👑class kdk::KTabBar— 支持三种样式 — supports three styles 🌈class kdk::KWindowButtonBar— 窗口三联按钮和菜单按钮的集合 — the whole window button trio plus the menu button, all in one place 🪟
🌸 Enumerations
enum NavigationBarDataType { ValueRole = Qt::UserRole + 1, StringRole = Qt::UserRole + 2, boolRole = Qt::UserRole + 3 }— the role IDs, literally spelled out for you 💜enum kdk::ProgressBarState { NormalProgress, FailedProgress, SuccessProgress }— 支持三种状态 — three states, no cap 📊enum kdk::KTabBarStyle { SegmentDark, SegmentLight, Sliding }— 支持三种样式 — three styles, iconic ✨enum kdk::MaximumButtonState { Maximum, Restore }— 最大化按钮提供两种状态响应 — the maximize button answers to two states 🔲
🦋 Functions
bestie there are SO many. buckle up. 🎢
kdk::KArrowTabBar::KArrowTabBar (QWidget *parent=nullptr)— constructor, parent defaults tonullptrKNativeTabbar * kdk::KArrowTabBar::tabbar ()— 获取knativetabbar — grab theKNativeTabbarvoid kdk::KArrowTabBar::resizeEvent (QResizeEvent *event)— resize handlerkdk::KIconBar::KIconBar (QWidget *parent=nullptr)— constructor, parent defaults tonullptrkdk::KIconBar::KIconBar (const QString &iconName, const QString &text, QWidget *parent=nullptr)— constructor that takes an icon name and text, parent defaults tonullptrvoid kdk::KIconBar::setIcon (const QString &iconName)— 设置图标 — set the icon by namevoid kdk::KIconBar::setIcon (const QIcon &icon)— 设置图标 — set the icon from aQIconvoid kdk::KIconBar::setWidgetName (const QString &widgetName)— 设置标题 — set the titleQLabel * kdk::KIconBar::nameLabel ()— 获取标题label — get the title labelQLabel * kdk::KIconBar::iconLabel ()— 获取图标label — get the icon labelvoid kdk::KIconBar::mouseDoubleClickEvent (QMouseEvent *event)— double-click handlervoid kdk::KIconBar::resizeEvent (QResizeEvent *event)— resize handlerQSize kdk::KIconBar::sizeHint () const override— size hint, and yes it's an overridekdk::KNavigationBar::KNavigationBar (QWidget *parent)— constructor taking a parentvoid kdk::KNavigationBar::addItem (QStandardItem *item)— 增加常规Item — add a regular Itemvoid kdk::KNavigationBar::addSubItem (QStandardItem *subItem)— 增加次级Item — add a sub-level Itemvoid kdk::KNavigationBar::addGroupItems (QList< QStandardItem * > items, const QString &tag)— 成组增加Item,在导航栏中会显示tag — add a whole group of Items at once, and thetagshows up in the navigation bar 📁void kdk::KNavigationBar::insertGroupItems (QString tag, int row, QStandardItem *item)— 在指定tag组中指定位置row插入item — insert an item at positionrowinside the group with thattagvoid kdk::KNavigationBar::removeGroupItem (QString tag, QStandardItem *item)— 在指定组中删除item — delete an item from the specified groupvoid kdk::KNavigationBar::addTag (const QString &tag)— 添加tag — add a tagQStandardItemModel * kdk::KNavigationBar::model ()— 获取model — get the modelQListView * kdk::KNavigationBar::listview ()— 获取view — get the viewvoid kdk::KNavigationBar::setTabValue (QStandardItem *item, QString value)— 设置tabvalue — set the tab valuevoid kdk::KNavigationBar::setTabValueVisible (bool visible)— 设置tabvalue是否可见 — set whether the tab value is visiblevoid kdk::KNavigationBar::setAddIcon (QString tag, QIcon icon)— tag 添加add图标 — add an add-icon for thattag➕void kdk::KNavigationBar::setAddTagVisible (QString tag, bool visible)— 设置tag add图标是否可见 — set whether the tag's add icon is visiblevoid kdk::KNavigationBar::setExtendTagVisible (QString tag, bool visible)— 设置折叠图标是否可见 — set whether the collapse/expand icon is visiblekdk::KPixmapContainer::KPixmapContainer (QWidget *parent=nullptr)— constructor, parent defaults tonullptrint kdk::KPixmapContainer::value () const— 获取值 — get the valuevoid kdk::KPixmapContainer::setValue (int value)— 设置值 — set the valuevoid kdk::KPixmapContainer::setValueVisiable (bool flag)— 设置值是否可见 — set whether the value is visible (yes,Visiable, that's how it's spelled, don't come for me 🙈)bool kdk::KPixmapContainer::isValueVisiable () const— 获取值是否可见 — get whether the value is visiblevoid kdk::KPixmapContainer::setPixmap (const QPixmap &pixmap)— 设置pixmap — set the pixmapQPixmap kdk::KPixmapContainer::pixmap () const— 获取pixmap — get the pixmapvoid kdk::KPixmapContainer::clearValue ()— 清除值 — clear the valueQColor kdk::KPixmapContainer::color ()— 返回背景色 — returns the background colorvoid kdk::KPixmapContainer::setColor (const QColor &color)— 设置背景色 — set the background colorint kdk::KPixmapContainer::fontSize ()— 返回字体大小 — returns the font sizevoid kdk::KPixmapContainer::setFontSize (int size)— 设置字体大小 — set the font sizevoid kdk::KPixmapContainer::paintEvent (QPaintEvent *event)— paint handlerkdk::KProgressBar::KProgressBar (QWidget *parent)— constructor taking a parentProgressBarState kdk::KProgressBar::state ()— 获取状态 — get the statevoid kdk::KProgressBar::setState (ProgressBarState state)— 设置状态 — set the stateQString kdk::KProgressBar::text () const override— 获取文本 — get the text, and it's an overridevoid kdk::KProgressBar::setOrientation (Qt::Orientation)— 设置方向 — set the orientationvoid kdk::KProgressBar::setBodyWidth (int width)— 设置进度条宽度 — set the progress bar's widthvoid kdk::KProgressBar::setGradationColor (QColor color1, QColor color2)— 设置首尾位置的渐变颜色 — set the gradient colors for the start and end positions 🎨void kdk::KProgressBar::setBackgroundColor (QColor color)— 设置背景色 — set the background colorvoid kdk::KProgressBar::setFillColor (QColor color)— 设置填充色 — set the fill colorvoid kdk::KProgressBar::setGradation (bool flag)— 是否启用自定义渐变色 — whether to enable the custom gradient colorsbool kdk::KProgressBar::gradation ()— 获取是否启用自定义渐变色 — get whether custom gradient colors are enabledvoid kdk::KProgressBar::setAnimation (bool flag)— 是否启用动画 — whether to enable the animationbool kdk::KProgressBar::animation ()— 获取是否启用动画 — get whether the animation is enabledvoid kdk::KProgressBar::paintEvent (QPaintEvent *event) override— paint handler, overrideQSize kdk::KProgressBar::sizeHint () const— size hintkdk::KTabBar::KTabBar (KTabBarStyle barStyle=SegmentLight, QWidget *parent=nullptr)— constructor,barStyledefaults toSegmentLightand parent defaults tonullptrvoid kdk::KTabBar::setTabBarStyle (KTabBarStyle barStyle)— 设置TabBar样式 — set the TabBar styleKTabBarStyle kdk::KTabBar::barStyle ()— 返回TabBar样式 — returns the TabBar stylevoid kdk::KTabBar::setBorderRadius (int radius)— 设置圆角半径,只对SegmentDark,SegmentLight样式生效 — set the corner radius; heads up, this only takes effect for theSegmentDarkandSegmentLightstyles ⚠️int kdk::KTabBar::borderRadius ()— 获取圆角半径 — get the corner radiusvoid kdk::KTabBar::setBackgroundColor (const QColor &color)— 设置背景色 — set the background colorQSize kdk::KTabBar::sizeHint () const— size hintQSize kdk::KTabBar::minimumTabSizeHint (int index) const— minimum tab size hint for the tab atindexQSize kdk::KTabBar::tabSizeHint (int index) const— tab size hint for the tab atindexvoid kdk::KTabBar::paintEvent (QPaintEvent *event)— paint handlerkdk::KWindowButtonBar::KWindowButtonBar (QWidget *parent=nullptr)— constructor, parent defaults tonullptrQPushButton * kdk::KWindowButtonBar::minimumButton ()— 获取最小化按钮 — get the minimize buttonQPushButton * kdk::KWindowButtonBar::maximumButton ()— 获取最大化按钮 — get the maximize buttonQPushButton * kdk::KWindowButtonBar::closeButton ()— 获取关闭按钮 — get the close buttonKMenuButton * kdk::KWindowButtonBar::menuButton ()— 获取菜单按钮 — get the menu buttonMaximumButtonState kdk::KWindowButtonBar::maximumButtonState ()— 获取最大化按钮的状态(最大化/恢复) — get the maximize button's state (maximized / restored)void kdk::KWindowButtonBar::setMaximumButtonState (MaximumButtonState state)— 设置最大化按钮图标状态(最大化/恢复) — set the maximize button's icon state (maximized / restored)void kdk::KWindowButtonBar::setFollowMode (bool flag)— 设置是否遵循模式 — set whether follow mode is onbool kdk::KWindowButtonBar::followMode ()— 返回是否遵循模式 — returns whether follow mode is onvoid kdk::KWindowButtonBar::setSplitScreenGeometry (QRect rect)—setSplitScreenGeometry🖥️void kdk::KWindowButtonBar::mouseDoubleClickEvent (QMouseEvent *event)— double-click handlerbool kdk::KWindowButtonBar::eventFilter (QObject *watched, QEvent *event)— the event filter, watchingwatchedand handlingeventQSize kdk::KWindowButtonBar::sizeHint () const override— size hint, override
🧚 Signals
the gossip channel of this module. 📣
void kdk::KArrowTabBar::sizeChange ()— 点击会发出信号 — it fires on clickvoid kdk::KIconBar::doubleClick ()— 双击会发出双击信号,父widget可以绑定相应槽函数 — a double-click fires this double-click signal, and the parent widget can hook up the matching slot 🔔void kdk::KNavigationBar::addTagClicked (QString str)— fires with aQStringwhen add-tag gets clickedvoid kdk::KTabBar::rightlicked (QPoint point)— 鼠标右键信号 — the right-mouse-button signal (spelledrightlicked, we don't ask questions 💀)void kdk::KWindowButtonBar::doubleClick ()— 双击会发出双击信号,父widget可以绑定相应槽函数 — a double-click fires this double-click signal, and the parent widget can hook up the matching slot ✨
👑 Detailed Description
支持三种样式 — it supports three styles. that's the whole vibe, bestie. 💅
Since
2.5.2.0 {
2.5.2.0
{
(yes, that's exactly how it's written in there. verbatim. don't shoot the messenger 🫶)
💅 Enumeration Type Documentation 💅
🌟 enum kdk::MaximumButtonState
最大化按钮提供两种状态响应 — the maximize button provides two states to respond with. ✨
Since
1.0.0
🌟 enum kdk::ProgressBarState
支持三种状态 — three states, supported. 👑
Since
1.0.0
✨ Function Documentation ✨
Okay bestie, this is the big one — all the functions, no skips, no cap. Let's get into it. 🫶
void kdk::KNavigationBar::addGroupItems— adds Items in groups, and thetagshows up in the nav bar. It's giving group project but actually good. 💅
void kdk::KNavigationBar::addGroupItems (QList< QStandardItem * > items,
const QString & tag)
Parameters:
itemstag
void kdk::KNavigationBar::addItem (QStandardItem * item)— adds a regular Item. Just a normal lil guy, living his best life. 🥰
Parameters:
item
void kdk::KNavigationBar::addSubItem (QStandardItem * subItem)— adds a sub-Item. The sidekick, the understudy, the main character's bestie. 🦋
Parameters:
subItem
void kdk::KNavigationBar::addTag (const QString & tag)— adds a tag. Tag, you're it, no cap. 🏷️
Parameters:
tag
bool kdk::KProgressBar::animation ()— gets whether animation is enabled. Is it moving? Is it serving? We love a little motion. 💃
Since: 2.5.2.0
Returns:
KTabBarStyle kdk::KTabBar::barStyle ()— returns the TabBar style. The aesthetic, the vibe, the whole look. ✨
Returns:
int kdk::KTabBar::borderRadius ()— gets the border radius. Soft edges, soft life, periodt. 🎀
Returns:
QPushButton * kdk::KWindowButtonBar::closeButton ()— gets the close button. The exit strategy, the Irish goodbye. 🚪
Returns:
QColor kdk::KPixmapContainer::color ()— returns the background color. The vibe check, the mood ring. 🌈
Returns:
bool kdk::KWindowButtonBar::followMode ()— returns whether follow mode is on. Are we following? Are we leading? 👀
Since: 2.0
Returns:
int kdk::KPixmapContainer::fontSize ()— returns the font size. Big mood, small mood, your choice. 🔠
Returns:
bool kdk::KProgressBar::gradation ()— gets whether custom gradient color is enabled. Gradient? We love a spectrum, bestie. 🌈
Since: 2.5.2.0
Returns:
QLabel * kdk::KIconBar::iconLabel ()— gets the icon label. The picture-perfect label, literally. 📸
Returns:
void kdk::KNavigationBar::insertGroupItems— insertsitemat positionrowin the specifiedtaggroup. Very precise, very demure, very mindful. 🎯
void kdk::KNavigationBar::insertGroupItems (QString tag, int row,
QStandardItem * item)
Parameters:
tagrowitem
Since: 3.0.1.0
QListView * kdk::KNavigationBar::listview ()— gets the view. The whole picture, the big screen. 🖼️
Returns:
QPushButton * kdk::KWindowButtonBar::maximumButton ()— gets the maximize button. Make it big, make it bold. 🔍
Returns:
MaximumButtonState kdk::KWindowButtonBar::maximumButtonState ()— gets the state of the maximize button (maximize/restore). Max or relax? You decide. 🤔
Returns:
KMenuButton * kdk::KWindowButtonBar::menuButton ()— gets the menu button. The options, the choices, the possibilities. 📋
Returns:
QPushButton * kdk::KWindowButtonBar::minimumButton ()— gets the minimize button. Shrink, but make it fashion. 📉
Returns:
QStandardItemModel * kdk::KNavigationBar::model ()— gets the model. The blueprint, the structure, the backbone. 🏗️
Returns:
QLabel * kdk::KIconBar::nameLabel ()— gets the title label. What's in a name? Everything, bestie. 🏷️
Returns:
void kdk::KNavigationBar::removeGroupItem— deletesitemfrom the specified group. Bye bestie, we won't miss you (jk, we will). 👋
void kdk::KNavigationBar::removeGroupItem (QString tag, QStandardItem *
item)
Parameters:
tagitem
Since: 3.0.1.0
void kdk::KNavigationBar::setAddIcon (QString tag, QIcon icon)— adds an add icon totag. Add it, add it, add it. ➕
Parameters:
tagicon
Since: 3.0.1.0
void kdk::KNavigationBar::setAddTagVisible (QString tag, bool visible)— sets whether thetagadd icon is visible. To see or not to see, that is the question. 👁️
Parameters:
tagvisible
Since: 3.0.1.0
void kdk::KProgressBar::setAnimation (bool flag)— sets whether animation is enabled. Turn the motion on or off. 🎬
Since: 2.5.2.0
Parameters:
flag
void kdk::KTabBar::setBackgroundColor (const QColor & color)— sets the background color. Paint the town, literally. 🎨
Parameters:
color
Since: 1.2.0
void kdk::KProgressBar::setBackgroundColor (QColor color)— sets the background color. Another one, DJ Khaled voice. 🎨
Since: 2.5.2.0
Parameters:
color
void kdk::KProgressBar::setBodyWidth (int width)— sets the progress bar width. Thick or thin, your choice. 📏
Parameters:
width
Since: 1.2.0
void kdk::KTabBar::setBorderRadius (int radius)— sets the border radius. Only works forSegmentDarkandSegmentLightstyles. Don't try it anywhere else, bestie. 🚫
Parameters:
radius
void kdk::KPixmapContainer::setColor (const QColor & color)— sets the background color. Color me impressed. 🖍️
Parameters:
color
void kdk::KNavigationBar::setExtendTagVisible (QString tag, bool visible)— sets whether the collapse icon is visible. Fold it or show it, we support both. 📂
Parameters:
tagvisible
Since: 3.0.1.0
void kdk::KProgressBar::setFillColor (QColor color)— sets the fill color. Fill 'er up, bestie. ⛽
Since: 2.5.2.0
Parameters:
color
void kdk::KWindowButtonBar::setFollowMode (bool flag)— sets whether follow mode is on. Follow the leader, or don't. 🚶♀️
Since: 2.0
Parameters:
flag
void kdk::KPixmapContainer::setFontSize (int size)— sets the font size. Make it big, make it small, make it iconic. 🔠
Parameters:
size
void kdk::KProgressBar::setGradation (bool flag)— sets whether custom gradient color is enabled. Gradient gang, rise up. 🌈
Since: 2.5.2.0
Parameters:
flag
void kdk::KProgressBar::setGradationColor (QColor color1, QColor color2)— sets the gradient colors at the start and end positions. From here to there, a beautiful journey. 🌅
Since: 2.5.2.0
Parameters:
color1color2
void kdk::KIconBar::setIcon (const QIcon & icon)— sets the icon. Iconic behavior, honestly. 💅
Parameters:
icon
void kdk::KIconBar::setIcon (const QString & iconName)— sets the icon. By name, by name, by name. 📛
Parameters:
iconName
void kdk::KWindowButtonBar::setMaximumButtonState (MaximumButtonState state)— sets the maximize button icon state (maximize/restore). Max it out or bring it back. 🔄
Parameters:
state
void kdk::KPixmapContainer::setPixmap (const QPixmap & pixmap)— sets the pixmap. Pixel perfect, no cap. 🖼️
Parameters:
pixmap
void kdk::KWindowButtonBar::setSplitScreenGeometry (QRect rect)—setSplitScreenGeometry. The display position rect for the pop-up interface. Where the pop-up lives, its little home. 📍
Parameters:
- the display position
rectfor the pop-up interface
Since: 3.0.1.0
void kdk::KProgressBar::setState (ProgressBarState state)— sets the state. State of mind, state of being. 🧠
Parameters:
state
void kdk::KTabBar::setTabBarStyle (KTabBarStyle barStyle)— sets the TabBar style. Style is a choice, and you're choosing well. 💁♀️
Parameters:
barStyle
void kdk::KNavigationBar::setTabValue (QStandardItem * item, QString value)— sets tabvalue. Value added, periodt. 💎
Parameters:
itemvalue
Since: 3.0.1.0
void kdk::KNavigationBar::setTabValueVisible (bool visible)— sets whether tabvalue is visible. Show it or hide it, we're not judging. 👀
Parameters:
visible
Since: 3.0.1.0
void kdk::KPixmapContainer::setValue (int value)— sets the value. Worth it, literally. 💰
Parameters:
value
void kdk::KPixmapContainer::setValueVisiable (bool flag)— sets whether the value is visible. Can you see it? Yes you can. 🔍
Parameters:
flag
void kdk::KIconBar::setWidgetName (const QString & widgetName)— sets the title. Name it and claim it, bestie. 🏷️
Parameters:
widgetName
ProgressBarState kdk::KProgressBar::state ()— gets the state. Current status: iconic. 📊
Returns:
KNativeTabbar * kdk::KArrowTabBar::tabbar ()— gets the knativetabbar. Native queen, slay. 👑
Returns:
QString kdk::KProgressBar::text () const [override]— gets the text. Words matter, fr fr. 📝
Returns:
📣 Signals 📣
void kdk::KTabBar::rightlicked (QPoint point) [signal]— right mouse click signal. Right click, right now. 🖱️
Parameters:
point
Since: 2.4.1.0
👑 Author 👑
Generated automatically by Doxygen for LIBKYSDK-APPLICATIONS from the source code. Doxygen did that, no cap. 🤖
Okay bestie, that's the whole page. This manual is from LIBKYSDK-APPLICATIONS, version version:3.0, and it's the BarModule(3) page. Love that for us. Stay slaying. 💖✨
📦 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