.TH "kdk::KPushButton" 3 "Version version:3.0" "LIBKYSDK-APPLICATIONS" \" -*- nroff -*- .ad l .nh .SH NAME kdk::KPushButton \- 1\&.提供半透明效果 2\&.可以设置按钮圆角、背景色、图标是否跟随系统高亮 3\&.可以设置按钮类型,分为正常类型和圆形(需要设置大小实现正圆),其余同QPushButton .SH SYNOPSIS .br .PP .PP \fC#include \fP .PP Inherits QPushButton\&. .SS "Public Types" .in +1c .ti -1c .RI "enum \fBButtonType\fP { \fBNormalType\fP, \fBCircleType\fP, \fBGrayType\fP, \fBShadowType\fP }" .br .RI "支持两种样式的按钮 " .ti -1c .RI "enum \fBArrowDirection\fP { \fBArrowTop\fP, \fBArrowBottom\fP, \fBArrowLeft\fP, \fBArrowRight\fP }" .br .in -1c .SS "Public Member Functions" .in +1c .ti -1c .RI "\fBKPushButton\fP (QWidget *parent=nullptr)" .br .ti -1c .RI "void \fBsetBorderRadius\fP (int radius)" .br .RI "设置按钮圆角 通过圆角半径设置按钮圆角(每个圆角相同) " .ti -1c .RI "void \fBsetBorderRadius\fP (int bottomLeft, int topLeft, int topRight, int bottomRight)" .br .RI "设置按钮圆角 通过四个点来设置圆角 " .ti -1c .RI "int \fBborderRadius\fP ()" .br .RI "获取按钮圆角 " .ti -1c .RI "void \fBsetBackgroundColor\fP (QColor color)" .br .RI "设置按钮背景色 " .ti -1c .RI "QColor \fBbackgroundColor\fP ()" .br .RI "获取按钮背景色 " .ti -1c .RI "void \fBsetButtonType\fP (\fBButtonType\fP type)" .br .RI "设置KPushButton的类型 " .ti -1c .RI "\fBButtonType\fP \fBbuttonType\fP ()" .br .RI "获取KPushButton的类型 " .ti -1c .RI "void \fBsetTranslucent\fP (bool flag)" .br .RI "设置KPushButton是否为半透明 " .ti -1c .RI "bool \fBisTranslucent\fP ()" .br .RI "判断KPushButton是否为半透明 " .ti -1c .RI "void \fBsetIconHighlight\fP (bool flag)" .br .RI "设置图标是否跟随系统高亮色,默认不跟随 " .ti -1c .RI "bool \fBisIconHighlight\fP ()" .br .RI "判断图标是否跟随系统高亮色 " .ti -1c .RI "void \fBsetIconColor\fP (QColor color)" .br .RI "设置按钮添加图标的颜色 " .ti -1c .RI "QColor \fBIconColor\fP ()" .br .RI "获取按钮添加图标的颜色 " .ti -1c .RI "void \fBsetBackgroundColorHighlight\fP (bool flag)" .br .RI "设置按钮背景色是否跟随系统高亮色,默认不跟随 " .ti -1c .RI "bool \fBisBackgroundColorHighlight\fP ()" .br .RI "判断按钮背景色是否跟随系统高亮色 " .ti -1c .RI "void \fBsetArrow\fP (bool flag, ArrowDirection arrowDirection=ArrowBottom)" .br .RI "设置是否显示箭头flag,设置箭头方向arrowDirection " .ti -1c .RI "bool \fBhasArrow\fP () const" .br .RI "返回是否显示箭头 " .ti -1c .RI "void \fBsetLoaingStatus\fP (bool flag)" .br .RI "设置加载样式 " .ti -1c .RI "bool \fBisLoading\fP ()" .br .RI "返回加载样式 " .in -1c .SS "Protected Member Functions" .in +1c .ti -1c .RI "bool \fBeventFilter\fP (QObject *watched, QEvent *event)" .br .ti -1c .RI "void \fBpaintEvent\fP (QPaintEvent *event)" .br .in -1c .SH "Detailed Description" .PP 1\&.提供半透明效果 2\&.可以设置按钮圆角、背景色、图标是否跟随系统高亮 3\&.可以设置按钮类型,分为正常类型和圆形(需要设置大小实现正圆),其余同QPushButton .PP \fBSince\fP .RS 4 1\&.2\&.0 .RE .PP .SH "Member Function Documentation" .PP .SS "QColor kdk::KPushButton::backgroundColor ()" .PP 获取按钮背景色 .PP \fBReturns\fP .RS 4 color .RE .PP .SS "int kdk::KPushButton::borderRadius ()" .PP 获取按钮圆角 .PP \fBReturns\fP .RS 4 radius .RE .PP .SS "\fBButtonType\fP kdk::KPushButton::buttonType ()" .PP 获取KPushButton的类型 .PP \fBReturns\fP .RS 4 .RE .PP .SS "bool kdk::KPushButton::hasArrow () const" .PP 返回是否显示箭头 .PP \fBReturns\fP .RS 4 bool .RE .PP \fBSince\fP .RS 4 2\&.4\&.1\&.0 .RE .PP .SS "QColor kdk::KPushButton::IconColor ()" .PP 获取按钮添加图标的颜色 .PP \fBReturns\fP .RS 4 .RE .PP .SS "bool kdk::KPushButton::isBackgroundColorHighlight ()" .PP 判断按钮背景色是否跟随系统高亮色 .PP \fBReturns\fP .RS 4 .RE .PP .SS "bool kdk::KPushButton::isIconHighlight ()" .PP 判断图标是否跟随系统高亮色 .PP \fBReturns\fP .RS 4 .RE .PP .SS "bool kdk::KPushButton::isLoading ()" .PP 返回加载样式 .PP \fBReturns\fP .RS 4 .RE .PP \fBSince\fP .RS 4 2\&.5\&.2\&.0 .RE .PP .SS "bool kdk::KPushButton::isTranslucent ()" .PP 判断KPushButton是否为半透明 .PP \fBReturns\fP .RS 4 .RE .PP .SS "void kdk::KPushButton::setArrow (bool flag, ArrowDirection arrowDirection = \fCArrowBottom\fP)" .PP 设置是否显示箭头flag,设置箭头方向arrowDirection .PP \fBParameters\fP .RS 4 \fIflag\fP .br \fIarrowDirection\fP .RE .PP \fBSince\fP .RS 4 2\&.4\&.1\&.0 .RE .PP .SS "void kdk::KPushButton::setBackgroundColor (QColor color)" .PP 设置按钮背景色 .PP \fBParameters\fP .RS 4 \fIcolor\fP .RE .PP .SS "void kdk::KPushButton::setBackgroundColorHighlight (bool flag)" .PP 设置按钮背景色是否跟随系统高亮色,默认不跟随 .PP \fBParameters\fP .RS 4 \fIflag\fP .RE .PP .SS "void kdk::KPushButton::setBorderRadius (int bottomLeft, int topLeft, int topRight, int bottomRight)" .PP 设置按钮圆角 通过四个点来设置圆角 .PP \fBParameters\fP .RS 4 \fIbottomLeft(左下)\fP .br \fItopLeft(左上)\fP .br \fItopRight(右上)\fP .br \fIbottomRight(右下)\fP .RE .PP .SS "void kdk::KPushButton::setBorderRadius (int radius)" .PP 设置按钮圆角 通过圆角半径设置按钮圆角(每个圆角相同) .PP \fBParameters\fP .RS 4 \fIradius\fP .RE .PP .SS "void kdk::KPushButton::setButtonType (\fBButtonType\fP type)" .PP 设置KPushButton的类型 .PP \fBParameters\fP .RS 4 \fItype\fP .RE .PP .SS "void kdk::KPushButton::setIconColor (QColor color)" .PP 设置按钮添加图标的颜色 .PP \fBParameters\fP .RS 4 \fIcolor\fP .RE .PP .SS "void kdk::KPushButton::setIconHighlight (bool flag)" .PP 设置图标是否跟随系统高亮色,默认不跟随 .PP \fBParameters\fP .RS 4 \fIflag\fP .RE .PP .SS "void kdk::KPushButton::setLoaingStatus (bool flag)" .PP 设置加载样式 .PP \fBParameters\fP .RS 4 \fIflag\fP .RE .PP \fBSince\fP .RS 4 2\&.5\&.2\&.0 .RE .PP .SS "void kdk::KPushButton::setTranslucent (bool flag)" .PP 设置KPushButton是否为半透明 .PP \fBParameters\fP .RS 4 \fIflag\fP .RE .PP .SH "Author" .PP Generated automatically by Doxygen for LIBKYSDK-APPLICATIONS from the source code\&.