summaryrefslogtreecommitdiffstats
path: root/doc/html/dirview-example.html
diff options
context:
space:
mode:
Diffstat (limited to 'doc/html/dirview-example.html')
-rw-r--r--doc/html/dirview-example.html260
1 files changed, 130 insertions, 130 deletions
diff --git a/doc/html/dirview-example.html b/doc/html/dirview-example.html
index bfed86e6b..c0a9e7f6d 100644
--- a/doc/html/dirview-example.html
+++ b/doc/html/dirview-example.html
@@ -52,11 +52,11 @@ Drag&Drop in a listview.
#ifndef DIRVIEW_H
#define DIRVIEW_H
-#include &lt;<a href="qlistview-h.html">qlistview.h</a>&gt;
-#include &lt;<a href="qstring-h.html">qstring.h</a>&gt;
-#include &lt;<a href="qfile-h.html">qfile.h</a>&gt;
-#include &lt;<a href="qfileinfo-h.html">qfileinfo.h</a>&gt;
-#include &lt;<a href="qtimer-h.html">qtimer.h</a>&gt;
+#include &lt;<a href="qlistview-h.html">ntqlistview.h</a>&gt;
+#include &lt;<a href="qstring-h.html">ntqstring.h</a>&gt;
+#include &lt;<a href="qfile-h.html">ntqfile.h</a>&gt;
+#include &lt;<a href="qfileinfo-h.html">ntqfileinfo.h</a>&gt;
+#include &lt;<a href="qtimer-h.html">ntqtimer.h</a>&gt;
class TQWidget;
class TQDragEnterEvent;
@@ -67,63 +67,63 @@ class TQDropEvent;
class FileItem : public <a href="qlistviewitem.html">TQListViewItem</a>
{
public:
- FileItem( <a href="qlistviewitem.html">TQListViewItem</a> *parent, const <a href="qstring.html">TQString</a> &amp;s1, const <a href="qstring.html">TQString</a> &amp;s2 )
+ FileItem( <a href="qlistviewitem.html">TQListViewItem</a> *parent, const <a href="ntqstring.html">TQString</a> &amp;s1, const <a href="ntqstring.html">TQString</a> &amp;s2 )
: <a href="qlistviewitem.html">TQListViewItem</a>( parent, s1, s2 ), pix( 0 ) {}
- const <a href="qpixmap.html">TQPixmap</a> *pixmap( int i ) const;
+ const <a href="ntqpixmap.html">TQPixmap</a> *pixmap( int i ) const;
#if !defined(Q_NO_USING_KEYWORD)
using TQListViewItem::setPixmap;
#endif
- void setPixmap( <a href="qpixmap.html">TQPixmap</a> *p );
+ void setPixmap( <a href="ntqpixmap.html">TQPixmap</a> *p );
private:
- <a href="qpixmap.html">TQPixmap</a> *pix;
+ <a href="ntqpixmap.html">TQPixmap</a> *pix;
};
class Directory : public <a href="qlistviewitem.html">TQListViewItem</a>
{
public:
- Directory( <a href="qlistview.html">TQListView</a> * parent, const <a href="qstring.html">TQString</a>&amp; filename );
- Directory( Directory * parent, const <a href="qstring.html">TQString</a>&amp; filename, const <a href="qstring.html">TQString</a> &amp;col2 )
+ Directory( <a href="ntqlistview.html">TQListView</a> * parent, const <a href="ntqstring.html">TQString</a>&amp; filename );
+ Directory( Directory * parent, const <a href="ntqstring.html">TQString</a>&amp; filename, const <a href="ntqstring.html">TQString</a> &amp;col2 )
: <a href="qlistviewitem.html">TQListViewItem</a>( parent, filename, col2 ), pix( 0 ) {}
- Directory( Directory * parent, const <a href="qstring.html">TQString</a>&amp; filename );
+ Directory( Directory * parent, const <a href="ntqstring.html">TQString</a>&amp; filename );
- <a href="qstring.html">TQString</a> text( int column ) const;
+ <a href="ntqstring.html">TQString</a> text( int column ) const;
- <a href="qstring.html">TQString</a> fullName();
+ <a href="ntqstring.html">TQString</a> fullName();
void setOpen( bool );
void setup();
- const <a href="qpixmap.html">TQPixmap</a> *pixmap( int i ) const;
+ const <a href="ntqpixmap.html">TQPixmap</a> *pixmap( int i ) const;
#if !defined(Q_NO_USING_KEYWORD)
using TQListViewItem::setPixmap;
#endif
- void setPixmap( <a href="qpixmap.html">TQPixmap</a> *p );
+ void setPixmap( <a href="ntqpixmap.html">TQPixmap</a> *p );
private:
- <a href="qfile.html">TQFile</a> f;
+ <a href="ntqfile.html">TQFile</a> f;
Directory * p;
bool readable;
bool showDirsOnly;
- <a href="qpixmap.html">TQPixmap</a> *pix;
+ <a href="ntqpixmap.html">TQPixmap</a> *pix;
};
-class DirectoryView : public <a href="qlistview.html">TQListView</a>
+class DirectoryView : public <a href="ntqlistview.html">TQListView</a>
{
<a href="metaobjects.html#Q_OBJECT">Q_OBJECT</a>
public:
- DirectoryView( <a href="qwidget.html">TQWidget</a> *parent = 0, const char *name = 0, bool sdo = FALSE );
+ DirectoryView( <a href="ntqwidget.html">TQWidget</a> *parent = 0, const char *name = 0, bool sdo = FALSE );
bool showDirsOnly() { return dirsOnly; }
public slots:
- void setDir( const <a href="qstring.html">TQString</a> &amp; );
+ void setDir( const <a href="ntqstring.html">TQString</a> &amp; );
signals:
- void folderSelected( const <a href="qstring.html">TQString</a> &amp; );
+ void folderSelected( const <a href="ntqstring.html">TQString</a> &amp; );
protected slots:
void slotFolderSelected( <a href="qlistviewitem.html">TQListViewItem</a> * );
@@ -139,12 +139,12 @@ protected:
void contentsMouseReleaseEvent( <a href="qmouseevent.html">TQMouseEvent</a> *e );
private:
- <a href="qstring.html">TQString</a> fullPath(TQListViewItem* item);
+ <a href="ntqstring.html">TQString</a> fullPath(TQListViewItem* item);
bool dirsOnly;
<a href="qlistviewitem.html">TQListViewItem</a> *oldCurrent;
<a href="qlistviewitem.html">TQListViewItem</a> *dropItem;
- <a href="qtimer.html">TQTimer</a>* autoopen_timer;
- <a href="qpoint.html">TQPoint</a> presspos;
+ <a href="ntqtimer.html">TQTimer</a>* autoopen_timer;
+ <a href="ntqpoint.html">TQPoint</a> presspos;
bool mousePressed;
};
@@ -169,19 +169,19 @@ can be used in any other trees.
#include "dirview.h"
-#include &lt;<a href="qdir-h.html">qdir.h</a>&gt;
-#include &lt;<a href="qfile-h.html">qfile.h</a>&gt;
-#include &lt;<a href="qfileinfo-h.html">qfileinfo.h</a>&gt;
-#include &lt;<a href="qpixmap-h.html">qpixmap.h</a>&gt;
-#include &lt;<a href="qevent-h.html">qevent.h</a>&gt;
-#include &lt;<a href="qpoint-h.html">qpoint.h</a>&gt;
-#include &lt;<a href="qmessagebox-h.html">qmessagebox.h</a>&gt;
-#include &lt;<a href="qdragobject-h.html">qdragobject.h</a>&gt;
-#include &lt;<a href="qmime-h.html">qmime.h</a>&gt;
-#include &lt;<a href="qstrlist-h.html">qstrlist.h</a>&gt;
-#include &lt;<a href="qstringlist-h.html">qstringlist.h</a>&gt;
-#include &lt;<a href="qapplication-h.html">qapplication.h</a>&gt;
-#include &lt;<a href="qheader-h.html">qheader.h</a>&gt;
+#include &lt;<a href="qdir-h.html">ntqdir.h</a>&gt;
+#include &lt;<a href="qfile-h.html">ntqfile.h</a>&gt;
+#include &lt;<a href="qfileinfo-h.html">ntqfileinfo.h</a>&gt;
+#include &lt;<a href="qpixmap-h.html">ntqpixmap.h</a>&gt;
+#include &lt;<a href="qevent-h.html">ntqevent.h</a>&gt;
+#include &lt;<a href="qpoint-h.html">ntqpoint.h</a>&gt;
+#include &lt;<a href="qmessagebox-h.html">ntqmessagebox.h</a>&gt;
+#include &lt;<a href="qdragobject-h.html">ntqdragobject.h</a>&gt;
+#include &lt;<a href="qmime-h.html">ntqmime.h</a>&gt;
+#include &lt;<a href="qstrlist-h.html">ntqstrlist.h</a>&gt;
+#include &lt;<a href="qstringlist-h.html">ntqstringlist.h</a>&gt;
+#include &lt;<a href="qapplication-h.html">ntqapplication.h</a>&gt;
+#include &lt;<a href="qheader-h.html">ntqheader.h</a>&gt;
static const char* folder_closed_xpm[]={
"16 16 9 1",
@@ -307,7 +307,7 @@ TQPixmap *fileNormal = 0;
*
*****************************************************************************/
-<a name="f476"></a>Directory::Directory( Directory * parent, const <a href="qstring.html">TQString</a>&amp; filename )
+<a name="f476"></a>Directory::Directory( Directory * parent, const <a href="ntqstring.html">TQString</a>&amp; filename )
: <a href="qlistviewitem.html">TQListViewItem</a>( parent ), f(filename),
showDirsOnly( parent-&gt;showDirsOnly ),
pix( 0 )
@@ -322,7 +322,7 @@ TQPixmap *fileNormal = 0;
}
-Directory::Directory( <a href="qlistview.html">TQListView</a> * parent, const <a href="qstring.html">TQString</a>&amp; filename )
+Directory::Directory( <a href="ntqlistview.html">TQListView</a> * parent, const <a href="ntqstring.html">TQString</a>&amp; filename )
: <a href="qlistviewitem.html">TQListViewItem</a>( parent ), f(filename),
showDirsOnly( ( (DirectoryView*)parent )-&gt;showDirsOnly() ),
pix( 0 )
@@ -332,7 +332,7 @@ Directory::Directory( <a href="qlistview.html">TQListView</a> * parent, const <a
}
-<a name="x1691"></a>void Directory::<a href="qlistviewitem.html#setPixmap">setPixmap</a>( <a href="qpixmap.html">TQPixmap</a> *px )
+<a name="x1691"></a>void Directory::<a href="qlistviewitem.html#setPixmap">setPixmap</a>( <a href="ntqpixmap.html">TQPixmap</a> *px )
{
pix = px;
<a href="qlistviewitem.html#setup">setup</a>();
@@ -357,34 +357,34 @@ Directory::Directory( <a href="qlistview.html">TQListView</a> * parent, const <a
<a href="qlistviewitem.html#setPixmap">setPixmap</a>( folderClosed );
if ( o &amp;&amp; !childCount() ) {
- <a href="qstring.html">TQString</a> s( fullName() );
- <a href="qdir.html">TQDir</a> thisDir( s );
-<a name="x1667"></a> if ( !thisDir.<a href="qdir.html#isReadable">isReadable</a>() ) {
+ <a href="ntqstring.html">TQString</a> s( fullName() );
+ <a href="ntqdir.html">TQDir</a> thisDir( s );
+<a name="x1667"></a> if ( !thisDir.<a href="ntqdir.html#isReadable">isReadable</a>() ) {
readable = FALSE;
<a href="qlistviewitem.html#setExpandable">setExpandable</a>( FALSE );
return;
}
<a href="qlistviewitem.html#listView">listView</a>()-&gt;setUpdatesEnabled( FALSE );
-<a name="x1666"></a> const TQFileInfoList * files = thisDir.<a href="qdir.html#entryInfoList">entryInfoList</a>();
+<a name="x1666"></a> const TQFileInfoList * files = thisDir.<a href="ntqdir.html#entryInfoList">entryInfoList</a>();
if ( files ) {
TQFileInfoListIterator it( *files );
- <a href="qfileinfo.html">TQFileInfo</a> * fi;
+ <a href="ntqfileinfo.html">TQFileInfo</a> * fi;
<a name="x1694"></a> while( (fi=it.<a href="qlistviewitemiterator.html#current">current</a>()) != 0 ) {
++it;
-<a name="x1675"></a> if ( fi-&gt;<a href="qfileinfo.html#fileName">fileName</a>() == "." || fi-&gt;<a href="qfileinfo.html#fileName">fileName</a>() == ".." )
+<a name="x1675"></a> if ( fi-&gt;<a href="ntqfileinfo.html#fileName">fileName</a>() == "." || fi-&gt;<a href="ntqfileinfo.html#fileName">fileName</a>() == ".." )
; // nothing
-<a name="x1678"></a> else if ( fi-&gt;<a href="qfileinfo.html#isSymLink">isSymLink</a>() &amp;&amp; !showDirsOnly ) {
- FileItem *item = new FileItem( this, fi-&gt;<a href="qfileinfo.html#fileName">fileName</a>(),
+<a name="x1678"></a> else if ( fi-&gt;<a href="ntqfileinfo.html#isSymLink">isSymLink</a>() &amp;&amp; !showDirsOnly ) {
+ FileItem *item = new FileItem( this, fi-&gt;<a href="ntqfileinfo.html#fileName">fileName</a>(),
"Symbolic Link" );
item-&gt;<a href="qlistviewitem.html#setPixmap">setPixmap</a>( fileNormal );
}
-<a name="x1676"></a> else if ( fi-&gt;<a href="qfileinfo.html#isDir">isDir</a>() )
- (void)new Directory( this, fi-&gt;<a href="qfileinfo.html#fileName">fileName</a>() );
+<a name="x1676"></a> else if ( fi-&gt;<a href="ntqfileinfo.html#isDir">isDir</a>() )
+ (void)new Directory( this, fi-&gt;<a href="ntqfileinfo.html#fileName">fileName</a>() );
else if ( !showDirsOnly ) {
FileItem *item
- = new FileItem( this, fi-&gt;<a href="qfileinfo.html#fileName">fileName</a>(),
-<a name="x1677"></a> fi-&gt;<a href="qfileinfo.html#isFile">isFile</a>()?"File":"Special" );
+ = new FileItem( this, fi-&gt;<a href="ntqfileinfo.html#fileName">fileName</a>(),
+<a name="x1677"></a> fi-&gt;<a href="ntqfileinfo.html#isFile">isFile</a>()?"File":"Special" );
item-&gt;<a href="qlistviewitem.html#setPixmap">setPixmap</a>( fileNormal );
}
}
@@ -404,11 +404,11 @@ Directory::Directory( <a href="qlistview.html">TQListView</a> * parent, const <a
TQString <a name="f477"></a>Directory::fullName()
{
- <a href="qstring.html">TQString</a> s;
+ <a href="ntqstring.html">TQString</a> s;
if ( p ) {
s = p-&gt;fullName();
-<a name="x1701"></a> s.<a href="qstring.html#append">append</a>( f.name() );
- s.<a href="qstring.html#append">append</a>( "/" );
+<a name="x1701"></a> s.<a href="ntqstring.html#append">append</a>( f.name() );
+ s.<a href="ntqstring.html#append">append</a>( "/" );
} else {
s = f.name();
}
@@ -432,27 +432,27 @@ TQString <a name="f477"></a>Directory::fullName()
*
*****************************************************************************/
-<a name="f478"></a>DirectoryView::DirectoryView( <a href="qwidget.html">TQWidget</a> *parent, const char *name, bool sdo )
- : <a href="qlistview.html">TQListView</a>( parent, name ), dirsOnly( sdo ), oldCurrent( 0 ),
+<a name="f478"></a>DirectoryView::DirectoryView( <a href="ntqwidget.html">TQWidget</a> *parent, const char *name, bool sdo )
+ : <a href="ntqlistview.html">TQListView</a>( parent, name ), dirsOnly( sdo ), oldCurrent( 0 ),
dropItem( 0 ), mousePressed( FALSE )
{
- autoopen_timer = new <a href="qtimer.html">TQTimer</a>( this );
+ autoopen_timer = new <a href="ntqtimer.html">TQTimer</a>( this );
if ( !folderLocked ) {
- folderLocked = new <a href="qpixmap.html">TQPixmap</a>( folder_locked );
- folderClosed = new <a href="qpixmap.html">TQPixmap</a>( folder_closed_xpm );
- folderOpen = new <a href="qpixmap.html">TQPixmap</a>( folder_open_xpm );
- fileNormal = new <a href="qpixmap.html">TQPixmap</a>( pix_file );
+ folderLocked = new <a href="ntqpixmap.html">TQPixmap</a>( folder_locked );
+ folderClosed = new <a href="ntqpixmap.html">TQPixmap</a>( folder_closed_xpm );
+ folderOpen = new <a href="ntqpixmap.html">TQPixmap</a>( folder_open_xpm );
+ fileNormal = new <a href="ntqpixmap.html">TQPixmap</a>( pix_file );
}
- <a href="qobject.html#connect">connect</a>( this, SIGNAL( <a href="qlistview.html#doubleClicked">doubleClicked</a>( <a href="qlistviewitem.html">TQListViewItem</a> * ) ),
+ <a href="ntqobject.html#connect">connect</a>( this, SIGNAL( <a href="ntqlistview.html#doubleClicked">doubleClicked</a>( <a href="qlistviewitem.html">TQListViewItem</a> * ) ),
this, SLOT( slotFolderSelected( <a href="qlistviewitem.html">TQListViewItem</a> * ) ) );
- <a href="qobject.html#connect">connect</a>( this, SIGNAL( <a href="qlistview.html#returnPressed">returnPressed</a>( <a href="qlistviewitem.html">TQListViewItem</a> * ) ),
+ <a href="ntqobject.html#connect">connect</a>( this, SIGNAL( <a href="ntqlistview.html#returnPressed">returnPressed</a>( <a href="qlistviewitem.html">TQListViewItem</a> * ) ),
this, SLOT( slotFolderSelected( <a href="qlistviewitem.html">TQListViewItem</a> * ) ) );
- <a href="qwidget.html#setAcceptDrops">setAcceptDrops</a>( TRUE );
- <a href="qscrollview.html#viewport">viewport</a>()-&gt;setAcceptDrops( TRUE );
+ <a href="ntqwidget.html#setAcceptDrops">setAcceptDrops</a>( TRUE );
+ <a href="ntqscrollview.html#viewport">viewport</a>()-&gt;setAcceptDrops( TRUE );
-<a name="x1706"></a> <a href="qobject.html#connect">connect</a>( autoopen_timer, SIGNAL( <a href="qtimer.html#timeout">timeout</a>() ),
+<a name="x1706"></a> <a href="ntqobject.html#connect">connect</a>( autoopen_timer, SIGNAL( <a href="ntqtimer.html#timeout">timeout</a>() ),
this, SLOT( openFolder() ) );
}
@@ -467,7 +467,7 @@ void <a name="f479"></a>DirectoryView::slotFolderSelected( <a href="qlistviewite
void <a name="f480"></a>DirectoryView::openFolder()
{
-<a name="x1705"></a> autoopen_timer-&gt;<a href="qtimer.html#stop">stop</a>();
+<a name="x1705"></a> autoopen_timer-&gt;<a href="ntqtimer.html#stop">stop</a>();
if ( dropItem &amp;&amp; !dropItem-&gt;isOpen() ) {
dropItem-&gt;setOpen( TRUE );
dropItem-&gt;repaint();
@@ -477,39 +477,39 @@ void <a name="f480"></a>DirectoryView::openFolder()
static const int autoopenTime = 750;
-<a name="x1679"></a>void DirectoryView::<a href="qscrollview.html#contentsDragEnterEvent">contentsDragEnterEvent</a>( <a href="qdragenterevent.html">TQDragEnterEvent</a> *e )
+<a name="x1679"></a>void DirectoryView::<a href="ntqscrollview.html#contentsDragEnterEvent">contentsDragEnterEvent</a>( <a href="qdragenterevent.html">TQDragEnterEvent</a> *e )
{
if ( !TQUriDrag::canDecode(e) ) {
<a name="x1669"></a> e-&gt;<a href="qdragmoveevent.html#ignore">ignore</a>();
return;
}
- oldCurrent = <a href="qlistview.html#currentItem">currentItem</a>();
+ oldCurrent = <a href="ntqlistview.html#currentItem">currentItem</a>();
-<a name="x1673"></a> <a href="qlistviewitem.html">TQListViewItem</a> *i = <a href="qlistview.html#itemAt">itemAt</a>( <a href="qscrollview.html#contentsToViewport">contentsToViewport</a>(e-&gt;<a href="qdropevent.html#pos">pos</a>()) );
+<a name="x1673"></a> <a href="qlistviewitem.html">TQListViewItem</a> *i = <a href="ntqlistview.html#itemAt">itemAt</a>( <a href="ntqscrollview.html#contentsToViewport">contentsToViewport</a>(e-&gt;<a href="qdropevent.html#pos">pos</a>()) );
if ( i ) {
dropItem = i;
-<a name="x1704"></a> autoopen_timer-&gt;<a href="qtimer.html#start">start</a>( autoopenTime );
+<a name="x1704"></a> autoopen_timer-&gt;<a href="ntqtimer.html#start">start</a>( autoopenTime );
}
}
-<a name="x1681"></a>void DirectoryView::<a href="qscrollview.html#contentsDragMoveEvent">contentsDragMoveEvent</a>( <a href="qdragmoveevent.html">TQDragMoveEvent</a> *e )
+<a name="x1681"></a>void DirectoryView::<a href="ntqscrollview.html#contentsDragMoveEvent">contentsDragMoveEvent</a>( <a href="qdragmoveevent.html">TQDragMoveEvent</a> *e )
{
if ( !TQUriDrag::canDecode(e) ) {
e-&gt;<a href="qdragmoveevent.html#ignore">ignore</a>();
return;
}
- <a href="qpoint.html">TQPoint</a> vp = <a href="qscrollview.html#contentsToViewport">contentsToViewport</a>( ( (TQDragMoveEvent*)e )-&gt;pos() );
- <a href="qlistviewitem.html">TQListViewItem</a> *i = <a href="qlistview.html#itemAt">itemAt</a>( vp );
+ <a href="ntqpoint.html">TQPoint</a> vp = <a href="ntqscrollview.html#contentsToViewport">contentsToViewport</a>( ( (TQDragMoveEvent*)e )-&gt;pos() );
+ <a href="qlistviewitem.html">TQListViewItem</a> *i = <a href="ntqlistview.html#itemAt">itemAt</a>( vp );
if ( i ) {
- <a href="qlistview.html#setSelected">setSelected</a>( i, TRUE );
+ <a href="ntqlistview.html#setSelected">setSelected</a>( i, TRUE );
<a name="x1668"></a> e-&gt;<a href="qdragmoveevent.html#accept">accept</a>();
if ( i != dropItem ) {
- autoopen_timer-&gt;<a href="qtimer.html#stop">stop</a>();
+ autoopen_timer-&gt;<a href="ntqtimer.html#stop">stop</a>();
dropItem = i;
- autoopen_timer-&gt;<a href="qtimer.html#start">start</a>( autoopenTime );
+ autoopen_timer-&gt;<a href="ntqtimer.html#start">start</a>( autoopenTime );
}
<a name="x1672"></a> switch ( e-&gt;<a href="qdropevent.html#action">action</a>() ) {
case TQDropEvent::Copy:
@@ -525,37 +525,37 @@ static const int autoopenTime = 750;
}
} else {
e-&gt;<a href="qdragmoveevent.html#ignore">ignore</a>();
- autoopen_timer-&gt;<a href="qtimer.html#stop">stop</a>();
+ autoopen_timer-&gt;<a href="ntqtimer.html#stop">stop</a>();
dropItem = 0;
}
}
-<a name="x1680"></a>void DirectoryView::<a href="qscrollview.html#contentsDragLeaveEvent">contentsDragLeaveEvent</a>( <a href="qdragleaveevent.html">TQDragLeaveEvent</a> * )
+<a name="x1680"></a>void DirectoryView::<a href="ntqscrollview.html#contentsDragLeaveEvent">contentsDragLeaveEvent</a>( <a href="qdragleaveevent.html">TQDragLeaveEvent</a> * )
{
- autoopen_timer-&gt;<a href="qtimer.html#stop">stop</a>();
+ autoopen_timer-&gt;<a href="ntqtimer.html#stop">stop</a>();
dropItem = 0;
- <a href="qlistview.html#setCurrentItem">setCurrentItem</a>( oldCurrent );
- <a href="qlistview.html#setSelected">setSelected</a>( oldCurrent, TRUE );
+ <a href="ntqlistview.html#setCurrentItem">setCurrentItem</a>( oldCurrent );
+ <a href="ntqlistview.html#setSelected">setSelected</a>( oldCurrent, TRUE );
}
-<a name="x1682"></a>void DirectoryView::<a href="qscrollview.html#contentsDropEvent">contentsDropEvent</a>( <a href="qdropevent.html">TQDropEvent</a> *e )
+<a name="x1682"></a>void DirectoryView::<a href="ntqscrollview.html#contentsDropEvent">contentsDropEvent</a>( <a href="qdropevent.html">TQDropEvent</a> *e )
{
- autoopen_timer-&gt;<a href="qtimer.html#stop">stop</a>();
+ autoopen_timer-&gt;<a href="ntqtimer.html#stop">stop</a>();
if ( !TQUriDrag::canDecode(e) ) {
e-&gt;<a href="qdragmoveevent.html#ignore">ignore</a>();
return;
}
- <a href="qlistviewitem.html">TQListViewItem</a> *item = <a href="qlistview.html#itemAt">itemAt</a>( <a href="qscrollview.html#contentsToViewport">contentsToViewport</a>(e-&gt;<a href="qdropevent.html#pos">pos</a>()) );
+ <a href="qlistviewitem.html">TQListViewItem</a> *item = <a href="ntqlistview.html#itemAt">itemAt</a>( <a href="ntqscrollview.html#contentsToViewport">contentsToViewport</a>(e-&gt;<a href="qdropevent.html#pos">pos</a>()) );
if ( item ) {
- <a href="qstrlist.html">TQStrList</a> lst;
+ <a href="ntqstrlist.html">TQStrList</a> lst;
<a name="x1707"></a> TQUriDrag::<a href="quridrag.html#decode">decode</a>( e, lst );
- <a href="qstring.html">TQString</a> str;
+ <a href="ntqstring.html">TQString</a> str;
switch ( e-&gt;<a href="qdropevent.html#action">action</a>() ) {
case TQDropEvent::Copy:
@@ -577,14 +577,14 @@ static const int autoopenTime = 750;
e-&gt;<a href="qdragmoveevent.html#accept">accept</a>();
-<a name="x1699"></a> for ( uint i = 0; i &lt; lst.<a href="qptrlist.html#count">count</a>(); ++i ) {
-<a name="x1709"></a><a name="x1697"></a><a name="x1664"></a> <a href="qstring.html">TQString</a> filename = TQDir::<a href="qdir.html#convertSeparators">convertSeparators</a>(TQUriDrag::<a href="quridrag.html#uriToLocalFile">uriToLocalFile</a>(lst.<a href="qptrlist.html#at">at</a>(i)));
+<a name="x1699"></a> for ( uint i = 0; i &lt; lst.<a href="ntqptrlist.html#count">count</a>(); ++i ) {
+<a name="x1709"></a><a name="x1697"></a><a name="x1664"></a> <a href="ntqstring.html">TQString</a> filename = TQDir::<a href="ntqdir.html#convertSeparators">convertSeparators</a>(TQUriDrag::<a href="quridrag.html#uriToLocalFile">uriToLocalFile</a>(lst.<a href="ntqptrlist.html#at">at</a>(i)));
str += filename + "\n";
}
str += TQString( "\nTo\n\n %1" )
- .arg( TQDir::<a href="qdir.html#convertSeparators">convertSeparators</a>(fullPath(item)) );
+ .arg( TQDir::<a href="ntqdir.html#convertSeparators">convertSeparators</a>(fullPath(item)) );
-<a name="x1695"></a> TQMessageBox::<a href="qmessagebox.html#information">information</a>( this, "Drop target", str, "Not implemented" );
+<a name="x1695"></a> TQMessageBox::<a href="ntqmessagebox.html#information">information</a>( this, "Drop target", str, "Not implemented" );
} else
e-&gt;<a href="qdragmoveevent.html#ignore">ignore</a>();
@@ -593,7 +593,7 @@ static const int autoopenTime = 750;
TQString <a name="f481"></a>DirectoryView::fullPath(TQListViewItem* item)
{
- <a href="qstring.html">TQString</a> fullpath = item-&gt;<a href="qlistviewitem.html#text">text</a>(0);
+ <a href="ntqstring.html">TQString</a> fullpath = item-&gt;<a href="qlistviewitem.html#text">text</a>(0);
<a name="x1688"></a> while ( (item=item-&gt;<a href="qlistviewitem.html#parent">parent</a>()) ) {
if ( item-&gt;<a href="qlistviewitem.html#parent">parent</a>() )
fullpath = item-&gt;<a href="qlistviewitem.html#text">text</a>(0) + "/" + fullpath;
@@ -601,55 +601,55 @@ TQString <a name="f481"></a>DirectoryView::fullPath(TQListViewItem* item)
fullpath = item-&gt;<a href="qlistviewitem.html#text">text</a>(0) + fullpath;
}
#ifdef Q_WS_WIN
-<a name="x1702"></a> if (fullpath.<a href="qstring.html#length">length</a>() &gt; 2 &amp;&amp; fullpath[1] != ':') {
- <a href="qdir.html">TQDir</a> dir(fullpath);
-<a name="x1665"></a> fullpath = dir.<a href="qdir.html#currentDirPath">currentDirPath</a>().left(2) + fullpath;
+<a name="x1702"></a> if (fullpath.<a href="ntqstring.html#length">length</a>() &gt; 2 &amp;&amp; fullpath[1] != ':') {
+ <a href="ntqdir.html">TQDir</a> dir(fullpath);
+<a name="x1665"></a> fullpath = dir.<a href="ntqdir.html#currentDirPath">currentDirPath</a>().left(2) + fullpath;
}
#endif
return fullpath;
}
-<a name="x1684"></a>void DirectoryView::<a href="qlistview.html#contentsMousePressEvent">contentsMousePressEvent</a>( <a href="qmouseevent.html">TQMouseEvent</a>* e )
+<a name="x1684"></a>void DirectoryView::<a href="ntqlistview.html#contentsMousePressEvent">contentsMousePressEvent</a>( <a href="qmouseevent.html">TQMouseEvent</a>* e )
{
- TQListView::<a href="qlistview.html#contentsMousePressEvent">contentsMousePressEvent</a>(e);
- <a href="qpoint.html">TQPoint</a> p( contentsToViewport( e-&gt;<a href="qdropevent.html#pos">pos</a>() ) );
+ TQListView::<a href="ntqlistview.html#contentsMousePressEvent">contentsMousePressEvent</a>(e);
+ <a href="ntqpoint.html">TQPoint</a> p( contentsToViewport( e-&gt;<a href="qdropevent.html#pos">pos</a>() ) );
<a href="qlistviewitem.html">TQListViewItem</a> *i = itemAt( p );
if ( i ) {
// if the user clicked into the root decoration of the item, don't try to start a drag!
-<a name="x1696"></a> if ( p.<a href="qpoint.html#x">x</a>() &gt; header()-&gt;cellPos( header()-&gt;mapToActual( 0 ) ) +
+<a name="x1696"></a> if ( p.<a href="ntqpoint.html#x">x</a>() &gt; header()-&gt;cellPos( header()-&gt;mapToActual( 0 ) ) +
<a name="x1686"></a> treeStepSize() * ( i-&gt;<a href="qlistviewitem.html#depth">depth</a>() + ( rootIsDecorated() ? 1 : 0) ) + itemMargin() ||
- p.<a href="qpoint.html#x">x</a>() &lt; header()-&gt;cellPos( header()-&gt;mapToActual( 0 ) ) ) {
+ p.<a href="ntqpoint.html#x">x</a>() &lt; header()-&gt;cellPos( header()-&gt;mapToActual( 0 ) ) ) {
presspos = e-&gt;<a href="qdropevent.html#pos">pos</a>();
mousePressed = TRUE;
}
}
}
-<a name="x1683"></a>void DirectoryView::<a href="qlistview.html#contentsMouseMoveEvent">contentsMouseMoveEvent</a>( <a href="qmouseevent.html">TQMouseEvent</a>* e )
+<a name="x1683"></a>void DirectoryView::<a href="ntqlistview.html#contentsMouseMoveEvent">contentsMouseMoveEvent</a>( <a href="qmouseevent.html">TQMouseEvent</a>* e )
{
- if ( mousePressed &amp;&amp; ( presspos - e-&gt;<a href="qdropevent.html#pos">pos</a>() ).manhattanLength() &gt; TQApplication::<a href="qapplication.html#startDragDistance">startDragDistance</a>() ) {
+ if ( mousePressed &amp;&amp; ( presspos - e-&gt;<a href="qdropevent.html#pos">pos</a>() ).manhattanLength() &gt; TQApplication::<a href="ntqapplication.html#startDragDistance">startDragDistance</a>() ) {
mousePressed = FALSE;
<a href="qlistviewitem.html">TQListViewItem</a> *item = itemAt( contentsToViewport(presspos) );
if ( item ) {
- <a href="qstring.html">TQString</a> source = fullPath(item);
-<a name="x1674"></a> if ( TQFile::<a href="qfile.html#exists">exists</a>(source) ) {
+ <a href="ntqstring.html">TQString</a> source = fullPath(item);
+<a name="x1674"></a> if ( TQFile::<a href="ntqfile.html#exists">exists</a>(source) ) {
<a href="quridrag.html">TQUriDrag</a>* ud = new <a href="quridrag.html">TQUriDrag</a>(viewport());
<a name="x1708"></a> ud-&gt;<a href="quridrag.html#setFileNames">setFileNames</a>( source );
-<a name="x1670"></a> if ( ud-&gt;<a href="qdragobject.html#drag">drag</a>() )
- TQMessageBox::<a href="qmessagebox.html#information">information</a>( this, "Drag source",
+<a name="x1670"></a> if ( ud-&gt;<a href="ntqdragobject.html#drag">drag</a>() )
+ TQMessageBox::<a href="ntqmessagebox.html#information">information</a>( this, "Drag source",
TQString("Delete ") + TQDir::convertSeparators(source), "Not implemented" );
}
}
}
}
-<a name="x1685"></a>void DirectoryView::<a href="qlistview.html#contentsMouseReleaseEvent">contentsMouseReleaseEvent</a>( <a href="qmouseevent.html">TQMouseEvent</a> * )
+<a name="x1685"></a>void DirectoryView::<a href="ntqlistview.html#contentsMouseReleaseEvent">contentsMouseReleaseEvent</a>( <a href="qmouseevent.html">TQMouseEvent</a> * )
{
mousePressed = FALSE;
}
-void <a name="f482"></a>DirectoryView::setDir( const <a href="qstring.html">TQString</a> &amp;s )
+void <a name="f482"></a>DirectoryView::setDir( const <a href="ntqstring.html">TQString</a> &amp;s )
{
<a href="qlistviewitemiterator.html">TQListViewItemIterator</a> it( this );
++it;
@@ -657,10 +657,10 @@ void <a name="f482"></a>DirectoryView::setDir( const <a href="qstring.html">TQSt
it.<a href="qlistviewitemiterator.html#current">current</a>()-&gt;setOpen( FALSE );
}
-<a name="x1703"></a> <a href="qstringlist.html">TQStringList</a> lst( TQStringList::<a href="qstringlist.html#split">split</a>( "/", s ) );
+<a name="x1703"></a> <a href="ntqstringlist.html">TQStringList</a> lst( TQStringList::<a href="ntqstringlist.html#split">split</a>( "/", s ) );
<a href="qlistviewitem.html">TQListViewItem</a> *item = <a href="qlistviewitem.html#firstChild">firstChild</a>();
-<a name="x1698"></a> TQStringList::Iterator it2 = lst.<a href="qvaluelist.html#begin">begin</a>();
-<a name="x1700"></a> for ( ; it2 != lst.<a href="qvaluelist.html#end">end</a>(); ++it2 ) {
+<a name="x1698"></a> TQStringList::Iterator it2 = lst.<a href="ntqvaluelist.html#begin">begin</a>();
+<a name="x1700"></a> for ( ; it2 != lst.<a href="ntqvaluelist.html#end">end</a>(); ++it2 ) {
while ( item ) {
if ( item-&gt;<a href="qlistviewitem.html#text">text</a>( 0 ) == *it2 ) {
item-&gt;<a href="qlistviewitem.html#setOpen">setOpen</a>( TRUE );
@@ -674,7 +674,7 @@ void <a name="f482"></a>DirectoryView::setDir( const <a href="qstring.html">TQSt
setCurrentItem( item );
}
-void FileItem::<a href="qlistviewitem.html#setPixmap">setPixmap</a>( <a href="qpixmap.html">TQPixmap</a> *p )
+void FileItem::<a href="qlistviewitem.html#setPixmap">setPixmap</a>( <a href="ntqpixmap.html">TQPixmap</a> *p )
{
pix = p;
<a href="qlistviewitem.html#setup">setup</a>();
@@ -704,38 +704,38 @@ const TQPixmap *FileItem::<a href="qlistviewitem.html#pixmap">pixmap</a>( int i
**
*****************************************************************************/
-#include &lt;<a href="qapplication-h.html">qapplication.h</a>&gt;
-#include &lt;<a href="qfileinfo-h.html">qfileinfo.h</a>&gt;
-#include &lt;<a href="qdir-h.html">qdir.h</a>&gt;
+#include &lt;<a href="qapplication-h.html">ntqapplication.h</a>&gt;
+#include &lt;<a href="qfileinfo-h.html">ntqfileinfo.h</a>&gt;
+#include &lt;<a href="qdir-h.html">ntqdir.h</a>&gt;
#include "dirview.h"
int main( int argc, char ** argv )
{
- <a href="qapplication.html">TQApplication</a> a( argc, argv );
+ <a href="ntqapplication.html">TQApplication</a> a( argc, argv );
DirectoryView mw;
-<a name="x1714"></a> mw.<a href="qlistview.html#addColumn">addColumn</a>( "Name" );
- mw.<a href="qlistview.html#addColumn">addColumn</a>( "Type" );
-<a name="x1716"></a> mw.<a href="qlistview.html#setTreeStepSize">setTreeStepSize</a>( 20 );
+<a name="x1714"></a> mw.<a href="ntqlistview.html#addColumn">addColumn</a>( "Name" );
+ mw.<a href="ntqlistview.html#addColumn">addColumn</a>( "Type" );
+<a name="x1716"></a> mw.<a href="ntqlistview.html#setTreeStepSize">setTreeStepSize</a>( 20 );
-<a name="x1712"></a> const TQFileInfoList* roots = TQDir::<a href="qdir.html#drives">drives</a>();
+<a name="x1712"></a> const TQFileInfoList* roots = TQDir::<a href="ntqdir.html#drives">drives</a>();
<a href="qptrlistiterator.html">TQPtrListIterator</a>&lt;TQFileInfo&gt; i(*roots);
- <a href="qfileinfo.html">TQFileInfo</a>* fi;
+ <a href="ntqfileinfo.html">TQFileInfo</a>* fi;
while ( (fi = *i) ) {
++i;
-<a name="x1713"></a> Directory * root = new Directory( &amp;mw, fi-&gt;<a href="qfileinfo.html#filePath">filePath</a>() );
+<a name="x1713"></a> Directory * root = new Directory( &amp;mw, fi-&gt;<a href="ntqfileinfo.html#filePath">filePath</a>() );
if ( roots-&gt;count() &lt;= 1 )
<a name="x1718"></a> root-&gt;<a href="qlistviewitem.html#setOpen">setOpen</a>( TRUE ); // be interesting
}
-<a name="x1719"></a> mw.<a href="qwidget.html#resize">resize</a>( 400, 400 );
- mw.<a href="qwidget.html#setCaption">setCaption</a>( "TQt Example - Directory Browser" );
-<a name="x1715"></a> mw.<a href="qlistview.html#setAllColumnsShowFocus">setAllColumnsShowFocus</a>( TRUE );
- a.<a href="qapplication.html#setMainWidget">setMainWidget</a>( &amp;mw );
-<a name="x1717"></a> mw.<a href="qwidget.html#show">show</a>();
+<a name="x1719"></a> mw.<a href="ntqwidget.html#resize">resize</a>( 400, 400 );
+ mw.<a href="ntqwidget.html#setCaption">setCaption</a>( "TQt Example - Directory Browser" );
+<a name="x1715"></a> mw.<a href="ntqlistview.html#setAllColumnsShowFocus">setAllColumnsShowFocus</a>( TRUE );
+ a.<a href="ntqapplication.html#setMainWidget">setMainWidget</a>( &amp;mw );
+<a name="x1717"></a> mw.<a href="ntqwidget.html#show">show</a>();
- return a.<a href="qapplication.html#exec">exec</a>();
+ return a.<a href="ntqapplication.html#exec">exec</a>();
}
</pre>