summaryrefslogtreecommitdiffstats
path: root/doc/dnd.doc
diff options
context:
space:
mode:
authorMichele Calgaro <[email protected]>2024-06-08 12:56:43 +0900
committerMichele Calgaro <[email protected]>2024-06-08 12:56:43 +0900
commit0cf411b09cf5d8970b873a338a69eae98d5ce5d8 (patch)
tree107cf55759cc3138bb1e0035b479bcd92127403a /doc/dnd.doc
parente6077c30d14e9d662e8843c554db86c0d366d0b6 (diff)
downloadtqt3-0cf411b09cf5d8970b873a338a69eae98d5ce5d8.tar.gz
tqt3-0cf411b09cf5d8970b873a338a69eae98d5ce5d8.zip
Rename text nt* related files to equivalent tq*
Signed-off-by: Michele Calgaro <[email protected]>
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 6da6117a5..fe210fd4f 100644
--- a/doc/dnd.doc
+++ b/doc/dnd.doc
@@ -52,14 +52,14 @@ mechanism.
For drag and drop examples see (in increasing order of
sophistication): \c qt/examples/iconview/simple_dd, \c
qt/examples/dragdrop and \c qt/examples/fileiconview. See also the
-QTextEdit widget source code.
+TQTextEdit widget source code.
\section1 Dragging
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
+subclass appropriate for your media, such as TQTextDrag for text and
TQImageDrag for images. Then call the drag() method. This is all you
need for simple dragging of existing types.
@@ -67,7 +67,7 @@ For example, to start dragging some text from a widget:
\code
void MyWidget::startDrag()
{
- QDragObject *d = new QTextDrag( myHighlightedText(), this );
+ QDragObject *d = new TQTextDrag( myHighlightedText(), this );
d->dragCopy();
// do NOT delete d.
}
@@ -106,7 +106,7 @@ MyWidget::MyWidget(...) :
void MyWidget::dragEnterEvent(QDragEnterEvent* event)
{
event->accept(
- QTextDrag::canDecode(event) ||
+ TQTextDrag::canDecode(event) ||
TQImageDrag::canDecode(event)
);
}
@@ -118,7 +118,7 @@ void MyWidget::dropEvent(QDropEvent* event)
if ( TQImageDrag::decode(event, image) ) {
insertImageAt(image, event->pos());
- } else if ( QTextDrag::decode(event, text) ) {
+ } else if ( TQTextDrag::decode(event, text) ) {
insertTextAt(text, event->pos());
}
}
@@ -141,13 +141,13 @@ information on the clipboard:
void MyWidget::copy()
{
QApplication::clipboard()->setData(
- new QTextDrag(myHighlightedText()) );
+ new TQTextDrag(myHighlightedText()) );
}
void MyWidget::paste()
{
TQString text;
- if ( QTextDrag::decode(QApplication::clipboard()->data(), text) )
+ if ( TQTextDrag::decode(QApplication::clipboard()->data(), text) )
insertText( text );
}
\endcode
@@ -211,7 +211,7 @@ they can produce. This is achieved using \link
http://www.rfc-editor.org/rfc/rfc1341.txt MIME types\endlink: the drag
source provides a list of MIME types that it can produce (ordered from
most appropriate to least appropriate), and the drop target chooses
-which of those it can accept. For example, QTextDrag provides support
+which of those it can accept. For example, TQTextDrag provides support
for the "\c{text/plain}" MIME type (ordinary unformatted text), and
the Unicode formats "\c{text/utf16}" and "\c{text/utf8}"; TQImageDrag
provides for "\c{image/*}", where \c{*} is any image format that
@@ -276,7 +276,7 @@ the drag start point and the drop event might look like this:
\code
void MyEditor::startDrag()
{
- QDragObject *d = new QTextDrag(myHighlightedText(), this);
+ QDragObject *d = new TQTextDrag(myHighlightedText(), this);
if ( d->drag() && d->target() != this )
cutMyHighlightedText();
}
@@ -285,7 +285,7 @@ void MyEditor::dropEvent(QDropEvent* event)
{
TQString text;
- if ( QTextDrag::decode(event, text) ) {
+ if ( TQTextDrag::decode(event, text) ) {
if ( event->source() == this && event->action() == QDropEvent::Move ) {
// Careful not to tread on my own feet
event->acceptAction();
@@ -305,7 +305,7 @@ an \e area is given for which the drag is accepted or ignored:
\code
void MyWidget::dragMoveEvent(QDragMoveEvent* event)
{
- if ( QTextDrag::canDecode(event) ) {
+ if ( TQTextDrag::canDecode(event) ) {
MyCadItem* item = findMyItemAt(event->pos());
if ( item )
event->accept();
@@ -318,7 +318,7 @@ you promise the acceptance persists:
\code
void MyWidget::dragMoveEvent(QDragMoveEvent* event)
{
- if ( QTextDrag::canDecode(event) ) {
+ if ( TQTextDrag::canDecode(event) ) {
MyCadItem* item = findMyItemAt(event->pos());
if ( item ) {
QRect r = item->areaRelativeToMeClippedByAnythingInTheWay();