diff options
Diffstat (limited to 'doc/html/fileiconview-example.html')
-rw-r--r-- | doc/html/fileiconview-example.html | 94 |
1 files changed, 47 insertions, 47 deletions
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. <p> <hr> <p> Header file of the file icon view: <p> <pre>/**************************************************************************** -** $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 <<a href="tqiconset-h.html">tqiconset.h</a>> #include <<a href="tqstring-h.html">tqstring.h</a>> -#include <<a href="qfileinfo-h.html">ntqfileinfo.h</a>> -#include <<a href="qdir-h.html">ntqdir.h</a>> +#include <<a href="tqfileinfo-h.html">tqfileinfo.h</a>> +#include <<a href="tqdir-h.html">tqdir.h</a>> #include <<a href="tqtimer-h.html">tqtimer.h</a>> #include <<a href="tqiconview-h.html">tqiconview.h</a>> @@ -111,9 +111,9 @@ public: public slots: void setDirectory( const <a href="tqstring.html">TQString</a> &dir ); - void setDirectory( const <a href="ntqdir.html">TQDir</a> &dir ); + void setDirectory( const <a href="tqdir.html">TQDir</a> &dir ); void newDirectory(); - <a href="ntqdir.html">TQDir</a> currentDir(); + <a href="tqdir.html">TQDir</a> currentDir(); signals: void directoryChanged( const <a href="tqstring.html">TQString</a> & ); @@ -147,12 +147,12 @@ protected slots: void openFolder(); protected: - void readDir( const <a href="ntqdir.html">TQDir</a> &dir ); + void readDir( const <a href="tqdir.html">TQDir</a> &dir ); virtual TQDragObject *dragObject(); virtual void keyPressEvent( <a href="qkeyevent.html">TQKeyEvent</a> *e ); - <a href="ntqdir.html">TQDir</a> viewDir; + <a href="tqdir.html">TQDir</a> viewDir; int newFolderNum; <a href="tqsize.html">TQSize</a> sz; <a href="ntqpixmap.html">TQPixmap</a> pix; @@ -201,7 +201,7 @@ protected: virtual void dropped( <a href="tqdropevent.html">TQDropEvent</a> *e, const <a href="tqvaluelist.html">TQValueList</a><TQIconDragItem> & ); <a href="tqstring.html">TQString</a> itemFileName; - <a href="ntqfileinfo.html">TQFileInfo</a> *itemFileInfo; + <a href="tqfileinfo.html">TQFileInfo</a> *itemFileInfo; ItemType itemType; bool checkSetText; <a href="tqtimer.html">TQTimer</a> timer; @@ -216,7 +216,7 @@ protected: <p> <hr> <p> Implementation of the file icon view: <p> <pre>/**************************************************************************** -** $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 <<a href="qpainter-h.html">ntqpainter.h</a>> #include <<a href="tqstringlist-h.html">tqstringlist.h</a>> #include <<a href="qpixmap-h.html">ntqpixmap.h</a>> @@ -510,8 +510,8 @@ static void cleanup() <a href="tqstring.html">TQString</a> ourUrl = url; #ifdef TQ_WS_WIN if (ourUrl.<a href="tqstring.html#length">length</a>() > 2 && ourUrl[1] != ':') { - <a href="ntqdir.html">TQDir</a> dir(ourUrl); -<a name="x810"></a> ourUrl = dir.<a href="ntqdir.html#absPath">absPath</a>(); + <a href="tqdir.html">TQDir</a> dir(ourUrl); +<a name="x810"></a> ourUrl = dir.<a href="tqdir.html#absPath">absPath</a>(); } #endif urls << TQUriDrag::<a href="tquridrag.html#localFileToUri">localFileToUri</a>(ourUrl); @@ -524,22 +524,22 @@ static void cleanup() *****************************************************************************/ <a name="f322"></a>TQtFileIconViewItem::TQtFileIconViewItem( TQtFileIconView *parent, TQFileInfo *fi ) -<a name="x824"></a><a name="x823"></a> : <a href="tqiconviewitem.html">TQIconViewItem</a>( parent, fi-><a href="ntqfileinfo.html#fileName">fileName</a>() ), itemFileName( fi-><a href="ntqfileinfo.html#filePath">filePath</a>() ), +<a name="x824"></a><a name="x823"></a> : <a href="tqiconviewitem.html">TQIconViewItem</a>( parent, fi-><a href="tqfileinfo.html#fileName">fileName</a>() ), itemFileName( fi-><a href="tqfileinfo.html#filePath">filePath</a>() ), itemFileInfo( fi ), checkSetText( FALSE ) { vm = TQtFileIconView::Large; -<a name="x825"></a> if ( itemFileInfo-><a href="ntqfileinfo.html#isDir">isDir</a>() ) +<a name="x825"></a> if ( itemFileInfo-><a href="tqfileinfo.html#isDir">isDir</a>() ) itemType = Dir; -<a name="x826"></a> else if ( itemFileInfo-><a href="ntqfileinfo.html#isFile">isFile</a>() ) +<a name="x826"></a> else if ( itemFileInfo-><a href="tqfileinfo.html#isFile">isFile</a>() ) itemType = File; -<a name="x827"></a> if ( itemFileInfo-><a href="ntqfileinfo.html#isSymLink">isSymLink</a>() ) +<a name="x827"></a> if ( itemFileInfo-><a href="tqfileinfo.html#isSymLink">isSymLink</a>() ) itemType = Link; viewModeChanged( ( (TQtFileIconView*)<a href="tqiconviewitem.html#iconView">iconView</a>() )->viewMode() ); - if ( itemFileInfo-><a href="ntqfileinfo.html#fileName">fileName</a>() == "." || - itemFileInfo-><a href="ntqfileinfo.html#fileName">fileName</a>() == ".." ) + if ( itemFileInfo-><a href="tqfileinfo.html#fileName">fileName</a>() == "." || + itemFileInfo-><a href="tqfileinfo.html#fileName">fileName</a>() == ".." ) <a href="tqiconviewitem.html#setRenameEnabled">setRenameEnabled</a>( FALSE ); checkSetText = TRUE; @@ -550,7 +550,7 @@ static void cleanup() <a name="x842"></a>void TQtFileIconViewItem::<a href="tqiconviewitem.html#paintItem">paintItem</a>( <a href="ntqpainter.html">TQPainter</a> *p, const <a href="qcolorgroup.html">TQColorGroup</a> &cg ) { - if ( itemFileInfo-><a href="ntqfileinfo.html#isSymLink">isSymLink</a>() ) { + if ( itemFileInfo-><a href="tqfileinfo.html#isSymLink">isSymLink</a>() ) { <a name="x861"></a> <a href="ntqfont.html">TQFont</a> f( p-><a href="ntqpainter.html#font">font</a>() ); <a name="x828"></a> f.<a href="ntqfont.html#setItalic">setItalic</a>( TRUE ); p-><a href="ntqpainter.html#setFont">setFont</a>( f ); @@ -610,11 +610,11 @@ TQtFileIconViewItem::~TQtFileIconViewItem() if ( checkSetText ) { if ( text == "." || text == "." || text.<a href="tqstring.html#isEmpty">isEmpty</a>() ) return; -<a name="x821"></a> <a href="ntqdir.html">TQDir</a> dir( itemFileInfo-><a href="ntqfileinfo.html#dir">dir</a>() ); -<a name="x814"></a> if ( dir.<a href="ntqdir.html#rename">rename</a>( itemFileInfo-><a href="ntqfileinfo.html#fileName">fileName</a>(), text ) ) { -<a name="x822"></a> itemFileName = itemFileInfo-><a href="ntqfileinfo.html#dirPath">dirPath</a>( TRUE ) + "/" + text; +<a name="x821"></a> <a href="tqdir.html">TQDir</a> dir( itemFileInfo-><a href="tqfileinfo.html#dir">dir</a>() ); +<a name="x814"></a> if ( dir.<a href="tqdir.html#rename">rename</a>( itemFileInfo-><a href="tqfileinfo.html#fileName">fileName</a>(), text ) ) { +<a name="x822"></a> itemFileName = itemFileInfo-><a href="tqfileinfo.html#dirPath">dirPath</a>( TRUE ) + "/" + text; delete itemFileInfo; - itemFileInfo = new <a href="ntqfileinfo.html">TQFileInfo</a>( itemFileName ); + itemFileInfo = new <a href="tqfileinfo.html">TQFileInfo</a>( itemFileName ); TQIconViewItem::<a href="tqiconviewitem.html#setText">setText</a>( text ); } } else { @@ -752,7 +752,7 @@ void <a name="f304"></a>TQtFileIconView::setDirectory( const <a href="tqstring.h readDir( viewDir ); } -void TQtFileIconView::setDirectory( const <a href="ntqdir.html">TQDir</a> &dir ) +void TQtFileIconView::setDirectory( const <a href="tqdir.html">TQDir</a> &dir ) { viewDir = dir; readDir( viewDir ); @@ -763,9 +763,9 @@ void <a name="f305"></a>TQtFileIconView::newDirectory() <a href="tqiconview.html#setAutoArrange">setAutoArrange</a>( FALSE ); <a href="tqiconview.html#selectAll">selectAll</a>( FALSE ); if ( viewDir.mkdir( TQString( "New Folder %1" ).arg( ++newFolderNum ) ) ) { - <a href="ntqfileinfo.html">TQFileInfo</a> *fi = new <a href="ntqfileinfo.html">TQFileInfo</a>( viewDir, TQString( "New Folder %1" ).arg( newFolderNum ) ); - TQtFileIconViewItem *item = new TQtFileIconViewItem( this, new <a href="ntqfileinfo.html">TQFileInfo</a>( *fi ) ); -<a name="x847"></a> item-><a href="tqiconviewitem.html#setKey">setKey</a>( TQString( "000000%1" ).arg( fi-><a href="ntqfileinfo.html#fileName">fileName</a>() ) ); + <a href="tqfileinfo.html">TQFileInfo</a> *fi = new <a href="tqfileinfo.html">TQFileInfo</a>( viewDir, TQString( "New Folder %1" ).arg( newFolderNum ) ); + TQtFileIconViewItem *item = new TQtFileIconViewItem( this, new <a href="tqfileinfo.html">TQFileInfo</a>( *fi ) ); +<a name="x847"></a> item-><a href="tqiconviewitem.html#setKey">setKey</a>( TQString( "000000%1" ).arg( fi-><a href="tqfileinfo.html#fileName">fileName</a>() ) ); delete fi; <a href="ntqscrollview.html#repaintContents">repaintContents</a>( <a href="ntqscrollview.html#contentsX">contentsX</a>(), contentsY(), contentsWidth(), contentsHeight(), FALSE ); <a href="tqiconview.html#ensureItemVisible">ensureItemVisible</a>( item ); @@ -805,39 +805,39 @@ static bool isRoot( const <a href="tqstring.html">TQString</a> &s ) return FALSE; } -void <a name="f307"></a>TQtFileIconView::readDir( const <a href="ntqdir.html">TQDir</a> &dir ) +void <a name="f307"></a>TQtFileIconView::readDir( const <a href="tqdir.html">TQDir</a> &dir ) { -<a name="x813"></a> if ( !dir.<a href="ntqdir.html#isReadable">isReadable</a>() ) +<a name="x813"></a> if ( !dir.<a href="tqdir.html#isReadable">isReadable</a>() ) return; - if ( isRoot( dir.<a href="ntqdir.html#absPath">absPath</a>() ) ) + if ( isRoot( dir.<a href="tqdir.html#absPath">absPath</a>() ) ) emit disableUp(); else emit enableUp(); <a href="tqiconview.html#clear">clear</a>(); - emit directoryChanged( dir.<a href="ntqdir.html#absPath">absPath</a>() ); + emit directoryChanged( dir.<a href="tqdir.html#absPath">absPath</a>() ); -<a name="x812"></a> const TQFileInfoList *filist = dir.<a href="ntqdir.html#entryInfoList">entryInfoList</a>( TQDir::DefaultFilter, TQDir::DirsFirst | TQDir::Name ); +<a name="x812"></a> const TQFileInfoList *filist = dir.<a href="tqdir.html#entryInfoList">entryInfoList</a>( TQDir::DefaultFilter, TQDir::DirsFirst | TQDir::Name ); emit startReadDir( filist->count() ); TQFileInfoListIterator it( *filist ); - <a href="ntqfileinfo.html">TQFileInfo</a> *fi; + <a href="tqfileinfo.html">TQFileInfo</a> *fi; bool allowRename = FALSE, allowRenameSet = FALSE; while ( ( fi = it.current() ) != 0 ) { ++it; - if ( fi && fi-><a href="ntqfileinfo.html#fileName">fileName</a>() == ".." && ( fi-><a href="ntqfileinfo.html#dirPath">dirPath</a>() == "/" || fi-><a href="ntqfileinfo.html#dirPath">dirPath</a>().isEmpty() ) ) + if ( fi && fi-><a href="tqfileinfo.html#fileName">fileName</a>() == ".." && ( fi-><a href="tqfileinfo.html#dirPath">dirPath</a>() == "/" || fi-><a href="tqfileinfo.html#dirPath">dirPath</a>().isEmpty() ) ) continue; emit readNextDir(); - TQtFileIconViewItem *item = new TQtFileIconViewItem( this, new <a href="ntqfileinfo.html">TQFileInfo</a>( *fi ) ); - if ( fi-><a href="ntqfileinfo.html#isDir">isDir</a>() ) - item-><a href="tqiconviewitem.html#setKey">setKey</a>( TQString( "000000%1" ).arg( fi-><a href="ntqfileinfo.html#fileName">fileName</a>() ) ); + TQtFileIconViewItem *item = new TQtFileIconViewItem( this, new <a href="tqfileinfo.html">TQFileInfo</a>( *fi ) ); + if ( fi-><a href="tqfileinfo.html#isDir">isDir</a>() ) + item-><a href="tqiconviewitem.html#setKey">setKey</a>( TQString( "000000%1" ).arg( fi-><a href="tqfileinfo.html#fileName">fileName</a>() ) ); else - item-><a href="tqiconviewitem.html#setKey">setKey</a>( fi-><a href="ntqfileinfo.html#fileName">fileName</a>() ); + item-><a href="tqiconviewitem.html#setKey">setKey</a>( fi-><a href="tqfileinfo.html#fileName">fileName</a>() ); if ( !allowRenameSet ) { -<a name="x820"></a> if ( !TQFileInfo( fi-><a href="ntqfileinfo.html#absFilePath">absFilePath</a>() ).isWritable() || +<a name="x820"></a> if ( !TQFileInfo( fi-><a href="tqfileinfo.html#absFilePath">absFilePath</a>() ).isWritable() || <a name="x851"></a> item-><a href="tqiconviewitem.html#text">text</a>() == "." || item-><a href="tqiconviewitem.html#text">text</a>() == ".." ) allowRename = FALSE; else @@ -850,7 +850,7 @@ void <a name="f307"></a>TQtFileIconView::readDir( const <a href="ntqdir.html">TQ <a name="x848"></a> item-><a href="tqiconviewitem.html#setRenameEnabled">setRenameEnabled</a>( allowRename ); } - if ( !TQFileInfo( dir.<a href="ntqdir.html#absPath">absPath</a>() ).isWritable() ) + if ( !TQFileInfo( dir.<a href="tqdir.html#absPath">absPath</a>() ).isWritable() ) emit disableMkdir(); else emit enableMkdir(); @@ -927,7 +927,7 @@ void <a name="f309"></a>TQtFileIconView::slotDropped( <a href="tqdropevent.html" else str = "Move\n\n"; for ( uint i = 0; i < lst.<a href="tqvaluelist.html#count">count</a>(); ++i ) -<a name="x811"></a> str += TQString( " %1\n" ).arg( TQDir::<a href="ntqdir.html#convertSeparators">convertSeparators</a>(lst[i]) ); +<a name="x811"></a> str += TQString( " %1\n" ).arg( TQDir::<a href="tqdir.html#convertSeparators">convertSeparators</a>(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 <<a href="qsplitter-h.html">ntqsplitter.h</a>> @@ -1142,8 +1142,8 @@ protected slots: #include <<a href="qcombobox-h.html">ntqcombobox.h</a>> #include <<a href="qpixmap-h.html">ntqpixmap.h</a>> #include <<a href="tqtoolbutton-h.html">tqtoolbutton.h</a>> -#include <<a href="qdir-h.html">ntqdir.h</a>> -#include <<a href="qfileinfo-h.html">ntqfileinfo.h</a>> +#include <<a href="tqdir-h.html">tqdir.h</a>> +#include <<a href="tqfileinfo-h.html">tqfileinfo.h</a>> static const char* cdtoparent_xpm[]={ "15 13 3 1", @@ -1312,8 +1312,8 @@ void <a name="f330"></a>FileMainWindow::slotReadDirDone() void <a name="f331"></a>FileMainWindow::cdUp() { - <a href="ntqdir.html">TQDir</a> dir = fileview->currentDir(); -<a name="x883"></a> dir.<a href="ntqdir.html#cd">cd</a>( ".." ); + <a href="tqdir.html">TQDir</a> dir = fileview->currentDir(); +<a name="x883"></a> dir.<a href="tqdir.html#cd">cd</a>( ".." ); fileview->setDirectory( dir ); } @@ -1364,7 +1364,7 @@ void <a name="f337"></a>FileMainWindow::disableMkdir() *****************************************************************************/ #include "mainwindow.h" -#include "qfileiconview.h" +#include "tqfileiconview.h" #include <<a href="qapplication-h.html">ntqapplication.h</a>> |