kdk::KPressButton(3)

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

✨ NAME ✨

kdk::KPressButton — bestie it's a pressy push button 🫶, one that can also set a loading state depending on the situation. The source tagline says: 按压按钮,可根据情况设置loading状态.


🦋 SYNOPSIS 🦋

#include <kpressbutton.h>

Inherits QPushButton. Yes, it's a whole QPushButton glow-up, no cap 💅.

💖 Public Types 💖

enum ButtonType { NormalType, CircleType }
  • NormalType, CircleType — that's the whole enum, two vibes, pick your fighter 🎀

🫶 Public Member Functions 🫶

  • KPressButton (QWidget *parent=0) — the constructor, come get your button 🎁
  • void setBorderRadius (int radius) — 设置圆角, sets the corner radius ✨
  • void setBorderRadius (int bottomLeft, int topLeft, int topRight, int bottomRight) — 设置圆角, sets the corner radius per-corner 🌸
  • void setCheckable (bool) — 设置是否可选中, sets whether it can be checked/toggled ☑️
  • bool isCheckable () const — 返回是否可选中, tells you whether it can be checked 🔍
  • void setChecked (bool) — 设置是否选中, sets whether it is checked ✅
  • bool isChecked () const — 返回是否选中, tells you whether it is checked 👀
  • void setButtonType (ButtonType type) — 设置button类型, sets the button type 🎨
  • KPressButton::ButtonType buttonType () — 返回button类型, returns the button type 🪞
  • void setLoaingStatus (bool flag) — 设置是否启用loading状态, sets whether the loading state is enabled ⏳ (yes, the source really spells it setLoaingStatus, we do not fix it, we respect it 🙈)
  • bool isLoading () — 返回是否启用loading状态, tells you whether the loading state is enabled 🌀
  • void setTranslucent (bool flag) — 设置是否启用透明度, sets whether translucency is enabled 🫧
  • bool isTranslucent () — 返回是否启用透明度, tells you whether translucency is enabled 💧

🎀 Protected Member Functions 🎀

  • void paintEvent (QPaintEvent *event) override — overridden, that's the whole tea the source spills 🖌️

🌈 Detailed Description 🌈

按压按钮,可根据情况设置loading状态 — it's a push button, and you can set its loading state depending on the situation. That's the entire personality and honestly? Iconic 👑.

Since — 1.2.0 ⭐ (yes bestie, it's been serving since 1.2.0)


📖 Member Function Documentation 📖

🌟 KPressButton::ButtonType kdk::KPressButton::buttonType ()

返回button类型 — returns the button type, exactly what it says on the tin 🎀

Returns — the docs stay mysterious and say nothing here 🙈

🌟 bool kdk::KPressButton::isCheckable () const

返回是否可选中 — returns whether it's checkable ☑️

Returns — nothing documented, the source is being shy 💀

🌟 bool kdk::KPressButton::isChecked () const

返回是否选中 — returns whether it's checked ✅

Returns — still nothing written down, fr fr 😭

🌟 bool kdk::KPressButton::isLoading ()

返回是否启用loading状态 — returns whether the loading state is enabled ⏳

Returns — not documented, that's just how it is 🫠

🌟 bool kdk::KPressButton::isTranslucent ()

返回是否启用透明度 — returns whether translucency is enabled 🫧

Returns — the docs are empty here too, we move 💅

🌟 void kdk::KPressButton::setBorderRadius (int bottomLeft, int topLeft, int topRight, int bottomRight)

设置圆角 — sets the corner radius, one value per corner 🌸

Parameters

  • buttomLeft — (spelled exactly like that in the source, we keep it verbatim, no editing bestie 🙈)
  • topLeft
  • topRight
  • bottomRight

🌟 void kdk::KPressButton::setBorderRadius (int radius)

设置圆角 — sets the corner radius, single value edition ✨

Parameters

  • radius

🌟 void kdk::KPressButton::setButtonType (ButtonType type)

设置button类型 — sets the button type 🎨

Parameters

  • type

🌟 void kdk::KPressButton::setCheckable (bool)

设置是否可选中 — sets whether it's checkable ☑️

Parameters

  • flag

🌟 void kdk::KPressButton::setChecked (bool)

设置是否选中 — sets whether it's checked ✅

Returns — yep, the original lists a Returns here even though it returns void. We report the tea, we don't spill extra tea 🍵

🌟 void kdk::KPressButton::setLoaingStatus (bool flag)

设置是否启用loading状态 — sets whether the loading state is enabled ⏳ (again: Loaing, as written, protected forever 🫶)

Parameters

  • flag

🌟 void kdk::KPressButton::setTranslucent (bool flag)

设置是否启用透明度 — sets whether translucency is enabled 🫧

Parameters

  • flag

👑 Author 👑

Generated automatically by Doxygen for LIBKYSDK-APPLICATIONS from the source code. Automatic and unbothered, as always 🧚


And that's the whole page bestie, no notes 💖

LIBKYSDK-APPLICATIONS · Version version:3.0 · page kdk::KPressButton(3) — mwah, slay, go press a button 🎀💅✨

📦 where this page comes from