44 #include "../qmlinspectorconstants.h" 46 #include <QtGui/QPixmap> 47 #include <QtGui/QPainter> 48 #include <QtGui/QMenu> 49 #include <QtGui/QAction> 50 #include <QtGui/QContextMenuEvent> 51 #include <QtGui/QClipboard> 52 #include <QtGui/QApplication> 53 #include <QtGui/QColorDialog> 54 #include <QtGui/QDrag> 56 #include <QtCore/QMimeData> 57 #include <QtCore/QDebug> 65 tr(
"Copy Color"),
this);
116 p.
fillRect(0, 0, size, size, borderColor1);
117 p.
drawRect(1,1, size - 3, size - 3);
The QPainter class performs low-level painting on widgets and other paint devices.
The QColor class provides colors based on RGB, HSV or CMYK values.
static QWaylandClipboard * clipboard
bool event(QEvent *e)
em>Reimplemented Function
void setPixmap(const QPixmap &)
Sets pixmap as the pixmap used to represent the data in a drag and drop operation.
The QDrag class provides support for MIME-based drag and drop data transfer.
void setMimeData(QMimeData *data)
Sets the data to be sent to the given MIME data.
static QString tr(const char *sourceText, const char *comment=0, int n=-1)
QLatin1String(DBUS_INTERFACE_DBUS))) Q_GLOBAL_STATIC_WITH_ARGS(QString
Qt::DropAction exec(Qt::DropActions supportedActions=Qt::MoveAction)
Starts the drag and drop operation and returns a value indicating the requested drop action when it i...
void setText(const QString &, Mode mode=Clipboard)
Copies text into the clipboard as plain text.
The QPen class defines how a QPainter should draw lines and outlines of shapes.
const QPoint & pos() const
Returns the position of the mouse cursor, relative to the widget that received the event...
void setPixmap(const QPixmap &)
static const int DragStartDistance
static QClipboard * clipboard()
Returns a pointer to the application global clipboard.
static bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
Creates a connection of the given type from the signal in the sender object to the method in the rece...
void setScaledContents(bool)
The QClipboard class provides access to the window system clipboard.
The QMimeData class provides a container for data that records information about its MIME type...
The QMouseEvent class contains parameters that describe a mouse event.
The QBrush class defines the fill pattern of shapes drawn by QPainter.
Qt::MouseButtons buttons() const
Returns the button state when the event was generated.
The QPoint class defines a point in the plane using integer precision.
void setBrush(const QBrush &brush)
Sets the painter's brush to the given brush.
void setPen(const QColor &color)
Sets the painter's pen to have style Qt::SolidLine, width 0 and the specified color.
The QLabel widget provides a text or image display.
void drawRect(const QRectF &rect)
Draws the current rectangle with the current pen and brush.
The QPixmap class is an off-screen image representation that can be used as a paint device...
void setText(const QString &text)
Sets text as the plain text (MIME type text/plain) used to represent the data.
QString name() const
Returns the name of the color in the format "#RRGGBB"; i.e.
The QAction class provides an abstract user interface action that can be inserted into widgets...
void fillRect(const QRectF &, const QBrush &)
Fills the given rectangle with the brush specified.
The QIcon class provides scalable icons in different modes and states.