/* * $Id$ */ /* * Harbour Qt wrapper generator control file * * Copyright 2009-2012 Pritpal Bedi * www - http://www.harbour-project.org * * See COPYING for licensing terms. */ Inherit = QAbstractItemModel Type = Core New = #include #include /* * QFileSystemModel ( QObject * parent = 0 ) * ~QFileSystemModel () */ HB_FUNC( QT_QFILESYSTEMMODEL ) { if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QOBJECT" ) ) { __HB_RETPTRGC__( new QFileSystemModel( hbqt_par_QObject( 1 ) ) ); } else { __HB_RETPTRGC__( new QFileSystemModel() ); } } enum Roles { FileIconRole, FilePathRole, FileNameRole, FilePermissions } virtual bool dropMimeData ( const QMimeData * data, Qt::DropAction action, int row, int column, const QModelIndex & parent ) QIcon fileIcon ( const QModelIndex & index ) const QFileInfo fileInfo ( const QModelIndex & index ) const QString fileName ( const QModelIndex & index ) const QString filePath ( const QModelIndex & index ) const QDir::Filters filter () const // QFileIconProvider * iconProvider () const QModelIndex index ( const QString & path, int column = 0 ) const bool isDir ( const QModelIndex & index ) const bool isReadOnly () const QDateTime lastModified ( const QModelIndex & index ) const virtual QMimeData * mimeData ( const QModelIndexList & indexes ) const{ QFileSystemModel * p = ( QFileSystemModel * ) hbqt_par_ptr( 0 ); if( p ) { hb_itemReturnRelease( hbqt_bindGetHbObject( NULL, ( void* ) p->mimeData( *hbqt_par_QModelIndexList( 1 ) ), "HB_QMIMEDATA", NULL, HBQT_BIT_NONE ) ); } } virtual QStringList mimeTypes () const QModelIndex mkdir ( const QModelIndex & parent, const QString & name ) QVariant myComputer ( int role = Qt::DisplayRole ) const bool nameFilterDisables () const QStringList nameFilters () const QFile::Permissions permissions ( const QModelIndex & index ) const bool remove ( const QModelIndex & index ) const bool resolveSymlinks () const bool rmdir ( const QModelIndex & index ) const QDir rootDirectory () const QString rootPath () const void setFilter ( QDir::Filters filters ) // void setIconProvider ( QFileIconProvider * provider ) void setNameFilterDisables ( bool enable ) void setNameFilters ( const QStringList & filters ) void setReadOnly ( bool enable ) void setResolveSymlinks ( bool enable ) QModelIndex setRootPath ( const QString & newPath ) qint64 size ( const QModelIndex & index ) const QString type ( const QModelIndex & index ) const void fileRenamed ( const QString & path, const QString & oldName, const QString & newName ) void rootPathChanged ( const QString & newPath ) void directoryLoaded ( const QString & path ) [*V=0x040700*]