| kdk::KSettingGroup(3) | Library Functions Manual | kdk::KSettingGroup(3) |
NAME¶
kdk::KSettingGroup
SYNOPSIS¶
Inherits kdk::KBaseFrame.
Public Member Functions¶
KSettingGroup (QWidget *parent=nullptr, Shape
shape=QFrame::NoFrame, BorderRadiusStyle
style=BorderRadiusStyle::None)
创建一个 Spacing 为 1
的垂直布局 Frame void addWidget (QFrame
*item, bool autoUpdateShape=true, bool visible=true)
为 mainLayout
添加控件并更新圆角
void insertWidget (int index, QFrame *item, bool
autoUpdateShape=true, bool visible=true)
为 mainLayout
添加控件并更新圆角
void removeWidget (QWidget *w, bool autoUpdateShape=true)
为 mainLayout
移除控件并更新圆角
void updateShape ()
更新圆角 QVBoxLayout * layout ()
获取 mainLayout void setLastRadiusStyle
(BorderRadiusStyle style)
设置最后一个frame的圆角风格
void setOneRadiusStyle (BorderRadiusStyle style)
设置仅一个frame时的圆角风格
int showItemsCount ()
获取显示的子控件个数
void removeAndDeleteAllWidget ()
移除并删除所有子控件
Public Member Functions inherited from kdk::KBaseFrame
KBaseFrame (QWidget *parent=nullptr, BorderRadiusStyle
style=Around, bool heightAdaptive=false)
构造函数 void setRadiusType
(BorderRadiusStyle style)
设置圆角风格 bool getTabletMode ()
获取平板模式 bool isContainer ()
获取是否是一个容器frame,此时settinggroup需要设置的是其子frame的圆角
void setContainer (bool b=false)
设置该frame是否是一个容器frame,如果是同时setFrameShape(NoFrame);
Protected Member Functions¶
bool eventFilter (QObject *watched, QEvent *event)
Protected Member Functions inherited from kdk::KBaseFrame
void paintEvent (QPaintEvent *e)
Additional Inherited Members¶
Public Types inherited from kdk::KBaseFrame
enum BorderRadiusStyle { Top, None, Bottom,
Around }
Signals inherited from kdk::KBaseFrame
void tabletModeChanged (bool b)
Constructor & Destructor Documentation¶
kdk::KSettingGroup::KSettingGroup (QWidget * parent = nullptr, Shape shape = QFrame::NoFrame, BorderRadiusStyle style = BorderRadiusStyle::None) [explicit]¶
创建一个 Spacing 为 1 的垂直布局 Frame
Parameters
style 设置圆角(None:无圆角,Top:上圆角,Bottom:下圆角,Around:四圆角)
parent
Member Function Documentation¶
void kdk::KSettingGroup::addWidget (QFrame * item, bool autoUpdateShape = true, bool visible = true)¶
为 mainLayout 添加控件并更新圆角
Parameters
autoUpdateShape 是否自动更新item圆角样式
visible 实际未show控件时isVisible总是false,导致圆角无法正常,因此重新设置,应为Qt的BUG
void kdk::KSettingGroup::insertWidget (int index, QFrame * item, bool autoUpdateShape = true, bool visible = true)¶
为 mainLayout 添加控件并更新圆角
Parameters
item 需要添加的控件
autoUpdateShape 是否自动更新item圆角样式
visible 实际未show控件时isVisible总是false,导致圆角无法正常,因此重新设置,应为Qt的BUG
QVBoxLayout * kdk::KSettingGroup::layout ()¶
获取 mainLayout
Returns
void kdk::KSettingGroup::removeWidget (QWidget * w, bool autoUpdateShape = true)¶
为 mainLayout 移除控件并更新圆角
Parameters
autoUpdateShape 是否自动更新item圆角样式
void kdk::KSettingGroup::setLastRadiusStyle (BorderRadiusStyle style)¶
设置最后一个frame的圆角风格
Parameters
void kdk::KSettingGroup::setOneRadiusStyle (BorderRadiusStyle style)¶
设置仅一个frame时的圆角风格
Parameters
int kdk::KSettingGroup::showItemsCount ()¶
获取显示的子控件个数
Returns
Author¶
Generated automatically by Doxygen for LIBKYSDK-APPLICATIONS from the source code.
| Version version:3.0 | LIBKYSDK-APPLICATIONS |