Qt:Документация 4.3.2/q3colordrag

Материал из Wiki.crossplatform.ru

Перейти к: навигация, поиск
40px Внимание: Актуальная версия перевода документации находится здесь

__NOTOC__

Image:qt-logo.png

Главная · Все классы · Основные классы · Классы по группам · Модули · Функции

Image:trolltech-logo.png

Содержание

Q3ColorDrag Class Reference
[ Qt3Support module]

The Q3ColorDrag class provides a drag and drop object for transferring colors between widgets. Далее...

 #include <Q3ColorDrag>

This class is part of the Qt 3 support library. It is provided to keep old source code working. Мы настоятельно не рекомендуем использовать этот класс в новом коде. See Porting to Qt 4 for more information.

Inherits Q3StoredDrag.

Открытые функции

  • Q3ColorDrag ( const QColor & col, QWidget * dragsource = 0, const char * name = 0 )
  • Q3ColorDrag ( QWidget * dragsource = 0, const char * name = 0 )
  • void setColor ( const QColor & color )

Статические открытые члены

  • bool canDecode ( QMimeSource * source )
  • bool decode ( QMimeSource * source, QColor & color )
  • 1 static public member inherited from Q3DragObject
  • 5 статических открытых членов, унаследованных от QObject

Дополнительные унаследованные члены

  • 1 свойство, унаследованное от QObject
  • 1 открытый слот, унаследованный от QObject
  • 1 сигнал, унаследованный от QObject
  • 1 protected function inherited from Q3DragObject
  • 7 защищенных функций, унаследованных от QObject

Подробное описание

The Q3ColorDrag class provides a drag and drop object for transferring colors between widgets.

This class provides a drag object which can be used to transfer data about colors for drag and drop and in the clipboard. For example, it is used in QColorDialog.

The color is set in the constructor but can be changed with setColor().

For more information about drag and drop, see the Q3DragObject class and the drag and drop documentation.


Описание функций-членов

Q3ColorDrag::Q3ColorDrag ( const QColor & col, QWidget * dragsource = 0, const char * name = 0 )

Constructs a color drag object with the given col. Passes dragsource and name to the Q3StoredDrag constructor.

Q3ColorDrag::Q3ColorDrag ( QWidget * dragsource = 0, const char * name = 0 )

Constructs a color drag object with a white color. Passes dragsource and name to the Q3StoredDrag constructor.

bool Q3ColorDrag::canDecode ( QMimeSource * source ) [static]

Returns true if the color drag object can decode the MIME source; otherwise returns false.

bool Q3ColorDrag::decode ( QMimeSource * source, QColor & color ) [static]

Decodes the MIME source, and sets the decoded values to the given color. Returns true if the decoding is successful. Returns false if the size of the encoded data is not the expected size.

void Q3ColorDrag::setColor ( const QColor & color )

Sets the color of the color drag.



Copyright © 2007 Trolltech Trademarks
Qt 4.3.2