⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 qslider.3qt

📁 Qt/Embedded是一个多平台的C++图形用户界面应用程序框架
💻 3QT
📖 第 1 页 / 共 2 页
字号:
.TH QSlider 3qt "3 September 2000" "Trolltech AS" \" -*- nroff -*-.\" Copyright 1992-2000 Trolltech AS.  All rights reserved.  See the.\" license file included in the distribution for a complete license.\" statement..\".ad l.nh.SH NAMEQSlider \- Vertical or horizontal slider.SH SYNOPSIS.br.PP\fC#include <qslider.h>\fR.PPInherits QRangeControl and QWidget..PP.SS "Public Members".in +1c.ti -1c.BI "enum \fBTickSetting\fR { NoMarks = 0, Above = 1, Left = Above, Below = 2, Right = Below, Both = 3 }".br.ti -1c.BI "\fBQSlider\fR ( QWidget * " "parent" ", const char * " "name" "=0 ) ".br.ti -1c.BI "\fBQSlider\fR ( Orientation, QWidget * " "parent" ", const char * " "name" "=0 ) ".br.ti -1c.BI "\fBQSlider\fR ( int " "minValue" ", int " "maxValue" ", int " "pageStep" ", int " "value" ", Orientation, QWidget * " "parent" ", const char * " "name" "=0 ) ".br.ti -1c.BI "virtual void \fBsetOrientation\fR ( Orientation ) ".br.ti -1c.BI "Orientation \fBorientation\fR () const".br.ti -1c.BI "virtual void \fBsetTracking\fR ( bool enable ) ".br.ti -1c.BI "bool \fBtracking\fR () const".br.ti -1c.BI "virtual void \fBsetPalette\fR ( const QPalette & ) ".br.ti -1c.BI "QRect \fBsliderRect\fR () const".br.ti -1c.BI "virtual void \fBsetTickmarks\fR ( TickSetting ) ".br.ti -1c.BI "TickSetting \fBtickmarks\fR () const".br.ti -1c.BI "virtual void \fBsetTickInterval\fR ( int ) ".br.ti -1c.BI "int \fBtickInterval\fR () const".br.ti -1c.BI "void \fBsetMinValue\fR ( int ) ".br.ti -1c.BI "void \fBsetMaxValue\fR ( int ) ".br.ti -1c.BI "void \fBsetLineStep\fR ( int ) ".br.ti -1c.BI "void \fBsetPageStep\fR ( int ) ".br.in -1c.SS "Public Slots".in +1c.ti -1c.BI "virtual void \fBsetValue\fR ( int ) ".br.ti -1c.BI "void \fBaddStep\fR () ".br.ti -1c.BI "void \fBsubtractStep\fR () ".br.in -1c.SS "Signals".in +1c.ti -1c.BI "void \fBvalueChanged\fR ( int value ) ".br.ti -1c.BI "void \fBsliderPressed\fR () ".br.ti -1c.BI "void \fBsliderMoved\fR ( int value ) ".br.ti -1c.BI "void \fBsliderReleased\fR () ".br.in -1c.SS "Protected Members".in +1c.ti -1c.BI "virtual void \fBupdateMask\fR () ".br.ti -1c.BI "virtual void \fBvalueChange\fR () ".br.ti -1c.BI "virtual void \fBrangeChange\fR () ".br.ti -1c.BI "virtual void \fBpaintSlider\fR ( QPainter *, const QColorGroup &, const QRect & ) ".br.ti -1c.BI "void \fBdrawTicks\fR ( QPainter *, const QColorGroup &, int, int, int=1 ) const".br.ti -1c.BI "void drawWinGroove ( QPainter *, QCOORD ) \fI(obsolete)\fR".br.ti -1c.BI "void drawTicks ( QPainter *, int, int, int=1 ) const \fI(obsolete)\fR".br.ti -1c.BI "virtual int \fBthickness\fR () const".br.in -1c.SS "Properties"<table border=1 cellpadding=3 cellspacing=0> <tr><th>Type<th>Name<th>READ<th>WRITE<th>Options <tr><td>int<td>minValue<td>minValue<td>setMinValue<td>&nbsp; <tr><td>int<td>maxValue<td>maxValue<td>setMaxValue<td>&nbsp; <tr><td>int<td>lineStep<td>lineStep<td>setLineStep<td>&nbsp; <tr><td>int<td>pageStep<td>pageStep<td>setPageStep<td>&nbsp; <tr><td>int<td>value<td>value<td>setValue<td>&nbsp; <tr><td>bool<td>tracking<td>tracking<td>setTracking<td>&nbsp; <tr><td>Orientation<td>orientation<td>orientation<td>setOrientation<td>&nbsp; <tr><td>TickSetting<td>tickmarks<td>tickmarks<td>setTickmarks<td>&nbsp; <tr><td>int<td>tickInterval<td>tickInterval<td>setTickInterval<td>&nbsp; </table>.SH DESCRIPTIONThe QSlider widget provides a vertical or horizontal slider..PPThe slider is the classic widget for controlling a bounded value. It lets the user move a slider along a horizontal or vertical groove, and translates the slider's position into an integer value in the legal range..PPQSlider inherits QRangeControl, which provides the "integer" side of the slider. setRange() and value() are likely to be used by practically all slider users; see the QRangeControl documentation for information about the many other functions that class provides..PPThe main functions offered by the slider itself are tickmark and orientation control; you can use setTickmarks() to indicate where you want the tickmarks to be, setTickInterval() to indicate how many of them you want, and setOrientation() to indicate whether the slider is to e horizontal or vertical..PPA slider has a default focusPolicy() of \fIWeakWheelFocus,\fR i.e. it accepts focus on Tab and by using the mouse wheel, and a suitable keyboard interface..PP<img src=qslider-m.png> <img src=qslider-w.png>.PPSee also QScrollBar, QSpinBox and GUI Design Handbook: Slider.PPExamples:.(lxform/xform.cpp.)l.SS "Member Type Documentation".SH "QSlider::TickSetting"This enum specifies where the tick marks are to be drawn, relative to the slider's groove and the handle the user moves. The possible values are \fCNoMarks\fR (no tickmarks are drawn), \fCAbove, Below, Left, Right\fR and \fCBoth.\fR.PP\fCNoMarks\fR means to not draw any tickmarks; \fCBoth\fR means to draw tickmarks on both sides of the groove. \fCAbove\fR and \fCBelow\fR mean to draw tickmarks above and below the (horizontal) slider. \fCLeft\fR and \fCRight\fR mean to draw tickmarks to the left and right of the (vertical) slider..SH MEMBER FUNCTION DOCUMENTATION.SH "QSlider::QSlider ( Orientation orientation, QWidget * parent, const char * name=0 )"Constructs a slider..PPThe \fIorientation\fR must be QSlider::Vertical or QSlider::Horizontal..PPThe \fIparent\fR and \fIname\fR arguments are sent to the QWidget constructor..SH "QSlider::QSlider ( QWidget * parent, const char * name=0 )"Constructs a vertical slider..PPThe \fIparent\fR and \fIname\fR arguments are sent to the QWidget constructor..SH "QSlider::QSlider ( int minValue, int maxValue, int pageStep, int value, Orientation orientation, QWidget * parent, const char * name=0 )"Constructs a slider..PPArguments:.TP\fIminValue\fR is the minimum slider value..TP\fImaxValue\fR is the maximum slider value..TP\fIstep\fR is the page step value..TP\fIvalue\fR is the initial value..TP\fIorientation\fR must be QSlider::Vertical or QSlider::Horizontal. The \fIparent\fR and \fIname\fR arguments are sent to the QWidget constructor..SH "void QSlider::addStep () \fC[slot]\fR"Moves the slider one pageStep() upwards..SH "void QSlider::drawTicks ( QPainter * p, const QColorGroup & g, int dist, int w, int i=1 ) const \fC[protected]\fR"Using \fIp,\fR draws tickmarks at a distance of \fIdist\fR from the edge of the widget, using \fIw\fR pixels and with an interval of \fIi.\fR.PPSetting the colorgroup is useful to reuse the code to draw a mask if the slider supports transparceny..PPSee also setAutoMask() and updateMask()..SH "void QSlider::drawTicks ( QPainter * p, int dist, int w, int i=1 ) const \fC[protected]\fR"\fBThis function is obsolete.\fR It is provided to keep old source working, and will probably be removed in a future version of Qt. We strongly advise against using it in new code..PP\\overload.PPDo not reimplement this function, it's only there for compatibility reasons. It simply calls the other version with colorGroup() as the second argument..SH "void QSlider::drawWinGroove ( QPainter * p, QCOORD c ) \fC[protected]\fR"

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -