• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdelibs API Reference
  • KDE Home
  • Contact Us
 

KDEUI

Functions
KColorMimeData Namespace Reference

Functions

bool canDecode (const QMimeData *mimeData)
 
QDrag * createDrag (const QColor &color, QWidget *dragsource)
 
QColor fromMimeData (const QMimeData *mimeData)
 
void populateMimeData (QMimeData *mimeData, const QColor &color)
 

Detailed Description

Drag-and-drop and clipboard mimedata manipulation for QColor objects.

The according MIME type is set to application/x-color.

See the Qt drag'n'drop documentation.

Function Documentation

bool KColorMimeData::canDecode ( const QMimeData *  mimeData)

Returns true if the MIME data mimeData contains a color object.

First checks for application/x-color and if that fails, for a text/plain entry, which represents a color in the format #hexnumbers

Definition at line 36 of file kcolormimedata.cpp.

QDrag * KColorMimeData::createDrag ( const QColor &  color,
QWidget *  dragsource 
)

Creates a color drag object.

Either you have to start this drag or delete it The drag object's mime data has the application/x-color and text/plain type set and a pixmap filled with the specified color, which is going to be displayed next to the mouse cursor

Definition at line 61 of file kcolormimedata.cpp.

QColor KColorMimeData::fromMimeData ( const QMimeData *  mimeData)

Decodes the MIME data mimeData and returns the resulting color.

First tries application/x-color and if that fails, a text/plain entry, which represents a color in the format #hexnumbers. If this fails too, an invalid QColor object is returned, use QColor::isValid() to test it.

Definition at line 50 of file kcolormimedata.cpp.

void KColorMimeData::populateMimeData ( QMimeData *  mimeData,
const QColor &  color 
)

Sets the color and text representation fields for the specified color in the mimedata object: application/x-color and text/plain types are set.

Definition at line 29 of file kcolormimedata.cpp.

This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:24:04 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KDEUI

Skip menu "KDEUI"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Modules
  • Related Pages

kdelibs API Reference

Skip menu "kdelibs API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal