Qt:Документация 4.3.2/q3textdrag
Материал из Wiki.crossplatform.ru
Внимание: Актуальная версия перевода документации находится здесь |
__NOTOC__
Главная · Все классы · Основные классы · Классы по группам · Модули · Функции |
[править] Q3TextDrag Class Reference
[ Qt3Support module]
The Q3TextDrag class is a drag and drop object for transferring plain and Unicode text. Далее...
#include <Q3TextDrag>
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 Q3DragObject.
[править] Открытые функции
- Q3TextDrag ( const QString & text, QWidget * dragSource = 0, const char * name = 0 )
- Q3TextDrag ( QWidget * dragSource = 0, const char * name = 0 )
- ~Q3TextDrag ()
- virtual void setSubtype ( const QString & subtype )
- virtual void setText ( const QString & text )
- 9 public functions inherited from Q3DragObject
- 29 открытых функций, унаследованных от QObject
- 3 public functions inherited from QMimeSource
[править] Статические открытые члены
- bool canDecode ( const QMimeSource * source )
- bool decode ( const QMimeSource * source, QString & string )
- bool decode ( const QMimeSource * source, QString & string, QString & subtype )
- 1 static public member inherited from Q3DragObject
- 5 статических открытых членов, унаследованных от QObject
[править] Дополнительные унаследованные члены
- 1 свойство, унаследованное от QObject
- 1 открытый слот, унаследованный от QObject
- 1 сигнал, унаследованный от QObject
- 1 protected function inherited from Q3DragObject
- 7 защищенных функций, унаследованных от QObject
[править] Подробное описание
The Q3TextDrag class is a drag and drop object for transferring plain and Unicode text.
Plain text is passed in a QString which may contain multiple lines (i.e. may contain newline characters). The drag target will receive the newlines according to the runtime environment, e.g. LF on Unix, and CRLF on Windows.
Qt provides no built-in mechanism for delivering only a single-line.
For more information about drag and drop, see the Q3DragObject class and the drag and drop documentation.
[править] Описание функций-членов
[править] Q3TextDrag::Q3TextDrag ( const QString & text, QWidget * dragSource = 0, const char * name = 0 )
Constructs a text drag object with the given name, and sets its data to text. The dragSource is the widget that the drag operation started from.
[править] Q3TextDrag::Q3TextDrag ( QWidget * dragSource = 0, const char * name = 0 )
Constructs a default text drag object with the given name. The dragSource is the widget that the drag operation started from.
[править] Q3TextDrag::~Q3TextDrag ()
Destroys the text drag object.
[править] bool Q3TextDrag::canDecode ( const QMimeSource * source ) [static]
Returns true if the information in the MIME source can be decoded into a QString; otherwise returns false.
See also decode().
[править] bool Q3TextDrag::decode ( const QMimeSource * source, QString & string ) [static]
Attempts to decode the dropped information in the MIME source into the string given. Возвращает true в случае успеха; при неудаче возвращается false.
See also canDecode().
[править] bool Q3TextDrag::decode ( const QMimeSource * source, QString & string, QString & subtype ) [static]
Эта перегруженная функция предоставлена для удобства.
Attempts to decode the dropped information in the MIME source into the string given. Возвращает true в случае успеха; при неудаче возвращается false. If subtype is null, any text subtype is accepted; otherwise only the specified subtype is accepted.
See also canDecode().
[править] void Q3TextDrag::setSubtype ( const QString & subtype ) [virtual]
Sets the MIME subtype of the text being dragged. The default subtype is "plain", so the default MIME type of the text is "text/plain". You might use this to declare that the text is "text/html" by calling setSubtype("html").
[править] void Q3TextDrag::setText ( const QString & text ) [virtual]
Sets the text to be dragged. You will need to call this if you did not pass the text during construction.
Copyright © 2007 Trolltech | Trademarks | Qt 4.3.2
|