![]() |
Home · All Classes · Main Classes · Annotated · Grouped Classes · Functions | ![]() |
The QRubberBand class provides a rectangle or line that can indicate a selection or a boundary. More...
#include <QRubberBand>
Part of the QtGui module.
Inherits QWidget.
The QRubberBand class provides a rectangle or line that can indicate a selection or a boundary.
A rubber band is often used to show a new bounding area (as in a QSplitter or a QDockWidget that is undocking). Historically this has been implemented using a QPainter and XOR, but this approach doesn't always work properly since rendering can happen in the window below the rubber band, but before the rubber band has been "erased".
You can create a QRubberBand whenever you need to render a rubber band around a given area (or to represent a single line), then call setGeometry(), move() or resize() to position and size it; hiding (or destroying) the widget will make the rubber band disappear. The rubber band can be a Rectangle or a Line, depending on the shape() it was given when constructed.
Constant | Value |
---|---|
QRubberBand::Line | 0 |
QRubberBand::Rectangle | 1 |
Constructs a rubber band of shape s, with parent p.
By default a rectangular QRubberBand (s is Rectangle) will be set to auto mask, so that the boundary of the rectangle is all that is visible. Some styles (for example native Mac OS X) will change this and call QWidget::setWindowOpacity() to make the window only partially opaque.
Destructor.
Moves the rubberband to point (x, y).
See also resize().
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
Moves the rubberband to point p.
See also resize().
Resizes the rubberband so that its width is width, and its height is height.
See also move().
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
Resizes the rubberband so that its new size is size.
See also move().
Changes the rubberband's geometry to the geometry of the rectangle rect.
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
Changes the rubberband's geometry to have a top-left corner of (x, y), a width of w, and a height of h.
Returns the shape of this rubber band. The shape can only be set upon construction.
Copyright © 2005 Trolltech | Trademarks | Qt 4.0.0 |