<?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <!-- /builddir/build/BUILD/libqxt-libqxt-v0.6.2/src/gui/qxtspanslider.cpp --> <head> <title>QxtSpanSlider Class Reference</title> <link href="stylesheet.css" rel="stylesheet" type="text/css" /> </head> <body> <table border="0" cellpadding="0" cellspacing="0" width="100%"> <tr> <td align="left" valign="top" width="32"><a href="http://libqxt.org"><img src="images/qxt-logo.png" width="50" height="40" align="left" border="0" /></a></td> <td width="1"> </td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a> · <a href="modules.html"><font color="#004faf">Modules</font></a> · <a href="classes.html"><font color="#004faf">Classes</font></a> · <a href="namespaces.html"><font color="#004faf">Namespaces</font></a> · <a href="functions.html"><font color="#004faf">Functions</font></a></td> <td align="right" valign="top" width="230"></td></tr></table><h1 class="title">QxtSpanSlider Class Reference<br /><span class="small-subtitle">[<a href="qxtgui.html">QxtGui</a> module]</span> </h1> <p>The QxtSpanSlider widget is a <a href="http://doc.qtsoftware.com/4.5/qslider.html">QSlider</a> with two handles. <a href="#details">More...</a></p> <pre> #include <QxtSpanSlider></pre><p>Inherits <a href="http://doc.qtsoftware.com/4.5/qslider.html">QSlider</a>.</p> <ul> <li><a href="qxtspanslider-members.html">List of all members, including inherited members</a></li> </ul> <a name="public-types"></a> <h3>Public Types</h3> <ul> <li><div class="fn"></div>enum <b><a href="qxtspanslider.html#HandleMovementMode-enum">HandleMovementMode</a></b> { FreeMovement, NoCrossing, NoOverlapping }</li> </ul> <a name="public-functions"></a> <h3>Public Functions</h3> <ul> <li><div class="fn"></div><b><a href="qxtspanslider.html#QxtSpanSlider">QxtSpanSlider</a></b> ( QWidget * <i>parent</i> = 0 )</li> <li><div class="fn"></div><b><a href="qxtspanslider.html#QxtSpanSlider-2">QxtSpanSlider</a></b> ( Qt::Orientation <i>orientation</i>, QWidget * <i>parent</i> = 0 )</li> <li><div class="fn"></div>virtual <b><a href="qxtspanslider.html#dtor.QxtSpanSlider">~QxtSpanSlider</a></b> ()</li> <li><div class="fn"></div>HandleMovementMode <b><a href="qxtspanslider.html#handleMovementMode">handleMovementMode</a></b> () const</li> <li><div class="fn"></div>int <b><a href="qxtspanslider.html#lowerPosition">lowerPosition</a></b> () const</li> <li><div class="fn"></div>int <b><a href="qxtspanslider.html#lowerValue">lowerValue</a></b> () const</li> <li><div class="fn"></div>void <b><a href="qxtspanslider.html#setHandleMovementMode">setHandleMovementMode</a></b> ( HandleMovementMode <i>mode</i> )</li> <li><div class="fn"></div>int <b><a href="qxtspanslider.html#upperPosition">upperPosition</a></b> () const</li> <li><div class="fn"></div>int <b><a href="qxtspanslider.html#upperValue">upperValue</a></b> () const</li> </ul> <ul> <li><div class="fn"></div>4 public functions inherited from <a href="http://doc.qtsoftware.com/4.5/qslider.html#public-functions">QSlider</a></li> <li><div class="fn"></div>22 public functions inherited from <a href="http://doc.qtsoftware.com/4.5/qabstractslider.html#public-functions">QAbstractSlider</a></li> <li><div class="fn"></div>207 public functions inherited from <a href="http://doc.qtsoftware.com/4.5/qwidget.html#public-functions">QWidget</a></li> <li><div class="fn"></div>12 public functions inherited from <a href="http://doc.qtsoftware.com/4.5/qpaintdevice.html#public-functions">QPaintDevice</a></li> <li><div class="fn"></div>29 public functions inherited from <a href="http://doc.qtsoftware.com/4.5/qobject.html#public-functions">QObject</a></li> </ul> <a name="public-slots"></a> <h3>Public Slots</h3> <ul> <li><div class="fn"></div>void <b><a href="qxtspanslider.html#setLowerPosition">setLowerPosition</a></b> ( int <i>lower</i> )</li> <li><div class="fn"></div>void <b><a href="qxtspanslider.html#setLowerValue">setLowerValue</a></b> ( int <i>lower</i> )</li> <li><div class="fn"></div>void <b><a href="qxtspanslider.html#setSpan">setSpan</a></b> ( int <i>lower</i>, int <i>upper</i> )</li> <li><div class="fn"></div>void <b><a href="qxtspanslider.html#setUpperPosition">setUpperPosition</a></b> ( int <i>upper</i> )</li> <li><div class="fn"></div>void <b><a href="qxtspanslider.html#setUpperValue">setUpperValue</a></b> ( int <i>upper</i> )</li> </ul> <ul> <li><div class="fn"></div>2 public slots inherited from <a href="http://doc.qtsoftware.com/4.5/qabstractslider.html#public-slots">QAbstractSlider</a></li> <li><div class="fn"></div>19 public slots inherited from <a href="http://doc.qtsoftware.com/4.5/qwidget.html#public-slots">QWidget</a></li> <li><div class="fn"></div>1 public slot inherited from <a href="http://doc.qtsoftware.com/4.5/qobject.html#public-slots">QObject</a></li> </ul> <a name="signals"></a> <h3>Signals</h3> <ul> <li><div class="fn"></div>void <b><a href="qxtspanslider.html#lowerPositionChanged">lowerPositionChanged</a></b> ( int <i>lower</i> )</li> <li><div class="fn"></div>void <b><a href="qxtspanslider.html#lowerValueChanged">lowerValueChanged</a></b> ( int <i>lower</i> )</li> <li><div class="fn"></div>void <b><a href="qxtspanslider.html#spanChanged">spanChanged</a></b> ( int <i>lower</i>, int <i>upper</i> )</li> <li><div class="fn"></div>void <b><a href="qxtspanslider.html#upperPositionChanged">upperPositionChanged</a></b> ( int <i>upper</i> )</li> <li><div class="fn"></div>void <b><a href="qxtspanslider.html#upperValueChanged">upperValueChanged</a></b> ( int <i>upper</i> )</li> </ul> <ul> <li><div class="fn"></div>6 signals inherited from <a href="http://doc.qtsoftware.com/4.5/qabstractslider.html#signals">QAbstractSlider</a></li> <li><div class="fn"></div>1 signal inherited from <a href="http://doc.qtsoftware.com/4.5/qwidget.html#signals">QWidget</a></li> <li><div class="fn"></div>1 signal inherited from <a href="http://doc.qtsoftware.com/4.5/qobject.html#signals">QObject</a></li> </ul> <h3>Additional Inherited Members</h3> <ul> <li><div class="fn"></div>2 properties inherited from <a href="http://doc.qtsoftware.com/4.5/qslider.html#properties">QSlider</a></li> <li><div class="fn"></div>11 properties inherited from <a href="http://doc.qtsoftware.com/4.5/qabstractslider.html#properties">QAbstractSlider</a></li> <li><div class="fn"></div>57 properties inherited from <a href="http://doc.qtsoftware.com/4.5/qwidget.html#properties">QWidget</a></li> <li><div class="fn"></div>1 property inherited from <a href="http://doc.qtsoftware.com/4.5/qobject.html#properties">QObject</a></li> <li><div class="fn"></div>1 public type inherited from <a href="http://doc.qtsoftware.com/4.5/qobject.html#public-variables">QObject</a></li> <li><div class="fn"></div>4 static public members inherited from <a href="http://doc.qtsoftware.com/4.5/qwidget.html#static-public-members">QWidget</a></li> <li><div class="fn"></div>1 static public member inherited from <a href="http://doc.qtsoftware.com/4.5/qpaintdevice.html#static-public-members">QPaintDevice</a></li> <li><div class="fn"></div>4 static public members inherited from <a href="http://doc.qtsoftware.com/4.5/qobject.html#static-public-members">QObject</a></li> <li><div class="fn"></div>1 protected function inherited from <a href="http://doc.qtsoftware.com/4.5/qslider.html#protected-functions">QSlider</a></li> <li><div class="fn"></div>3 protected functions inherited from <a href="http://doc.qtsoftware.com/4.5/qabstractslider.html#protected-functions">QAbstractSlider</a></li> <li><div class="fn"></div>37 protected functions inherited from <a href="http://doc.qtsoftware.com/4.5/qwidget.html#protected-functions">QWidget</a></li> <li><div class="fn"></div>1 protected function inherited from <a href="http://doc.qtsoftware.com/4.5/qpaintdevice.html#protected-functions">QPaintDevice</a></li> <li><div class="fn"></div>7 protected functions inherited from <a href="http://doc.qtsoftware.com/4.5/qobject.html#protected-functions">QObject</a></li> <li><div class="fn"></div>1 protected slot inherited from <a href="http://doc.qtsoftware.com/4.5/qwidget.html#protected-slots">QWidget</a></li> <li><div class="fn"></div>1 protected type inherited from <a href="http://doc.qtsoftware.com/4.5/qpaintdevice.html#protected-variables">QPaintDevice</a></li> <li><div class="fn"></div>2 protected variables inherited from <a href="http://doc.qtsoftware.com/4.5/qobject.html#protected-variables">QObject</a></li> </ul> <a name="details"></a> <hr /> <h2>Detailed Description</h2> <p>The QxtSpanSlider widget is a <a href="http://doc.qtsoftware.com/4.5/qslider.html">QSlider</a> with two handles.</p> <p>QxtSpanSlider is a slider with two handles. QxtSpanSlider is handy for letting user to choose an span between min/max.</p> <p>The span color is calculated based on <a href="http://doc.qtsoftware.com/4.5/qpalette.html#ColorRole-enum">QPalette::Highlight</a>.</p> <p>The keys are bound according to the following table:</p> <p><table align="center" cellpadding="2" cellspacing="1" border="0"> <thead><tr valign="top" class="qt-style"><th>Orientation</th><th>Key</th><th>Handle</th></tr></thead> <tr valign="top" class="odd"><td><a href="http://doc.qtsoftware.com/4.5/qt.html#Orientation-enum">Qt::Horizontal</a></td><td><a href="http://doc.qtsoftware.com/4.5/qt.html#Key-enum">Qt::Key_Left</a></td><td>lower</td></tr> <tr valign="top" class="even"><td><a href="http://doc.qtsoftware.com/4.5/qt.html#Orientation-enum">Qt::Horizontal</a></td><td><a href="http://doc.qtsoftware.com/4.5/qt.html#Key-enum">Qt::Key_Right</a></td><td>lower</td></tr> <tr valign="top" class="odd"><td><a href="http://doc.qtsoftware.com/4.5/qt.html#Orientation-enum">Qt::Horizontal</a></td><td><a href="http://doc.qtsoftware.com/4.5/qt.html#Key-enum">Qt::Key_Up</a></td><td>upper</td></tr> <tr valign="top" class="even"><td><a href="http://doc.qtsoftware.com/4.5/qt.html#Orientation-enum">Qt::Horizontal</a></td><td><a href="http://doc.qtsoftware.com/4.5/qt.html#Key-enum">Qt::Key_Down</a></td><td>upper</td></tr> <tr valign="top" class="odd"><td><a href="http://doc.qtsoftware.com/4.5/qt.html#Orientation-enum">Qt::Vertical</a></td><td><a href="http://doc.qtsoftware.com/4.5/qt.html#Key-enum">Qt::Key_Up</a></td><td>lower</td></tr> <tr valign="top" class="even"><td><a href="http://doc.qtsoftware.com/4.5/qt.html#Orientation-enum">Qt::Vertical</a></td><td><a href="http://doc.qtsoftware.com/4.5/qt.html#Key-enum">Qt::Key_Down</a></td><td>lower</td></tr> <tr valign="top" class="odd"><td><a href="http://doc.qtsoftware.com/4.5/qt.html#Orientation-enum">Qt::Vertical</a></td><td><a href="http://doc.qtsoftware.com/4.5/qt.html#Key-enum">Qt::Key_Left</a></td><td>upper</td></tr> <tr valign="top" class="even"><td><a href="http://doc.qtsoftware.com/4.5/qt.html#Orientation-enum">Qt::Vertical</a></td><td><a href="http://doc.qtsoftware.com/4.5/qt.html#Key-enum">Qt::Key_Right</a></td><td>upper</td></tr> </table></p> <p>Keys are bound by the time the slider is created. A key is bound to same handle for the lifetime of the slider. So even if the handle representation might change from lower to upper, the same key binding remains.</p> <p align="center"><img src="images/qxtspanslider.png" alt=""QxtSpanSlider in Plastique style."" /></p><p><b>Note:</b> QxtSpanSlider inherits <a href="http://doc.qtsoftware.com/4.5/qslider.html">QSlider</a> for implementation specific reasons. Adjusting any single handle specific properties like</p> <ul> <li><a href="http://doc.qtsoftware.com/4.5/qabstractslider.html#sliderPosition-prop">QAbstractSlider::sliderPosition</a></li> <li><a href="http://doc.qtsoftware.com/4.5/qabstractslider.html#value-prop">QAbstractSlider::value</a></li> </ul> <p>has no effect. However, all slider specific properties like</p> <ul> <li><a href="http://doc.qtsoftware.com/4.5/qabstractslider.html#invertedAppearance-prop">QAbstractSlider::invertedAppearance</a></li> <li><a href="http://doc.qtsoftware.com/4.5/qabstractslider.html#invertedControls-prop">QAbstractSlider::invertedControls</a></li> <li><a href="http://doc.qtsoftware.com/4.5/qabstractslider.html#minimum-prop">QAbstractSlider::minimum</a></li> <li><a href="http://doc.qtsoftware.com/4.5/qabstractslider.html#maximum-prop">QAbstractSlider::maximum</a></li> <li><a href="http://doc.qtsoftware.com/4.5/qabstractslider.html#orientation-prop">QAbstractSlider::orientation</a></li> <li><a href="http://doc.qtsoftware.com/4.5/qabstractslider.html#pageStep-prop">QAbstractSlider::pageStep</a></li> <li><a href="http://doc.qtsoftware.com/4.5/qabstractslider.html#singleStep-prop">QAbstractSlider::singleStep</a></li> <li><a href="http://doc.qtsoftware.com/4.5/qslider.html#tickInterval-prop">QSlider::tickInterval</a></li> <li><a href="http://doc.qtsoftware.com/4.5/qslider.html#tickPosition-prop">QSlider::tickPosition</a></li> </ul> <p>are taken into consideration.</p> <hr /> <h2>Member Type Documentation</h2> <h3 class="fn"><a name="HandleMovementMode-enum"></a>enum QxtSpanSlider::HandleMovementMode</h3> <p>This enum describes the available handle movement modes.</p> <p><table border="1" cellpadding="2" cellspacing="1" width="100%"> <tr><th width="25%">Constant</th><th width="15%">Value</th><th width="60%">Description</th></tr> <tr><td valign="top"><tt>QxtSpanSlider::FreeMovement</tt></td><td align="center" valign="top"><tt>0</tt></td><td valign="top">The handles can be moved freely.</td></tr> <tr><td valign="top"><tt>QxtSpanSlider::NoCrossing</tt></td><td align="center" valign="top"><tt>1</tt></td><td valign="top">The handles cannot cross, but they can still overlap each other. The lower and upper values can be the same.</td></tr> <tr><td valign="top"><tt>QxtSpanSlider::NoOverlapping</tt></td><td align="center" valign="top"><tt>2</tt></td><td valign="top">The handles cannot overlap each other. The lower and upper values cannot be the same.</td></tr> </table></p> <hr /> <h2>Member Function Documentation</h2> <h3 class="fn"><a name="QxtSpanSlider"></a>QxtSpanSlider::QxtSpanSlider ( <a href="http://doc.qtsoftware.com/4.5/qwidget.html">QWidget</a> * <i>parent</i> = 0 )</h3> <p>Constructs a new <a href="qxtspanslider.html">QxtSpanSlider</a> with <i>parent</i>.</p> <h3 class="fn"><a name="QxtSpanSlider-2"></a>QxtSpanSlider::QxtSpanSlider ( <a href="http://doc.qtsoftware.com/4.5/qt.html#Orientation-enum">Qt::Orientation</a> <i>orientation</i>, <a href="http://doc.qtsoftware.com/4.5/qwidget.html">QWidget</a> * <i>parent</i> = 0 )</h3> <p>Constructs a new <a href="qxtspanslider.html">QxtSpanSlider</a> with <i>orientation</i> and <i>parent</i>.</p> <h3 class="fn"><a name="dtor.QxtSpanSlider"></a>QxtSpanSlider::~QxtSpanSlider () <tt> [virtual]</tt></h3> <p>Destructs the span slider.</p> <h3 class="fn"><a name="handleMovementMode"></a><a href="qxtspanslider.html#HandleMovementMode-enum">HandleMovementMode</a> QxtSpanSlider::handleMovementMode () const</h3> <p>See also <a href="qxtspanslider.html#setHandleMovementMode">setHandleMovementMode</a>().</p> <h3 class="fn"><a name="lowerPosition"></a>int QxtSpanSlider::lowerPosition () const</h3> <p>See also <a href="qxtspanslider.html#setLowerPosition">setLowerPosition</a>().</p> <h3 class="fn"><a name="lowerPositionChanged"></a>void QxtSpanSlider::lowerPositionChanged ( int <i>lower</i> ) <tt> [signal]</tt></h3> <p>This signal is emitted whenever the <i>lower</i> position has changed.</p> <h3 class="fn"><a name="lowerValue"></a>int QxtSpanSlider::lowerValue () const</h3> <p>See also <a href="qxtspanslider.html#setLowerValue">setLowerValue</a>().</p> <h3 class="fn"><a name="lowerValueChanged"></a>void QxtSpanSlider::lowerValueChanged ( int <i>lower</i> ) <tt> [signal]</tt></h3> <p>This signal is emitted whenever the <i>lower</i> value has changed.</p> <h3 class="fn"><a name="setHandleMovementMode"></a>void QxtSpanSlider::setHandleMovementMode ( <a href="qxtspanslider.html#HandleMovementMode-enum">HandleMovementMode</a> <i>mode</i> )</h3> <p>See also <a href="qxtspanslider.html#handleMovementMode">handleMovementMode</a>().</p> <h3 class="fn"><a name="setLowerPosition"></a>void QxtSpanSlider::setLowerPosition ( int <i>lower</i> ) <tt> [slot]</tt></h3> <p>See also <a href="qxtspanslider.html#lowerPosition">lowerPosition</a>().</p> <h3 class="fn"><a name="setLowerValue"></a>void QxtSpanSlider::setLowerValue ( int <i>lower</i> ) <tt> [slot]</tt></h3> <p>See also <a href="qxtspanslider.html#lowerValue">lowerValue</a>().</p> <h3 class="fn"><a name="setSpan"></a>void QxtSpanSlider::setSpan ( int <i>lower</i>, int <i>upper</i> ) <tt> [slot]</tt></h3> <p>Sets the span from <i>lower</i> to <i>upper</i>.</p> <h3 class="fn"><a name="setUpperPosition"></a>void QxtSpanSlider::setUpperPosition ( int <i>upper</i> ) <tt> [slot]</tt></h3> <p>See also <a href="qxtspanslider.html#upperPosition">upperPosition</a>().</p> <h3 class="fn"><a name="setUpperValue"></a>void QxtSpanSlider::setUpperValue ( int <i>upper</i> ) <tt> [slot]</tt></h3> <p>See also <a href="qxtspanslider.html#upperValue">upperValue</a>().</p> <h3 class="fn"><a name="spanChanged"></a>void QxtSpanSlider::spanChanged ( int <i>lower</i>, int <i>upper</i> ) <tt> [signal]</tt></h3> <p>This signal is emitted whenever both the <i>lower</i> and the <i>upper</i> values have changed ie. the span has changed.</p> <h3 class="fn"><a name="upperPosition"></a>int QxtSpanSlider::upperPosition () const</h3> <p>See also <a href="qxtspanslider.html#setUpperPosition">setUpperPosition</a>().</p> <h3 class="fn"><a name="upperPositionChanged"></a>void QxtSpanSlider::upperPositionChanged ( int <i>upper</i> ) <tt> [signal]</tt></h3> <p>This signal is emitted whenever the <i>upper</i> position has changed.</p> <h3 class="fn"><a name="upperValue"></a>int QxtSpanSlider::upperValue () const</h3> <p>See also <a href="qxtspanslider.html#setUpperValue">setUpperValue</a>().</p> <h3 class="fn"><a name="upperValueChanged"></a>void QxtSpanSlider::upperValueChanged ( int <i>upper</i> ) <tt> [signal]</tt></h3> <p>This signal is emitted whenever the <i>upper</i> value has changed.</p> <p /><address><hr /><div align="center"> <table width="100%" cellspacing="0" border="0"><tr class="address"> <td align="left">Copyright © 2007-2011 <a href="mailto:foundation@libqxt.org">Qxt Foundation</a></td> <td align="right"><div align="right"> <a href="http://libqxt.org">Qxt</a> 0.6.2</div></td> </tr></table></div></address></body> </html>