|
|
A ruler widget.
The vertical ruler looks similar to this:
meters inches ------ <--- end mark ---> ------ -- - -- <---little mark---> -- -- - -- --- --- <---medium mark - -- -- -- tiny mark----> - -- ---- -- - ---- <-----big mark -- -- - |>-- <--ruler pointer--> |>-- |
There are tiny marks, little marks, medium marks, and big marks along the ruler.
To receive mouse clicks or mouse moves, the class has to be overloaded.
For performance reasons, the public methods don't call QWidget::repaint(). (Slots do, see documentation below.) All the changed settings will be painted once after leaving to the main event loop. For performance painting the slot methods should be used, they do a fast QWidget::repaint() call after changing the values. For setting multiple values like minValue(), maxValue(), offset() etc. using the public methods is recommended so the widget will be painted only once when entering the main event loop.
void slotNewValue (int)
| slotNewValue |
[slot]
Sets the pointer to a new position.
The offset is NOT updated. QWidget::repaint() is called afterwards.
void slotNewOffset (int)
| slotNewOffset |
[slot]
Sets the ruler marks to a new position.
The pointer is NOT updated. QWidget::repaint() is called afterwards.
void slotEndOffset (int)
| slotEndOffset |
[slot]
void drawContents (QPainter *)
| drawContents |
[protected virtual]
Reimplemented from QFrame for internal purposes..