BarModule(3)

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

💖 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 to nullptr
  • KNativeTabbar * kdk::KArrowTabBar::tabbar () — 获取knativetabbar — grab the KNativeTabbar
  • void kdk::KArrowTabBar::resizeEvent (QResizeEvent *event) — resize handler
  • kdk::KIconBar::KIconBar (QWidget *parent=nullptr) — constructor, parent defaults to nullptr
  • kdk::KIconBar::KIconBar (const QString &iconName, const QString &text, QWidget *parent=nullptr) — constructor that takes an icon name and text, parent defaults to nullptr
  • void kdk::KIconBar::setIcon (const QString &iconName) — 设置图标 — set the icon by name
  • void kdk::KIconBar::setIcon (const QIcon &icon) — 设置图标 — set the icon from a QIcon
  • void kdk::KIconBar::setWidgetName (const QString &widgetName) — 设置标题 — set the title
  • QLabel * kdk::KIconBar::nameLabel () — 获取标题label — get the title label
  • QLabel * kdk::KIconBar::iconLabel () — 获取图标label — get the icon label
  • void kdk::KIconBar::mouseDoubleClickEvent (QMouseEvent *event) — double-click handler
  • void kdk::KIconBar::resizeEvent (QResizeEvent *event) — resize handler
  • QSize kdk::KIconBar::sizeHint () const override — size hint, and yes it's an override
  • kdk::KNavigationBar::KNavigationBar (QWidget *parent) — constructor taking a parent
  • void kdk::KNavigationBar::addItem (QStandardItem *item) — 增加常规Item — add a regular Item
  • void kdk::KNavigationBar::addSubItem (QStandardItem *subItem) — 增加次级Item — add a sub-level Item
  • void kdk::KNavigationBar::addGroupItems (QList< QStandardItem * > items, const QString &tag) — 成组增加Item,在导航栏中会显示tag — add a whole group of Items at once, and the tag shows up in the navigation bar 📁
  • void kdk::KNavigationBar::insertGroupItems (QString tag, int row, QStandardItem *item) — 在指定tag组中指定位置row插入item — insert an item at position row inside the group with that tag
  • void kdk::KNavigationBar::removeGroupItem (QString tag, QStandardItem *item) — 在指定组中删除item — delete an item from the specified group
  • void kdk::KNavigationBar::addTag (const QString &tag) — 添加tag — add a tag
  • QStandardItemModel * kdk::KNavigationBar::model () — 获取model — get the model
  • QListView * kdk::KNavigationBar::listview () — 获取view — get the view
  • void kdk::KNavigationBar::setTabValue (QStandardItem *item, QString value) — 设置tabvalue — set the tab value
  • void kdk::KNavigationBar::setTabValueVisible (bool visible) — 设置tabvalue是否可见 — set whether the tab value is visible
  • void kdk::KNavigationBar::setAddIcon (QString tag, QIcon icon) — tag 添加add图标 — add an add-icon for that tag ➕
  • void kdk::KNavigationBar::setAddTagVisible (QString tag, bool visible) — 设置tag add图标是否可见 — set whether the tag's add icon is visible
  • void kdk::KNavigationBar::setExtendTagVisible (QString tag, bool visible) — 设置折叠图标是否可见 — set whether the collapse/expand icon is visible
  • kdk::KPixmapContainer::KPixmapContainer (QWidget *parent=nullptr) — constructor, parent defaults to nullptr
  • int kdk::KPixmapContainer::value () const — 获取值 — get the value
  • void kdk::KPixmapContainer::setValue (int value) — 设置值 — set the value
  • void 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 visible
  • void kdk::KPixmapContainer::setPixmap (const QPixmap &pixmap) — 设置pixmap — set the pixmap
  • QPixmap kdk::KPixmapContainer::pixmap () const — 获取pixmap — get the pixmap
  • void kdk::KPixmapContainer::clearValue () — 清除值 — clear the value
  • QColor kdk::KPixmapContainer::color () — 返回背景色 — returns the background color
  • void kdk::KPixmapContainer::setColor (const QColor &color) — 设置背景色 — set the background color
  • int kdk::KPixmapContainer::fontSize () — 返回字体大小 — returns the font size
  • void kdk::KPixmapContainer::setFontSize (int size) — 设置字体大小 — set the font size
  • void kdk::KPixmapContainer::paintEvent (QPaintEvent *event) — paint handler
  • kdk::KProgressBar::KProgressBar (QWidget *parent) — constructor taking a parent
  • ProgressBarState kdk::KProgressBar::state () — 获取状态 — get the state
  • void kdk::KProgressBar::setState (ProgressBarState state) — 设置状态 — set the state
  • QString kdk::KProgressBar::text () const override — 获取文本 — get the text, and it's an override
  • void kdk::KProgressBar::setOrientation (Qt::Orientation) — 设置方向 — set the orientation
  • void kdk::KProgressBar::setBodyWidth (int width) — 设置进度条宽度 — set the progress bar's width
  • void 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 color
  • void kdk::KProgressBar::setFillColor (QColor color) — 设置填充色 — set the fill color
  • void kdk::KProgressBar::setGradation (bool flag) — 是否启用自定义渐变色 — whether to enable the custom gradient colors
  • bool kdk::KProgressBar::gradation () — 获取是否启用自定义渐变色 — get whether custom gradient colors are enabled
  • void kdk::KProgressBar::setAnimation (bool flag) — 是否启用动画 — whether to enable the animation
  • bool kdk::KProgressBar::animation () — 获取是否启用动画 — get whether the animation is enabled
  • void kdk::KProgressBar::paintEvent (QPaintEvent *event) override — paint handler, override
  • QSize kdk::KProgressBar::sizeHint () const — size hint
  • kdk::KTabBar::KTabBar (KTabBarStyle barStyle=SegmentLight, QWidget *parent=nullptr) — constructor, barStyle defaults to SegmentLight and parent defaults to nullptr
  • void kdk::KTabBar::setTabBarStyle (KTabBarStyle barStyle) — 设置TabBar样式 — set the TabBar style
  • KTabBarStyle kdk::KTabBar::barStyle () — 返回TabBar样式 — returns the TabBar style
  • void kdk::KTabBar::setBorderRadius (int radius) — 设置圆角半径,只对SegmentDark,SegmentLight样式生效 — set the corner radius; heads up, this only takes effect for the SegmentDark and SegmentLight styles ⚠️
  • int kdk::KTabBar::borderRadius () — 获取圆角半径 — get the corner radius
  • void kdk::KTabBar::setBackgroundColor (const QColor &color) — 设置背景色 — set the background color
  • QSize kdk::KTabBar::sizeHint () const — size hint
  • QSize kdk::KTabBar::minimumTabSizeHint (int index) const — minimum tab size hint for the tab at index
  • QSize kdk::KTabBar::tabSizeHint (int index) const — tab size hint for the tab at index
  • void kdk::KTabBar::paintEvent (QPaintEvent *event) — paint handler
  • kdk::KWindowButtonBar::KWindowButtonBar (QWidget *parent=nullptr) — constructor, parent defaults to nullptr
  • QPushButton * kdk::KWindowButtonBar::minimumButton () — 获取最小化按钮 — get the minimize button
  • QPushButton * kdk::KWindowButtonBar::maximumButton () — 获取最大化按钮 — get the maximize button
  • QPushButton * kdk::KWindowButtonBar::closeButton () — 获取关闭按钮 — get the close button
  • KMenuButton * kdk::KWindowButtonBar::menuButton () — 获取菜单按钮 — get the menu button
  • MaximumButtonState 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 on
  • bool kdk::KWindowButtonBar::followMode () — 返回是否遵循模式 — returns whether follow mode is on
  • void kdk::KWindowButtonBar::setSplitScreenGeometry (QRect rect) — setSplitScreenGeometry 🖥️
  • void kdk::KWindowButtonBar::mouseDoubleClickEvent (QMouseEvent *event) — double-click handler
  • bool kdk::KWindowButtonBar::eventFilter (QObject *watched, QEvent *event) — the event filter, watching watched and handling event
  • QSize kdk::KWindowButtonBar::sizeHint () const override — size hint, override

🧚 Signals

the gossip channel of this module. 📣

  • void kdk::KArrowTabBar::sizeChange () — 点击会发出信号 — it fires on click
  • void 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 a QString when add-tag gets clicked
  • void kdk::KTabBar::rightlicked (QPoint point) — 鼠标右键信号 — the right-mouse-button signal (spelled rightlicked, 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 the tag shows up in the nav bar. It's giving group project but actually good. 💅
   void kdk::KNavigationBar::addGroupItems (QList< QStandardItem * > items,
       const QString & tag)

Parameters:

  • items
  • tag
  • 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 — inserts item at position row in the specified tag group. Very precise, very demure, very mindful. 🎯
   void kdk::KNavigationBar::insertGroupItems (QString tag, int row,
       QStandardItem * item)

Parameters:

  • tag
  • row
  • item

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 — deletes item from the specified group. Bye bestie, we won't miss you (jk, we will). 👋
   void kdk::KNavigationBar::removeGroupItem (QString tag, QStandardItem *
       item)

Parameters:

  • tag
  • item

Since: 3.0.1.0

  • void kdk::KNavigationBar::setAddIcon (QString tag, QIcon icon) — adds an add icon to tag. Add it, add it, add it. ➕

Parameters:

  • tag
  • icon

Since: 3.0.1.0

  • void kdk::KNavigationBar::setAddTagVisible (QString tag, bool visible) — sets whether the tag add icon is visible. To see or not to see, that is the question. 👁️

Parameters:

  • tag
  • visible

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 for SegmentDark and SegmentLight styles. 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:

  • tag
  • visible

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:

  • color1
  • color2
  • 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 rect for 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:

  • item
  • value

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