KDEUI
kcolorbutton.cpp
Go to the documentation of this file.
225 QColor color=KColorMimeData::fromMimeData( QApplication::clipboard()->mimeData( QClipboard::Clipboard ));
bool isDown() const
void changed(const QColor &newColor)
Emitted when the color of the widget is changed, either with setColor() or via user selection...
Qt::KeyboardModifiers modifiers() const
const QPalette & palette() const
const QMimeData * mimeData() const
void setAlphaChannelEnabled(bool alpha)
When set to true, allow the user to change the alpha component of the color.
Definition: kcolorbutton.cpp:114
Qt::DropAction start(QFlags< Qt::DropAction > request)
void setAlphaChannelEnabled(bool alpha)
When set to true, the user is allowed to change the alpha component of the color. ...
Definition: kcolordialog.cpp:1376
void setDefaultColor(const QColor &defaultCol)
Call this to make the dialog show a "Default Color" checkbox.
Definition: kcolordialog.cpp:1343
bool canDecode(const QMimeData *mimeData)
Returns true if the MIME data mimeData contains a color object.
Definition: kcolormimedata.cpp:36
QStyle * style() const
Show Cancel-button. (this button reject()s the dialog; result set to QDialog::Rejected) ...
Definition: kdialog.h:144
virtual int pixelMetric(PixelMetric metric, const QStyleOption *option, const QWidget *widget) const =0
const QColor & color(ColorGroup group, ColorRole role) const
int y() const
void setAttribute(Qt::WidgetAttribute attribute, bool on)
bool hasFocus() const
Qt::MouseButtons buttons() const
static void forceActiveWindow(WId win, long time=0)
Sets window win to be the active window.
Definition: kwindowsystem_mac.cpp:366
void update()
QSize globalStrut()
void initStyleOption(QStyleOptionButton *option) const
void initFrom(const QWidget *widget)
const QColor & color() const
bool isEnabled() const
int x() const
QClipboard * clipboard()
QPalette::ColorRole backgroundRole() const
const QBrush & background() const
WId winId() const
virtual void mousePressEvent(QMouseEvent *e)
void setButtons(ButtonCodes buttonMask)
Creates (or recreates) the button box and all the buttons in it.
Definition: kdialog.cpp:206
void setMimeData(QMimeData *src, Mode mode)
const KShortcut & copy()
Copy selected area into the clipboard.
Definition: kstandardshortcut.cpp:335
void setAcceptDrops(bool on)
Show Ok button. (this button accept()s the dialog; result set to QDialog::Accepted) ...
Definition: kdialog.h:141
int key() const
QDrag * createDrag(const QColor &color, QWidget *dragsource)
Creates a color drag object.
Definition: kcolormimedata.cpp:61
bool isChecked() const
QColor fromMimeData(const QMimeData *mimeData)
Decodes the MIME data mimeData and returns the resulting color.
Definition: kcolormimedata.cpp:50
void populateMimeData(QMimeData *mimeData, const QColor &color)
Sets the color and text representation fields for the specified color in the mimedata object: applica...
Definition: kcolormimedata.cpp:29
A pushbutton to display or allow user selection of a color.
Definition: kcolorbutton.h:37
virtual void mouseMoveEvent(QMouseEvent *e)
Definition: kcolorbutton.cpp:238
virtual void drawControl(ControlElement element, const QStyleOption *option, QPainter *painter, const QWidget *widget) const =0
void adjust(int dx1, int dy1, int dx2, int dy2)
void init(const QWidget *widget)
virtual void drawPrimitive(PrimitiveElement element, const QStyleOption *option, QPainter *painter, const QWidget *widget) const =0
bool isAlphaChannelEnabled() const
Returns true if the user is allowed to change the alpha component.
Definition: kcolorbutton.cpp:119
void show()
virtual QRect subElementRect(SubElement element, const QStyleOption *option, const QWidget *widget) const =0
const QPoint & pos() const
virtual void keyPressEvent(QKeyEvent *e)
void fillOpaqueRect(QPainter *painter, const QRect &rect, const QBrush &brush)
Definition: kcolorhelpers.cpp:28
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
static int dndEventDelay()
Returns a threshold in pixels for drag & drop operations.
Definition: kglobalsettings.cpp:227
bool isDefault() const
void getRect(int *x, int *y, int *width, int *height) const
QColor defaultColor() const
Returns the default color or an invalid color if no default color is set.
virtual QSize sizeFromContents(ContentsType type, const QStyleOption *option, const QSize &contentsSize, const QWidget *widget) const =0
virtual void dragEnterEvent(QDragEnterEvent *)
Definition: kcolorbutton.cpp:202
virtual void mousePressEvent(QMouseEvent *e)
Definition: kcolorbutton.cpp:232
bool isValid() const
const KShortcut & paste()
Paste contents of clipboard at mouse/cursor position.
Definition: kstandardshortcut.cpp:336
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:23:59 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:23:59 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.