/* * $Id$ */ /* * Harbour Project source code: * QT Source Generator for Harbour * * Copyright 2009 Pritpal Bedi * www - http://www.harbour-project.org * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2, or (at your option) * any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this software; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, * Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/). * * As a special exception, the Harbour Project gives permission for * additional uses of the text contained in its release of Harbour. * * The exception is that, if you link the Harbour libraries with other * files to produce an executable, this does not by itself cause the * resulting executable to be covered by the GNU General Public License. * Your use of that executable is in no way restricted on account of * linking the Harbour library code into it. * * This exception does not however invalidate any other reasons why * the executable file might be covered by the GNU General Public License. * * This exception applies only to the code released by the Harbour * Project under the name Harbour. If you copy code from other * Harbour Project or Free Software Foundation releases into a copy of * Harbour, as the General Public License permits, the exception does * not apply to the code that you add in this way. To avoid misleading * anyone as to the status of such modified files, you must delete * this exception notice from them. * * If you write modifications of your own for Harbour, it is your choice * whether to permit this exception to apply to your modifications. * If you do not wish that, delete this exception notice. * */ /*----------------------------------------------------------------------*/ ; ; Header File to Generate QT Wrapper Sources ; Inherit = QDialog New = pParent, nFlags #include /* * 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 && HB_ISPOINTER( 1 ) ) { hb_retptr( new QFileDialog( hbqt_par_QWidget( 1 ), ( Qt::WindowFlags ) 0 ) ); } else if( hb_pcount() == 2 && HB_ISPOINTER( 1 ) && HB_ISNUM( 2 ) ) { hb_retptr( new QFileDialog( hbqt_par_QWidget( 1 ), ( Qt::WindowFlags ) hb_parni( 2 ) ) ); } else { hb_retptr( new QFileDialog() ); } } 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 } 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 & urls ) void setViewMode ( ViewMode mode ) QList 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 ) 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 )