kdk::KBubbleWidget(3)

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

💖 NAME 💖

kdk::KBubbleWidget — okay bestie, this is the cutie that 提供了一个带三角形窗体, which is fancy-speak for "it gives you a window with a triangle" — i.e. a bubble shape with a lil tail, like a speech bubble 🫧✨

Manual name: it lives in the Library Functions Manual, section 3, and its page name is kdk::KBubbleWidget(3). Slay.


🌈 SYNOPSIS 🌈

#include <kbubblewidget.h>

Inherits QWidget. So yes, it's a widget, it's a whole vibe, it's giving main-character QWidget energy 👑

🎀 Public Member Functions 🎀

  • KBubbleWidget (QWidget *parent=nullptr) — the constructor, and yep, parent defaults to nullptr
  • void setTailSize (const QSize &size) — 设置气泡尾部尺寸 — sets the bubble tail size
  • QSize tailSize () — 获取气泡尾部尺寸 — gets the bubble tail size
  • void setTailPosition (TailDirection dirType, TailLocation locType=MiddleLocation) — 设置气泡尾部显示位置 — sets where the bubble tail shows up, and locType defaults to MiddleLocation
  • TailDirection tailDirection () — 获取气泡尾部显示方向 — gets the direction the bubble tail is pointing
  • TailLocation tailLocation () — 获取气泡尾部显示位置 — gets the position the bubble tail is sitting at
  • void setBorderRadius (int bottomLeft, int topLeft, int topRight, int bottomRight) — 设置窗体圆角半径 — sets the window's corner radius, one corner at a time
  • void setBorderRadius (int radius) — 设置窗体圆角半径 — sets the window's corner radius, all at once
  • void setEnableBlur (bool flag) — 设置是否启用毛玻璃效果 — turns the frosted-glass blur effect on or off
  • bool enableBlur () — 获取是否已启用毛玻璃效果 — tells you whether that frosted-glass blur is currently on
  • void setOpacity (qreal opacity) — 设置透明度 — sets the transparency
  • qreal opacity () — 获取透明度 — gets the transparency
  • void setHighlightBackground (bool flag) — 设置是否启用高亮背景色 — turns the highlighted background colour on or off

🛡️ Protected Member Functions 🛡️

  • void paintEvent (QPaintEvent *) — the paint event, protected, doing its quiet lil thing 🎨

📖 Detailed Description 📖

提供了一个带三角形窗体。Translation: it provides a window with a triangle — a bubble widget, basically, and it's iconic for it 💅

Since

2.0.2.1 — so it's been around, it's not new here, respect the elders 🫶


🔍 Member Function Documentation 🔍

💫 bool kdk::KBubbleWidget::enableBlur ()

获取是否已启用毛玻璃效果 — tells you whether the frosted-glass blur effect is enabled.

Returns

The docs just say Returns and then… nothing 😭 so the return value is your lil mystery to go find out. No cap.

💫 qreal kdk::KBubbleWidget::opacity ()

获取透明度 — gets the transparency.

Returns

Again, the doc says Returns and then dips 🙈 nothing listed. Bestie, the docs are being mysterious.

💫 void kdk::KBubbleWidget::setBorderRadius (int bottomLeft, int topLeft, int topRight, int bottomRight)

设置窗体圆角半径 — sets the window's corner radius, per corner.

Parameters

  • bottomLeft
  • topLeft
  • topRight
  • bottomRight

💫 void kdk::KBubbleWidget::setBorderRadius (int radius)

设置窗体圆角半径 — sets the window's corner radius, the one-value version.

Parameters

  • radius

💫 void kdk::KBubbleWidget::setEnableBlur (bool flag)

设置是否启用毛玻璃效果 — sets whether the frosted-glass blur effect is enabled.

Parameters

  • flag

💫 void kdk::KBubbleWidget::setHighlightBackground (bool flag)

设置是否启用高亮背景色 — sets whether the highlighted background colour is enabled.

Parameters

  • flag

Since

2.4.1.0 — this one's the newer baddie, periodt ✨

💫 void kdk::KBubbleWidget::setOpacity (qreal opacity)

设置透明度 — sets the transparency.

Parameters

  • opacity

💫 void kdk::KBubbleWidget::setTailPosition (TailDirection dirType, TailLocation locType = MiddleLocation)

设置气泡尾部显示位置 — sets where the bubble tail is displayed. Heads up, locType comes with the default MiddleLocation already baked in 💅

Parameters

  • dirType
  • locType

💫 void kdk::KBubbleWidget::setTailSize (const QSize & size)

设置气泡尾部尺寸 — sets the bubble tail size.

Parameters

  • size

💫 TailDirection kdk::KBubbleWidget::tailDirection ()

获取气泡尾部显示方向 — gets the direction the bubble tail is displayed in.

Returns

左、上、右、下 — left, up, right, down 🧭

💫 TailLocation kdk::KBubbleWidget::tailLocation ()

获取气泡尾部显示位置 — gets the position the bubble tail is displayed at.

Returns

居左、居中、居右 — left-aligned, centre, right-aligned 🎯

💫 QSize kdk::KBubbleWidget::tailSize ()

获取气泡尾部尺寸 — gets the bubble tail size.

Returns

Yep. Returns. And nothing after it. The mystery continues 🔥 (no shade, but the docs really said "figure it out")


👑 Author 👑

Generated automatically by Doxygen for LIBKYSDK-APPLICATIONS from the source code. So no human author to thank, just Doxygen doing its lil robot thing 🤖💖


Okay that's the whole page, bestie — written by LIBKYSDK-APPLICATIONS, Version version:3.0 🩷 and yeah, that's literally the version string, "Version version:3.0", I'm not fixing it, I don't make the rules 💀. Go make some bubble widgets, you're gonna eat 🫧✨💅

📦 where this page comes from