From 252a2ec8b0f0f9cf20c947737087b24a8185b588 Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Wed, 10 Jul 2024 18:56:16 +0900 Subject: Rename IO and network class nt* related files to equivalent tq* Signed-off-by: Michele Calgaro --- doc/html/fileiconview-example.html | 94 +++++++++++++++++++------------------- 1 file changed, 47 insertions(+), 47 deletions(-) (limited to 'doc/html/fileiconview-example.html') diff --git a/doc/html/fileiconview-example.html b/doc/html/fileiconview-example.html index ecb21e4f0..3a22ab16a 100644 --- a/doc/html/fileiconview-example.html +++ b/doc/html/fileiconview-example.html @@ -41,7 +41,7 @@ used.


Header file of the file icon view:

/****************************************************************************
-** $Id: qt/qfileiconview.h   3.3.8   edited Jan 11 14:37 $
+** $Id: qt/tqfileiconview.h   3.3.8   edited Jan 11 14:37 $
 **
 ** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
 **
@@ -56,8 +56,8 @@ used.
 
 #include <tqiconset.h>
 #include <tqstring.h>
-#include <ntqfileinfo.h>
-#include <ntqdir.h>
+#include <tqfileinfo.h>
+#include <tqdir.h>
 #include <tqtimer.h>
 #include <tqiconview.h>
 
@@ -111,9 +111,9 @@ public:
 
 public slots:
     void setDirectory( const TQString &dir );
-    void setDirectory( const TQDir &dir );
+    void setDirectory( const TQDir &dir );
     void newDirectory();
-    TQDir currentDir();
+    TQDir currentDir();
 
 signals:
     void directoryChanged( const TQString & );
@@ -147,12 +147,12 @@ protected slots:
     void openFolder();
 
 protected:
-    void readDir( const TQDir &dir );
+    void readDir( const TQDir &dir );
     virtual TQDragObject *dragObject();
 
     virtual void keyPressEvent( TQKeyEvent *e );
 
-    TQDir viewDir;
+    TQDir viewDir;
     int newFolderNum;
     TQSize sz;
     TQPixmap pix;
@@ -201,7 +201,7 @@ protected:
     virtual void dropped( TQDropEvent *e, const TQValueList<TQIconDragItem> & );
 
     TQString itemFileName;
-    TQFileInfo *itemFileInfo;
+    TQFileInfo *itemFileInfo;
     ItemType itemType;
     bool checkSetText;
     TQTimer timer;
@@ -216,7 +216,7 @@ protected:
 


Implementation of the file icon view:

/****************************************************************************
-** $Id: qt/qfileiconview.cpp   3.3.8   edited Jan 11 14:37 $
+** $Id: qt/tqfileiconview.cpp   3.3.8   edited Jan 11 14:37 $
 **
 ** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
 **
@@ -225,7 +225,7 @@ protected:
 **
 *****************************************************************************/
 
-#include "qfileiconview.h"
+#include "tqfileiconview.h"
 #include <ntqpainter.h>
 #include <tqstringlist.h>
 #include <ntqpixmap.h>
@@ -510,8 +510,8 @@ static void cleanup()
     TQString ourUrl = url;
 #ifdef TQ_WS_WIN
     if (ourUrl.length() > 2 && ourUrl[1] != ':') {
-        TQDir dir(ourUrl);
-        ourUrl = dir.absPath();
+        TQDir dir(ourUrl);
+        ourUrl = dir.absPath();
     }
 #endif
     urls << TQUriDrag::localFileToUri(ourUrl);
@@ -524,22 +524,22 @@ static void cleanup()
  *****************************************************************************/
 
 TQtFileIconViewItem::TQtFileIconViewItem( TQtFileIconView *parent, TQFileInfo *fi )
-    : TQIconViewItem( parent, fi->fileName() ), itemFileName( fi->filePath() ),
+    : TQIconViewItem( parent, fi->fileName() ), itemFileName( fi->filePath() ),
       itemFileInfo( fi ), checkSetText( FALSE )
 {
     vm = TQtFileIconView::Large;
 
-    if ( itemFileInfo->isDir() )
+    if ( itemFileInfo->isDir() )
         itemType = Dir;
-    else if ( itemFileInfo->isFile() )
+    else if ( itemFileInfo->isFile() )
         itemType = File;
-    if ( itemFileInfo->isSymLink() )
+    if ( itemFileInfo->isSymLink() )
         itemType = Link;
 
     viewModeChanged( ( (TQtFileIconView*)iconView() )->viewMode() );
 
-    if ( itemFileInfo->fileName() == "." ||
-         itemFileInfo->fileName() == ".." )
+    if ( itemFileInfo->fileName() == "." ||
+         itemFileInfo->fileName() == ".." )
         setRenameEnabled( FALSE );
 
     checkSetText = TRUE;
@@ -550,7 +550,7 @@ static void cleanup()
 
 void TQtFileIconViewItem::paintItem( TQPainter *p, const TQColorGroup &cg )
 {
-    if ( itemFileInfo->isSymLink() ) {
+    if ( itemFileInfo->isSymLink() ) {
         TQFont f( p->font() );
         f.setItalic( TRUE );
         p->setFont( f );
@@ -610,11 +610,11 @@ TQtFileIconViewItem::~TQtFileIconViewItem()
     if ( checkSetText ) {
         if ( text == "." || text == "." || text.isEmpty() )
             return;
-        TQDir dir( itemFileInfo->dir() );
-        if ( dir.rename( itemFileInfo->fileName(), text ) ) {
-            itemFileName = itemFileInfo->dirPath( TRUE ) + "/" + text;
+        TQDir dir( itemFileInfo->dir() );
+        if ( dir.rename( itemFileInfo->fileName(), text ) ) {
+            itemFileName = itemFileInfo->dirPath( TRUE ) + "/" + text;
             delete itemFileInfo;
-            itemFileInfo = new TQFileInfo( itemFileName );
+            itemFileInfo = new TQFileInfo( itemFileName );
             TQIconViewItem::setText( text );
         }
     } else {
@@ -752,7 +752,7 @@ void TQtFileIconView::setDirectory( const TQDir &dir )
+void TQtFileIconView::setDirectory( const TQDir &dir )
 {
     viewDir = dir;
     readDir( viewDir );
@@ -763,9 +763,9 @@ void TQtFileIconView::newDirectory()
     setAutoArrange( FALSE );
     selectAll( FALSE );
     if ( viewDir.mkdir( TQString( "New Folder %1" ).arg( ++newFolderNum ) ) ) {
-        TQFileInfo *fi = new TQFileInfo( viewDir, TQString( "New Folder %1" ).arg( newFolderNum ) );
-        TQtFileIconViewItem *item = new TQtFileIconViewItem( this, new TQFileInfo( *fi ) );
-        item->setKey( TQString( "000000%1" ).arg( fi->fileName() ) );
+        TQFileInfo *fi = new TQFileInfo( viewDir, TQString( "New Folder %1" ).arg( newFolderNum ) );
+        TQtFileIconViewItem *item = new TQtFileIconViewItem( this, new TQFileInfo( *fi ) );
+        item->setKey( TQString( "000000%1" ).arg( fi->fileName() ) );
         delete fi;
         repaintContents( contentsX(), contentsY(), contentsWidth(), contentsHeight(), FALSE );
         ensureItemVisible( item );
@@ -805,39 +805,39 @@ static bool isRoot( const TQString &s )
     return FALSE;
 }
 
-void TQtFileIconView::readDir( const TQDir &dir )
+void TQtFileIconView::readDir( const TQDir &dir )
 {
-    if ( !dir.isReadable() )
+    if ( !dir.isReadable() )
         return;
 
-    if ( isRoot( dir.absPath() ) )
+    if ( isRoot( dir.absPath() ) )
         emit disableUp();
     else
         emit enableUp();
 
     clear();
 
-    emit directoryChanged( dir.absPath() );
+    emit directoryChanged( dir.absPath() );
 
-    const TQFileInfoList *filist = dir.entryInfoList( TQDir::DefaultFilter, TQDir::DirsFirst | TQDir::Name );
+    const TQFileInfoList *filist = dir.entryInfoList( TQDir::DefaultFilter, TQDir::DirsFirst | TQDir::Name );
 
     emit startReadDir( filist->count() );
 
     TQFileInfoListIterator it( *filist );
-    TQFileInfo *fi;
+    TQFileInfo *fi;
     bool allowRename = FALSE, allowRenameSet = FALSE;
     while ( ( fi = it.current() ) != 0 ) {
         ++it;
-        if ( fi && fi->fileName() == ".." && ( fi->dirPath() == "/" || fi->dirPath().isEmpty() ) )
+        if ( fi && fi->fileName() == ".." && ( fi->dirPath() == "/" || fi->dirPath().isEmpty() ) )
             continue;
         emit readNextDir();
-        TQtFileIconViewItem *item = new TQtFileIconViewItem( this, new TQFileInfo( *fi ) );
-        if ( fi->isDir() )
-            item->setKey( TQString( "000000%1" ).arg( fi->fileName() ) );
+        TQtFileIconViewItem *item = new TQtFileIconViewItem( this, new TQFileInfo( *fi ) );
+        if ( fi->isDir() )
+            item->setKey( TQString( "000000%1" ).arg( fi->fileName() ) );
         else
-            item->setKey( fi->fileName() );
+            item->setKey( fi->fileName() );
         if ( !allowRenameSet ) {
-            if ( !TQFileInfo( fi->absFilePath() ).isWritable() ||
+            if ( !TQFileInfo( fi->absFilePath() ).isWritable() ||
                  item->text() == "." || item->text() == ".." )
                 allowRename = FALSE;
             else
@@ -850,7 +850,7 @@ void TQtFileIconView::readDir( const TQ
         item->setRenameEnabled( allowRename );
     }
 
-    if ( !TQFileInfo( dir.absPath() ).isWritable() )
+    if ( !TQFileInfo( dir.absPath() ).isWritable() )
         emit disableMkdir();
     else
         emit enableMkdir();
@@ -927,7 +927,7 @@ void TQtFileIconView::slotDropped( count(); ++i )
-        str += TQString( "   %1\n" ).arg( TQDir::convertSeparators(lst[i]) );
+        str += TQString( "   %1\n" ).arg( TQDir::convertSeparators(lst[i]) );
     str += TQString( "\n"
         "To\n\n"
         "       %1" ).arg( viewDir.absPath() );
@@ -1131,7 +1131,7 @@ protected slots:
 *****************************************************************************/
 
 #include "mainwindow.h"
-#include "qfileiconview.h"
+#include "tqfileiconview.h"
 #include "../dirview/dirview.h"
 
 #include <ntqsplitter.h>
@@ -1142,8 +1142,8 @@ protected slots:
 #include <ntqcombobox.h>
 #include <ntqpixmap.h>
 #include <tqtoolbutton.h>
-#include <ntqdir.h>
-#include <ntqfileinfo.h>
+#include <tqdir.h>
+#include <tqfileinfo.h>
 
 static const char* cdtoparent_xpm[]={
     "15 13 3 1",
@@ -1312,8 +1312,8 @@ void FileMainWindow::slotReadDirDone()
 
 void FileMainWindow::cdUp()
 {
-    TQDir dir = fileview->currentDir();
-    dir.cd( ".." );
+    TQDir dir = fileview->currentDir();
+    dir.cd( ".." );
     fileview->setDirectory( dir );
 }
 
@@ -1364,7 +1364,7 @@ void FileMainWindow::disableMkdir()
 *****************************************************************************/
 
 #include "mainwindow.h"
-#include "qfileiconview.h"
+#include "tqfileiconview.h"
 
 #include <ntqapplication.h>
 
-- 
cgit v1.2.1