Files
harbour-core/harbour/contrib/hbqt/qth/QFile.qth
2010-06-14 19:01:41 +00:00

144 lines
4.6 KiB
Plaintext

/*
* $Id$
*/
/*
* Harbour Project source code:
* QT Source Generator for Harbour
*
* Copyright 2009 Pritpal Bedi <pritpal@vouchcac.com>
* 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
;
<CLASS>
QObject =
Inherits = QIODevice
Type = Core
New =
Destructor =
</CLASS>
<CODE>
#include <QtCore/QFile>
/* QFile ( const QString & name )
* QFile ( QObject * parent )
* QFile ( const QString & name, QObject * parent )
* ~QFile ()
*/
HB_FUNC( QT_QFILE )
{
if( hb_pcount() == 1 && HB_ISCHAR( 1 ) )
{
hb_retptr( new QFile( hbqt_par_QString( 1 ) ) );
}
}
</CODE>
<ENUMS>
enum FileError { NoError, ReadError, WriteError, FatalError, ..., CopyError }
enum MemoryMapFlags { NoOptions }
enum Permission { ReadOwner, WriteOwner, ExeOwner, ReadUser, ..., ExeOther }
flags Permissions
flags OpenMode
enum OpenModeFlag { NotOpen, ReadOnly, WriteOnly, ReadWrite, ..., Unbuffered }
</ENUMS>
<PROTOS>
virtual bool atEnd () const
virtual void close ()
bool copy ( const QString & newName )
FileError error () const
bool exists () const
QString fileName () const
bool flush ()
int handle () const
virtual bool isSequential () const
bool link ( const QString & linkName )
uchar * map ( qint64 offset, qint64 size, MemoryMapFlags flags = NoOptions )
virtual bool open ( OpenMode mode )
// bool open ( FILE * fh, OpenMode mode )
bool open ( int fd, OpenMode mode )
Permissions permissions () const
bool remove ()
bool rename ( const QString & newName )
bool resize ( qint64 sz )
void setFileName ( const QString & name )
bool setPermissions ( Permissions permissions )
virtual qint64 size () const
QString symLinkTarget () const
// bool unmap ( uchar * address )
void unsetError ()
bool copy ( const QString & fileName, const QString & newName )
QString decodeName ( const QByteArray & localFileName )
QString decodeName ( const char * localFileName )
QByteArray encodeName ( const QString & fileName )
bool exists ( const QString & fileName )
bool link ( const QString & fileName, const QString & linkName )
Permissions permissions ( const QString & fileName )
bool remove ( const QString & fileName )
bool rename ( const QString & oldName, const QString & newName )
bool resize ( const QString & fileName, qint64 sz )
// void setDecodingFunction ( DecoderFn function )
// void setEncodingFunction ( EncoderFn function )
bool setPermissions ( const QString & fileName, Permissions permissions )
QString symLinkTarget ( const QString & fileName )
</PROTOS>
<SLOTS>
</SLOTS>
<SIGNALS>
</SIGNALS>