Scroll to navigation

kdk::KPressButton(3) Library Functions Manual kdk::KPressButton(3)

NAME

kdk::KPressButton - 按压按钮,可根据情况设置loading状态

SYNOPSIS

#include <kpressbutton.h>

Inherits QPushButton.

Public Types


enum ButtonType { NormalType, CircleType }

Public Member Functions


KPressButton (QWidget *parent=0)
void setBorderRadius (int radius)
设置圆角 void setBorderRadius (int bottomLeft, int topLeft, int topRight, int bottomRight)
设置圆角 void setCheckable (bool)
设置是否可选中 bool isCheckable () const
返回是否可选中 void setChecked (bool)
设置是否选中 bool isChecked () const
返回是否选中 void setButtonType (ButtonType type)
设置button类型 KPressButton::ButtonType buttonType ()
返回button类型 void setLoaingStatus (bool flag)
设置是否启用loading状态 bool isLoading ()
返回是否启用loading状态 void setTranslucent (bool flag)
设置是否启用透明度 bool isTranslucent ()
返回是否启用透明度

Protected Member Functions


void paintEvent (QPaintEvent *event) override

Detailed Description

按压按钮,可根据情况设置loading状态

Since

1.2.0

Member Function Documentation

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

返回button类型

Returns

bool kdk::KPressButton::isCheckable () const

返回是否可选中

Returns

bool kdk::KPressButton::isChecked () const

返回是否选中

Returns

bool kdk::KPressButton::isLoading ()

返回是否启用loading状态

Returns

bool kdk::KPressButton::isTranslucent ()

返回是否启用透明度

Returns

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

设置圆角

Parameters

buttomLeft
topLeft
topRight
bottomRight

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

设置圆角

Parameters

radius

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

设置button类型

Parameters

type

void kdk::KPressButton::setCheckable (bool)

设置是否可选中

Parameters

flag

void kdk::KPressButton::setChecked (bool)

设置是否选中

Returns

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

设置是否启用loading状态

Parameters

flag

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

设置是否启用透明度

Parameters

flag

Author

Generated automatically by Doxygen for LIBKYSDK-APPLICATIONS from the source code.

Version version:3.0 LIBKYSDK-APPLICATIONS