2009-07-19 13:56 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com)
* contrib/hbqt/generator/hbqtgen.prg
* contrib/hbqt/generator/qt45.qtp
* contrib/hbqt/hbqt.h
* contrib/hbqt/Makefile_gen
+ contrib/hbqt/qth/QButtonGroup.qth
+ contrib/hbqt/qth/QIODevice.qth
+ contrib/hbqt/qth/QProcess.qth
+ contrib/hbqt/QButtonGroup.cpp
+ contrib/hbqt/QIODevice.cpp
+ contrib/hbqt/QProcess.cpp
+ contrib/hbqt/TQButtonGroup.prg
+ contrib/hbqt/TQIODevice.prg
+ contrib/hbqt/TQProcess.prg
+ Added new classes.
This commit is contained in:
@@ -17,6 +17,25 @@
|
||||
past entries belonging to author(s): Viktor Szakats.
|
||||
*/
|
||||
|
||||
2009-07-19 13:56 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com)
|
||||
* contrib/hbqt/generator/hbqtgen.prg
|
||||
* contrib/hbqt/generator/qt45.qtp
|
||||
* contrib/hbqt/hbqt.h
|
||||
* contrib/hbqt/Makefile_gen
|
||||
|
||||
+ contrib/hbqt/qth/QButtonGroup.qth
|
||||
+ contrib/hbqt/qth/QIODevice.qth
|
||||
+ contrib/hbqt/qth/QProcess.qth
|
||||
|
||||
+ contrib/hbqt/QButtonGroup.cpp
|
||||
+ contrib/hbqt/QIODevice.cpp
|
||||
+ contrib/hbqt/QProcess.cpp
|
||||
+ contrib/hbqt/TQButtonGroup.prg
|
||||
+ contrib/hbqt/TQIODevice.prg
|
||||
+ contrib/hbqt/TQProcess.prg
|
||||
|
||||
+ Added new classes.
|
||||
|
||||
2009-07-19 19:58 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
|
||||
* utils/hbmk2/hbmk2.prg
|
||||
+ Added /P128 to tlib default flags.
|
||||
|
||||
@@ -22,6 +22,7 @@ CPP_SOURCES=\
|
||||
QBitmap.cpp \
|
||||
QBoxLayout.cpp \
|
||||
QBrush.cpp \
|
||||
QButtonGroup.cpp \
|
||||
QCalendarWidget.cpp \
|
||||
QCheckBox.cpp \
|
||||
QClipboard.cpp \
|
||||
@@ -74,6 +75,7 @@ CPP_SOURCES=\
|
||||
QImageWriter.cpp \
|
||||
QInputDialog.cpp \
|
||||
QInputEvent.cpp \
|
||||
QIODevice.cpp \
|
||||
QKeyEvent.cpp \
|
||||
QKeySequence.cpp \
|
||||
QLabel.cpp \
|
||||
@@ -111,6 +113,7 @@ CPP_SOURCES=\
|
||||
QPrintEngine.cpp \
|
||||
QPrinter.cpp \
|
||||
QPrintPreviewDialog.cpp \
|
||||
QProcess.cpp \
|
||||
QProgressBar.cpp \
|
||||
QProgressDialog.cpp \
|
||||
QPushButton.cpp \
|
||||
@@ -244,6 +247,7 @@ PRG_SOURCES=\
|
||||
TQBitmap.prg \
|
||||
TQBoxLayout.prg \
|
||||
TQBrush.prg \
|
||||
TQButtonGroup.prg \
|
||||
TQCalendarWidget.prg \
|
||||
TQCheckBox.prg \
|
||||
TQClipboard.prg \
|
||||
@@ -296,6 +300,7 @@ PRG_SOURCES=\
|
||||
TQImageWriter.prg \
|
||||
TQInputDialog.prg \
|
||||
TQInputEvent.prg \
|
||||
TQIODevice.prg \
|
||||
TQKeyEvent.prg \
|
||||
TQKeySequence.prg \
|
||||
TQLabel.prg \
|
||||
@@ -333,6 +338,7 @@ PRG_SOURCES=\
|
||||
TQPrintEngine.prg \
|
||||
TQPrinter.prg \
|
||||
TQPrintPreviewDialog.prg \
|
||||
TQProcess.prg \
|
||||
TQProgressBar.prg \
|
||||
TQProgressDialog.prg \
|
||||
TQPushButton.prg \
|
||||
|
||||
184
harbour/contrib/hbqt/QButtonGroup.cpp
Normal file
184
harbour/contrib/hbqt/QButtonGroup.cpp
Normal file
@@ -0,0 +1,184 @@
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
/*
|
||||
* Harbour Project source code:
|
||||
* QT wrapper main header
|
||||
*
|
||||
* Copyright 2009 Pritpal Bedi <pritpal@vouchcac.com>
|
||||
*
|
||||
* Copyright 2009 Marcos Antonio Gambeta <marcosgambeta at gmail dot 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.
|
||||
*
|
||||
*/
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
#include "hbapi.h"
|
||||
#include "hbqt.h"
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
#if QT_VERSION >= 0x040500
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
/*
|
||||
* Constructed[ 10/11 [ 90.91% ] ]
|
||||
*
|
||||
* *** Unconvered Prototypes ***
|
||||
* -----------------------------
|
||||
*
|
||||
* QList<QAbstractButton *> buttons () const
|
||||
*/
|
||||
|
||||
|
||||
#include <QtGui/QButtonGroup>
|
||||
|
||||
|
||||
/*
|
||||
* QButtonGroup ( QObject * parent = 0 )
|
||||
* ~QButtonGroup ()
|
||||
*/
|
||||
HB_FUNC( QT_QBUTTONGROUP )
|
||||
{
|
||||
if( hb_pcount() == 1 && HB_ISPOINTER( 1 ) )
|
||||
{
|
||||
hb_retptr( ( QButtonGroup* ) new QButtonGroup( hbqt_par_QObject( 1 ) ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
hb_retptr( ( QButtonGroup* ) new QButtonGroup() );
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* DESTRUCTOR
|
||||
*/
|
||||
HB_FUNC( QT_QBUTTONGROUP_DESTROY )
|
||||
{
|
||||
hbqt_par_QButtonGroup( 1 )->~QButtonGroup();
|
||||
}
|
||||
|
||||
/*
|
||||
* void addButton ( QAbstractButton * button )
|
||||
*/
|
||||
HB_FUNC( QT_QBUTTONGROUP_ADDBUTTON )
|
||||
{
|
||||
hbqt_par_QButtonGroup( 1 )->addButton( hbqt_par_QAbstractButton( 2 ) );
|
||||
}
|
||||
|
||||
/*
|
||||
* void addButton ( QAbstractButton * button, int id )
|
||||
*/
|
||||
HB_FUNC( QT_QBUTTONGROUP_ADDBUTTON_1 )
|
||||
{
|
||||
hbqt_par_QButtonGroup( 1 )->addButton( hbqt_par_QAbstractButton( 2 ), hb_parni( 3 ) );
|
||||
}
|
||||
|
||||
/*
|
||||
* QAbstractButton * button ( int id ) const
|
||||
*/
|
||||
HB_FUNC( QT_QBUTTONGROUP_BUTTON )
|
||||
{
|
||||
hb_retptr( ( QAbstractButton* ) hbqt_par_QButtonGroup( 1 )->button( hb_parni( 2 ) ) );
|
||||
}
|
||||
|
||||
/*
|
||||
* QAbstractButton * checkedButton () const
|
||||
*/
|
||||
HB_FUNC( QT_QBUTTONGROUP_CHECKEDBUTTON )
|
||||
{
|
||||
hb_retptr( ( QAbstractButton* ) hbqt_par_QButtonGroup( 1 )->checkedButton() );
|
||||
}
|
||||
|
||||
/*
|
||||
* int checkedId () const
|
||||
*/
|
||||
HB_FUNC( QT_QBUTTONGROUP_CHECKEDID )
|
||||
{
|
||||
hb_retni( hbqt_par_QButtonGroup( 1 )->checkedId() );
|
||||
}
|
||||
|
||||
/*
|
||||
* bool exclusive () const
|
||||
*/
|
||||
HB_FUNC( QT_QBUTTONGROUP_EXCLUSIVE )
|
||||
{
|
||||
hb_retl( hbqt_par_QButtonGroup( 1 )->exclusive() );
|
||||
}
|
||||
|
||||
/*
|
||||
* int id ( QAbstractButton * button ) const
|
||||
*/
|
||||
HB_FUNC( QT_QBUTTONGROUP_ID )
|
||||
{
|
||||
hb_retni( hbqt_par_QButtonGroup( 1 )->id( hbqt_par_QAbstractButton( 2 ) ) );
|
||||
}
|
||||
|
||||
/*
|
||||
* void removeButton ( QAbstractButton * button )
|
||||
*/
|
||||
HB_FUNC( QT_QBUTTONGROUP_REMOVEBUTTON )
|
||||
{
|
||||
hbqt_par_QButtonGroup( 1 )->removeButton( hbqt_par_QAbstractButton( 2 ) );
|
||||
}
|
||||
|
||||
/*
|
||||
* void setExclusive ( bool )
|
||||
*/
|
||||
HB_FUNC( QT_QBUTTONGROUP_SETEXCLUSIVE )
|
||||
{
|
||||
hbqt_par_QButtonGroup( 1 )->setExclusive( hb_parl( 2 ) );
|
||||
}
|
||||
|
||||
/*
|
||||
* void setId ( QAbstractButton * button, int id )
|
||||
*/
|
||||
HB_FUNC( QT_QBUTTONGROUP_SETID )
|
||||
{
|
||||
hbqt_par_QButtonGroup( 1 )->setId( hbqt_par_QAbstractButton( 2 ), hb_parni( 3 ) );
|
||||
}
|
||||
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
#endif /* #if QT_VERSION >= 0x040500 */
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
367
harbour/contrib/hbqt/QIODevice.cpp
Normal file
367
harbour/contrib/hbqt/QIODevice.cpp
Normal file
@@ -0,0 +1,367 @@
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
/*
|
||||
* Harbour Project source code:
|
||||
* QT wrapper main header
|
||||
*
|
||||
* Copyright 2009 Pritpal Bedi <pritpal@vouchcac.com>
|
||||
*
|
||||
* Copyright 2009 Marcos Antonio Gambeta <marcosgambeta at gmail dot 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.
|
||||
*
|
||||
*/
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
#include "hbapi.h"
|
||||
#include "hbqt.h"
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
#if QT_VERSION >= 0x040500
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
/*
|
||||
* flags OpenMode
|
||||
* enum OpenModeFlag { NotOpen, ReadOnly, WriteOnly, ReadWrite, ..., Unbuffered }
|
||||
*/
|
||||
|
||||
|
||||
#include <QtCore/QIODevice>
|
||||
|
||||
|
||||
/*
|
||||
* QIODevice ()
|
||||
* QIODevice ( QObject * parent )
|
||||
* virtual ~QIODevice ()
|
||||
*/
|
||||
HB_FUNC( QT_QIODEVICE )
|
||||
{
|
||||
#if 0
|
||||
if( hb_pcount() == 1 && HB_ISPOINTER( 1 ) )
|
||||
{
|
||||
hb_retptr( ( QIODevice* ) new QIODevice( hbqt_par_QObject( 1 ) ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
hb_retptr( ( QIODevice* ) new QIODevice() );
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
* DESTRUCTOR
|
||||
*/
|
||||
HB_FUNC( QT_QIODEVICE_DESTROY )
|
||||
{
|
||||
hbqt_par_QIODevice( 1 )->~QIODevice();
|
||||
}
|
||||
|
||||
/*
|
||||
* virtual bool atEnd () const
|
||||
*/
|
||||
HB_FUNC( QT_QIODEVICE_ATEND )
|
||||
{
|
||||
hb_retl( hbqt_par_QIODevice( 1 )->atEnd() );
|
||||
}
|
||||
|
||||
/*
|
||||
* virtual qint64 bytesAvailable () const
|
||||
*/
|
||||
HB_FUNC( QT_QIODEVICE_BYTESAVAILABLE )
|
||||
{
|
||||
hb_retnint( hbqt_par_QIODevice( 1 )->bytesAvailable() );
|
||||
}
|
||||
|
||||
/*
|
||||
* virtual qint64 bytesToWrite () const
|
||||
*/
|
||||
HB_FUNC( QT_QIODEVICE_BYTESTOWRITE )
|
||||
{
|
||||
hb_retnint( hbqt_par_QIODevice( 1 )->bytesToWrite() );
|
||||
}
|
||||
|
||||
/*
|
||||
* virtual bool canReadLine () const
|
||||
*/
|
||||
HB_FUNC( QT_QIODEVICE_CANREADLINE )
|
||||
{
|
||||
hb_retl( hbqt_par_QIODevice( 1 )->canReadLine() );
|
||||
}
|
||||
|
||||
/*
|
||||
* virtual void close ()
|
||||
*/
|
||||
HB_FUNC( QT_QIODEVICE_CLOSE )
|
||||
{
|
||||
hbqt_par_QIODevice( 1 )->close();
|
||||
}
|
||||
|
||||
/*
|
||||
* QString errorString () const
|
||||
*/
|
||||
HB_FUNC( QT_QIODEVICE_ERRORSTRING )
|
||||
{
|
||||
hb_retc( hbqt_par_QIODevice( 1 )->errorString().toLatin1().data() );
|
||||
}
|
||||
|
||||
/*
|
||||
* bool getChar ( char * c )
|
||||
*/
|
||||
HB_FUNC( QT_QIODEVICE_GETCHAR )
|
||||
{
|
||||
hb_retl( hbqt_par_QIODevice( 1 )->getChar( ( char * ) hb_parc( 2 ) ) );
|
||||
}
|
||||
|
||||
/*
|
||||
* bool isOpen () const
|
||||
*/
|
||||
HB_FUNC( QT_QIODEVICE_ISOPEN )
|
||||
{
|
||||
hb_retl( hbqt_par_QIODevice( 1 )->isOpen() );
|
||||
}
|
||||
|
||||
/*
|
||||
* bool isReadable () const
|
||||
*/
|
||||
HB_FUNC( QT_QIODEVICE_ISREADABLE )
|
||||
{
|
||||
hb_retl( hbqt_par_QIODevice( 1 )->isReadable() );
|
||||
}
|
||||
|
||||
/*
|
||||
* virtual bool isSequential () const
|
||||
*/
|
||||
HB_FUNC( QT_QIODEVICE_ISSEQUENTIAL )
|
||||
{
|
||||
hb_retl( hbqt_par_QIODevice( 1 )->isSequential() );
|
||||
}
|
||||
|
||||
/*
|
||||
* bool isTextModeEnabled () const
|
||||
*/
|
||||
HB_FUNC( QT_QIODEVICE_ISTEXTMODEENABLED )
|
||||
{
|
||||
hb_retl( hbqt_par_QIODevice( 1 )->isTextModeEnabled() );
|
||||
}
|
||||
|
||||
/*
|
||||
* bool isWritable () const
|
||||
*/
|
||||
HB_FUNC( QT_QIODEVICE_ISWRITABLE )
|
||||
{
|
||||
hb_retl( hbqt_par_QIODevice( 1 )->isWritable() );
|
||||
}
|
||||
|
||||
/*
|
||||
* virtual bool open ( OpenMode mode )
|
||||
*/
|
||||
HB_FUNC( QT_QIODEVICE_OPEN )
|
||||
{
|
||||
hb_retl( hbqt_par_QIODevice( 1 )->open( ( QIODevice::OpenMode ) hb_parni( 2 ) ) );
|
||||
}
|
||||
|
||||
/*
|
||||
* OpenMode openMode () const
|
||||
*/
|
||||
HB_FUNC( QT_QIODEVICE_OPENMODE )
|
||||
{
|
||||
hb_retni( ( QIODevice::OpenMode ) hbqt_par_QIODevice( 1 )->openMode() );
|
||||
}
|
||||
|
||||
/*
|
||||
* qint64 peek ( char * data, qint64 maxSize )
|
||||
*/
|
||||
HB_FUNC( QT_QIODEVICE_PEEK )
|
||||
{
|
||||
hb_retnint( hbqt_par_QIODevice( 1 )->peek( ( char * ) hb_parc( 2 ), hb_parnint( 3 ) ) );
|
||||
}
|
||||
|
||||
/*
|
||||
* QByteArray peek ( qint64 maxSize )
|
||||
*/
|
||||
HB_FUNC( QT_QIODEVICE_PEEK_1 )
|
||||
{
|
||||
hb_retptr( new QByteArray( hbqt_par_QIODevice( 1 )->peek( hb_parnint( 2 ) ) ) );
|
||||
}
|
||||
|
||||
/*
|
||||
* virtual qint64 pos () const
|
||||
*/
|
||||
HB_FUNC( QT_QIODEVICE_POS )
|
||||
{
|
||||
hb_retnint( hbqt_par_QIODevice( 1 )->pos() );
|
||||
}
|
||||
|
||||
/*
|
||||
* bool putChar ( char c )
|
||||
*/
|
||||
HB_FUNC( QT_QIODEVICE_PUTCHAR )
|
||||
{
|
||||
hb_retl( hbqt_par_QIODevice( 1 )->putChar( ( char ) hb_parni( 2 ) ) );
|
||||
}
|
||||
|
||||
/*
|
||||
* qint64 read ( char * data, qint64 maxSize )
|
||||
*/
|
||||
HB_FUNC( QT_QIODEVICE_READ )
|
||||
{
|
||||
hb_retnint( hbqt_par_QIODevice( 1 )->read( ( char * ) hb_parc( 2 ), hb_parnint( 3 ) ) );
|
||||
}
|
||||
|
||||
/*
|
||||
* QByteArray read ( qint64 maxSize )
|
||||
*/
|
||||
HB_FUNC( QT_QIODEVICE_READ_1 )
|
||||
{
|
||||
hb_retptr( new QByteArray( hbqt_par_QIODevice( 1 )->read( hb_parnint( 2 ) ) ) );
|
||||
}
|
||||
|
||||
/*
|
||||
* QByteArray readAll ()
|
||||
*/
|
||||
HB_FUNC( QT_QIODEVICE_READALL )
|
||||
{
|
||||
hb_retptr( new QByteArray( hbqt_par_QIODevice( 1 )->readAll() ) );
|
||||
}
|
||||
|
||||
/*
|
||||
* qint64 readLine ( char * data, qint64 maxSize )
|
||||
*/
|
||||
HB_FUNC( QT_QIODEVICE_READLINE )
|
||||
{
|
||||
hb_retnint( hbqt_par_QIODevice( 1 )->readLine( ( char * ) hb_parc( 2 ), hb_parnint( 3 ) ) );
|
||||
}
|
||||
|
||||
/*
|
||||
* QByteArray readLine ( qint64 maxSize = 0 )
|
||||
*/
|
||||
HB_FUNC( QT_QIODEVICE_READLINE_1 )
|
||||
{
|
||||
hb_retptr( new QByteArray( hbqt_par_QIODevice( 1 )->readLine( hb_parnint( 2 ) ) ) );
|
||||
}
|
||||
|
||||
/*
|
||||
* virtual bool reset ()
|
||||
*/
|
||||
HB_FUNC( QT_QIODEVICE_RESET )
|
||||
{
|
||||
hb_retl( hbqt_par_QIODevice( 1 )->reset() );
|
||||
}
|
||||
|
||||
/*
|
||||
* virtual bool seek ( qint64 pos )
|
||||
*/
|
||||
HB_FUNC( QT_QIODEVICE_SEEK )
|
||||
{
|
||||
hb_retl( hbqt_par_QIODevice( 1 )->seek( hb_parnint( 2 ) ) );
|
||||
}
|
||||
|
||||
/*
|
||||
* void setTextModeEnabled ( bool enabled )
|
||||
*/
|
||||
HB_FUNC( QT_QIODEVICE_SETTEXTMODEENABLED )
|
||||
{
|
||||
hbqt_par_QIODevice( 1 )->setTextModeEnabled( hb_parl( 2 ) );
|
||||
}
|
||||
|
||||
/*
|
||||
* virtual qint64 size () const
|
||||
*/
|
||||
HB_FUNC( QT_QIODEVICE_SIZE )
|
||||
{
|
||||
hb_retnint( hbqt_par_QIODevice( 1 )->size() );
|
||||
}
|
||||
|
||||
/*
|
||||
* void ungetChar ( char c )
|
||||
*/
|
||||
HB_FUNC( QT_QIODEVICE_UNGETCHAR )
|
||||
{
|
||||
hbqt_par_QIODevice( 1 )->ungetChar( ( char ) hb_parni( 2 ) );
|
||||
}
|
||||
|
||||
/*
|
||||
* virtual bool waitForBytesWritten ( int msecs )
|
||||
*/
|
||||
HB_FUNC( QT_QIODEVICE_WAITFORBYTESWRITTEN )
|
||||
{
|
||||
hb_retl( hbqt_par_QIODevice( 1 )->waitForBytesWritten( hb_parni( 2 ) ) );
|
||||
}
|
||||
|
||||
/*
|
||||
* virtual bool waitForReadyRead ( int msecs )
|
||||
*/
|
||||
HB_FUNC( QT_QIODEVICE_WAITFORREADYREAD )
|
||||
{
|
||||
hb_retl( hbqt_par_QIODevice( 1 )->waitForReadyRead( hb_parni( 2 ) ) );
|
||||
}
|
||||
|
||||
/*
|
||||
* qint64 write ( const char * data, qint64 maxSize )
|
||||
*/
|
||||
HB_FUNC( QT_QIODEVICE_WRITE )
|
||||
{
|
||||
hb_retnint( hbqt_par_QIODevice( 1 )->write( hbqt_par_char( 2 ), hb_parnint( 3 ) ) );
|
||||
}
|
||||
|
||||
/*
|
||||
* qint64 write ( const char * data )
|
||||
*/
|
||||
HB_FUNC( QT_QIODEVICE_WRITE_1 )
|
||||
{
|
||||
hb_retnint( hbqt_par_QIODevice( 1 )->write( hbqt_par_char( 2 ) ) );
|
||||
}
|
||||
|
||||
/*
|
||||
* qint64 write ( const QByteArray & byteArray )
|
||||
*/
|
||||
HB_FUNC( QT_QIODEVICE_WRITE_2 )
|
||||
{
|
||||
hb_retnint( hbqt_par_QIODevice( 1 )->write( *hbqt_par_QByteArray( 2 ) ) );
|
||||
}
|
||||
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
#endif /* #if QT_VERSION >= 0x040500 */
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
382
harbour/contrib/hbqt/QProcess.cpp
Normal file
382
harbour/contrib/hbqt/QProcess.cpp
Normal file
@@ -0,0 +1,382 @@
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
/*
|
||||
* Harbour Project source code:
|
||||
* QT wrapper main header
|
||||
*
|
||||
* Copyright 2009 Pritpal Bedi <pritpal@vouchcac.com>
|
||||
*
|
||||
* Copyright 2009 Marcos Antonio Gambeta <marcosgambeta at gmail dot 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.
|
||||
*
|
||||
*/
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
#include "hbapi.h"
|
||||
#include "hbqt.h"
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
#if QT_VERSION >= 0x040500
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
/*
|
||||
* # FROM QIODevice
|
||||
* flags OpenMode
|
||||
* enum OpenModeFlag { NotOpen, ReadOnly, WriteOnly, ReadWrite, ..., Unbuffered }
|
||||
* enum ExitStatus { NormalExit, CrashExit }
|
||||
* enum ProcessChannel { StandardOutput, StandardError }
|
||||
* enum ProcessChannelMode { SeparateChannels, MergedChannels, ForwardedChannels }
|
||||
* enum ProcessError { FailedToStart, Crashed, Timedout, WriteError, ReadError, UnknownError }
|
||||
* enum ProcessState { NotRunning, Starting, Running }
|
||||
*/
|
||||
|
||||
|
||||
#include <QtCore/QProcess>
|
||||
|
||||
|
||||
/*
|
||||
* QProcess ( QObject * parent = 0 )
|
||||
* virtual ~QProcess ()
|
||||
*/
|
||||
HB_FUNC( QT_QPROCESS )
|
||||
{
|
||||
if( hb_pcount() == 1 && HB_ISPOINTER( 1 ) )
|
||||
{
|
||||
hb_retptr( ( QProcess* ) new QProcess( hbqt_par_QObject( 1 ) ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
hb_retptr( ( QProcess* ) new QProcess() );
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* DESTRUCTOR
|
||||
*/
|
||||
HB_FUNC( QT_QPROCESS_DESTROY )
|
||||
{
|
||||
hbqt_par_QProcess( 1 )->~QProcess();
|
||||
}
|
||||
|
||||
/*
|
||||
* virtual void close ()
|
||||
*/
|
||||
HB_FUNC( QT_QPROCESS_CLOSE )
|
||||
{
|
||||
hbqt_par_QProcess( 1 )->close();
|
||||
}
|
||||
|
||||
/*
|
||||
* void closeReadChannel ( ProcessChannel channel )
|
||||
*/
|
||||
HB_FUNC( QT_QPROCESS_CLOSEREADCHANNEL )
|
||||
{
|
||||
hbqt_par_QProcess( 1 )->closeReadChannel( ( QProcess::ProcessChannel ) hb_parni( 2 ) );
|
||||
}
|
||||
|
||||
/*
|
||||
* void closeWriteChannel ()
|
||||
*/
|
||||
HB_FUNC( QT_QPROCESS_CLOSEWRITECHANNEL )
|
||||
{
|
||||
hbqt_par_QProcess( 1 )->closeWriteChannel();
|
||||
}
|
||||
|
||||
/*
|
||||
* QStringList environment () const
|
||||
*/
|
||||
HB_FUNC( QT_QPROCESS_ENVIRONMENT )
|
||||
{
|
||||
hb_retptr( new QStringList( hbqt_par_QProcess( 1 )->environment() ) );
|
||||
}
|
||||
|
||||
/*
|
||||
* QProcess::ProcessError error () const
|
||||
*/
|
||||
HB_FUNC( QT_QPROCESS_ERROR )
|
||||
{
|
||||
hb_retni( ( QProcess::ProcessError ) hbqt_par_QProcess( 1 )->error() );
|
||||
}
|
||||
|
||||
/*
|
||||
* int exitCode () const
|
||||
*/
|
||||
HB_FUNC( QT_QPROCESS_EXITCODE )
|
||||
{
|
||||
hb_retni( hbqt_par_QProcess( 1 )->exitCode() );
|
||||
}
|
||||
|
||||
/*
|
||||
* QProcess::ExitStatus exitStatus () const
|
||||
*/
|
||||
HB_FUNC( QT_QPROCESS_EXITSTATUS )
|
||||
{
|
||||
hb_retni( ( QProcess::ExitStatus ) hbqt_par_QProcess( 1 )->exitStatus() );
|
||||
}
|
||||
|
||||
/*
|
||||
* Q_PID pid () const
|
||||
*/
|
||||
HB_FUNC( QT_QPROCESS_PID )
|
||||
{
|
||||
hb_retptr( new Q_PID( hbqt_par_QProcess( 1 )->pid() ) );
|
||||
}
|
||||
|
||||
/*
|
||||
* ProcessChannelMode processChannelMode () const
|
||||
*/
|
||||
HB_FUNC( QT_QPROCESS_PROCESSCHANNELMODE )
|
||||
{
|
||||
hb_retni( ( QProcess::ProcessChannelMode ) hbqt_par_QProcess( 1 )->processChannelMode() );
|
||||
}
|
||||
|
||||
/*
|
||||
* QByteArray readAllStandardError ()
|
||||
*/
|
||||
HB_FUNC( QT_QPROCESS_READALLSTANDARDERROR )
|
||||
{
|
||||
hb_retptr( new QByteArray( hbqt_par_QProcess( 1 )->readAllStandardError() ) );
|
||||
}
|
||||
|
||||
/*
|
||||
* QByteArray readAllStandardOutput ()
|
||||
*/
|
||||
HB_FUNC( QT_QPROCESS_READALLSTANDARDOUTPUT )
|
||||
{
|
||||
hb_retptr( new QByteArray( hbqt_par_QProcess( 1 )->readAllStandardOutput() ) );
|
||||
}
|
||||
|
||||
/*
|
||||
* ProcessChannel readChannel () const
|
||||
*/
|
||||
HB_FUNC( QT_QPROCESS_READCHANNEL )
|
||||
{
|
||||
hb_retni( ( QProcess::ProcessChannel ) hbqt_par_QProcess( 1 )->readChannel() );
|
||||
}
|
||||
|
||||
/*
|
||||
* void setEnvironment ( const QStringList & environment )
|
||||
*/
|
||||
HB_FUNC( QT_QPROCESS_SETENVIRONMENT )
|
||||
{
|
||||
hbqt_par_QProcess( 1 )->setEnvironment( *hbqt_par_QStringList( 2 ) );
|
||||
}
|
||||
|
||||
/*
|
||||
* void setProcessChannelMode ( ProcessChannelMode mode )
|
||||
*/
|
||||
HB_FUNC( QT_QPROCESS_SETPROCESSCHANNELMODE )
|
||||
{
|
||||
hbqt_par_QProcess( 1 )->setProcessChannelMode( ( QProcess::ProcessChannelMode ) hb_parni( 2 ) );
|
||||
}
|
||||
|
||||
/*
|
||||
* void setReadChannel ( ProcessChannel channel )
|
||||
*/
|
||||
HB_FUNC( QT_QPROCESS_SETREADCHANNEL )
|
||||
{
|
||||
hbqt_par_QProcess( 1 )->setReadChannel( ( QProcess::ProcessChannel ) hb_parni( 2 ) );
|
||||
}
|
||||
|
||||
/*
|
||||
* void setStandardErrorFile ( const QString & fileName, OpenMode mode = Truncate )
|
||||
*/
|
||||
HB_FUNC( QT_QPROCESS_SETSTANDARDERRORFILE )
|
||||
{
|
||||
hbqt_par_QProcess( 1 )->setStandardErrorFile( hbqt_par_QString( 2 ), ( HB_ISNUM( 3 ) ? ( QProcess::OpenMode ) hb_parni( 3 ) : ( QProcess::OpenMode ) QProcess::Truncate ) );
|
||||
}
|
||||
|
||||
/*
|
||||
* void setStandardInputFile ( const QString & fileName )
|
||||
*/
|
||||
HB_FUNC( QT_QPROCESS_SETSTANDARDINPUTFILE )
|
||||
{
|
||||
hbqt_par_QProcess( 1 )->setStandardInputFile( hbqt_par_QString( 2 ) );
|
||||
}
|
||||
|
||||
/*
|
||||
* void setStandardOutputFile ( const QString & fileName, OpenMode mode = Truncate )
|
||||
*/
|
||||
HB_FUNC( QT_QPROCESS_SETSTANDARDOUTPUTFILE )
|
||||
{
|
||||
hbqt_par_QProcess( 1 )->setStandardOutputFile( hbqt_par_QString( 2 ), ( HB_ISNUM( 3 ) ? ( QProcess::OpenMode ) hb_parni( 3 ) : ( QProcess::OpenMode ) QProcess::Truncate ) );
|
||||
}
|
||||
|
||||
/*
|
||||
* void setStandardOutputProcess ( QProcess * destination )
|
||||
*/
|
||||
HB_FUNC( QT_QPROCESS_SETSTANDARDOUTPUTPROCESS )
|
||||
{
|
||||
hbqt_par_QProcess( 1 )->setStandardOutputProcess( hbqt_par_QProcess( 2 ) );
|
||||
}
|
||||
|
||||
/*
|
||||
* void setWorkingDirectory ( const QString & dir )
|
||||
*/
|
||||
HB_FUNC( QT_QPROCESS_SETWORKINGDIRECTORY )
|
||||
{
|
||||
hbqt_par_QProcess( 1 )->setWorkingDirectory( hbqt_par_QString( 2 ) );
|
||||
}
|
||||
|
||||
/*
|
||||
* void start ( const QString & program, const QStringList & arguments, OpenMode mode = ReadWrite )
|
||||
*/
|
||||
HB_FUNC( QT_QPROCESS_START )
|
||||
{
|
||||
hbqt_par_QProcess( 1 )->start( hbqt_par_QString( 2 ), *hbqt_par_QStringList( 3 ), ( HB_ISNUM( 4 ) ? ( QProcess::OpenMode ) hb_parni( 4 ) : ( QProcess::OpenMode ) QProcess::ReadWrite ) );
|
||||
}
|
||||
|
||||
/*
|
||||
* void start ( const QString & program, OpenMode mode = ReadWrite )
|
||||
*/
|
||||
HB_FUNC( QT_QPROCESS_START_1 )
|
||||
{
|
||||
hbqt_par_QProcess( 1 )->start( hbqt_par_QString( 2 ), ( HB_ISNUM( 3 ) ? ( QProcess::OpenMode ) hb_parni( 3 ) : ( QProcess::OpenMode ) QProcess::ReadWrite ) );
|
||||
}
|
||||
|
||||
/*
|
||||
* QProcess::ProcessState state () const
|
||||
*/
|
||||
HB_FUNC( QT_QPROCESS_STATE )
|
||||
{
|
||||
hb_retni( ( QProcess::ProcessState ) hbqt_par_QProcess( 1 )->state() );
|
||||
}
|
||||
|
||||
/*
|
||||
* bool waitForFinished ( int msecs = 30000 )
|
||||
*/
|
||||
HB_FUNC( QT_QPROCESS_WAITFORFINISHED )
|
||||
{
|
||||
hb_retl( hbqt_par_QProcess( 1 )->waitForFinished( ( HB_ISNUM( 2 ) ? hb_parni( 2 ) : 30000 ) ) );
|
||||
}
|
||||
|
||||
/*
|
||||
* bool waitForStarted ( int msecs = 30000 )
|
||||
*/
|
||||
HB_FUNC( QT_QPROCESS_WAITFORSTARTED )
|
||||
{
|
||||
hb_retl( hbqt_par_QProcess( 1 )->waitForStarted( ( HB_ISNUM( 2 ) ? hb_parni( 2 ) : 30000 ) ) );
|
||||
}
|
||||
|
||||
/*
|
||||
* QString workingDirectory () const
|
||||
*/
|
||||
HB_FUNC( QT_QPROCESS_WORKINGDIRECTORY )
|
||||
{
|
||||
hb_retc( hbqt_par_QProcess( 1 )->workingDirectory().toLatin1().data() );
|
||||
}
|
||||
|
||||
/*
|
||||
* int execute ( const QString & program, const QStringList & arguments )
|
||||
*/
|
||||
HB_FUNC( QT_QPROCESS_EXECUTE )
|
||||
{
|
||||
hb_retni( hbqt_par_QProcess( 1 )->execute( hbqt_par_QString( 2 ), *hbqt_par_QStringList( 3 ) ) );
|
||||
}
|
||||
|
||||
/*
|
||||
* int execute ( const QString & program )
|
||||
*/
|
||||
HB_FUNC( QT_QPROCESS_EXECUTE_1 )
|
||||
{
|
||||
hb_retni( hbqt_par_QProcess( 1 )->execute( hbqt_par_QString( 2 ) ) );
|
||||
}
|
||||
|
||||
/*
|
||||
* bool startDetached ( const QString & program, const QStringList & arguments, const QString & workingDirectory, qint64 * pid = 0 )
|
||||
*/
|
||||
HB_FUNC( QT_QPROCESS_STARTDETACHED )
|
||||
{
|
||||
qint64 iPid = 0;
|
||||
|
||||
hb_retl( hbqt_par_QProcess( 1 )->startDetached( hbqt_par_QString( 2 ), *hbqt_par_QStringList( 3 ), hbqt_par_QString( 4 ), &iPid ) );
|
||||
|
||||
hb_stornint( iPid, 5 );
|
||||
}
|
||||
|
||||
/*
|
||||
* bool startDetached ( const QString & program, const QStringList & arguments )
|
||||
*/
|
||||
HB_FUNC( QT_QPROCESS_STARTDETACHED_1 )
|
||||
{
|
||||
hb_retl( hbqt_par_QProcess( 1 )->startDetached( hbqt_par_QString( 2 ), *hbqt_par_QStringList( 3 ) ) );
|
||||
}
|
||||
|
||||
/*
|
||||
* bool startDetached ( const QString & program )
|
||||
*/
|
||||
HB_FUNC( QT_QPROCESS_STARTDETACHED_2 )
|
||||
{
|
||||
hb_retl( hbqt_par_QProcess( 1 )->startDetached( hbqt_par_QString( 2 ) ) );
|
||||
}
|
||||
|
||||
/*
|
||||
* QStringList systemEnvironment ()
|
||||
*/
|
||||
HB_FUNC( QT_QPROCESS_SYSTEMENVIRONMENT )
|
||||
{
|
||||
hb_retptr( new QStringList( hbqt_par_QProcess( 1 )->systemEnvironment() ) );
|
||||
}
|
||||
|
||||
/*
|
||||
* void kill ()
|
||||
*/
|
||||
HB_FUNC( QT_QPROCESS_KILL )
|
||||
{
|
||||
hbqt_par_QProcess( 1 )->kill();
|
||||
}
|
||||
|
||||
/*
|
||||
* void terminate ()
|
||||
*/
|
||||
HB_FUNC( QT_QPROCESS_TERMINATE )
|
||||
{
|
||||
hbqt_par_QProcess( 1 )->terminate();
|
||||
}
|
||||
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
#endif /* #if QT_VERSION >= 0x040500 */
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
105
harbour/contrib/hbqt/TQButtonGroup.prg
Normal file
105
harbour/contrib/hbqt/TQButtonGroup.prg
Normal file
@@ -0,0 +1,105 @@
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
/*
|
||||
* Harbour Project source code:
|
||||
* QT wrapper main header
|
||||
*
|
||||
* Copyright 2009 Pritpal Bedi <pritpal@vouchcac.com>
|
||||
*
|
||||
* Copyright 2009 Marcos Antonio Gambeta <marcosgambeta at gmail dot 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.
|
||||
*
|
||||
*/
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
|
||||
#include "hbclass.ch"
|
||||
|
||||
|
||||
CREATE CLASS QButtonGroup INHERIT QObject
|
||||
|
||||
VAR pParent
|
||||
VAR pPtr
|
||||
|
||||
METHOD New()
|
||||
METHOD Configure( xObject )
|
||||
METHOD Destroy() INLINE Qt_QButtonGroup_destroy( ::pPtr )
|
||||
|
||||
METHOD addButton( pButton ) INLINE Qt_QButtonGroup_addButton( ::pPtr, pButton )
|
||||
METHOD addButton_1( pButton, nId ) INLINE Qt_QButtonGroup_addButton_1( ::pPtr, pButton, nId )
|
||||
METHOD button( nId ) INLINE Qt_QButtonGroup_button( ::pPtr, nId )
|
||||
METHOD checkedButton() INLINE Qt_QButtonGroup_checkedButton( ::pPtr )
|
||||
METHOD checkedId() INLINE Qt_QButtonGroup_checkedId( ::pPtr )
|
||||
METHOD exclusive() INLINE Qt_QButtonGroup_exclusive( ::pPtr )
|
||||
METHOD id( pButton ) INLINE Qt_QButtonGroup_id( ::pPtr, pButton )
|
||||
METHOD removeButton( pButton ) INLINE Qt_QButtonGroup_removeButton( ::pPtr, pButton )
|
||||
METHOD setExclusive( lBool ) INLINE Qt_QButtonGroup_setExclusive( ::pPtr, lBool )
|
||||
METHOD setId( pButton, nId ) INLINE Qt_QButtonGroup_setId( ::pPtr, pButton, nId )
|
||||
|
||||
ENDCLASS
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
METHOD New( pParent ) CLASS QButtonGroup
|
||||
|
||||
::pParent := pParent
|
||||
|
||||
::pPtr := Qt_QButtonGroup( pParent )
|
||||
|
||||
RETURN Self
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
METHOD Configure( xObject ) CLASS QButtonGroup
|
||||
|
||||
IF hb_isObject( xObject )
|
||||
::pPtr := xObject:pPtr
|
||||
ELSEIF hb_isPointer( xObject )
|
||||
::pPtr := xObject
|
||||
ENDIF
|
||||
|
||||
RETURN Self
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
128
harbour/contrib/hbqt/TQIODevice.prg
Normal file
128
harbour/contrib/hbqt/TQIODevice.prg
Normal file
@@ -0,0 +1,128 @@
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
/*
|
||||
* Harbour Project source code:
|
||||
* QT wrapper main header
|
||||
*
|
||||
* Copyright 2009 Pritpal Bedi <pritpal@vouchcac.com>
|
||||
*
|
||||
* Copyright 2009 Marcos Antonio Gambeta <marcosgambeta at gmail dot 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.
|
||||
*
|
||||
*/
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
|
||||
#include "hbclass.ch"
|
||||
|
||||
|
||||
CREATE CLASS QIODevice INHERIT QObject
|
||||
|
||||
VAR pParent
|
||||
VAR pPtr
|
||||
|
||||
METHOD New()
|
||||
METHOD Configure( xObject )
|
||||
METHOD Destroy() INLINE Qt_QIODevice_destroy( ::pPtr )
|
||||
|
||||
METHOD atEnd() INLINE Qt_QIODevice_atEnd( ::pPtr )
|
||||
METHOD bytesAvailable() INLINE Qt_QIODevice_bytesAvailable( ::pPtr )
|
||||
METHOD bytesToWrite() INLINE Qt_QIODevice_bytesToWrite( ::pPtr )
|
||||
METHOD canReadLine() INLINE Qt_QIODevice_canReadLine( ::pPtr )
|
||||
METHOD close() INLINE Qt_QIODevice_close( ::pPtr )
|
||||
METHOD errorString() INLINE Qt_QIODevice_errorString( ::pPtr )
|
||||
METHOD getChar( cC ) INLINE Qt_QIODevice_getChar( ::pPtr, cC )
|
||||
METHOD isOpen() INLINE Qt_QIODevice_isOpen( ::pPtr )
|
||||
METHOD isReadable() INLINE Qt_QIODevice_isReadable( ::pPtr )
|
||||
METHOD isSequential() INLINE Qt_QIODevice_isSequential( ::pPtr )
|
||||
METHOD isTextModeEnabled() INLINE Qt_QIODevice_isTextModeEnabled( ::pPtr )
|
||||
METHOD isWritable() INLINE Qt_QIODevice_isWritable( ::pPtr )
|
||||
METHOD open( nMode ) INLINE Qt_QIODevice_open( ::pPtr, nMode )
|
||||
METHOD openMode() INLINE Qt_QIODevice_openMode( ::pPtr )
|
||||
METHOD peek( cData, nMaxSize ) INLINE Qt_QIODevice_peek( ::pPtr, cData, nMaxSize )
|
||||
METHOD peek_1( nMaxSize ) INLINE Qt_QIODevice_peek_1( ::pPtr, nMaxSize )
|
||||
METHOD pos() INLINE Qt_QIODevice_pos( ::pPtr )
|
||||
METHOD putChar( cC ) INLINE Qt_QIODevice_putChar( ::pPtr, cC )
|
||||
METHOD read( cData, nMaxSize ) INLINE Qt_QIODevice_read( ::pPtr, cData, nMaxSize )
|
||||
METHOD read_1( nMaxSize ) INLINE Qt_QIODevice_read_1( ::pPtr, nMaxSize )
|
||||
METHOD readAll() INLINE Qt_QIODevice_readAll( ::pPtr )
|
||||
METHOD readLine( cData, nMaxSize ) INLINE Qt_QIODevice_readLine( ::pPtr, cData, nMaxSize )
|
||||
METHOD readLine_1( nMaxSize ) INLINE Qt_QIODevice_readLine_1( ::pPtr, nMaxSize )
|
||||
METHOD reset() INLINE Qt_QIODevice_reset( ::pPtr )
|
||||
METHOD seek( nPos ) INLINE Qt_QIODevice_seek( ::pPtr, nPos )
|
||||
METHOD setTextModeEnabled( lEnabled ) INLINE Qt_QIODevice_setTextModeEnabled( ::pPtr, lEnabled )
|
||||
METHOD size() INLINE Qt_QIODevice_size( ::pPtr )
|
||||
METHOD ungetChar( cC ) INLINE Qt_QIODevice_ungetChar( ::pPtr, cC )
|
||||
METHOD waitForBytesWritten( nMsecs ) INLINE Qt_QIODevice_waitForBytesWritten( ::pPtr, nMsecs )
|
||||
METHOD waitForReadyRead( nMsecs ) INLINE Qt_QIODevice_waitForReadyRead( ::pPtr, nMsecs )
|
||||
METHOD write( pData, nMaxSize ) INLINE Qt_QIODevice_write( ::pPtr, pData, nMaxSize )
|
||||
METHOD write_1( pData ) INLINE Qt_QIODevice_write_1( ::pPtr, pData )
|
||||
METHOD write_2( pByteArray ) INLINE Qt_QIODevice_write_2( ::pPtr, pByteArray )
|
||||
|
||||
ENDCLASS
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
METHOD New( pParent ) CLASS QIODevice
|
||||
|
||||
::pParent := pParent
|
||||
|
||||
::pPtr := Qt_QIODevice( pParent )
|
||||
|
||||
RETURN Self
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
METHOD Configure( xObject ) CLASS QIODevice
|
||||
|
||||
IF hb_isObject( xObject )
|
||||
::pPtr := xObject:pPtr
|
||||
ELSEIF hb_isPointer( xObject )
|
||||
::pPtr := xObject
|
||||
ENDIF
|
||||
|
||||
RETURN Self
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
129
harbour/contrib/hbqt/TQProcess.prg
Normal file
129
harbour/contrib/hbqt/TQProcess.prg
Normal file
@@ -0,0 +1,129 @@
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
/*
|
||||
* Harbour Project source code:
|
||||
* QT wrapper main header
|
||||
*
|
||||
* Copyright 2009 Pritpal Bedi <pritpal@vouchcac.com>
|
||||
*
|
||||
* Copyright 2009 Marcos Antonio Gambeta <marcosgambeta at gmail dot 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.
|
||||
*
|
||||
*/
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
|
||||
#include "hbclass.ch"
|
||||
|
||||
|
||||
CREATE CLASS QProcess INHERIT QIODevice
|
||||
|
||||
VAR pParent
|
||||
VAR pPtr
|
||||
|
||||
METHOD New()
|
||||
METHOD Configure( xObject )
|
||||
METHOD Destroy() INLINE Qt_QProcess_destroy( ::pPtr )
|
||||
|
||||
METHOD close() INLINE Qt_QProcess_close( ::pPtr )
|
||||
METHOD closeReadChannel( nChannel ) INLINE Qt_QProcess_closeReadChannel( ::pPtr, nChannel )
|
||||
METHOD closeWriteChannel() INLINE Qt_QProcess_closeWriteChannel( ::pPtr )
|
||||
METHOD environment() INLINE Qt_QProcess_environment( ::pPtr )
|
||||
METHOD error() INLINE Qt_QProcess_error( ::pPtr )
|
||||
METHOD exitCode() INLINE Qt_QProcess_exitCode( ::pPtr )
|
||||
METHOD exitStatus() INLINE Qt_QProcess_exitStatus( ::pPtr )
|
||||
METHOD pid() INLINE Qt_QProcess_pid( ::pPtr )
|
||||
METHOD processChannelMode() INLINE Qt_QProcess_processChannelMode( ::pPtr )
|
||||
METHOD readAllStandardError() INLINE Qt_QProcess_readAllStandardError( ::pPtr )
|
||||
METHOD readAllStandardOutput() INLINE Qt_QProcess_readAllStandardOutput( ::pPtr )
|
||||
METHOD readChannel() INLINE Qt_QProcess_readChannel( ::pPtr )
|
||||
METHOD setEnvironment( pEnvironment ) INLINE Qt_QProcess_setEnvironment( ::pPtr, pEnvironment )
|
||||
METHOD setProcessChannelMode( nMode ) INLINE Qt_QProcess_setProcessChannelMode( ::pPtr, nMode )
|
||||
METHOD setReadChannel( nChannel ) INLINE Qt_QProcess_setReadChannel( ::pPtr, nChannel )
|
||||
METHOD setStandardErrorFile( cFileName, nMode ) INLINE Qt_QProcess_setStandardErrorFile( ::pPtr, cFileName, nMode )
|
||||
METHOD setStandardInputFile( cFileName ) INLINE Qt_QProcess_setStandardInputFile( ::pPtr, cFileName )
|
||||
METHOD setStandardOutputFile( cFileName, nMode ) INLINE Qt_QProcess_setStandardOutputFile( ::pPtr, cFileName, nMode )
|
||||
METHOD setStandardOutputProcess( pDestination ) INLINE Qt_QProcess_setStandardOutputProcess( ::pPtr, pDestination )
|
||||
METHOD setWorkingDirectory( cDir ) INLINE Qt_QProcess_setWorkingDirectory( ::pPtr, cDir )
|
||||
METHOD start( cProgram, pArguments, nMode ) INLINE Qt_QProcess_start( ::pPtr, cProgram, pArguments, nMode )
|
||||
METHOD start_1( cProgram, nMode ) INLINE Qt_QProcess_start_1( ::pPtr, cProgram, nMode )
|
||||
METHOD state() INLINE Qt_QProcess_state( ::pPtr )
|
||||
METHOD waitForFinished( nMsecs ) INLINE Qt_QProcess_waitForFinished( ::pPtr, nMsecs )
|
||||
METHOD waitForStarted( nMsecs ) INLINE Qt_QProcess_waitForStarted( ::pPtr, nMsecs )
|
||||
METHOD workingDirectory() INLINE Qt_QProcess_workingDirectory( ::pPtr )
|
||||
METHOD execute( cProgram, pArguments ) INLINE Qt_QProcess_execute( ::pPtr, cProgram, pArguments )
|
||||
METHOD execute_1( cProgram ) INLINE Qt_QProcess_execute_1( ::pPtr, cProgram )
|
||||
METHOD startDetached( cProgram, pArguments, cWorkingDirectory, nPid ) INLINE Qt_QProcess_startDetached( ::pPtr, cProgram, pArguments, cWorkingDirectory, nPid )
|
||||
METHOD startDetached_1( cProgram, pArguments ) INLINE Qt_QProcess_startDetached_1( ::pPtr, cProgram, pArguments )
|
||||
METHOD startDetached_2( cProgram ) INLINE Qt_QProcess_startDetached_2( ::pPtr, cProgram )
|
||||
METHOD systemEnvironment() INLINE Qt_QProcess_systemEnvironment( ::pPtr )
|
||||
METHOD kill() INLINE Qt_QProcess_kill( ::pPtr )
|
||||
METHOD terminate() INLINE Qt_QProcess_terminate( ::pPtr )
|
||||
|
||||
ENDCLASS
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
METHOD New( pParent ) CLASS QProcess
|
||||
|
||||
::pParent := pParent
|
||||
|
||||
::pPtr := Qt_QProcess( pParent )
|
||||
|
||||
RETURN Self
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
METHOD Configure( xObject ) CLASS QProcess
|
||||
|
||||
IF hb_isObject( xObject )
|
||||
::pPtr := xObject:pPtr
|
||||
ELSEIF hb_isPointer( xObject )
|
||||
::pPtr := xObject
|
||||
ENDIF
|
||||
|
||||
RETURN Self
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
@@ -714,6 +714,14 @@ STATIC FUNCTION ParseProto( cProto, cWidget, txt_, doc_, aEnum, func_ )
|
||||
aA[ PRT_BODY ] := '( char ) hb_parni( ' + cHBIdx + ' )'
|
||||
aA[ PRT_DOC ] := 'n' + cDocNM
|
||||
|
||||
CASE aA[ PRT_CAST ] == 'char' .and. aA[ PRT_L_FAR ] .and. !( aA[ PRT_L_CONST ] )
|
||||
aA[ PRT_BODY ] := '( char * ) hb_parc( ' + cHBIdx + ' )'
|
||||
aA[ PRT_DOC ] := 'c' + cDocNM
|
||||
|
||||
CASE aA[ PRT_CAST ] == 'char' .and. !( aA[ PRT_L_FAR ] ) .and. !( aA[ PRT_L_CONST ] )
|
||||
aA[ PRT_BODY ] := '( char ) hb_parni( ' + cHBIdx + ' )'
|
||||
aA[ PRT_DOC ] := 'c' + cDocNM
|
||||
|
||||
CASE ( '::' $ aA[ PRT_CAST ] ) .and. aA[ PRT_L_FAR ]
|
||||
aadd( aPre, { aA[ PRT_CAST ] + ' i' + cDocNM + ';', nHBIdx, 'i' + cDocNM, 'hb_storni' } )
|
||||
aA[ PRT_BODY ] := '&i' + cDocNM
|
||||
|
||||
@@ -25,6 +25,7 @@ QApplication.qth
|
||||
QBitmap.qth
|
||||
QBoxLayout.qth
|
||||
QBrush.qth
|
||||
QButtonGroup.qth
|
||||
QCalendarWidget.qth
|
||||
QCheckBox.qth
|
||||
QClipboard.qth
|
||||
@@ -77,6 +78,7 @@ QImageReader.qth
|
||||
QImageWriter.qth
|
||||
QInputDialog.qth
|
||||
QInputEvent.qth
|
||||
QIODevice.qth
|
||||
QKeyEvent.qth
|
||||
QKeySequence.qth
|
||||
QLabel.qth
|
||||
@@ -114,6 +116,7 @@ QPrintDialog.qth
|
||||
QPrintEngine.qth
|
||||
QPrinter.qth
|
||||
QPrintPreviewDialog.qth
|
||||
QProcess.qth
|
||||
QProgressBar.qth
|
||||
QProgressDialog.qth
|
||||
QPushButton.qth
|
||||
|
||||
@@ -82,6 +82,7 @@
|
||||
#define hbqt_par_QBitmap( n ) ( ( QBitmap* ) hb_parptr( n ) )
|
||||
#define hbqt_par_QBoxLayout( n ) ( ( QBoxLayout* ) hb_parptr( n ) )
|
||||
#define hbqt_par_QBrush( n ) ( ( QBrush* ) hb_parptr( n ) )
|
||||
#define hbqt_par_QButtonGroup( n ) ( ( QButtonGroup* ) hb_parptr( n ) )
|
||||
#define hbqt_par_QByteArray( n ) ( ( QByteArray* ) hb_parptr( n ) )
|
||||
#define hbqt_par_QCalendarWidget( n ) ( ( QCalendarWidget* ) hb_parptr( n ) )
|
||||
#define hbqt_par_QCheckBox( n ) ( ( QCheckBox* ) hb_parptr( n ) )
|
||||
@@ -195,6 +196,7 @@
|
||||
#define hbqt_par_QPrintEngine( n ) ( ( QPrintEngine* ) hb_parptr( n ) )
|
||||
#define hbqt_par_QPrinter( n ) ( ( QPrinter* ) hb_parptr( n ) )
|
||||
#define hbqt_par_QPrintPreviewDialog( n ) ( ( QPrintPreviewDialog* ) hb_parptr( n ) )
|
||||
#define hbqt_par_QProcess( n ) ( ( QProcess* ) hb_parptr( n ) )
|
||||
#define hbqt_par_QProgressBar( n ) ( ( QProgressBar* ) hb_parptr( n ) )
|
||||
#define hbqt_par_QProgressDialog( n ) ( ( QProgressDialog* ) hb_parptr( n ) )
|
||||
#define hbqt_par_QPushButton( n ) ( ( QPushButton* ) hb_parptr( n ) )
|
||||
|
||||
117
harbour/contrib/hbqt/qth/QButtonGroup.qth
Normal file
117
harbour/contrib/hbqt/qth/QButtonGroup.qth
Normal file
@@ -0,0 +1,117 @@
|
||||
/*
|
||||
* $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>
|
||||
Inherits = QObject
|
||||
Type = Core
|
||||
New =
|
||||
</CLASS>
|
||||
|
||||
<CODE>
|
||||
#include <QtGui/QButtonGroup>
|
||||
|
||||
|
||||
/*
|
||||
* QButtonGroup ( QObject * parent = 0 )
|
||||
* ~QButtonGroup ()
|
||||
*/
|
||||
HB_FUNC( QT_QBUTTONGROUP )
|
||||
{
|
||||
if( hb_pcount() == 1 && HB_ISPOINTER( 1 ) )
|
||||
{
|
||||
hb_retptr( ( QButtonGroup* ) new QButtonGroup( hbqt_par_QObject( 1 ) ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
hb_retptr( ( QButtonGroup* ) new QButtonGroup() );
|
||||
}
|
||||
}
|
||||
</CODE>
|
||||
|
||||
<ENUMS>
|
||||
</ENUMS>
|
||||
|
||||
<PROTOS>
|
||||
void addButton ( QAbstractButton * button )
|
||||
void addButton ( QAbstractButton * button, int id )
|
||||
QAbstractButton * button ( int id ) const
|
||||
QList<QAbstractButton *> buttons () const
|
||||
QAbstractButton * checkedButton () const
|
||||
int checkedId () const
|
||||
bool exclusive () const
|
||||
int id ( QAbstractButton * button ) const
|
||||
void removeButton ( QAbstractButton * button )
|
||||
void setExclusive ( bool )
|
||||
void setId ( QAbstractButton * button, int id )
|
||||
</PROTOS>
|
||||
|
||||
<SLOTS>
|
||||
</SLOTS>
|
||||
|
||||
<SIGNALS>
|
||||
void buttonClicked ( QAbstractButton * button )
|
||||
void buttonClicked ( int id )
|
||||
void buttonPressed ( QAbstractButton * button )
|
||||
void buttonPressed ( int id )
|
||||
void buttonReleased ( QAbstractButton * button )
|
||||
void buttonReleased ( int id )
|
||||
</SIGNALS>
|
||||
|
||||
<VARIABLES>
|
||||
</VARIABLES>
|
||||
|
||||
|
||||
|
||||
142
harbour/contrib/hbqt/qth/QIODevice.qth
Normal file
142
harbour/contrib/hbqt/qth/QIODevice.qth
Normal file
@@ -0,0 +1,142 @@
|
||||
/*
|
||||
* $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>
|
||||
Inherits = QObject
|
||||
Type = Core
|
||||
New =
|
||||
</CLASS>
|
||||
|
||||
<CODE>
|
||||
#include <QtCore/QIODevice>
|
||||
|
||||
|
||||
/*
|
||||
* QIODevice ()
|
||||
* QIODevice ( QObject * parent )
|
||||
* virtual ~QIODevice ()
|
||||
*/
|
||||
HB_FUNC( QT_QIODEVICE )
|
||||
{
|
||||
#if 0
|
||||
if( hb_pcount() == 1 && HB_ISPOINTER( 1 ) )
|
||||
{
|
||||
hb_retptr( ( QIODevice* ) new QIODevice( hbqt_par_QObject( 1 ) ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
hb_retptr( ( QIODevice* ) new QIODevice() );
|
||||
}
|
||||
#endif
|
||||
}
|
||||
</CODE>
|
||||
|
||||
<ENUMS>
|
||||
flags OpenMode
|
||||
enum OpenModeFlag { NotOpen, ReadOnly, WriteOnly, ReadWrite, ..., Unbuffered }
|
||||
</ENUMS>
|
||||
|
||||
<PROTOS>
|
||||
virtual bool atEnd () const
|
||||
virtual qint64 bytesAvailable () const
|
||||
virtual qint64 bytesToWrite () const
|
||||
virtual bool canReadLine () const
|
||||
virtual void close ()
|
||||
QString errorString () const
|
||||
bool getChar ( char * c )
|
||||
bool isOpen () const
|
||||
bool isReadable () const
|
||||
virtual bool isSequential () const
|
||||
bool isTextModeEnabled () const
|
||||
bool isWritable () const
|
||||
virtual bool open ( OpenMode mode )
|
||||
OpenMode openMode () const
|
||||
qint64 peek ( char * data, qint64 maxSize )
|
||||
QByteArray peek ( qint64 maxSize )
|
||||
virtual qint64 pos () const
|
||||
bool putChar ( char c )
|
||||
qint64 read ( char * data, qint64 maxSize )
|
||||
QByteArray read ( qint64 maxSize )
|
||||
QByteArray readAll ()
|
||||
qint64 readLine ( char * data, qint64 maxSize )
|
||||
QByteArray readLine ( qint64 maxSize = 0 )
|
||||
virtual bool reset ()
|
||||
virtual bool seek ( qint64 pos )
|
||||
void setTextModeEnabled ( bool enabled )
|
||||
virtual qint64 size () const
|
||||
void ungetChar ( char c )
|
||||
virtual bool waitForBytesWritten ( int msecs )
|
||||
virtual bool waitForReadyRead ( int msecs )
|
||||
qint64 write ( const char * data, qint64 maxSize )
|
||||
qint64 write ( const char * data )
|
||||
qint64 write ( const QByteArray & byteArray )
|
||||
</PROTOS>
|
||||
|
||||
<SLOTS>
|
||||
</SLOTS>
|
||||
|
||||
<SIGNALS>
|
||||
void aboutToClose ()
|
||||
void bytesWritten ( qint64 bytes )
|
||||
void readChannelFinished ()
|
||||
void readyRead ()
|
||||
</SIGNALS>
|
||||
|
||||
<VARIABLES>
|
||||
</VARIABLES>
|
||||
|
||||
|
||||
|
||||
150
harbour/contrib/hbqt/qth/QProcess.qth
Normal file
150
harbour/contrib/hbqt/qth/QProcess.qth
Normal file
@@ -0,0 +1,150 @@
|
||||
/*
|
||||
* $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>
|
||||
Inherits = QIODevice
|
||||
Type = Core
|
||||
New =
|
||||
</CLASS>
|
||||
|
||||
<CODE>
|
||||
#include <QtCore/QProcess>
|
||||
|
||||
|
||||
/*
|
||||
* QProcess ( QObject * parent = 0 )
|
||||
* virtual ~QProcess ()
|
||||
*/
|
||||
HB_FUNC( QT_QPROCESS )
|
||||
{
|
||||
if( hb_pcount() == 1 && HB_ISPOINTER( 1 ) )
|
||||
{
|
||||
hb_retptr( ( QProcess* ) new QProcess( hbqt_par_QObject( 1 ) ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
hb_retptr( ( QProcess* ) new QProcess() );
|
||||
}
|
||||
}
|
||||
</CODE>
|
||||
|
||||
<ENUMS>
|
||||
# FROM QIODevice
|
||||
flags OpenMode
|
||||
enum OpenModeFlag { NotOpen, ReadOnly, WriteOnly, ReadWrite, ..., Unbuffered }
|
||||
|
||||
enum ExitStatus { NormalExit, CrashExit }
|
||||
enum ProcessChannel { StandardOutput, StandardError }
|
||||
enum ProcessChannelMode { SeparateChannels, MergedChannels, ForwardedChannels }
|
||||
enum ProcessError { FailedToStart, Crashed, Timedout, WriteError, ReadError, UnknownError }
|
||||
enum ProcessState { NotRunning, Starting, Running }
|
||||
</ENUMS>
|
||||
|
||||
<PROTOS>
|
||||
virtual void close ()
|
||||
void closeReadChannel ( ProcessChannel channel )
|
||||
void closeWriteChannel ()
|
||||
QStringList environment () const
|
||||
QProcess::ProcessError error () const
|
||||
int exitCode () const
|
||||
QProcess::ExitStatus exitStatus () const
|
||||
Q_PID pid () const
|
||||
ProcessChannelMode processChannelMode () const
|
||||
QByteArray readAllStandardError ()
|
||||
QByteArray readAllStandardOutput ()
|
||||
ProcessChannel readChannel () const
|
||||
void setEnvironment ( const QStringList & environment )
|
||||
void setProcessChannelMode ( ProcessChannelMode mode )
|
||||
void setReadChannel ( ProcessChannel channel )
|
||||
void setStandardErrorFile ( const QString & fileName, OpenMode mode = Truncate )
|
||||
void setStandardInputFile ( const QString & fileName )
|
||||
void setStandardOutputFile ( const QString & fileName, OpenMode mode = Truncate )
|
||||
void setStandardOutputProcess ( QProcess * destination )
|
||||
void setWorkingDirectory ( const QString & dir )
|
||||
void start ( const QString & program, const QStringList & arguments, OpenMode mode = ReadWrite )
|
||||
void start ( const QString & program, OpenMode mode = ReadWrite )
|
||||
QProcess::ProcessState state () const
|
||||
bool waitForFinished ( int msecs = 30000 )
|
||||
bool waitForStarted ( int msecs = 30000 )
|
||||
QString workingDirectory () const
|
||||
|
||||
int execute ( const QString & program, const QStringList & arguments )
|
||||
int execute ( const QString & program )
|
||||
bool startDetached ( const QString & program, const QStringList & arguments, const QString & workingDirectory, qint64 * pid = 0 )
|
||||
bool startDetached ( const QString & program, const QStringList & arguments )
|
||||
bool startDetached ( const QString & program )
|
||||
QStringList systemEnvironment ()
|
||||
</PROTOS>
|
||||
|
||||
<SLOTS>
|
||||
void kill ()
|
||||
void terminate ()
|
||||
</SLOTS>
|
||||
|
||||
<SIGNALS>
|
||||
void error ( QProcess::ProcessError error )
|
||||
void finished ( int exitCode, QProcess::ExitStatus exitStatus )
|
||||
void readyReadStandardError ()
|
||||
void readyReadStandardOutput ()
|
||||
void started ()
|
||||
void stateChanged ( QProcess::ProcessState newState )
|
||||
</SIGNALS>
|
||||
|
||||
<VARIABLES>
|
||||
</VARIABLES>
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user