44 #include "../qdeclarativeviewinspector.h" 46 #include <QtGui/QMouseEvent> 47 #include <QtGui/QKeyEvent> 48 #include <QtCore/QRectF> 50 #include <QtGui/QImage> 51 #include <QtGui/QApplication> 52 #include <QtGui/QPalette> 90 QRect source(pos.
x(), pos.
y(), 1, 1);
The QPainter class performs low-level painting on widgets and other paint devices.
void setRgb(int r, int g, int b, int a=255)
Sets the RGB value to r, g, b and the alpha value to a.
const QColor & color() const
Returns the brush color.
void render(QPainter *painter, const QRectF &target=QRectF(), const QRect &source=QRect(), Qt::AspectRatioMode aspectRatioMode=Qt::KeepAspectRatio)
Renders the source rect, which is in view coordinates, from the scene into target, which is in paint device coordinates, using painter.
QBrush backgroundBrush() const
virtual bool event(QEvent *)
This virtual function receives events to an object and should return true if the event e was recogniz...
const QColor & color(ColorGroup cg, ColorRole cr) const
Returns the color in the specified color group, used for the given color role.
const QPoint & pos() const
Returns the position of the mouse cursor, relative to the widget that received the event...
The QRectF class defines a rectangle in the plane using floating point precision. ...
The QImage class provides a hardware-independent image representation that allows direct access to th...
The QMouseEvent class contains parameters that describe a mouse event.
The QPoint class defines a point in the plane using integer precision.
The QRect class defines a rectangle in the plane using integer precision.
int y() const
Returns the y coordinate of this point.
static QColor fromRgb(QRgb rgb)
Static convenience function that returns a QColor constructed from the given QRgb value rgb...
int x() const
Returns the x coordinate of this point.
QRgb rgb() const
Returns the RGB value of the color.