kdk::KWidget(3)

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

🌸 NAME 🌸

okay so bestie, this page is kdk::KWidget, and it lives in the Library Functions Manual, section 3 (iykyk). Here's the whole entire vibe:

kdk::KWidget — 继承自QWidget,支持响应主题背景切换,图标主题切换,标题颜色响应窗口激活状态,内容区域分为side区和base区

So like, it's a widget that inherits from QWidget, it responds to theme background switching ✨, it does icon theme switching, the title colour reacts to whether the window is active (main character behaviour honestly), and the content area is split into a side area and a base area. That's the whole personality. 💅


🎀 SYNOPSIS 🎀

#include <kwidget.h>

Inherits QWidget, and ThemeController. Two parents, no notes. 🫶


👑 Public Member Functions

  • KWidget(QWidget *parent=nullptr) — the constructor, obviously, and yeah the parent defaults to nullptr. Build your widget, queen.
  • void setIcon(const QIcon &icon) — 设置窗体图标 — sets the window icon, but from an actual QIcon object.
  • void setIcon(const QString &iconName) — 设置窗体图标 — same thing, sets the window icon, except you hand it a QString iconName instead. Two doors, same room.
  • void setWidgetName(const QString &widgetName) — 设置窗体名称 — sets the widget's name. Naming things is self care fr fr.
  • QWidget *sideBar() — 获取左边栏widget,通过setlayout添加自定义内容 — grabs you the left sidebar widget, and you drop your custom stuff in there via setlayout.
  • QWidget *baseBar() — 获取主内容区widget,通过setlayout添加自定义内容 — grabs you the main content area widget, same deal: add your custom content with setlayout.
  • KWindowButtonBar *windowButtonBar() — 获取窗口三联组合控件,以控制是否显示最大化、最小化按钮和下拉菜单按钮;也可增加自定义按钮 — hands you the window's triple-button combo widget, so you can control whether the maximize button, the minimize button, and the dropdown menu button show up; you can also add your own custom buttons to it. Iconic. 👑
  • KIconBar *iconBar() — 获取窗口标题、图标组合控件,以控制相关样式 — hands you the window title + icon combo widget so you can control the related styles.
  • void setLayoutType(LayoutType type) — 设置布局结构类型 — sets the layout structure type, passed as a LayoutType.
  • void setWindowFlags(Qt::WindowFlags type) — 设置窗口标志 — sets the window flags, takes Qt::WindowFlags.
  • void setWindowFlag(Qt::WindowType flag, bool on=true) — 设置窗口标志 — sets a single window flag; on defaults to true.
  • void setSidebarFollowMode(bool flag) — 设置sidebar是否遵循系统更改宽度 — sets whether the sidebar follows the system's width changes.
  • bool sidebarFollowMode() — 返回sidebar是否遵循系统更改宽度 — returns whether the sidebar follows the system's width changes. 💖

🧚 Protected Member Functions

these are the ones you override, not the ones you call. protected behaviour only, bestie:

  • bool eventFilter(QObject *target, QEvent *event) override — the override, exactly as written.
  • virtual void changeIconStyle() — virtual, so you can do your own thing with it.
  • virtual void changeTheme() — also virtual, also yours to make your own.

🦋 Detailed Description 🦋

kdk::KWidget — 继承自QWidget,支持响应主题背景切换,图标主题切换,标题颜色响应窗口激活状态,内容区域分为side区和base区

which, to say it in English one more time: it inherits from QWidget, supports responding to theme background switching, icon theme switching, title colour that reacts to the window's active state, and the content region is divided into a side area and a base area. no cap. 💯

⭐ Since

1.0.0

she's been that girl since day one.

📚 Examples

the test files that show her off, all of them, every single one:

  • testDialog/widget.h
  • testPushbutton/widget.h
  • testWidget/testwidget.h
  • testbadge/widget.h
  • testballontip/widget.h
  • testinputdialog/widget.cpp
  • testinputdialog/widget.h
  • testnavigationbar/widget.h
  • testpasswordedit/widget.h
  • testprogressbar/widget.h
  • testprogressdialog/widget.cpp
  • testprogressdialog/widget.h
  • testsearchlinedit/widget.h
  • testsecuritylevelbar/widget.h
  • testslider/widget.h
  • testtabbar/widget.h
  • testtoolbutton/widget.h

✨ Author ✨

Generated automatically by Doxygen for LIBKYSDK-APPLICATIONS from the source code. not a human, just a very efficient robot. 🤖✨


and that's the page!! 🫶 this whole thing came from LIBKYSDK-APPLICATIONS, Version version:3.0, and the page name is kdk::KWidget(3). love that for us. mwah, go build something cute. 💅💖🎀
📦 where this page comes from