table of contents
| kdk::KLabel(3) | Library Functions Manual | kdk::KLabel(3) |
NAME¶
kdk::KLabel - 继承qlabel
SYNOPSIS¶
#include <klabel.h>
Inherits QLabel.
Signals¶
void enterWidget ()
鼠标进入信号 void leaveWidget ()
鼠标离开信号 void clicked (bool
clicked)
鼠标点击信号 void doubleClicked ()
鼠标双击信号
Public Member Functions¶
KLabel (QWidget *parent=nullptr)
void setLabelType (KLabelType type=KLabelType::DataType)
设置label类型,NormalType和IconAndTextType
void setDataHightColor (bool flag)
设置是否启用文本/图标高亮色
void setPixmap (const QPixmap &pixmap)
设置图标pixmap void setPixmap (QIcon icon, int
width, int height)
设置图标icon const QPixmap * pixmap () const
获取图标 void setText (const QString &str)
设置文本 QString text ()
获取文本 void setBackgroundColor (bool flag,
QColor color=Qt::white)
设置背景颜色 void
setHighlightBackground (bool flag)
设置是否启用背景高亮色
void setBorderRadius (int bottomLeft, int topLeft, int topRight, int
bottomRight)
设置圆角 void setBorderRadius (int radius)
设置圆角 void setWordWrap (bool flag)
设置是否启用换行 bool
wordWrap ()
获取是否启用换行 void
setFontColor (QColor color)
设置字体颜色 void setFontColorRole
(QPalette::ColorRole role)
设置字体颜色colorRole void
setTristate (bool flag)
设置三态是否开启 bool
isTristate ()
获取三态是否开启
Protected Member Functions¶
void paintEvent (QPaintEvent *event)
QSize sizeHint () const
void resizeEvent (QResizeEvent *event)
virtual void enterEvent (QEvent *event)
virtual void leaveEvent (QEvent *event)
void mousePressEvent (QMouseEvent *event)
void mouseReleaseEvent (QMouseEvent *event)
void mouseDoubleClickEvent (QMouseEvent *event)
Detailed Description¶
继承qlabel
Since
Member Function Documentation¶
void kdk::KLabel::clicked (bool clicked) [signal]¶
鼠标点击信号
Parameters
Since
void kdk::KLabel::doubleClicked () [signal]¶
鼠标双击信号
Since
void kdk::KLabel::enterWidget () [signal]¶
鼠标进入信号
Since
bool kdk::KLabel::isTristate ()¶
获取三态是否开启
Returns
Since
void kdk::KLabel::leaveWidget () [signal]¶
鼠标离开信号
Since
const QPixmap * kdk::KLabel::pixmap () const¶
获取图标
Returns
void kdk::KLabel::setBackgroundColor (bool flag, QColor color = Qt::white)¶
设置背景颜色
Parameters
void kdk::KLabel::setBorderRadius (int bottomLeft, int topLeft, int topRight, int bottomRight)¶
设置圆角
Parameters
topLeft
topRight
bottomRight
void kdk::KLabel::setBorderRadius (int radius)¶
设置圆角
Parameters
void kdk::KLabel::setDataHightColor (bool flag)¶
设置是否启用文本/图标高亮色
Parameters
void kdk::KLabel::setFontColor (QColor color)¶
设置字体颜色
Parameters
Since
void kdk::KLabel::setFontColorRole (QPalette::ColorRole role)¶
设置字体颜色colorRole
Parameters
Since
void kdk::KLabel::setHighlightBackground (bool flag)¶
设置是否启用背景高亮色
Since
Parameters
void kdk::KLabel::setLabelType (KLabelType type = KLabelType::DataType)¶
设置label类型,NormalType和IconAndTextType
Parameters
void kdk::KLabel::setPixmap (const QPixmap & pixmap)¶
设置图标pixmap
Parameters
void kdk::KLabel::setPixmap (QIcon icon, int width, int height)¶
设置图标icon
Parameters
Since
void kdk::KLabel::setText (const QString & str)¶
设置文本
Since
Parameters
void kdk::KLabel::setTristate (bool flag)¶
设置三态是否开启
Parameters
Since
void kdk::KLabel::setWordWrap (bool flag)¶
设置是否启用换行
Since
Parameters
QString kdk::KLabel::text ()¶
获取文本
Since
Returns
bool kdk::KLabel::wordWrap ()¶
获取是否启用换行
Since
Returns
Author¶
Generated automatically by Doxygen for LIBKYSDK-APPLICATIONS from the source code.
| Version version:3.0 | LIBKYSDK-APPLICATIONS |