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/dirview-example.html | 52 +++++++++++++++++++++---------------------- 1 file changed, 26 insertions(+), 26 deletions(-) (limited to 'doc/html/dirview-example.html') diff --git a/doc/html/dirview-example.html b/doc/html/dirview-example.html index 5cd95fe78..f8c0fd5f8 100644 --- a/doc/html/dirview-example.html +++ b/doc/html/dirview-example.html @@ -53,7 +53,7 @@ Drag&Drop in a listview. #define DIRVIEW_H #include <ntqlistview.h> -#include <ntqstring.h> +#include <tqstring.h> #include <ntqfile.h> #include <ntqfileinfo.h> #include <ntqtimer.h> @@ -67,7 +67,7 @@ class TQDropEvent; class FileItem : public TQListViewItem { public: - FileItem( TQListViewItem *parent, const TQString &s1, const TQString &s2 ) + FileItem( TQListViewItem *parent, const TQString &s1, const TQString &s2 ) : TQListViewItem( parent, s1, s2 ), pix( 0 ) {} const TQPixmap *pixmap( int i ) const; @@ -84,14 +84,14 @@ private: class Directory : public TQListViewItem { public: - Directory( TQListView * parent, const TQString& filename ); - Directory( Directory * parent, const TQString& filename, const TQString &col2 ) + Directory( TQListView * parent, const TQString& filename ); + Directory( Directory * parent, const TQString& filename, const TQString &col2 ) : TQListViewItem( parent, filename, col2 ), pix( 0 ) {} - Directory( Directory * parent, const TQString& filename ); + Directory( Directory * parent, const TQString& filename ); - TQString text( int column ) const; + TQString text( int column ) const; - TQString fullName(); + TQString fullName(); void setOpen( bool ); void setup(); @@ -120,10 +120,10 @@ public: bool showDirsOnly() { return dirsOnly; } public slots: - void setDir( const TQString & ); + void setDir( const TQString & ); signals: - void folderSelected( const TQString & ); + void folderSelected( const TQString & ); protected slots: void slotFolderSelected( TQListViewItem * ); @@ -139,7 +139,7 @@ protected: void contentsMouseReleaseEvent( TQMouseEvent *e ); private: - TQString fullPath(TQListViewItem* item); + TQString fullPath(TQListViewItem* item); bool dirsOnly; TQListViewItem *oldCurrent; TQListViewItem *dropItem; @@ -178,8 +178,8 @@ can be used in any other trees. #include <ntqmessagebox.h> #include <ntqdragobject.h> #include <ntqmime.h> -#include <ntqstrlist.h> -#include <ntqstringlist.h> +#include <tqstrlist.h> +#include <tqstringlist.h> #include <ntqapplication.h> #include <ntqheader.h> @@ -307,7 +307,7 @@ TQPixmap *fileNormal = 0; * *****************************************************************************/ -Directory::Directory( Directory * parent, const TQString& filename ) +Directory::Directory( Directory * parent, const TQString& filename ) : TQListViewItem( parent ), f(filename), showDirsOnly( parent->showDirsOnly ), pix( 0 ) @@ -322,7 +322,7 @@ TQPixmap *fileNormal = 0; } -Directory::Directory( TQListView * parent, const TQString& filename ) +Directory::Directory( TQListView * parent, const TQString& filename ) : TQListViewItem( parent ), f(filename), showDirsOnly( ( (DirectoryView*)parent )->showDirsOnly() ), pix( 0 ) @@ -357,7 +357,7 @@ Directory::Directory( TQListView * parent, const setPixmap( folderClosed ); if ( o && !childCount() ) { - TQString s( fullName() ); + TQString s( fullName() ); TQDir thisDir( s ); if ( !thisDir.isReadable() ) { readable = FALSE; @@ -404,11 +404,11 @@ Directory::Directory( TQListView * parent, const TQString Directory::fullName() { - TQString s; + TQString s; if ( p ) { s = p->fullName(); - s.append( f.name() ); - s.append( "/" ); + s.append( f.name() ); + s.append( "/" ); } else { s = f.name(); } @@ -551,11 +551,11 @@ static const int autoopenTime = 750; TQListViewItem *item = itemAt( contentsToViewport(e->pos()) ); if ( item ) { - TQStrList lst; + TQStrList lst; TQUriDrag::decode( e, lst ); - TQString str; + TQString str; switch ( e->action() ) { case TQDropEvent::Copy: @@ -578,7 +578,7 @@ static const int autoopenTime = 750; e->accept(); for ( uint i = 0; i < lst.count(); ++i ) { - TQString filename = TQDir::convertSeparators(TQUriDrag::uriToLocalFile(lst.at(i))); + TQString filename = TQDir::convertSeparators(TQUriDrag::uriToLocalFile(lst.at(i))); str += filename + "\n"; } str += TQString( "\nTo\n\n %1" ) @@ -593,7 +593,7 @@ static const int autoopenTime = 750; TQString DirectoryView::fullPath(TQListViewItem* item) { - TQString fullpath = item->text(0); + TQString fullpath = item->text(0); while ( (item=item->parent()) ) { if ( item->parent() ) fullpath = item->text(0) + "/" + fullpath; @@ -601,7 +601,7 @@ TQString DirectoryView::fullPath(TQListViewItem* item) fullpath = item->text(0) + fullpath; } #ifdef TQ_WS_WIN - if (fullpath.length() > 2 && fullpath[1] != ':') { + if (fullpath.length() > 2 && fullpath[1] != ':') { TQDir dir(fullpath); fullpath = dir.currentDirPath().left(2) + fullpath; } @@ -632,7 +632,7 @@ TQString DirectoryView::fullPath(TQListViewItem* item) mousePressed = FALSE; TQListViewItem *item = itemAt( contentsToViewport(presspos) ); if ( item ) { - TQString source = fullPath(item); + TQString source = fullPath(item); if ( TQFile::exists(source) ) { TQUriDrag* ud = new TQUriDrag(viewport()); ud->setFileNames( source ); @@ -649,7 +649,7 @@ TQString DirectoryView::fullPath(TQListViewItem* item) mousePressed = FALSE; } -void DirectoryView::setDir( const TQString &s ) +void DirectoryView::setDir( const TQString &s ) { TQListViewItemIterator it( this ); ++it; @@ -657,7 +657,7 @@ void DirectoryView::setDir( const TQ it.current()->setOpen( FALSE ); } - TQStringList lst( TQStringList::split( "/", s ) ); + TQStringList lst( TQStringList::split( "/", s ) ); TQListViewItem *item = firstChild(); TQStringList::Iterator it2 = lst.begin(); for ( ; it2 != lst.end(); ++it2 ) { -- cgit v1.2.3