summaryrefslogtreecommitdiffstats
path: root/doc/dnd.doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc/dnd.doc')
-rw-r--r--doc/dnd.doc24
1 files changed, 12 insertions, 12 deletions
diff --git a/doc/dnd.doc b/doc/dnd.doc
index b7d54c15..27ac5937 100644
--- a/doc/dnd.doc
+++ b/doc/dnd.doc
@@ -57,7 +57,7 @@ QTextEdit widget source code.
\section1 Dragging
-To start a drag, for example in a \link QWidget::mouseMoveEvent()
+To start a drag, for example in a \link TQWidget::mouseMoveEvent()
mouse motion event\endlink, create an object of the QDragObject
subclass appropriate for your media, such as QTextDrag for text and
QImageDrag for images. Then call the drag() method. This is all you
@@ -84,20 +84,20 @@ references.
\section1 Dropping
To be able to receive media dropped on a widget, call
-\link QWidget::setAcceptDrops() setAcceptDrops(TRUE)\endlink
+\link TQWidget::setAcceptDrops() setAcceptDrops(TRUE)\endlink
for the widget (e.g. in its constructor), and override the
event handler methods
-\link QWidget::dragEnterEvent() dragEnterEvent()\endlink and
-\link QWidget::dropEvent() dropEvent()\endlink.
+\link TQWidget::dragEnterEvent() dragEnterEvent()\endlink and
+\link TQWidget::dropEvent() dropEvent()\endlink.
For more sophisticated applications overriding
-\link QWidget::dragMoveEvent() dragMoveEvent()\endlink and
-\link QWidget::dragLeaveEvent() dragLeaveEvent()\endlink will also be
+\link TQWidget::dragMoveEvent() dragMoveEvent()\endlink and
+\link TQWidget::dragLeaveEvent() dragLeaveEvent()\endlink will also be
necessary.
For example, to accept text and image drops:
\code
MyWidget::MyWidget(...) :
- QWidget(...)
+ TQWidget(...)
{
...
setAcceptDrops(TRUE);
@@ -113,8 +113,8 @@ void MyWidget::dragEnterEvent(QDragEnterEvent* event)
void MyWidget::dropEvent(QDropEvent* event)
{
- QImage image;
- QString text;
+ TQImage image;
+ TQString text;
if ( QImageDrag::decode(event, image) ) {
insertImageAt(image, event->pos());
@@ -146,7 +146,7 @@ void MyWidget::copy()
void MyWidget::paste()
{
- QString text;
+ TQString text;
if ( QTextDrag::decode(QApplication::clipboard()->data(), text) )
insertText( text );
}
@@ -283,7 +283,7 @@ void MyEditor::startDrag()
void MyEditor::dropEvent(QDropEvent* event)
{
- QString text;
+ TQString text;
if ( QTextDrag::decode(event, text) ) {
if ( event->source() == this && event->action() == QDropEvent::Move ) {
@@ -300,7 +300,7 @@ void MyEditor::dropEvent(QDropEvent* event)
Some widgets are more specific than just a "yes" or "no" response when
data is dragged onto them. For example, a CAD program might only
accept drops of text onto text objects in the view. In these cases,
-the \link QWidget::dragMoveEvent() dragMoveEvent()\endlink is used and
+the \link TQWidget::dragMoveEvent() dragMoveEvent()\endlink is used and
an \e area is given for which the drag is accepted or ignored:
\code
void MyWidget::dragMoveEvent(QDragMoveEvent* event)