From e6077c30d14e9d662e8843c554db86c0d366d0b6 Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Thu, 6 Jun 2024 13:44:12 +0900 Subject: Rename str nt* related files to equivalent tq* Signed-off-by: Michele Calgaro --- doc/html/fileiconview-example.html | 88 +++++++++++++++++++------------------- 1 file changed, 44 insertions(+), 44 deletions(-) (limited to 'doc/html/fileiconview-example.html') diff --git a/doc/html/fileiconview-example.html b/doc/html/fileiconview-example.html index 8b3e779c2..c2e69747d 100644 --- a/doc/html/fileiconview-example.html +++ b/doc/html/fileiconview-example.html @@ -55,7 +55,7 @@ used. #include <ntqiconset.h> -#include <ntqstring.h> +#include <tqstring.h> #include <ntqfileinfo.h> #include <ntqdir.h> #include <ntqtimer.h> @@ -81,10 +81,10 @@ public: const char* format( int i ) const; TQByteArray encodedData( const char* mime ) const; static bool canDecode( TQMimeSource* e ); - void append( const TQIconDragItem &item, const TQRect &pr, const TQRect &tr, const TQString &url ); + void append( const TQIconDragItem &item, const TQRect &pr, const TQRect &tr, const TQString &url ); private: - TQStringList urls; + TQStringList urls; }; @@ -99,7 +99,7 @@ class TQtFileIconView : public TQIconView TQ_OBJECT public: - TQtFileIconView( const TQString &dir, TQWidget *parent = 0, const char *name = 0 ); + TQtFileIconView( const TQString &dir, TQWidget *parent = 0, const char *name = 0 ); enum ViewMode { Large, Small }; @@ -110,13 +110,13 @@ public: } public slots: - void setDirectory( const TQString &dir ); + void setDirectory( const TQString &dir ); void setDirectory( const TQDir &dir ); void newDirectory(); TQDir currentDir(); signals: - void directoryChanged( const TQString & ); + void directoryChanged( const TQString & ); void startReadDir( int dirs ); void readNextDir(); void readDirDone(); @@ -184,11 +184,11 @@ public: ItemType type() const { return itemType; } - TQString filename() const { return itemFileName; } + TQString filename() const { return itemFileName; } virtual bool acceptDrop( const TQMimeSource *e ) const; - virtual void setText( const TQString &text ); + virtual void setText( const TQString &text ); virtual TQPixmap *pixmap() const; virtual void dragEntered(); @@ -200,7 +200,7 @@ public: protected: virtual void dropped( TQDropEvent *e, const TQValueList<TQIconDragItem> & ); - TQString itemFileName; + TQString itemFileName; TQFileInfo *itemFileInfo; ItemType itemType; bool checkSetText; @@ -227,10 +227,10 @@ protected: #include "qfileiconview.h" #include <ntqpainter.h> -#include <ntqstringlist.h> +#include <tqstringlist.h> #include <ntqpixmap.h> #include <ntqmime.h> -#include <ntqstrlist.h> +#include <tqstrlist.h> #include <ntqdragobject.h> #include <ntqmessagebox.h> #include <ntqevent.h> @@ -490,9 +490,9 @@ static void cleanup() if ( TQString( mime ) == "application/x-qiconlist" ) { a = TQIconDrag::encodedData( mime ); } else if ( TQString( mime ) == "text/uri-list" ) { - TQString s = urls.join( "\r\n" ); - a.resize( s.length() ); - memcpy( a.data(), s.latin1(), s.length() ); + TQString s = urls.join( "\r\n" ); + a.resize( s.length() ); + memcpy( a.data(), s.latin1(), s.length() ); } return a; } @@ -504,12 +504,12 @@ static void cleanup() } void TQtFileIconDrag::append( const TQIconDragItem &item, const TQRect &pr, - const TQRect &tr, const TQString &url ) + const TQRect &tr, const TQString &url ) { TQIconDrag::append( item, pr, tr ); - TQString ourUrl = url; + TQString ourUrl = url; #ifdef TQ_WS_WIN - if (ourUrl.length() > 2 && ourUrl[1] != ':') { + if (ourUrl.length() > 2 && ourUrl[1] != ':') { TQDir dir(ourUrl); ourUrl = dir.absPath(); } @@ -605,10 +605,10 @@ TQtFileIconViewItem::~TQtFileIconViewItem() delete itemFileInfo; } -void TQtFileIconViewItem::setText( const TQString &text ) +void TQtFileIconViewItem::setText( const TQString &text ) { if ( checkSetText ) { - if ( text == "." || text == "." || text.isEmpty() ) + if ( text == "." || text == "." || text.isEmpty() ) return; TQDir dir( itemFileInfo->dir() ); if ( dir.rename( itemFileInfo->fileName(), text ) ) { @@ -640,10 +640,10 @@ TQtFileIconViewItem::~TQtFileIconViewItem() return; } - TQStringList lst; + TQStringList lst; TQUriDrag::decodeLocalFiles( e, lst ); - TQString str; + TQString str; if ( e->action() == TQDropEvent::Copy ) str = "Copy\n\n"; else @@ -685,7 +685,7 @@ TQtFileIconViewItem::~TQtFileIconViewItem() * *****************************************************************************/ -TQtFileIconView::TQtFileIconView( const TQString &dir, TQWidget *parent, const char *name ) +TQtFileIconView::TQtFileIconView( const TQString &dir, TQWidget *parent, const char *name ) : TQIconView( parent, name ), viewDir( dir ), newFolderNum( 0 ) { if ( !iconFolderLockedLarge ) { @@ -746,7 +746,7 @@ void TQtFileIconView::openFolder() setDirectory( openItem->itemFileName ); } -void TQtFileIconView::setDirectory( const TQString &dir ) +void TQtFileIconView::setDirectory( const TQString &dir ) { viewDir = TQDir( dir ); readDir( viewDir ); @@ -783,21 +783,21 @@ TQDir TQtFileIconView::currentDir() return viewDir; } -static bool isRoot( const TQString &s ) +static bool isRoot( const TQString &s ) { #if defined(Q_OS_UNIX) if ( s == "/" ) return TRUE; #elif defined(Q_OS_WIN32) - TQString p = s; - if ( p.length() == 3 && - p.right( 2 ) == ":/" ) + TQString p = s; + if ( p.length() == 3 && + p.right( 2 ) == ":/" ) return TRUE; if ( p[ 0 ] == '/' && p[ 1 ] == '/' ) { - int slashes = p.contains( '/' ); + int slashes = p.contains( '/' ); if ( slashes <= 3 ) return TRUE; - if ( slashes == 4 && p[ (int)p.length() - 1 ] == '/' ) + if ( slashes == 4 && p[ (int)p.length() - 1 ] == '/' ) return TRUE; } #endif @@ -918,10 +918,10 @@ void TQtFileIconView::slotDropped( return; } - TQStringList lst; + TQStringList lst; TQUriDrag::decodeLocalFiles( e, lst ); - TQString str; + TQString str; if ( e->action() == TQDropEvent::Copy ) str = "Copy\n\n"; else @@ -934,7 +934,7 @@ void TQtFileIconView::slotDropped( 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" ); + TQMessageBox::information( this, "Remove" , TQDir::convertSeparators(lst.join("\n")), "Not Implemented" ); e->acceptAction(); openItem = 0; } @@ -1101,13 +1101,13 @@ protected: TQToolButton *upButton, *mkdirButton; protected slots: - void directoryChanged( const TQString & ); + void directoryChanged( const TQString & ); void slotStartReadDir( int dirs ); void slotReadNextDir(); void slotReadDirDone(); void cdUp(); void newFolder(); - void changePath( const TQString &path ); + void changePath( const TQString &path ); void enableUp(); void disableUp(); void enableMkdir(); @@ -1220,25 +1220,25 @@ void FileMainWindow::setup() pathCombo = new TQComboBox( TRUE, toolbar ); pathCombo->setAutoCompletion( TRUE ); toolbar->setStretchableWidget( pathCombo ); - connect( pathCombo, TQ_SIGNAL( activated( const TQString & ) ), - this, TQ_SLOT ( changePath( const TQString & ) ) ); + connect( pathCombo, TQ_SIGNAL( activated( const TQString & ) ), + this, TQ_SLOT ( changePath( const TQString & ) ) ); toolbar->addSeparator(); TQPixmap pix; pix = TQPixmap( cdtoparent_xpm ); - upButton = new TQToolButton( pix, "One directory up", TQString::null, + upButton = new TQToolButton( pix, "One directory up", TQString::null, this, TQ_SLOT( cdUp() ), toolbar, "cd up" ); pix = TQPixmap( newfolder_xpm ); mkdirButton = new TQToolButton( pix, "New Folder", TQString::null, this, TQ_SLOT( newFolder() ), toolbar, "new folder" ); - connect( dirlist, TQ_SIGNAL( folderSelected( const TQString & ) ), - fileview, TQ_SLOT ( setDirectory( const TQString & ) ) ); - connect( fileview, TQ_SIGNAL( directoryChanged( const TQString & ) ), - this, TQ_SLOT( directoryChanged( const TQString & ) ) ); + connect( dirlist, TQ_SIGNAL( folderSelected( const TQString & ) ), + fileview, TQ_SLOT ( setDirectory( const TQString & ) ) ); + connect( fileview, TQ_SIGNAL( directoryChanged( const TQString & ) ), + this, TQ_SLOT( directoryChanged( const TQString & ) ) ); connect( fileview, TQ_SIGNAL( startReadDir( int ) ), this, TQ_SLOT( slotStartReadDir( int ) ) ); connect( fileview, TQ_SIGNAL( readNextDir() ), @@ -1266,7 +1266,7 @@ void FileMainWindow::setup() void FileMainWindow::setPathCombo() { - TQString dir = caption(); + TQString dir = caption(); int i = 0; bool found = FALSE; for ( i = 0; i < pathCombo->count(); ++i ) { @@ -1285,7 +1285,7 @@ void FileMainWindow::setPathCombo() } -void FileMainWindow::directoryChanged( const TQString &dir ) +void FileMainWindow::directoryChanged( const TQString &dir ) { setCaption( dir ); setPathCombo(); @@ -1322,7 +1322,7 @@ void FileMainWindow::newFolder() fileview->newDirectory(); } -void FileMainWindow::changePath( const TQString &path ) +void FileMainWindow::changePath( const TQString &path ) { if ( TQFileInfo( path ).exists() ) fileview->setDirectory( path ); -- cgit v1.2.3