conflicting packages
QwtCounter(3) | Qwt User's Guide | QwtCounter(3) |
NAME¶
QwtCounter - The Counter Widget.SYNOPSIS¶
#include <qwt_counter.h> Inherits QwtDoubleRange.Public Types¶
enum Button { Button1, Button2, Button3, ButtonCnt }
Signals¶
void buttonReleased (double value)
Public Member Functions¶
bool editable () const
Protected Member Functions¶
virtual bool event (QEvent *)
Detailed Description¶
The Counter Widget.#include '../include/qwt_counter.h> QwtCounter *cnt; cnt = new QwtCounter(parent, name); cnt->setRange(0.0, 100.0, 1.0); // From 0.0 to 100, step 1.0 cnt->setNumButtons(2); // Two buttons each side cnt->setIncSteps(QwtCounter::Button1, 1); // Button 1 increments 1 step cnt->setIncSteps(QwtCounter::Button2, 20); // Button 2 increments 20 steps connect(cnt, SIGNAL(valueChanged(double)), my_class, SLOT(newValue(double)));
Member Enumeration Documentation¶
enum QwtCounter::Button Button index¶
Constructor & Destructor Documentation¶
QwtCounter::QwtCounter (QWidget *parent = NULL) [explicit] The default number of buttons is set to 2. The default increments are:¶
- •
- Button 1: 1 step
- •
- Button 2: 10 steps
- •
- Button 3: 100 steps
parent
QwtCounter::~QwtCounter () [virtual]¶
Destructor.Member Function Documentation¶
void QwtCounter::buttonReleased (doublevalue) [signal] This signal is emitted when a button has been released¶
Parameters:value The new value
bool QwtCounter::editable () const¶
returns whether the line edit is edatble. (default is yes)bool QwtCounter::event (QEvent *e) [protected, virtual] Handle PolishRequest events¶
double QwtDoubleRange::exactPrevValue () const [protected, inherited]¶
Returns the exact previous value.double QwtDoubleRange::exactValue () const [protected, inherited]¶
Returns the exact value. The exact value is the value which QwtDoubleRange::value would return if the value were not adjusted to the step raster. It differs from the current value only if QwtDoubleRange::fitValue or QwtDoubleRange::incValue have been used before. This function is intended for internal use in derived classes.void QwtDoubleRange::fitValue (doublex) [virtual, inherited]¶
Adjust the value to the closest point in the step raster. Parameters:x value
Warning:
The value is clipped when it lies outside the
range. When the range is QwtDoubleRange::periodic, it will be mapped to
a point in the interval such that
with an integer number n.
new value := x + n * (max. value - min. value)
with an integer number n.
void QwtDoubleRange::incPages (intnPages) [virtual, inherited]¶
Increment the value by a specified number of pages. Parameters:nPages Number of pages to increment. A
negative number decrements the value.
Warning:
The Page size is specified in the
constructor.
int QwtCounter::incSteps (QwtCounter::Buttonbtn) const Returns:¶
the number of steps by which a specified
button increments the value or 0 if the button is invalid.
Parameters:
btn One of QwtCounter::Button1,
QwtCounter::Button2, QwtCounter::Button3
void QwtDoubleRange::incValue (intnSteps) [virtual, inherited]¶
Increment the value by a specified number of steps. Parameters:nSteps Number of steps to
increment
Warning:
As a result of this operation, the new value
will always be adjusted to the step raster.
bool QwtDoubleRange::isValid () const [inherited]¶
Indicates if the value is valid. Reimplemented in QwtAbstractSlider.void QwtCounter::keyPressEvent (QKeyEvent *e) [protected, virtual] Handle key events¶
- •
- Ctrl + Qt::Key_Home Step to minValue()
- •
- Ctrl + Qt::Key_End Step to maxValue()
- •
- Qt::Key_Up Increment by incSteps(QwtCounter::Button1)
- •
- Qt::Key_Down Decrement by incSteps(QwtCounter::Button1)
- •
- Qt::Key_PageUp Increment by incSteps(QwtCounter::Button2)
- •
- Qt::Key_PageDown Decrement by incSteps(QwtCounter::Button2)
- •
- Shift + Qt::Key_PageUp Increment by incSteps(QwtCounter::Button3)
- •
- Shift + Qt::Key_PageDown Decrement by incSteps(QwtCounter::Button3)
double QwtCounter::maxVal () const¶
returns the maximum value of the rangedouble QwtDoubleRange::maxValue () const [inherited]¶
Returns the value of the second border of the range. maxValue returns the value which has been specified as the second parameter in QwtDoubleRange::setRange. See also:setRange()
double QwtCounter::minVal () const¶
returns the minimum value of the rangedouble QwtDoubleRange::minValue () const [inherited]¶
Returns the value at the first border of the range. minValue returns the value which has been specified as the first parameter in setRange(). See also:setRange()
int QwtCounter::numButtons () const Returns:¶
The number of buttons on each side of the
widget.
int QwtDoubleRange::pageSize () const [inherited]¶
Returns the page size in steps.bool QwtDoubleRange::periodic () const [inherited]¶
Returns true if the range is periodic. See also:setPeriodic()
void QwtCounter::polish () [virtual] Sets the minimum width for the buttons¶
double QwtDoubleRange::prevValue () const [protected, inherited]¶
Returns the previous value.void QwtCounter::rangeChange () [protected, virtual]¶
Notify change of range. This function updates the enabled property of all buttons contained in QwtCounter. Reimplemented from QwtDoubleRange.void QwtCounter::setEditable (booleditable)¶
Allow/disallow the user to manually edit the value. Parameters:editable true enables editing
See also:
editable()
void QwtCounter::setIncSteps (QwtCounter::Buttonbtn, intnSteps) Specify the number of steps by which the value is incremented or decremented when a specified button is pushed.¶
Parameters:btn One of QwtCounter::Button1,
QwtCounter::Button2, QwtCounter::Button3
nSteps Number of steps
void QwtCounter::setMaxValue (doublevalue) Set the maximum value of the range¶
Parameters:value Maximum value
See also:
setMinValue(), maxVal()
void QwtCounter::setMinValue (doublevalue) Set the minimum value of the range¶
Parameters:value Minimum value
See also:
setMaxValue(), minVal()
void QwtCounter::setNumButtons (intn)¶
Specify the number of buttons on each side of the label. Parameters:n Number of buttons
void QwtDoubleRange::setPeriodic (booltf) [inherited]¶
Make the range periodic. When the range is periodic, the value will be set to a point inside the interval such thatpoint = value + n * width .fi
if the user tries to set a new value which is outside the range. If the range is nonperiodic (the default), values outside the range will be clipped.
Parameters:
tf true for a periodic range
void QwtDoubleRange::setRange (doublevmin, doublevmax, doublevstep = 0.0, intpageSize = 1) [inherited]¶
Specify range and step size. Parameters:vmin lower boundary of the interval
vmax higher boundary of the interval
vstep step width
pageSize page size in steps
Warning:
- •
- A change of the range changes the value if it lies outside the new range. The current value will *not* be adjusted to the new step raster.
- •
- vmax < vmin is allowed.
- •
- If the step size is left out or set to zero, it will be set to 1/100 of the interval length.
- •
- If the step size has an absurd value, it will be corrected to a better one.
void QwtCounter::setStep (doublestepSize) Set the step size¶
Parameters:stepSize Step size
See also:
QwtDoubleRange::setStep()
void QwtCounter::setStepButton1 (intnSteps) Set the number of increment steps for button 1¶
Parameters:nSteps Number of steps
void QwtCounter::setStepButton2 (intnSteps) Set the number of increment steps for button 2¶
Parameters:nSteps Number of steps
void QwtCounter::setStepButton3 (intnSteps) Set the number of increment steps for button 3¶
Parameters:nSteps Number of steps
void QwtDoubleRange::setValid (boolisValid) [inherited]¶
Set the value to be valid/invalid. Reimplemented in QwtAbstractSlider.void QwtCounter::setValue (doublev) [virtual]¶
Set a new value. Parameters:v new value Calls
QwtDoubleRange::setValue and does all visual updates.
See also:
QwtDoubleRange::setValue()
QSize QwtCounter::sizeHint () const [virtual]¶
A size hint.double QwtCounter::step () const¶
returns the step size Reimplemented from QwtDoubleRange.int QwtCounter::stepButton1 () const¶
returns the number of increment steps for button 1int QwtCounter::stepButton2 () const¶
returns the number of increment steps for button 2int QwtCounter::stepButton3 () const¶
returns the number of increment steps for button 3void QwtDoubleRange::stepChange () [protected, virtual, inherited]¶
Notify a change of the step size. This virtual function is called whenever the step size changes. The default implementation does nothing.double QwtCounter::value () const [virtual] Returns:¶
Current value
void QwtCounter::valueChanged (doublevalue) [signal] This signal is emitted when the counter's value has changed¶
Parameters:value The new value
void QwtCounter::wheelEvent (QWheelEvent *e) [protected, virtual] Handle wheel events¶
Parameters:e Wheel event
Author¶
Generated automatically by Doxygen for Qwt User's Guide from the source code.Mon Aug 1 2011 | Version 5.2.2 |