diff options
Diffstat (limited to 'doc/html/fileiconview-example.html')
-rw-r--r-- | doc/html/fileiconview-example.html | 88 |
1 files changed, 44 insertions, 44 deletions
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 <<a href="qiconset-h.html">ntqiconset.h</a>> -#include <<a href="qstring-h.html">ntqstring.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="qtimer-h.html">ntqtimer.h</a>> @@ -81,10 +81,10 @@ public: const char* format( int i ) const; <a href="qbytearray.html">TQByteArray</a> encodedData( const char* mime ) const; static bool canDecode( <a href="qmimesource.html">TQMimeSource</a>* e ); - void append( const <a href="qicondragitem.html">TQIconDragItem</a> &item, const <a href="ntqrect.html">TQRect</a> &pr, const <a href="ntqrect.html">TQRect</a> &tr, const <a href="ntqstring.html">TQString</a> &url ); + void append( const <a href="qicondragitem.html">TQIconDragItem</a> &item, const <a href="ntqrect.html">TQRect</a> &pr, const <a href="ntqrect.html">TQRect</a> &tr, const <a href="tqstring.html">TQString</a> &url ); private: - <a href="ntqstringlist.html">TQStringList</a> urls; + <a href="tqstringlist.html">TQStringList</a> urls; }; @@ -99,7 +99,7 @@ class TQtFileIconView : public <a href="ntqiconview.html">TQIconView</a> TQ_OBJECT public: - TQtFileIconView( const <a href="ntqstring.html">TQString</a> &dir, TQWidget *parent = 0, const char *name = 0 ); + TQtFileIconView( const <a href="tqstring.html">TQString</a> &dir, TQWidget *parent = 0, const char *name = 0 ); enum ViewMode { Large, Small }; @@ -110,13 +110,13 @@ public: } public slots: - void setDirectory( const <a href="ntqstring.html">TQString</a> &dir ); + void setDirectory( const <a href="tqstring.html">TQString</a> &dir ); void setDirectory( const <a href="ntqdir.html">TQDir</a> &dir ); void newDirectory(); <a href="ntqdir.html">TQDir</a> currentDir(); signals: - void directoryChanged( const <a href="ntqstring.html">TQString</a> & ); + void directoryChanged( const <a href="tqstring.html">TQString</a> & ); void startReadDir( int dirs ); void readNextDir(); void readDirDone(); @@ -184,11 +184,11 @@ public: ItemType type() const { return itemType; } - <a href="ntqstring.html">TQString</a> filename() const { return itemFileName; } + <a href="tqstring.html">TQString</a> filename() const { return itemFileName; } virtual bool acceptDrop( const <a href="qmimesource.html">TQMimeSource</a> *e ) const; - virtual void setText( const <a href="ntqstring.html">TQString</a> &text ); + virtual void setText( const <a href="tqstring.html">TQString</a> &text ); virtual TQPixmap *pixmap() const; virtual void dragEntered(); @@ -200,7 +200,7 @@ public: protected: virtual void dropped( <a href="qdropevent.html">TQDropEvent</a> *e, const <a href="tqvaluelist.html">TQValueList</a><TQIconDragItem> & ); - <a href="ntqstring.html">TQString</a> itemFileName; + <a href="tqstring.html">TQString</a> itemFileName; <a href="ntqfileinfo.html">TQFileInfo</a> *itemFileInfo; ItemType itemType; bool checkSetText; @@ -227,10 +227,10 @@ protected: #include "qfileiconview.h" #include <<a href="qpainter-h.html">ntqpainter.h</a>> -#include <<a href="qstringlist-h.html">ntqstringlist.h</a>> +#include <<a href="tqstringlist-h.html">tqstringlist.h</a>> #include <<a href="qpixmap-h.html">ntqpixmap.h</a>> #include <<a href="qmime-h.html">ntqmime.h</a>> -#include <<a href="qstrlist-h.html">ntqstrlist.h</a>> +#include <<a href="tqstrlist-h.html">tqstrlist.h</a>> #include <<a href="qdragobject-h.html">ntqdragobject.h</a>> #include <<a href="qmessagebox-h.html">ntqmessagebox.h</a>> #include <<a href="qevent-h.html">ntqevent.h</a>> @@ -490,9 +490,9 @@ static void cleanup() if ( TQString( mime ) == "application/x-qiconlist" ) { a = TQIconDrag::<a href="qicondrag.html#encodedData">encodedData</a>( mime ); } else if ( TQString( mime ) == "text/uri-list" ) { - <a href="ntqstring.html">TQString</a> s = urls.join( "\r\n" ); -<a name="x870"></a><a name="x856"></a> a.<a href="ntqmemarray.html#resize">resize</a>( s.<a href="ntqstring.html#length">length</a>() ); -<a name="x869"></a><a name="x855"></a> memcpy( a.<a href="ntqmemarray.html#data">data</a>(), s.<a href="ntqstring.html#latin1">latin1</a>(), s.<a href="ntqstring.html#length">length</a>() ); + <a href="tqstring.html">TQString</a> s = urls.join( "\r\n" ); +<a name="x870"></a><a name="x856"></a> a.<a href="ntqmemarray.html#resize">resize</a>( s.<a href="tqstring.html#length">length</a>() ); +<a name="x869"></a><a name="x855"></a> memcpy( a.<a href="ntqmemarray.html#data">data</a>(), s.<a href="tqstring.html#latin1">latin1</a>(), s.<a href="tqstring.html#length">length</a>() ); } return a; } @@ -504,12 +504,12 @@ static void cleanup() } <a name="x829"></a>void TQtFileIconDrag::<a href="qicondrag.html#append">append</a>( const <a href="qicondragitem.html">TQIconDragItem</a> &item, const <a href="ntqrect.html">TQRect</a> &pr, - const <a href="ntqrect.html">TQRect</a> &tr, const <a href="ntqstring.html">TQString</a> &url ) + const <a href="ntqrect.html">TQRect</a> &tr, const <a href="tqstring.html">TQString</a> &url ) { TQIconDrag::<a href="qicondrag.html#append">append</a>( item, pr, tr ); - <a href="ntqstring.html">TQString</a> ourUrl = url; + <a href="tqstring.html">TQString</a> ourUrl = url; #ifdef TQ_WS_WIN - if (ourUrl.<a href="ntqstring.html#length">length</a>() > 2 && ourUrl[1] != ':') { + 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>(); } @@ -605,10 +605,10 @@ TQtFileIconViewItem::~TQtFileIconViewItem() delete itemFileInfo; } -<a name="x850"></a>void TQtFileIconViewItem::<a href="qiconviewitem.html#setText">setText</a>( const <a href="ntqstring.html">TQString</a> &text ) +<a name="x850"></a>void TQtFileIconViewItem::<a href="qiconviewitem.html#setText">setText</a>( const <a href="tqstring.html">TQString</a> &text ) { if ( checkSetText ) { - if ( text == "." || text == "." || text.<a href="ntqstring.html#isEmpty">isEmpty</a>() ) + 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 ) ) { @@ -640,10 +640,10 @@ TQtFileIconViewItem::~TQtFileIconViewItem() return; } - <a href="ntqstringlist.html">TQStringList</a> lst; + <a href="tqstringlist.html">TQStringList</a> lst; <a name="x873"></a> TQUriDrag::<a href="quridrag.html#decodeLocalFiles">decodeLocalFiles</a>( e, lst ); - <a href="ntqstring.html">TQString</a> str; + <a href="tqstring.html">TQString</a> str; <a name="x817"></a> if ( e-><a href="qdropevent.html#action">action</a>() == TQDropEvent::Copy ) str = "Copy\n\n"; else @@ -685,7 +685,7 @@ TQtFileIconViewItem::~TQtFileIconViewItem() * *****************************************************************************/ -<a name="f302"></a>TQtFileIconView::TQtFileIconView( const <a href="ntqstring.html">TQString</a> &dir, TQWidget *parent, const char *name ) +<a name="f302"></a>TQtFileIconView::TQtFileIconView( const <a href="tqstring.html">TQString</a> &dir, TQWidget *parent, const char *name ) : <a href="ntqiconview.html">TQIconView</a>( parent, name ), viewDir( dir ), newFolderNum( 0 ) { if ( !iconFolderLockedLarge ) { @@ -746,7 +746,7 @@ void <a name="f303"></a>TQtFileIconView::openFolder() setDirectory( openItem->itemFileName ); } -void <a name="f304"></a>TQtFileIconView::setDirectory( const <a href="ntqstring.html">TQString</a> &dir ) +void <a name="f304"></a>TQtFileIconView::setDirectory( const <a href="tqstring.html">TQString</a> &dir ) { viewDir = TQDir( dir ); readDir( viewDir ); @@ -783,21 +783,21 @@ TQDir <a name="f306"></a>TQtFileIconView::currentDir() return viewDir; } -static bool isRoot( const <a href="ntqstring.html">TQString</a> &s ) +static bool isRoot( const <a href="tqstring.html">TQString</a> &s ) { #if defined(Q_OS_UNIX) if ( s == "/" ) return TRUE; #elif defined(Q_OS_WIN32) - <a href="ntqstring.html">TQString</a> p = s; - if ( p.<a href="ntqstring.html#length">length</a>() == 3 && -<a name="x871"></a> p.<a href="ntqstring.html#right">right</a>( 2 ) == ":/" ) + <a href="tqstring.html">TQString</a> p = s; + if ( p.<a href="tqstring.html#length">length</a>() == 3 && +<a name="x871"></a> p.<a href="tqstring.html#right">right</a>( 2 ) == ":/" ) return TRUE; if ( p[ 0 ] == '/' && p[ 1 ] == '/' ) { -<a name="x867"></a> int slashes = p.<a href="ntqstring.html#contains">contains</a>( '/' ); +<a name="x867"></a> int slashes = p.<a href="tqstring.html#contains">contains</a>( '/' ); if ( slashes <= 3 ) return TRUE; - if ( slashes == 4 && p[ (int)p.<a href="ntqstring.html#length">length</a>() - 1 ] == '/' ) + if ( slashes == 4 && p[ (int)p.<a href="tqstring.html#length">length</a>() - 1 ] == '/' ) return TRUE; } #endif @@ -918,10 +918,10 @@ void <a name="f309"></a>TQtFileIconView::slotDropped( <a href="qdropevent.html"> return; } - <a href="ntqstringlist.html">TQStringList</a> lst; + <a href="tqstringlist.html">TQStringList</a> lst; TQUriDrag::<a href="quridrag.html#decodeLocalFiles">decodeLocalFiles</a>( e, lst ); - <a href="ntqstring.html">TQString</a> str; + <a href="tqstring.html">TQString</a> str; if ( e-><a href="qdropevent.html#action">action</a>() == TQDropEvent::Copy ) str = "Copy\n\n"; else @@ -934,7 +934,7 @@ void <a name="f309"></a>TQtFileIconView::slotDropped( <a href="qdropevent.html"> TQMessageBox::<a href="ntqmessagebox.html#information">information</a>( this, e-><a href="qdropevent.html#action">action</a>() == TQDropEvent::Copy ? "Copy" : "Move" , str, "Not Implemented" ); if ( e-><a href="qdropevent.html#action">action</a>() == TQDropEvent::Move ) -<a name="x872"></a> TQMessageBox::<a href="ntqmessagebox.html#information">information</a>( this, "Remove" , TQDir::convertSeparators(lst.<a href="ntqstringlist.html#join">join</a>("\n")), "Not Implemented" ); +<a name="x872"></a> TQMessageBox::<a href="ntqmessagebox.html#information">information</a>( this, "Remove" , TQDir::convertSeparators(lst.<a href="tqstringlist.html#join">join</a>("\n")), "Not Implemented" ); e-><a href="qdropevent.html#acceptAction">acceptAction</a>(); openItem = 0; } @@ -1101,13 +1101,13 @@ protected: <a href="ntqtoolbutton.html">TQToolButton</a> *upButton, *mkdirButton; protected slots: - void directoryChanged( const <a href="ntqstring.html">TQString</a> & ); + void directoryChanged( const <a href="tqstring.html">TQString</a> & ); void slotStartReadDir( int dirs ); void slotReadNextDir(); void slotReadDirDone(); void cdUp(); void newFolder(); - void changePath( const <a href="ntqstring.html">TQString</a> &path ); + void changePath( const <a href="tqstring.html">TQString</a> &path ); void enableUp(); void disableUp(); void enableMkdir(); @@ -1220,25 +1220,25 @@ void <a name="f325"></a>FileMainWindow::setup() pathCombo = new <a href="ntqcombobox.html">TQComboBox</a>( TRUE, toolbar ); <a name="x880"></a> pathCombo-><a href="ntqcombobox.html#setAutoCompletion">setAutoCompletion</a>( TRUE ); <a name="x896"></a> toolbar-><a href="ntqtoolbar.html#setStretchableWidget">setStretchableWidget</a>( pathCombo ); -<a name="x877"></a> <a href="tqobject.html#connect">connect</a>( pathCombo, TQ_SIGNAL( <a href="ntqcombobox.html#activated">activated</a>( const <a href="ntqstring.html">TQString</a> & ) ), - this, TQ_SLOT ( changePath( const <a href="ntqstring.html">TQString</a> & ) ) ); +<a name="x877"></a> <a href="tqobject.html#connect">connect</a>( pathCombo, TQ_SIGNAL( <a href="ntqcombobox.html#activated">activated</a>( const <a href="tqstring.html">TQString</a> & ) ), + this, TQ_SLOT ( changePath( const <a href="tqstring.html">TQString</a> & ) ) ); <a name="x895"></a> toolbar-><a href="ntqtoolbar.html#addSeparator">addSeparator</a>(); <a href="ntqpixmap.html">TQPixmap</a> pix; pix = TQPixmap( cdtoparent_xpm ); - upButton = new <a href="ntqtoolbutton.html">TQToolButton</a>( pix, "One directory up", <a href="ntqstring.html#TQString-null">TQString::null</a>, + upButton = new <a href="ntqtoolbutton.html">TQToolButton</a>( pix, "One directory up", <a href="tqstring.html#TQString-null">TQString::null</a>, this, TQ_SLOT( cdUp() ), toolbar, "cd up" ); pix = TQPixmap( newfolder_xpm ); mkdirButton = new <a href="ntqtoolbutton.html">TQToolButton</a>( pix, "New Folder", TQString::null, this, TQ_SLOT( newFolder() ), toolbar, "new folder" ); - <a href="tqobject.html#connect">connect</a>( dirlist, TQ_SIGNAL( folderSelected( const <a href="ntqstring.html">TQString</a> & ) ), - fileview, TQ_SLOT ( setDirectory( const <a href="ntqstring.html">TQString</a> & ) ) ); - <a href="tqobject.html#connect">connect</a>( fileview, TQ_SIGNAL( directoryChanged( const <a href="ntqstring.html">TQString</a> & ) ), - this, TQ_SLOT( directoryChanged( const <a href="ntqstring.html">TQString</a> & ) ) ); + <a href="tqobject.html#connect">connect</a>( dirlist, TQ_SIGNAL( folderSelected( const <a href="tqstring.html">TQString</a> & ) ), + fileview, TQ_SLOT ( setDirectory( const <a href="tqstring.html">TQString</a> & ) ) ); + <a href="tqobject.html#connect">connect</a>( fileview, TQ_SIGNAL( directoryChanged( const <a href="tqstring.html">TQString</a> & ) ), + this, TQ_SLOT( directoryChanged( const <a href="tqstring.html">TQString</a> & ) ) ); <a href="tqobject.html#connect">connect</a>( fileview, TQ_SIGNAL( startReadDir( int ) ), this, TQ_SLOT( slotStartReadDir( int ) ) ); <a href="tqobject.html#connect">connect</a>( fileview, TQ_SIGNAL( readNextDir() ), @@ -1266,7 +1266,7 @@ void <a name="f325"></a>FileMainWindow::setup() void <a name="f326"></a>FileMainWindow::setPathCombo() { - <a href="ntqstring.html">TQString</a> dir = <a href="tqwidget.html#caption">caption</a>(); + <a href="tqstring.html">TQString</a> dir = <a href="tqwidget.html#caption">caption</a>(); int i = 0; bool found = FALSE; <a name="x878"></a> for ( i = 0; i < pathCombo-><a href="ntqcombobox.html#count">count</a>(); ++i ) { @@ -1285,7 +1285,7 @@ void <a name="f326"></a>FileMainWindow::setPathCombo() } -void <a name="f327"></a>FileMainWindow::directoryChanged( const <a href="ntqstring.html">TQString</a> &dir ) +void <a name="f327"></a>FileMainWindow::directoryChanged( const <a href="tqstring.html">TQString</a> &dir ) { <a href="tqwidget.html#setCaption">setCaption</a>( dir ); setPathCombo(); @@ -1322,7 +1322,7 @@ void <a name="f332"></a>FileMainWindow::newFolder() fileview->newDirectory(); } -void <a name="f333"></a>FileMainWindow::changePath( const <a href="ntqstring.html">TQString</a> &path ) +void <a name="f333"></a>FileMainWindow::changePath( const <a href="tqstring.html">TQString</a> &path ) { if ( TQFileInfo( path ).exists() ) fileview->setDirectory( path ); |