* contrib/hbqt/hbmk2_qt.hb
! Tweaked: ( QString * ) casted argument to be compilable.
* contrib/hbqt/qtgui/qth/QFileDialog.qth
+ Enabled: getOpenFileName() etc. methods which we commented out because
of lack of knowledge how those should been handelled.
121 lines
4.3 KiB
Plaintext
121 lines
4.3 KiB
Plaintext
/*
|
|
* $Id$
|
|
*/
|
|
|
|
/*
|
|
* Harbour Qt wrapper generator control file
|
|
*
|
|
* Copyright 2009-2012 Pritpal Bedi <bedipritpal@hotmail.com>
|
|
* www - http://www.harbour-project.org
|
|
*
|
|
* See COPYING for licensing terms.
|
|
*/
|
|
|
|
<CLASS>
|
|
Inherit = QDialog
|
|
New = pParent, nFlags
|
|
</CLASS>
|
|
|
|
<CODE>
|
|
#include <QtGui/QFileDialog>
|
|
#include <QtCore/QUrl>
|
|
|
|
/*
|
|
* QFileDialog ( QWidget * parent, Qt::WindowFlags flags )
|
|
* QFileDialog ( QWidget * parent = 0, const QString & caption = QString(), const QString & directory = QString(), const QString & filter = QString() )
|
|
* ~QFileDialog ()
|
|
*/
|
|
HB_FUNC( QT_QFILEDIALOG )
|
|
{
|
|
if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QWIDGET" ) )
|
|
{
|
|
__HB_RETPTRGC__( new QFileDialog( hbqt_par_QWidget( 1 ), ( Qt::WindowFlags ) 0 ) );
|
|
}
|
|
else if( hb_pcount() == 2 && hbqt_par_isDerivedFrom( 1, "QWIDGET" ) && HB_ISNUM( 2 ) )
|
|
{
|
|
__HB_RETPTRGC__( new QFileDialog( hbqt_par_QWidget( 1 ), ( Qt::WindowFlags ) hb_parni( 2 ) ) );
|
|
}
|
|
else
|
|
{
|
|
__HB_RETPTRGC__( new QFileDialog() );
|
|
}
|
|
}
|
|
</CODE>
|
|
|
|
<ENUMS>
|
|
enum AcceptMode { AcceptOpen, AcceptSave }
|
|
enum DialogLabel { LookIn, FileName, FileType, Accept, Reject }
|
|
enum FileMode { AnyFile, ExistingFile, Directory, ExistingFiles, DirectoryOnly }
|
|
enum Option { ShowDirsOnly, DontResolveSymlinks, DontConfirmOverwrite, DontUseNativeDialog, ..., DontUseSheet }
|
|
flags Options
|
|
enum ViewMode { Detail, List }
|
|
</ENUMS>
|
|
|
|
<PROTOS>
|
|
AcceptMode acceptMode () const
|
|
bool confirmOverwrite () const
|
|
QString defaultSuffix () const
|
|
QDir directory () const
|
|
FileMode fileMode () const
|
|
QDir::Filters filter () const
|
|
QStringList history () const
|
|
QFileIconProvider * iconProvider () const
|
|
bool isNameFilterDetailsVisible () const
|
|
bool isReadOnly () const
|
|
QAbstractItemDelegate * itemDelegate () const
|
|
QString labelText ( DialogLabel label ) const
|
|
QStringList nameFilters () const
|
|
#
|
|
# Just too difficult to handle automatically
|
|
#
|
|
// void open ( QObject * receiver, const char * member )
|
|
#
|
|
Options options () const
|
|
QAbstractProxyModel * proxyModel () const
|
|
bool resolveSymlinks () const
|
|
bool restoreState ( const QByteArray & state )
|
|
QByteArray saveState () const
|
|
void selectFile ( const QString & filename )
|
|
void selectNameFilter ( const QString & filter )
|
|
QStringList selectedFiles () const
|
|
QString selectedNameFilter () const
|
|
void setAcceptMode ( AcceptMode mode )
|
|
void setConfirmOverwrite ( bool enabled )
|
|
void setDefaultSuffix ( const QString & suffix )
|
|
void setDirectory ( const QString & directory )
|
|
void setDirectory ( const QDir & directory )
|
|
void setFileMode ( FileMode mode )
|
|
void setFilter ( QDir::Filters filters )
|
|
void setHistory ( const QStringList & paths )
|
|
void setIconProvider ( QFileIconProvider * provider )
|
|
void setItemDelegate ( QAbstractItemDelegate * delegate )
|
|
void setLabelText ( DialogLabel label, const QString & text )
|
|
void setNameFilter ( const QString & filter )
|
|
void setNameFilterDetailsVisible ( bool enabled )
|
|
void setNameFilters ( const QStringList & filters )
|
|
void setOption ( Option option, bool on = true )
|
|
void setOptions ( Options options )
|
|
void setProxyModel ( QAbstractProxyModel * proxyModel )
|
|
void setReadOnly ( bool enabled )
|
|
void setResolveSymlinks ( bool enabled )
|
|
void setSidebarUrls ( const QList<QUrl> & urls )
|
|
void setViewMode ( ViewMode mode )
|
|
QList<QUrl> sidebarUrls () const
|
|
bool testOption ( Option option ) const
|
|
ViewMode viewMode () const
|
|
|
|
|
|
QString getExistingDirectory ( QWidget * parent = 0, const QString & caption = QString(), const QString & dir = QString(), Options options = ShowDirsOnly )
|
|
QString getOpenFileName ( QWidget * parent = 0, const QString & caption = QString(), const QString & dir = QString(), const QString & filter = QString(), QString * selectedFilter = 0, Options options = 0 )
|
|
QStringList getOpenFileNames ( QWidget * parent = 0, const QString & caption = QString(), const QString & dir = QString(), const QString & filter = QString(), QString * selectedFilter = 0, Options options = 0 )
|
|
QString getSaveFileName ( QWidget * parent = 0, const QString & caption = QString(), const QString & dir = QString(), const QString & filter = QString(), QString * selectedFilter = 0, Options options = 0 )
|
|
</PROTOS>
|
|
|
|
<SIGNALS>
|
|
void currentChanged ( const QString & path )
|
|
void directoryEntered ( const QString & directory )
|
|
void fileSelected ( const QString & file )
|
|
void filesSelected ( const QStringList & selected )
|
|
void filterSelected ( const QString & filter )
|
|
</SIGNALS>
|