From 6ac276d2f709ce6d2564b5caf85b8a0fde92fea4 Mon Sep 17 00:00:00 2001 From: Pritpal Bedi Date: Fri, 25 Nov 2011 22:26:14 +0000 Subject: [PATCH] 2011-11-25 14:23 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com) * contrib/hbqt/qtgui/qth/QClipboard.qth * contrib/hbqt/qtgui/qth/QDirModel.qth * contrib/hbqt/qtgui/qth/QFileSystemModel.qth + Implemented: commented out methods returning data of type QMimeData. --- harbour/ChangeLog | 6 ++++++ harbour/contrib/hbqt/qtgui/qth/QClipboard.qth | 8 +++++++- harbour/contrib/hbqt/qtgui/qth/QDirModel.qth | 8 +++++++- harbour/contrib/hbqt/qtgui/qth/QFileSystemModel.qth | 8 +++++++- 4 files changed, 27 insertions(+), 3 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index d4dacfee02..a7422cb21d 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,12 @@ The license applies to all entries newer than 2009-04-28. */ +2011-11-25 14:23 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com) + * contrib/hbqt/qtgui/qth/QClipboard.qth + * contrib/hbqt/qtgui/qth/QDirModel.qth + * contrib/hbqt/qtgui/qth/QFileSystemModel.qth + + Implemented: commented out methods returning data of type QMimeData. + 2011-11-25 11:38 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/package/mpkg_rpm.sh ! fixed RPM _topdir detection. diff --git a/harbour/contrib/hbqt/qtgui/qth/QClipboard.qth b/harbour/contrib/hbqt/qtgui/qth/QClipboard.qth index b221f53436..7982e4e2fa 100644 --- a/harbour/contrib/hbqt/qtgui/qth/QClipboard.qth +++ b/harbour/contrib/hbqt/qtgui/qth/QClipboard.qth @@ -43,7 +43,13 @@ enum Mode { Clipboard, Selection, FindBuffer } void clear ( Mode mode = Clipboard ) QImage image ( Mode mode = Clipboard ) const -//const QMimeData * mimeData ( Mode mode = Clipboard ) const +const QMimeData * mimeData ( Mode mode = Clipboard ) const{ + QClipboard * p = ( QClipboard * ) hbqt_par_ptr( 0 ); + if( p ) + { + hbqt_create_objectGC( hbqt_gcAllocate_QMimeData( ( void* ) p->mimeData( ( QClipboard::Mode ) hb_parni( 1 ) ), false ), "hb_QMimeData" ); + } +} bool ownsClipboard () const bool ownsFindBuffer () const bool ownsSelection () const diff --git a/harbour/contrib/hbqt/qtgui/qth/QDirModel.qth b/harbour/contrib/hbqt/qtgui/qth/QDirModel.qth index c63f6a6c90..e08e171238 100644 --- a/harbour/contrib/hbqt/qtgui/qth/QDirModel.qth +++ b/harbour/contrib/hbqt/qtgui/qth/QDirModel.qth @@ -54,7 +54,13 @@ QModelIndex index ( const QString & path, int column = 0 ) const bool isDir ( const QModelIndex & index ) const bool isReadOnly () const bool lazyChildCount () const -// virtual QMimeData * mimeData ( const QModelIndexList & indexes ) const +virtual QMimeData * mimeData ( const QModelIndexList & indexes ) const{ + QDirModel * p = ( QDirModel * ) hbqt_par_ptr( 0 ); + if( p ) + { + hbqt_create_objectGC( hbqt_gcAllocate_QMimeData( ( void* ) p->mimeData( *hbqt_par_QModelIndexList( 1 ) ), false ), "hb_QMimeData" ); + } +} virtual QStringList mimeTypes () const QModelIndex mkdir ( const QModelIndex & parent, const QString & name ) QStringList nameFilters () const diff --git a/harbour/contrib/hbqt/qtgui/qth/QFileSystemModel.qth b/harbour/contrib/hbqt/qtgui/qth/QFileSystemModel.qth index fe415156cd..2d506d19af 100644 --- a/harbour/contrib/hbqt/qtgui/qth/QFileSystemModel.qth +++ b/harbour/contrib/hbqt/qtgui/qth/QFileSystemModel.qth @@ -47,7 +47,13 @@ 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 +virtual QMimeData * mimeData ( const QModelIndexList & indexes ) const{ + QFileSystemModel * p = ( QFileSystemModel * ) hbqt_par_ptr( 0 ); + if( p ) + { + hbqt_create_objectGC( hbqt_gcAllocate_QMimeData( ( void* ) p->mimeData( *hbqt_par_QModelIndexList( 1 ) ), false ), "hb_QMimeData" ); + } +} virtual QStringList mimeTypes () const QModelIndex mkdir ( const QModelIndex & parent, const QString & name ) QVariant myComputer ( int role = Qt::DisplayRole ) const