Viadeo Twitter Google Bookmarks ! Facebook Digg del.icio.us MySpace Yahoo MyWeb Blinklist Netvouz Reddit Simpy StumbleUpon Bookmarks Windows Live Favorites 
Logo Documentation Qt ·  Page d'accueil  ·  Toutes les classes  ·  Toutes les fonctions  ·  Vues d'ensemble  · 

Q3ImageDrag Class Reference

The Q3ImageDrag class provides a drag and drop object for transferring images. More...

 #include <Q3ImageDrag>

This class is part of the Qt 3 support library. It is provided to keep old source code working. We strongly advise against using it in new code. See Porting to Qt 4 for more information.

Inherits: Q3DragObject.

Public Functions

Q3ImageDrag ( QImage image, QWidget * dragSource = 0, const char * name = 0 )
Q3ImageDrag ( QWidget * dragSource = 0, const char * name = 0 )
~Q3ImageDrag ()
virtual void setImage ( QImage image )

Reimplemented Public Functions

virtual QByteArray encodedData ( const char * fmt ) const
virtual const char * format ( int i ) const

Static Public Members

bool canDecode ( const QMimeSource * source )
bool decode ( const QMimeSource * source, QImage & image )
bool decode ( const QMimeSource * source, QPixmap & pixmap )
  • 1 static public member inherited from Q3DragObject
  • 7 static public members inherited from QObject

Additional Inherited Members

Detailed Description

The Q3ImageDrag class provides a drag and drop object for transferring images.

Images are offered to the receiving application in multiple formats, determined by Qt's output formats.

Member Function Documentation

Q3ImageDrag::Q3ImageDrag ( QImage image, QWidget * dragSource = 0, const char * name = 0 )

Constructs an image drag object with the given name, and sets its data to image. The dragSource is the widget that the drag operation started from.

Q3ImageDrag::Q3ImageDrag ( QWidget * dragSource = 0, const char * name = 0 )

Constructs a default image drag object with the given name. The dragSource is the widget that the drag operation started from.

Q3ImageDrag::~Q3ImageDrag ()

Destroys the image drag object.

bool Q3ImageDrag::canDecode ( const QMimeSource * source ) [static]

Returns true if the information in the MIME source can be decoded into an image; otherwise returns false.

See also decode().

bool Q3ImageDrag::decode ( const QMimeSource * source, QImage & image ) [static]

Decode the dropped information in the MIME source into the image. Returns true if successful; otherwise returns false.

See also canDecode().

bool Q3ImageDrag::decode ( const QMimeSource * source, QPixmap & pixmap ) [static]

This is an overloaded function.

Decodes the dropped information in the MIME source into the pixmap. Returns true if successful; otherwise returns false.

This is a convenience function that converts the information to a QPixmap via a QImage.

See also canDecode().

QByteArray Q3ImageDrag::encodedData ( const char * fmt ) const [virtual]

Reimplemented from QMimeSource::encodedData().

const char * Q3ImageDrag::format ( int i ) const [virtual]

Reimplemented from QMimeSource::format().

void Q3ImageDrag::setImage ( QImage image ) [virtual]

Sets the image to be dragged. You will need to call this if you did not pass the image during construction.

Cette page est une traduction d'une page de la documentation de Qt, écrite par Nokia Corporation and/or its subsidiary(-ies). Les éventuels problèmes résultant d'une mauvaise traduction ne sont pas imputables à Nokia. Qt 4.8
Copyright © 2012 Developpez LLC. Tous droits réservés Developpez LLC. Aucune reproduction, même partielle, ne peut être faite de ce site et de l'ensemble de son contenu : textes, documents et images sans l'autorisation expresse de Developpez LLC. Sinon, vous encourez selon la loi jusqu'à 3 ans de prison et jusqu'à 300 000 E de dommages et intérêts. Cette page est déposée à la SACD.
Vous avez déniché une erreur ? Un bug ? Une redirection cassée ? Ou tout autre problème, quel qu'il soit ? Ou bien vous désirez participer à ce projet de traduction ? N'hésitez pas à nous contacter ou par MP !
 
 
 
 
Partenaires

Hébergement Web