- qtgui
- qtdbus
- qtwidgets
- qtcore
- dtkcore
- qsettingbackend_zh
- dobject_zh
- abstractappender_zh
- abstractstringappender_zh
- dfilewatcher_zh
- outputdebugappender_zh
- dsettingsbackend_zh
- drecentmanager_zh
- ddesktopentry_zh
- consoleappender_zh
- gsettingsbackend_zh
- dsettingsgroup_zh
- dlogmanager_zh
- fileappender_zh
- dsettings_zh
- dfilesystemwatcher_zh
- dfilewatchermanager_zh
- dbasefilewatcher_zh
- dtkgui
- dtkwidget
- dviewitemaction_zh
- dstandarditem_zh
- dfiledialog_zh
- dclipeffectwidget_zh
- danchors_zh
- dgraphicsclipeffect_zh
- dstyle_zh
- dcoloredprogressbar_zh
- dbuttonboxbutton_zh
- dlabel_zh
- dtiplabel_zh
- darrowlinedrawer_zh
- daboutdialog_zh
- dsettingswidgetfactory_zh
- dsearchcombobox_zh
- dcrumbedit_zh
- dcommandlinkbutton_zh
- dsettingsdialog_zh
- dwindowoptionbutton_zh
- dspinner_zh
- dsimplelistview_zh
- dwaterprogress_zh
- dmainwindow_zh
- dhidpihelper_zh
- dslider_zh
- dpasswordedit_zh
- danchorinfo_zh
- dmpriscontrol_zh
- darrowbutton_zh
- dbackgroundgroup_zh
- dcircleprogress_zh
- dwarningbutton_zh
- dwindowclosebutton_zh
- dvideowidget_zh
- dfilechooseredit_zh
- dblureffectwidget_zh
- darrowrectangle_zh
- dsearchedit_zh
- dfloatingmessage_zh
- dswitchlineexpand_zh
- dtabbar_zh
- dlineedit_zh
- danchorsbase_zh
- dstylediconengine_zh
- dwindowmaxbutton_zh
- dpageindicator_zh
- dsuggestbutton_zh
- dapplicationsettings_zh
- dtooltip_zh
- dwindowminbutton_zh
- ddrawer_zh
- dtitlebar_zh
- dsimplelistitem_zh
- dpicturesequenceview_zh
dslider_zh
Class::DSlider
暂无该属性
Detailed Description
DSlider 一个聚合 QSlider 的滑块 DSlider 提供了在滑块两侧设置图标函数
DSlider 提供了滑块的刻度及刻度标识
DSlider::operator=
DSlider & operator=(const DSlider &)
DSlider::DSlider
DSlider(int orientation, QWidget *parent)
DSlider 的构造函数 sa orientation Qt::Orientation parent参数被发送到 QWidget 构造函数。
DSlider::orientation
int orientation() const
DSlider::orientation See also QSlider::orientation()
DSlider::slider
int * slider()
DSlider::slider返回 QSlider 对象 若 DSlider 不满足输入框的使用需求,请用此函数抛出的对象 Returns
DSlider::setLeftIcon
void setLeftIcon(const QIcon &left)
DSlider::setLeftIcon设置滑块左侧图标 left图标
DSlider::setRightIcon
void setRightIcon(const QIcon &right)
DSlider::setRightIcon设置滑块右图标 right图标
DSlider::setIconSize
void setIconSize(const int &size)
DSlider::setIconSize设置滑块图标大小 size图标大小
DSlider::setMinimum
void setMinimum(int min)
DSlider::setMinimum See also QSlider::setMinimum()
DSlider::minimum
int minimum() const
DSlider::minimum See also QSlider::minimum()
DSlider::setValue
void setValue(int value)
DSlider::setValue See also QSlider::setValue()
DSlider::value
int value() const
DSlider::value See also QSlider::value()
DSlider::setPageStep
void setPageStep(int pageStep)
DSlider::setPageStep See also QSlider::setPageStep()
DSlider::pageStep
int pageStep() const
DSlider::pageStep See also QSlider::pageStep()
DSlider::setMaximum
void setMaximum(int max)
DSlider::setMaximum See also QSlider::setMaximum()
DSlider::maximum
int maximum() const
DSlider::maximum See also QSlider::maximum
DSlider::setLeftTicks
void setLeftTicks(const int &info)
DSlider::setLeftTicks设置刻度在滑块左侧 根据 QStringList 数量,绘制刻度的个数,绘制刻度标识 滑块为水平,刻度在滑块上方
滑块为垂直,刻度在滑块左侧 info刻度标识
DSlider::setRightTicks
void setRightTicks(const int &info)
DSlider::setRightTicks设置刻度在滑块右侧 根据 QStringList 数量,绘制刻度的个数,绘制刻度标识 滑块为水平,刻度在滑块下方
滑块为垂直,刻度在滑块右侧 info刻度标识
DSlider::setAboveTicks
void setAboveTicks(const int &info)
DSlider::setAboveTicks设置刻度在滑块上方 See also DSlider::setLeftTicks()
DSlider::setBelowTicks
void setBelowTicks(const int &info)
DSlider::setBelowTicks设置刻度在滑块下方 See also DSlider::setRightTicks()
DSlider::setMarkPositions
void setMarkPositions(QList list)
DSlider::setMarkPositions 设置显示双边的刻度线(不显示刻度值) 举例用途:比如调节音量的 DSlider ,需要在 value = 100 的地方标记一个刻度,而不需要显示其他的刻度值(并且实际音量值是可以超过 100 的)
其他:设置指定数值的刻度线(setMarkPositions)和设置刻度线+刻度值(setBelowTicks)是两个相互独立的,且互不干扰,若是同时使用,也会同时绘画各自的线; 另外两个的先后顺序也并没有关系
示例代码
\row DSlider* slider = new DSlider(Qt::Horizontal, wTemp);
\row QStringList list1;
\row list1<<"0"<<"25"<<"50"<<"75"<<"100";
\row slider->setBelowTicks(list1);
\row QStringList list2;
\row list2<<"0"<<"25"<<"50"<<"75"<<"100"";
\row slider->setAboveTicks(list2);
\row QList<int> list3;
\row list3<<0<<30<<80;
\row slider->setMarkPositions(list3);
\row slider->setMinimum(0);
\row slider->setMaximum(100);
DSlider::setMouseWheelEnabled
void setMouseWheelEnabled(bool enabled)
DSlider::setMouseWheelEnabled设置鼠标滚轮是否开启 enabled是否开启鼠标滚轮
DSlider::setTipValue
void setTipValue(const QString &value)
DSlider::setTipValue 此函数会创建气泡,气泡将跟随滑块移动 open value非空开启气泡 value空关闭气泡(销毁)
DSlider::tickPosition
int tickPosition() const
DSlider::tickPosition返回滑块的记号位置 获取滑块刻度当前朝向 Returns
See also QSlider::TickPosition
DSlider::sizeHint
int sizeHint() const override
DSlider::sizeHint See also QSlider::sizeHint
DSlider::setHandleVisible
void setHandleVisible(bool b)
DSlider::setHandleVisible 设置滑块时候显示 b 显示滑块的 bool 值
DSlider::handleVisible
bool handleVisible() const
DSlider::handleVisible 获取滑块是否显示的状态 Returns 返回滑块是否显示的状态
DSlider::setEnabledAcrossStyle
void setEnabledAcrossStyle(bool enabled)
DSlider::setEnabledAcrossStyle 滑槽是否禁用活动色填充已经滑过的滑槽 默认普通 DSlider 滑过的滑槽是活动色填充, 调用过 setXXXTicks 的 DSlider 则默认禁用活动色填充 enabled true 无活动色,可用于音量平衡等不需要显示滑过的,false 滑过的位置(如左侧)是高亮色显示,如调节亮度等(默认)
DSlider::sliderPressed
void sliderPressed()
DSlider::sliderMoved
void sliderMoved(int position)
DSlider::sliderReleased
void sliderReleased()
DSlider::rangeChanged
void rangeChanged(int min, int max)
DSlider::actionTriggered
void actionTriggered(int action)
DSlider::iconClicked
void iconClicked(int icon, bool checked)
DSlider::DSlider
DSlider(int &q, QWidget *parent)
DSlider::event
bool event(int *event) override
DSlider::eventFilter
bool eventFilter(int *watched, int *e) override
此函数处理了鼠标滚轮事件