From 628b0bb74c3fc327efff8add9c73ada04b1cbea2 Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Sun, 7 Jul 2024 13:06:00 +0900 Subject: Rename drag-n-drop nt* related files to equivalent tq* Signed-off-by: Michele Calgaro --- doc/html/fileiconview-example.html | 60 +++++++++++++++++++------------------- 1 file changed, 30 insertions(+), 30 deletions(-) (limited to 'doc/html/fileiconview-example.html') diff --git a/doc/html/fileiconview-example.html b/doc/html/fileiconview-example.html index 2116877b9..efb5f37b9 100644 --- a/doc/html/fileiconview-example.html +++ b/doc/html/fileiconview-example.html @@ -80,7 +80,7 @@ public: const char* format( int i ) const; TQByteArray encodedData( const char* mime ) const; - static bool canDecode( TQMimeSource* e ); + static bool canDecode( TQMimeSource* e ); void append( const TQIconDragItem &item, const TQRect &pr, const TQRect &tr, const TQString &url ); private: @@ -127,7 +127,7 @@ signals: protected slots: void itemDoubleClicked( TQIconViewItem *i ); - void slotDropped( TQDropEvent *e, const TQValueList<TQIconDragItem> & ); + void slotDropped( TQDropEvent *e, const TQValueList<TQIconDragItem> & ); void viewLarge(); void viewSmall(); @@ -186,7 +186,7 @@ public: { return itemType; } TQString filename() const { return itemFileName; } - virtual bool acceptDrop( const TQMimeSource *e ) const; + virtual bool acceptDrop( const TQMimeSource *e ) const; virtual void setText( const TQString &text ); virtual TQPixmap *pixmap() const; @@ -198,7 +198,7 @@ public: void paintItem( TQPainter *p, const TQColorGroup &cg ); protected: - virtual void dropped( TQDropEvent *e, const TQValueList<TQIconDragItem> & ); + virtual void dropped( TQDropEvent *e, const TQValueList<TQIconDragItem> & ); TQString itemFileName; TQFileInfo *itemFileInfo; @@ -229,9 +229,9 @@ protected: #include <ntqpainter.h> #include <tqstringlist.h> #include <ntqpixmap.h> -#include <ntqmime.h> +#include <tqmime.h> #include <tqstrlist.h> -#include <ntqdragobject.h> +#include <tqdragobject.h> #include <ntqmessagebox.h> #include <ntqevent.h> #include <tqpopupmenu.h> @@ -474,7 +474,7 @@ static void cleanup() { } -const char* TQtFileIconDrag::format( int i ) const +const char* TQtFileIconDrag::format( int i ) const { if ( i == 0 ) return "application/x-qiconlist"; @@ -497,10 +497,10 @@ static void cleanup() return a; } -bool TQtFileIconDrag::canDecode( TQMimeSource* e ) +bool TQtFileIconDrag::canDecode( TQMimeSource* e ) { - return e->provides( "application/x-qiconlist" ) || - e->provides( "text/uri-list" ); + return e->provides( "application/x-qiconlist" ) || + e->provides( "text/uri-list" ); } void TQtFileIconDrag::append( const TQIconDragItem &item, const TQRect &pr, @@ -514,7 +514,7 @@ static void cleanup() ourUrl = dir.absPath(); } #endif - urls << TQUriDrag::localFileToUri(ourUrl); + urls << TQUriDrag::localFileToUri(ourUrl); } /***************************************************************************** @@ -622,29 +622,29 @@ TQtFileIconViewItem::~TQtFileIconViewItem() } } -bool TQtFileIconViewItem::acceptDrop( const TQMimeSource *e ) const +bool TQtFileIconViewItem::acceptDrop( const TQMimeSource *e ) const { - if ( type() == Dir && e->provides( "text/uri-list" ) && + if ( type() == Dir && e->provides( "text/uri-list" ) && dropEnabled() ) return TRUE; return FALSE; } -void TQtFileIconViewItem::dropped( TQDropEvent *e, const TQValueList<TQIconDragItem> & ) +void TQtFileIconViewItem::dropped( TQDropEvent *e, const TQValueList<TQIconDragItem> & ) { timer.stop(); if ( !TQUriDrag::canDecode( e ) ) { - e->ignore(); + e->ignore(); return; } TQStringList lst; - TQUriDrag::decodeLocalFiles( e, lst ); + TQUriDrag::decodeLocalFiles( e, lst ); TQString str; - if ( e->action() == TQDropEvent::Copy ) + if ( e->action() == TQDropEvent::Copy ) str = "Copy\n\n"; else str = "Move\n\n"; @@ -654,10 +654,10 @@ TQtFileIconViewItem::~TQtFileIconViewItem() "To\n\n" " %1" ).arg( filename() ); - TQMessageBox::information( iconView(), e->action() == TQDropEvent::Copy ? "Copy" : "Move" , str, "Not Implemented" ); - if ( e->action() == TQDropEvent::Move ) + TQMessageBox::information( iconView(), e->action() == TQDropEvent::Copy ? "Copy" : "Move" , str, "Not Implemented" ); + if ( e->action() == TQDropEvent::Move ) TQMessageBox::information( iconView(), "Remove" , str, "Not Implemented" ); - e->acceptAction(); + e->acceptAction(); } void TQtFileIconViewItem::dragEntered() @@ -720,8 +720,8 @@ TQtFileIconViewItem::~TQtFileIconViewItem() this, TQ_SLOT( itemDoubleClicked( TQIconViewItem * ) ) ); connect( this, TQ_SIGNAL( returnPressed( TQIconViewItem * ) ), this, TQ_SLOT( itemDoubleClicked( TQIconViewItem * ) ) ); - connect( this, TQ_SIGNAL( dropped( TQDropEvent *, const TQValueList<TQIconDragItem> & ) ), - this, TQ_SLOT( slotDropped( TQDropEvent *, const TQValueList<TQIconDragItem> & ) ) ); + connect( this, TQ_SIGNAL( dropped( TQDropEvent *, const TQValueList<TQIconDragItem> & ) ), + this, TQ_SLOT( slotDropped( TQDropEvent *, const TQValueList<TQIconDragItem> & ) ) ); connect( this, TQ_SIGNAL( contextMenuRequested( TQIconViewItem *, const TQPoint & ) ), this, TQ_SLOT( slotRightPressed( TQIconViewItem * ) ) ); @@ -879,7 +879,7 @@ void TQtFileIconView::itemDoubleClicked( TQPoint orig = viewportToContents( viewport()->mapFromGlobal( TQCursor::pos() ) ); TQtFileIconDrag *drag = new TQtFileIconDrag( viewport() ); - drag->setPixmap( *currentItem()->pixmap(), + drag->setPixmap( *currentItem()->pixmap(), TQPoint( currentItem()->pixmapRect().width() / 2, currentItem()->pixmapRect().height() / 2 ) ); for ( TQtFileIconViewItem *item = (TQtFileIconViewItem*)firstItem(); item; item = (TQtFileIconViewItem*)item->nextItem() ) { @@ -909,20 +909,20 @@ void TQtFileIconView::itemDoubleClicked( keyPressEvent( e ); } -void TQtFileIconView::slotDropped( TQDropEvent *e, const TQValueList<TQIconDragItem> & ) +void TQtFileIconView::slotDropped( TQDropEvent *e, const TQValueList<TQIconDragItem> & ) { if ( openItem ) openItem->timer.stop(); if ( !TQUriDrag::canDecode( e ) ) { - e->ignore(); + e->ignore(); return; } TQStringList lst; - TQUriDrag::decodeLocalFiles( e, lst ); + TQUriDrag::decodeLocalFiles( e, lst ); TQString str; - if ( e->action() == TQDropEvent::Copy ) + if ( e->action() == TQDropEvent::Copy ) str = "Copy\n\n"; else str = "Move\n\n"; @@ -932,10 +932,10 @@ void TQtFileIconView::slotDropped( "To\n\n" " %1" ).arg( viewDir.absPath() ); - TQMessageBox::information( this, e->action() == TQDropEvent::Copy ? "Copy" : "Move" , str, "Not Implemented" ); - if ( e->action() == TQDropEvent::Move ) + TQMessageBox::information( this, e->action() == TQDropEvent::Copy ? "Copy" : "Move" , str, "Not Implemented" ); + if ( e->action() == TQDropEvent::Move ) TQMessageBox::information( this, "Remove" , TQDir::convertSeparators(lst.join("\n")), "Not Implemented" ); - e->acceptAction(); + e->acceptAction(); openItem = 0; } -- cgit v1.2.3