diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 241b4fdb43..9b980cbc38 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,70 @@ past entries belonging to author(s): Viktor Szakats. */ +2009-06-05 18:46 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com) + * harbour/contrib/hbqt/Makefile_gen + + + harbour/contrib/hbqt/hbqt_qcolor.cpp + + harbour/contrib/hbqt/hbqt_qconicalgradient.cpp + + harbour/contrib/hbqt/hbqt_qgradient.cpp + + harbour/contrib/hbqt/hbqt_qimage.cpp + + harbour/contrib/hbqt/hbqt_qimagereader.cpp + + harbour/contrib/hbqt/hbqt_qimagewriter.cpp + + harbour/contrib/hbqt/hbqt_qline.cpp + + harbour/contrib/hbqt/hbqt_qlineargradient.cpp + + harbour/contrib/hbqt/hbqt_qpalette.cpp + + harbour/contrib/hbqt/hbqt_qpicture.cpp + + harbour/contrib/hbqt/hbqt_qradialgradient.cpp + + harbour/contrib/hbqt/hbqt_qresource.cpp + + harbour/contrib/hbqt/hbqt_qsizepolicy.cpp + + harbour/contrib/hbqt/hbqt_qsound.cpp + + harbour/contrib/hbqt/hbqt_qstandarditem.cpp + + harbour/contrib/hbqt/hbqt_qstandarditemmodel.cpp + + * harbour/contrib/hbqt/hbqt.h + + * harbour/contrib/hbqt/generator/hbqtgen.prg + + + harbour/contrib/hbqt/TQColor.prg + + harbour/contrib/hbqt/TQConicalGradient.prg + + harbour/contrib/hbqt/TQGradient.prg + + harbour/contrib/hbqt/TQImage.prg + + harbour/contrib/hbqt/TQImageReader.prg + + harbour/contrib/hbqt/TQImageWriter.prg + + harbour/contrib/hbqt/TQLine.prg + + harbour/contrib/hbqt/TQLinearGradient.prg + + harbour/contrib/hbqt/TQPalette.prg + + harbour/contrib/hbqt/TQPicture.prg + + harbour/contrib/hbqt/TQRadialGradient.prg + + harbour/contrib/hbqt/TQResource.prg + + harbour/contrib/hbqt/TQSizePolicy.prg + + harbour/contrib/hbqt/TQSound.prg + + harbour/contrib/hbqt/TQStandardItem.prg + + harbour/contrib/hbqt/TQStandardItemModel.prg + + * harbour/contrib/hbqt/qth/QColor.qth + + harbour/contrib/hbqt/qth/QConicalGradient.qth + + harbour/contrib/hbqt/qth/QGradient.qth + + harbour/contrib/hbqt/qth/QImage.qth + + harbour/contrib/hbqt/qth/QImageReader.qth + + harbour/contrib/hbqt/qth/QImageWriter.qth + + harbour/contrib/hbqt/qth/QLine.qth + + harbour/contrib/hbqt/qth/QLinearGradient.qth + + harbour/contrib/hbqt/qth/QPalette.qth + + harbour/contrib/hbqt/qth/QPicture.qth + + harbour/contrib/hbqt/qth/QRadialGradient.qth + + harbour/contrib/hbqt/qth/QResource.qth + + harbour/contrib/hbqt/qth/QSizePolicy.qth + + harbour/contrib/hbqt/qth/QSound.qth + + harbour/contrib/hbqt/qth/QStandardItem.qth + + harbour/contrib/hbqt/qth/QStandardItemModel.qth + + * harbour/contrib/hbqt/generator/qt45.qtp + + + Added few new classes. With this commit number of classes + have reached 153. + + 2009-06-06 02:24 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/source/rdd/dbfnsx/dbfnsx1.c ! fixed stupid typo in C else block scope which caused false alarm diff --git a/harbour/contrib/hbqt/Makefile_gen b/harbour/contrib/hbqt/Makefile_gen index 8462a4712f..11e9fda3e2 100644 --- a/harbour/contrib/hbqt/Makefile_gen +++ b/harbour/contrib/hbqt/Makefile_gen @@ -23,6 +23,7 @@ CPP_SOURCES=\ hbqt_qcombobox.cpp \ hbqt_qcommandlinkbutton.cpp \ hbqt_qcommonstyle.cpp \ + hbqt_qconicalgradient.cpp \ hbqt_qcoreapplication.cpp \ hbqt_qdateedit.cpp \ hbqt_qdatetimeedit.cpp \ @@ -44,18 +45,24 @@ CPP_SOURCES=\ hbqt_qformlayout.cpp \ hbqt_qframe.cpp \ hbqt_qftp.cpp \ + hbqt_qgradient.cpp \ hbqt_qgridlayout.cpp \ hbqt_qgroupbox.cpp \ hbqt_qhboxlayout.cpp \ hbqt_qheaderview.cpp \ hbqt_qhttp.cpp \ hbqt_qicon.cpp \ + hbqt_qimage.cpp \ + hbqt_qimagereader.cpp \ + hbqt_qimagewriter.cpp \ hbqt_qinputdialog.cpp \ hbqt_qinputevent.cpp \ hbqt_qlabel.cpp \ hbqt_qlayout.cpp \ hbqt_qlayoutitem.cpp \ hbqt_qlcdnumber.cpp \ + hbqt_qline.cpp \ + hbqt_qlineargradient.cpp \ hbqt_qlineedit.cpp \ hbqt_qlistview.cpp \ hbqt_qlistwidget.cpp \ @@ -69,7 +76,9 @@ CPP_SOURCES=\ hbqt_qpagesetupdialog.cpp \ hbqt_qpainter.cpp \ hbqt_qpaintevent.cpp \ + hbqt_qpalette.cpp \ hbqt_qpen.cpp \ + hbqt_qpicture.cpp \ hbqt_qpixmap.cpp \ hbqt_qpoint.cpp \ hbqt_qpointf.cpp \ @@ -78,20 +87,26 @@ CPP_SOURCES=\ hbqt_qprogressbar.cpp \ hbqt_qprogressdialog.cpp \ hbqt_qpushbutton.cpp \ + hbqt_qradialgradient.cpp \ hbqt_qrect.cpp \ hbqt_qrectf.cpp \ hbqt_qradiobutton.cpp \ hbqt_qregion.cpp \ + hbqt_qresource.cpp \ hbqt_qscrollarea.cpp \ hbqt_qscrollbar.cpp \ hbqt_qsignalmapper.cpp \ hbqt_qsize.cpp \ hbqt_qsizef.cpp \ hbqt_qsizegrip.cpp \ + hbqt_qsizepolicy.cpp \ hbqt_qslider.cpp \ + hbqt_qsound.cpp \ hbqt_qspinbox.cpp \ hbqt_qsplashscreen.cpp \ hbqt_qsplitter.cpp \ + hbqt_qstandarditem.cpp \ + hbqt_qstandarditemmodel.cpp \ hbqt_qstatusbar.cpp \ hbqt_qstyle.cpp \ hbqt_qtabbar.cpp \ @@ -169,10 +184,12 @@ PRG_SOURCES=\ TQCalendarWidget.prg \ TQCheckBox.prg \ TQClipboard.prg \ + TQColor.prg \ TQColorDialog.prg \ TQComboBox.prg \ TQCommandLinkButton.prg \ TQCommonStyle.prg \ + TQConicalGradient.prg \ TQDateEdit.prg \ TQDateTimeEdit.prg \ TQDesktopWidget.prg \ @@ -193,18 +210,24 @@ PRG_SOURCES=\ TQFormLayout.prg \ TQFrame.prg \ TQFtp.prg \ + TQGradient.prg \ TQGridLayout.prg \ TQGroupBox.prg \ TQHBoxLayout.prg \ TQHeaderView.prg \ TQHttp.prg \ TQIcon.prg \ + TQImage.prg \ + TQImageReader.prg \ + TQImageWriter.prg \ TQInputDialog.prg \ TQInputEvent.prg \ TQLabel.prg \ TQLayout.prg \ TQLayoutItem.prg \ TQLCDNumber.prg \ + TQLine.prg \ + TQLinearGradient.prg \ TQLineEdit.prg \ TQListView.prg \ TQListWidget.prg \ @@ -218,7 +241,9 @@ PRG_SOURCES=\ TQPageSetupDialog.prg \ TQPainter.prg \ TQPaintEvent.prg \ + TQPalette.prg \ TQPen.prg \ + TQPicture.prg \ TQPixmap.prg \ TQPoint.prg \ TQPointF.prg \ @@ -227,20 +252,26 @@ PRG_SOURCES=\ TQProgressBar.prg \ TQProgressDialog.prg \ TQPushButton.prg \ + TQRadialGradient.prg \ TQRect.prg \ TQRectF.prg \ TQRadioButton.prg \ TQRegion.prg \ + TQResource.prg \ TQScrollArea.prg \ TQScrollBar.prg \ TQSignalMapper.prg \ TQSize.prg \ TQSizeF.prg \ TQSizeGrip.prg \ + TQSizePolicy.prg \ TQSlider.prg \ + TQSound.prg \ TQSpinBox.prg \ TQSplashScreen.prg \ TQSplitter.prg \ + TQStandardItem.prg \ + TQStandardItemModel.prg \ TQStatusBar.prg \ TQStyle.prg \ TQTabBar.prg \ diff --git a/harbour/contrib/hbqt/TQColor.prg b/harbour/contrib/hbqt/TQColor.prg new file mode 100644 index 0000000000..b4da93ce13 --- /dev/null +++ b/harbour/contrib/hbqt/TQColor.prg @@ -0,0 +1,136 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT wrapper main header + * + * Copyright 2009 Marcos Antonio Gambeta + * 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. + * + */ +/*----------------------------------------------------------------------*/ + + +#include "hbclass.ch" + + +CREATE CLASS QColor + + VAR pParent + VAR pPtr + + METHOD New() + + METHOD alpha() INLINE Qt_QColor_alpha( ::pPtr ) + METHOD alphaF() INLINE Qt_QColor_alphaF( ::pPtr ) + METHOD black() INLINE Qt_QColor_black( ::pPtr ) + METHOD blackF() INLINE Qt_QColor_blackF( ::pPtr ) + METHOD blue() INLINE Qt_QColor_blue( ::pPtr ) + METHOD blueF() INLINE Qt_QColor_blueF( ::pPtr ) + METHOD convertTo( nColorSpec ) INLINE Qt_QColor_convertTo( ::pPtr, nColorSpec ) + METHOD cyan() INLINE Qt_QColor_cyan( ::pPtr ) + METHOD cyanF() INLINE Qt_QColor_cyanF( ::pPtr ) + METHOD darker( nFactor ) INLINE Qt_QColor_darker( ::pPtr, nFactor ) + METHOD getCmyk( nC, nM, nY, nK, nA ) INLINE Qt_QColor_getCmyk( ::pPtr, nC, nM, nY, nK, nA ) + METHOD getCmykF( nC, nM, nY, nK, nA ) INLINE Qt_QColor_getCmykF( ::pPtr, nC, nM, nY, nK, nA ) + METHOD getHsv( nH, nS, nV, nA ) INLINE Qt_QColor_getHsv( ::pPtr, nH, nS, nV, nA ) + METHOD getHsvF( nH, nS, nV, nA ) INLINE Qt_QColor_getHsvF( ::pPtr, nH, nS, nV, nA ) + METHOD getRgb( nR, nG, nB, nA ) INLINE Qt_QColor_getRgb( ::pPtr, nR, nG, nB, nA ) + METHOD getRgbF( nR, nG, nB, nA ) INLINE Qt_QColor_getRgbF( ::pPtr, nR, nG, nB, nA ) + METHOD green() INLINE Qt_QColor_green( ::pPtr ) + METHOD greenF() INLINE Qt_QColor_greenF( ::pPtr ) + METHOD hue() INLINE Qt_QColor_hue( ::pPtr ) + METHOD hueF() INLINE Qt_QColor_hueF( ::pPtr ) + METHOD isValid() INLINE Qt_QColor_isValid( ::pPtr ) + METHOD lighter( nFactor ) INLINE Qt_QColor_lighter( ::pPtr, nFactor ) + METHOD magenta() INLINE Qt_QColor_magenta( ::pPtr ) + METHOD magentaF() INLINE Qt_QColor_magentaF( ::pPtr ) + METHOD name() INLINE Qt_QColor_name( ::pPtr ) + METHOD red() INLINE Qt_QColor_red( ::pPtr ) + METHOD redF() INLINE Qt_QColor_redF( ::pPtr ) + METHOD rgb() INLINE Qt_QColor_rgb( ::pPtr ) + METHOD rgba() INLINE Qt_QColor_rgba( ::pPtr ) + METHOD saturation() INLINE Qt_QColor_saturation( ::pPtr ) + METHOD saturationF() INLINE Qt_QColor_saturationF( ::pPtr ) + METHOD setAlpha( nAlpha ) INLINE Qt_QColor_setAlpha( ::pPtr, nAlpha ) + METHOD setAlphaF( nAlpha ) INLINE Qt_QColor_setAlphaF( ::pPtr, nAlpha ) + METHOD setBlue( nBlue ) INLINE Qt_QColor_setBlue( ::pPtr, nBlue ) + METHOD setBlueF( nBlue ) INLINE Qt_QColor_setBlueF( ::pPtr, nBlue ) + METHOD setCmyk( nC, nM, nY, nK, nA ) INLINE Qt_QColor_setCmyk( ::pPtr, nC, nM, nY, nK, nA ) + METHOD setCmykF( nC, nM, nY, nK, nA ) INLINE Qt_QColor_setCmykF( ::pPtr, nC, nM, nY, nK, nA ) + METHOD setGreen( nGreen ) INLINE Qt_QColor_setGreen( ::pPtr, nGreen ) + METHOD setGreenF( nGreen ) INLINE Qt_QColor_setGreenF( ::pPtr, nGreen ) + METHOD setHsv( nH, nS, nV, nA ) INLINE Qt_QColor_setHsv( ::pPtr, nH, nS, nV, nA ) + METHOD setHsvF( nH, nS, nV, nA ) INLINE Qt_QColor_setHsvF( ::pPtr, nH, nS, nV, nA ) + METHOD setNamedColor( cName ) INLINE Qt_QColor_setNamedColor( ::pPtr, cName ) + METHOD setRed( nRed ) INLINE Qt_QColor_setRed( ::pPtr, nRed ) + METHOD setRedF( nRed ) INLINE Qt_QColor_setRedF( ::pPtr, nRed ) + METHOD setRgb( nR, nG, nB, nA ) INLINE Qt_QColor_setRgb( ::pPtr, nR, nG, nB, nA ) + METHOD setRgb_1( nRgb ) INLINE Qt_QColor_setRgb_1( ::pPtr, nRgb ) + METHOD setRgbF( nR, nG, nB, nA ) INLINE Qt_QColor_setRgbF( ::pPtr, nR, nG, nB, nA ) + METHOD setRgba( nRgba ) INLINE Qt_QColor_setRgba( ::pPtr, nRgba ) + METHOD spec() INLINE Qt_QColor_spec( ::pPtr ) + METHOD toCmyk() INLINE Qt_QColor_toCmyk( ::pPtr ) + METHOD toHsv() INLINE Qt_QColor_toHsv( ::pPtr ) + METHOD toRgb() INLINE Qt_QColor_toRgb( ::pPtr ) + METHOD value() INLINE Qt_QColor_value( ::pPtr ) + METHOD valueF() INLINE Qt_QColor_valueF( ::pPtr ) + METHOD yellow() INLINE Qt_QColor_yellow( ::pPtr ) + METHOD yellowF() INLINE Qt_QColor_yellowF( ::pPtr ) + + ENDCLASS + +/*----------------------------------------------------------------------*/ + +METHOD New( pParent ) CLASS QColor + + ::pParent := pParent + + ::pPtr := Qt_QColor( pParent ) + + RETURN Self + +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/TQConicalGradient.prg b/harbour/contrib/hbqt/TQConicalGradient.prg new file mode 100644 index 0000000000..3380de3adf --- /dev/null +++ b/harbour/contrib/hbqt/TQConicalGradient.prg @@ -0,0 +1,85 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT wrapper main header + * + * Copyright 2009 Marcos Antonio Gambeta + * 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. + * + */ +/*----------------------------------------------------------------------*/ + + +#include "hbclass.ch" + + +CREATE CLASS QConicalGradient INHERIT QGradient + + VAR pParent + VAR pPtr + + METHOD New() + + METHOD angle() INLINE Qt_QConicalGradient_angle( ::pPtr ) + METHOD center() INLINE Qt_QConicalGradient_center( ::pPtr ) + METHOD setAngle( nAngle ) INLINE Qt_QConicalGradient_setAngle( ::pPtr, nAngle ) + METHOD setCenter( pCenter ) INLINE Qt_QConicalGradient_setCenter( ::pPtr, pCenter ) + METHOD setCenter_1( nX, nY ) INLINE Qt_QConicalGradient_setCenter_1( ::pPtr, nX, nY ) + + ENDCLASS + +/*----------------------------------------------------------------------*/ + +METHOD New( pParent ) CLASS QConicalGradient + + ::pParent := pParent + + ::pPtr := Qt_QConicalGradient( pParent ) + + RETURN Self + +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/TQGradient.prg b/harbour/contrib/hbqt/TQGradient.prg new file mode 100644 index 0000000000..86ec00a671 --- /dev/null +++ b/harbour/contrib/hbqt/TQGradient.prg @@ -0,0 +1,88 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT wrapper main header + * + * Copyright 2009 Marcos Antonio Gambeta + * 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. + * + */ +/*----------------------------------------------------------------------*/ + + +#include "hbclass.ch" + + +CREATE CLASS QGradient + + VAR pParent + VAR pPtr + + METHOD New() + + METHOD coordinateMode() INLINE Qt_QGradient_coordinateMode( ::pPtr ) + METHOD setColorAt( nPosition, pColor ) INLINE Qt_QGradient_setColorAt( ::pPtr, nPosition, pColor ) + METHOD setCoordinateMode( nMode ) INLINE Qt_QGradient_setCoordinateMode( ::pPtr, nMode ) + METHOD setSpread( nMethod ) INLINE Qt_QGradient_setSpread( ::pPtr, nMethod ) + METHOD setStops( pStopPoints ) INLINE Qt_QGradient_setStops( ::pPtr, pStopPoints ) + METHOD spread() INLINE Qt_QGradient_spread( ::pPtr ) + METHOD stops() INLINE Qt_QGradient_stops( ::pPtr ) + METHOD type() INLINE Qt_QGradient_type( ::pPtr ) + + ENDCLASS + +/*----------------------------------------------------------------------*/ + +METHOD New( pParent ) CLASS QGradient + + ::pParent := pParent + + ::pPtr := Qt_QGradient( pParent ) + + RETURN Self + +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/TQImage.prg b/harbour/contrib/hbqt/TQImage.prg new file mode 100644 index 0000000000..b1e37020b1 --- /dev/null +++ b/harbour/contrib/hbqt/TQImage.prg @@ -0,0 +1,140 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT wrapper main header + * + * Copyright 2009 Marcos Antonio Gambeta + * 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. + * + */ +/*----------------------------------------------------------------------*/ + + +#include "hbclass.ch" + + +CREATE CLASS QImage + + VAR pParent + VAR pPtr + + METHOD New() + + METHOD allGray() INLINE Qt_QImage_allGray( ::pPtr ) + METHOD alphaChannel() INLINE Qt_QImage_alphaChannel( ::pPtr ) + METHOD bits() INLINE Qt_QImage_bits( ::pPtr ) + METHOD bits_1() INLINE Qt_QImage_bits_1( ::pPtr ) + METHOD bytesPerLine() INLINE Qt_QImage_bytesPerLine( ::pPtr ) + METHOD cacheKey() INLINE Qt_QImage_cacheKey( ::pPtr ) + METHOD color( nI ) INLINE Qt_QImage_color( ::pPtr, nI ) + METHOD convertToFormat( nFormat, nFlags ) INLINE Qt_QImage_convertToFormat( ::pPtr, nFormat, nFlags ) + METHOD copy( pRectangle ) INLINE Qt_QImage_copy( ::pPtr, pRectangle ) + METHOD copy_1( nX, nY, nWidth, nHeight ) INLINE Qt_QImage_copy_1( ::pPtr, nX, nY, nWidth, nHeight ) + METHOD createAlphaMask( nFlags ) INLINE Qt_QImage_createAlphaMask( ::pPtr, nFlags ) + METHOD createHeuristicMask( lClipTight ) INLINE Qt_QImage_createHeuristicMask( ::pPtr, lClipTight ) + METHOD createMaskFromColor( nColor, nMode ) INLINE Qt_QImage_createMaskFromColor( ::pPtr, nColor, nMode ) + METHOD depth() INLINE Qt_QImage_depth( ::pPtr ) + METHOD dotsPerMeterX() INLINE Qt_QImage_dotsPerMeterX( ::pPtr ) + METHOD dotsPerMeterY() INLINE Qt_QImage_dotsPerMeterY( ::pPtr ) + METHOD fill( nPixelValue ) INLINE Qt_QImage_fill( ::pPtr, nPixelValue ) + METHOD format() INLINE Qt_QImage_format( ::pPtr ) + METHOD hasAlphaChannel() INLINE Qt_QImage_hasAlphaChannel( ::pPtr ) + METHOD height() INLINE Qt_QImage_height( ::pPtr ) + METHOD invertPixels( nMode ) INLINE Qt_QImage_invertPixels( ::pPtr, nMode ) + METHOD isGrayscale() INLINE Qt_QImage_isGrayscale( ::pPtr ) + METHOD isNull() INLINE Qt_QImage_isNull( ::pPtr ) + METHOD load( cFileName, pFormat ) INLINE Qt_QImage_load( ::pPtr, cFileName, pFormat ) + METHOD load_1( pDevice, pFormat ) INLINE Qt_QImage_load_1( ::pPtr, pDevice, pFormat ) + METHOD loadFromData( pData, pFormat ) INLINE Qt_QImage_loadFromData( ::pPtr, pData, pFormat ) + METHOD mirrored( lHorizontal, lVertical ) INLINE Qt_QImage_mirrored( ::pPtr, lHorizontal, lVertical ) + METHOD numBytes() INLINE Qt_QImage_numBytes( ::pPtr ) + METHOD numColors() INLINE Qt_QImage_numColors( ::pPtr ) + METHOD offset() INLINE Qt_QImage_offset( ::pPtr ) + METHOD pixel( pPosition ) INLINE Qt_QImage_pixel( ::pPtr, pPosition ) + METHOD pixel_1( nX, nY ) INLINE Qt_QImage_pixel_1( ::pPtr, nX, nY ) + METHOD pixelIndex( pPosition ) INLINE Qt_QImage_pixelIndex( ::pPtr, pPosition ) + METHOD pixelIndex_1( nX, nY ) INLINE Qt_QImage_pixelIndex_1( ::pPtr, nX, nY ) + METHOD rect() INLINE Qt_QImage_rect( ::pPtr ) + METHOD rgbSwapped() INLINE Qt_QImage_rgbSwapped( ::pPtr ) + METHOD save( cFileName, pFormat, nQuality ) INLINE Qt_QImage_save( ::pPtr, cFileName, pFormat, nQuality ) + METHOD save_1( pDevice, pFormat, nQuality ) INLINE Qt_QImage_save_1( ::pPtr, pDevice, pFormat, nQuality ) + METHOD scaled( pSize, nAspectRatioMode, nTransformMode ) INLINE Qt_QImage_scaled( ::pPtr, pSize, nAspectRatioMode, nTransformMode ) + METHOD scaled_1( nWidth, nHeight, nAspectRatioMode, nTransformMode ) INLINE Qt_QImage_scaled_1( ::pPtr, nWidth, nHeight, nAspectRatioMode, nTransformMode ) + METHOD scaledToHeight( nHeight, nMode ) INLINE Qt_QImage_scaledToHeight( ::pPtr, nHeight, nMode ) + METHOD scaledToWidth( nWidth, nMode ) INLINE Qt_QImage_scaledToWidth( ::pPtr, nWidth, nMode ) + METHOD scanLine( nI ) INLINE Qt_QImage_scanLine( ::pPtr, nI ) + METHOD scanLine_1( nI ) INLINE Qt_QImage_scanLine_1( ::pPtr, nI ) + METHOD setColor( nIndex, nColorValue ) INLINE Qt_QImage_setColor( ::pPtr, nIndex, nColorValue ) + METHOD setDotsPerMeterX( nX ) INLINE Qt_QImage_setDotsPerMeterX( ::pPtr, nX ) + METHOD setDotsPerMeterY( nY ) INLINE Qt_QImage_setDotsPerMeterY( ::pPtr, nY ) + METHOD setNumColors( nNumColors ) INLINE Qt_QImage_setNumColors( ::pPtr, nNumColors ) + METHOD setOffset( pOffset ) INLINE Qt_QImage_setOffset( ::pPtr, pOffset ) + METHOD setPixel( pPosition, nIndex_or_rgb ) INLINE Qt_QImage_setPixel( ::pPtr, pPosition, nIndex_or_rgb ) + METHOD setPixel_1( nX, nY, nIndex_or_rgb ) INLINE Qt_QImage_setPixel_1( ::pPtr, nX, nY, nIndex_or_rgb ) + METHOD setText( cKey, cText ) INLINE Qt_QImage_setText( ::pPtr, cKey, cText ) + METHOD size() INLINE Qt_QImage_size( ::pPtr ) + METHOD text( cKey ) INLINE Qt_QImage_text( ::pPtr, cKey ) + METHOD textKeys() INLINE Qt_QImage_textKeys( ::pPtr ) + METHOD transformed( pMatrix, nMode ) INLINE Qt_QImage_transformed( ::pPtr, pMatrix, nMode ) + METHOD transformed_1( pMatrix, nMode ) INLINE Qt_QImage_transformed_1( ::pPtr, pMatrix, nMode ) + METHOD valid( pPos ) INLINE Qt_QImage_valid( ::pPtr, pPos ) + METHOD valid_1( nX, nY ) INLINE Qt_QImage_valid_1( ::pPtr, nX, nY ) + METHOD width() INLINE Qt_QImage_width( ::pPtr ) + + ENDCLASS + +/*----------------------------------------------------------------------*/ + +METHOD New( pParent ) CLASS QImage + + ::pParent := pParent + + ::pPtr := Qt_QImage( pParent ) + + RETURN Self + +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/TQImageReader.prg b/harbour/contrib/hbqt/TQImageReader.prg new file mode 100644 index 0000000000..6e3bb4639c --- /dev/null +++ b/harbour/contrib/hbqt/TQImageReader.prg @@ -0,0 +1,116 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT wrapper main header + * + * Copyright 2009 Marcos Antonio Gambeta + * 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. + * + */ +/*----------------------------------------------------------------------*/ + + +#include "hbclass.ch" + + +CREATE CLASS QImageReader + + VAR pParent + VAR pPtr + + METHOD New() + + METHOD autoDetectImageFormat() INLINE Qt_QImageReader_autoDetectImageFormat( ::pPtr ) + METHOD backgroundColor() INLINE Qt_QImageReader_backgroundColor( ::pPtr ) + METHOD canRead() INLINE Qt_QImageReader_canRead( ::pPtr ) + METHOD clipRect() INLINE Qt_QImageReader_clipRect( ::pPtr ) + METHOD currentImageNumber() INLINE Qt_QImageReader_currentImageNumber( ::pPtr ) + METHOD currentImageRect() INLINE Qt_QImageReader_currentImageRect( ::pPtr ) + METHOD device() INLINE Qt_QImageReader_device( ::pPtr ) + METHOD error() INLINE Qt_QImageReader_error( ::pPtr ) + METHOD errorString() INLINE Qt_QImageReader_errorString( ::pPtr ) + METHOD fileName() INLINE Qt_QImageReader_fileName( ::pPtr ) + METHOD format() INLINE Qt_QImageReader_format( ::pPtr ) + METHOD imageCount() INLINE Qt_QImageReader_imageCount( ::pPtr ) + METHOD imageFormat() INLINE Qt_QImageReader_imageFormat( ::pPtr ) + METHOD jumpToImage( nImageNumber ) INLINE Qt_QImageReader_jumpToImage( ::pPtr, nImageNumber ) + METHOD jumpToNextImage() INLINE Qt_QImageReader_jumpToNextImage( ::pPtr ) + METHOD loopCount() INLINE Qt_QImageReader_loopCount( ::pPtr ) + METHOD nextImageDelay() INLINE Qt_QImageReader_nextImageDelay( ::pPtr ) + METHOD quality() INLINE Qt_QImageReader_quality( ::pPtr ) + METHOD read() INLINE Qt_QImageReader_read( ::pPtr ) + METHOD read_1( pImage ) INLINE Qt_QImageReader_read_1( ::pPtr, pImage ) + METHOD scaledClipRect() INLINE Qt_QImageReader_scaledClipRect( ::pPtr ) + METHOD scaledSize() INLINE Qt_QImageReader_scaledSize( ::pPtr ) + METHOD setAutoDetectImageFormat( lEnabled ) INLINE Qt_QImageReader_setAutoDetectImageFormat( ::pPtr, lEnabled ) + METHOD setBackgroundColor( pColor ) INLINE Qt_QImageReader_setBackgroundColor( ::pPtr, pColor ) + METHOD setClipRect( pRect ) INLINE Qt_QImageReader_setClipRect( ::pPtr, pRect ) + METHOD setDevice( pDevice ) INLINE Qt_QImageReader_setDevice( ::pPtr, pDevice ) + METHOD setFileName( cFileName ) INLINE Qt_QImageReader_setFileName( ::pPtr, cFileName ) + METHOD setFormat( pFormat ) INLINE Qt_QImageReader_setFormat( ::pPtr, pFormat ) + METHOD setQuality( nQuality ) INLINE Qt_QImageReader_setQuality( ::pPtr, nQuality ) + METHOD setScaledClipRect( pRect ) INLINE Qt_QImageReader_setScaledClipRect( ::pPtr, pRect ) + METHOD setScaledSize( pSize ) INLINE Qt_QImageReader_setScaledSize( ::pPtr, pSize ) + METHOD size() INLINE Qt_QImageReader_size( ::pPtr ) + METHOD supportsAnimation() INLINE Qt_QImageReader_supportsAnimation( ::pPtr ) + METHOD supportsOption( nOption ) INLINE Qt_QImageReader_supportsOption( ::pPtr, nOption ) + METHOD text( cKey ) INLINE Qt_QImageReader_text( ::pPtr, cKey ) + METHOD textKeys() INLINE Qt_QImageReader_textKeys( ::pPtr ) + + ENDCLASS + +/*----------------------------------------------------------------------*/ + +METHOD New( pParent ) CLASS QImageReader + + ::pParent := pParent + + ::pPtr := Qt_QImageReader( pParent ) + + RETURN Self + +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/TQImageWriter.prg b/harbour/contrib/hbqt/TQImageWriter.prg new file mode 100644 index 0000000000..12bbc17534 --- /dev/null +++ b/harbour/contrib/hbqt/TQImageWriter.prg @@ -0,0 +1,98 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT wrapper main header + * + * Copyright 2009 Marcos Antonio Gambeta + * 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. + * + */ +/*----------------------------------------------------------------------*/ + + +#include "hbclass.ch" + + +CREATE CLASS QImageWriter + + VAR pParent + VAR pPtr + + METHOD New() + + METHOD canWrite() INLINE Qt_QImageWriter_canWrite( ::pPtr ) + METHOD compression() INLINE Qt_QImageWriter_compression( ::pPtr ) + METHOD device() INLINE Qt_QImageWriter_device( ::pPtr ) + METHOD error() INLINE Qt_QImageWriter_error( ::pPtr ) + METHOD errorString() INLINE Qt_QImageWriter_errorString( ::pPtr ) + METHOD fileName() INLINE Qt_QImageWriter_fileName( ::pPtr ) + METHOD format() INLINE Qt_QImageWriter_format( ::pPtr ) + METHOD gamma() INLINE Qt_QImageWriter_gamma( ::pPtr ) + METHOD quality() INLINE Qt_QImageWriter_quality( ::pPtr ) + METHOD setCompression( nCompression ) INLINE Qt_QImageWriter_setCompression( ::pPtr, nCompression ) + METHOD setDevice( pDevice ) INLINE Qt_QImageWriter_setDevice( ::pPtr, pDevice ) + METHOD setFileName( cFileName ) INLINE Qt_QImageWriter_setFileName( ::pPtr, cFileName ) + METHOD setFormat( pFormat ) INLINE Qt_QImageWriter_setFormat( ::pPtr, pFormat ) + METHOD setGamma( nGamma ) INLINE Qt_QImageWriter_setGamma( ::pPtr, nGamma ) + METHOD setQuality( nQuality ) INLINE Qt_QImageWriter_setQuality( ::pPtr, nQuality ) + METHOD setText( cKey, cText ) INLINE Qt_QImageWriter_setText( ::pPtr, cKey, cText ) + METHOD supportsOption( nOption ) INLINE Qt_QImageWriter_supportsOption( ::pPtr, nOption ) + METHOD write( pImage ) INLINE Qt_QImageWriter_write( ::pPtr, pImage ) + + ENDCLASS + +/*----------------------------------------------------------------------*/ + +METHOD New( pParent ) CLASS QImageWriter + + ::pParent := pParent + + ::pPtr := Qt_QImageWriter( pParent ) + + RETURN Self + +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/TQLine.prg b/harbour/contrib/hbqt/TQLine.prg new file mode 100644 index 0000000000..7ec3ec357a --- /dev/null +++ b/harbour/contrib/hbqt/TQLine.prg @@ -0,0 +1,97 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT wrapper main header + * + * Copyright 2009 Marcos Antonio Gambeta + * 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. + * + */ +/*----------------------------------------------------------------------*/ + + +#include "hbclass.ch" + + +CREATE CLASS QLine + + VAR pParent + VAR pPtr + + METHOD New() + + METHOD p1() INLINE Qt_QLine_p1( ::pPtr ) + METHOD p2() INLINE Qt_QLine_p2( ::pPtr ) + METHOD x1() INLINE Qt_QLine_x1( ::pPtr ) + METHOD x2() INLINE Qt_QLine_x2( ::pPtr ) + METHOD y1() INLINE Qt_QLine_y1( ::pPtr ) + METHOD y2() INLINE Qt_QLine_y2( ::pPtr ) + METHOD dx() INLINE Qt_QLine_dx( ::pPtr ) + METHOD dy() INLINE Qt_QLine_dy( ::pPtr ) + METHOD isNull() INLINE Qt_QLine_isNull( ::pPtr ) + METHOD setP1( pP1 ) INLINE Qt_QLine_setP1( ::pPtr, pP1 ) + METHOD setP2( pP2 ) INLINE Qt_QLine_setP2( ::pPtr, pP2 ) + METHOD setLine( nX1, nY1, nX2, nY2 ) INLINE Qt_QLine_setLine( ::pPtr, nX1, nY1, nX2, nY2 ) + METHOD setPoints( pP1, pP2 ) INLINE Qt_QLine_setPoints( ::pPtr, pP1, pP2 ) + METHOD translate( pOffset ) INLINE Qt_QLine_translate( ::pPtr, pOffset ) + METHOD translate_1( nDx, nDy ) INLINE Qt_QLine_translate_1( ::pPtr, nDx, nDy ) + METHOD translated( pOffset ) INLINE Qt_QLine_translated( ::pPtr, pOffset ) + METHOD translated_1( nDx, nDy ) INLINE Qt_QLine_translated_1( ::pPtr, nDx, nDy ) + + ENDCLASS + +/*----------------------------------------------------------------------*/ + +METHOD New( pParent ) CLASS QLine + + ::pParent := pParent + + ::pPtr := Qt_QLine( pParent ) + + RETURN Self + +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/TQLinearGradient.prg b/harbour/contrib/hbqt/TQLinearGradient.prg new file mode 100644 index 0000000000..e06e48dc0f --- /dev/null +++ b/harbour/contrib/hbqt/TQLinearGradient.prg @@ -0,0 +1,86 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT wrapper main header + * + * Copyright 2009 Marcos Antonio Gambeta + * 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. + * + */ +/*----------------------------------------------------------------------*/ + + +#include "hbclass.ch" + + +CREATE CLASS QLinearGradient INHERIT QGradient + + VAR pParent + VAR pPtr + + METHOD New() + + METHOD finalStop() INLINE Qt_QLinearGradient_finalStop( ::pPtr ) + METHOD setFinalStop( pStop ) INLINE Qt_QLinearGradient_setFinalStop( ::pPtr, pStop ) + METHOD setFinalStop_1( nX, nY ) INLINE Qt_QLinearGradient_setFinalStop_1( ::pPtr, nX, nY ) + METHOD setStart( pStart ) INLINE Qt_QLinearGradient_setStart( ::pPtr, pStart ) + METHOD setStart_1( nX, nY ) INLINE Qt_QLinearGradient_setStart_1( ::pPtr, nX, nY ) + METHOD start() INLINE Qt_QLinearGradient_start( ::pPtr ) + + ENDCLASS + +/*----------------------------------------------------------------------*/ + +METHOD New( pParent ) CLASS QLinearGradient + + ::pParent := pParent + + ::pPtr := Qt_QLinearGradient( pParent ) + + RETURN Self + +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/TQPalette.prg b/harbour/contrib/hbqt/TQPalette.prg new file mode 100644 index 0000000000..e102ae9d97 --- /dev/null +++ b/harbour/contrib/hbqt/TQPalette.prg @@ -0,0 +1,115 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT wrapper main header + * + * Copyright 2009 Marcos Antonio Gambeta + * 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. + * + */ +/*----------------------------------------------------------------------*/ + + +#include "hbclass.ch" + + +CREATE CLASS QPalette + + VAR pParent + VAR pPtr + + METHOD New() + + METHOD alternateBase() INLINE Qt_QPalette_alternateBase( ::pPtr ) + METHOD base() INLINE Qt_QPalette_base( ::pPtr ) + METHOD brightText() INLINE Qt_QPalette_brightText( ::pPtr ) + METHOD brush( nGroup, nRole ) INLINE Qt_QPalette_brush( ::pPtr, nGroup, nRole ) + METHOD brush_1( nRole ) INLINE Qt_QPalette_brush_1( ::pPtr, nRole ) + METHOD button() INLINE Qt_QPalette_button( ::pPtr ) + METHOD buttonText() INLINE Qt_QPalette_buttonText( ::pPtr ) + METHOD cacheKey() INLINE Qt_QPalette_cacheKey( ::pPtr ) + METHOD color( nGroup, nRole ) INLINE Qt_QPalette_color( ::pPtr, nGroup, nRole ) + METHOD color_1( nRole ) INLINE Qt_QPalette_color_1( ::pPtr, nRole ) + METHOD currentColorGroup() INLINE Qt_QPalette_currentColorGroup( ::pPtr ) + METHOD dark() INLINE Qt_QPalette_dark( ::pPtr ) + METHOD highlight() INLINE Qt_QPalette_highlight( ::pPtr ) + METHOD highlightedText() INLINE Qt_QPalette_highlightedText( ::pPtr ) + METHOD isBrushSet( nCg, nCr ) INLINE Qt_QPalette_isBrushSet( ::pPtr, nCg, nCr ) + METHOD isCopyOf( pP ) INLINE Qt_QPalette_isCopyOf( ::pPtr, pP ) + METHOD isEqual( nCg1, nCg2 ) INLINE Qt_QPalette_isEqual( ::pPtr, nCg1, nCg2 ) + METHOD light() INLINE Qt_QPalette_light( ::pPtr ) + METHOD link() INLINE Qt_QPalette_link( ::pPtr ) + METHOD linkVisited() INLINE Qt_QPalette_linkVisited( ::pPtr ) + METHOD mid() INLINE Qt_QPalette_mid( ::pPtr ) + METHOD midlight() INLINE Qt_QPalette_midlight( ::pPtr ) + METHOD resolve( pOther ) INLINE Qt_QPalette_resolve( ::pPtr, pOther ) + METHOD setBrush( nRole, pBrush ) INLINE Qt_QPalette_setBrush( ::pPtr, nRole, pBrush ) + METHOD setBrush_1( nGroup, nRole, pBrush ) INLINE Qt_QPalette_setBrush_1( ::pPtr, nGroup, nRole, pBrush ) + METHOD setColor( nGroup, nRole, pColor ) INLINE Qt_QPalette_setColor( ::pPtr, nGroup, nRole, pColor ) + METHOD setColor_1( nRole, pColor ) INLINE Qt_QPalette_setColor_1( ::pPtr, nRole, pColor ) + METHOD setColorGroup( nCg, pWindowText, pButton, pLight, pDark, pMid, pText, pBright_text, pBase, pWindow ) INLINE Qt_QPalette_setColorGroup( ::pPtr, nCg, pWindowText, pButton, pLight, pDark, pMid, pText, pBright_text, pBase, pWindow ) + METHOD setCurrentColorGroup( nCg ) INLINE Qt_QPalette_setCurrentColorGroup( ::pPtr, nCg ) + METHOD shadow() INLINE Qt_QPalette_shadow( ::pPtr ) + METHOD text() INLINE Qt_QPalette_text( ::pPtr ) + METHOD toolTipBase() INLINE Qt_QPalette_toolTipBase( ::pPtr ) + METHOD toolTipText() INLINE Qt_QPalette_toolTipText( ::pPtr ) + METHOD window() INLINE Qt_QPalette_window( ::pPtr ) + METHOD windowText() INLINE Qt_QPalette_windowText( ::pPtr ) + + ENDCLASS + +/*----------------------------------------------------------------------*/ + +METHOD New( pParent ) CLASS QPalette + + ::pParent := pParent + + ::pPtr := Qt_QPalette( pParent ) + + RETURN Self + +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/TQPicture.prg b/harbour/contrib/hbqt/TQPicture.prg new file mode 100644 index 0000000000..b5dfcdbd3e --- /dev/null +++ b/harbour/contrib/hbqt/TQPicture.prg @@ -0,0 +1,91 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT wrapper main header + * + * Copyright 2009 Marcos Antonio Gambeta + * 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. + * + */ +/*----------------------------------------------------------------------*/ + + +#include "hbclass.ch" + + +CREATE CLASS QPicture INHERIT QPaintDevice + + VAR pParent + VAR pPtr + + METHOD New() + + METHOD boundingRect() INLINE Qt_QPicture_boundingRect( ::pPtr ) + METHOD data() INLINE Qt_QPicture_data( ::pPtr ) + METHOD isNull() INLINE Qt_QPicture_isNull( ::pPtr ) + METHOD load( cFileName, pFormat ) INLINE Qt_QPicture_load( ::pPtr, cFileName, pFormat ) + METHOD load_1( pDev, pFormat ) INLINE Qt_QPicture_load_1( ::pPtr, pDev, pFormat ) + METHOD play( pPainter ) INLINE Qt_QPicture_play( ::pPtr, pPainter ) + METHOD save( cFileName, pFormat ) INLINE Qt_QPicture_save( ::pPtr, cFileName, pFormat ) + METHOD save_1( pDev, pFormat ) INLINE Qt_QPicture_save_1( ::pPtr, pDev, pFormat ) + METHOD setBoundingRect( pR ) INLINE Qt_QPicture_setBoundingRect( ::pPtr, pR ) + METHOD setData( pData, nSize ) INLINE Qt_QPicture_setData( ::pPtr, pData, nSize ) + METHOD size() INLINE Qt_QPicture_size( ::pPtr ) + + ENDCLASS + +/*----------------------------------------------------------------------*/ + +METHOD New( pParent ) CLASS QPicture + + ::pParent := pParent + + ::pPtr := Qt_QPicture( pParent ) + + RETURN Self + +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/TQRadialGradient.prg b/harbour/contrib/hbqt/TQRadialGradient.prg new file mode 100644 index 0000000000..c00995cd5c --- /dev/null +++ b/harbour/contrib/hbqt/TQRadialGradient.prg @@ -0,0 +1,88 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT wrapper main header + * + * Copyright 2009 Marcos Antonio Gambeta + * 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. + * + */ +/*----------------------------------------------------------------------*/ + + +#include "hbclass.ch" + + +CREATE CLASS QRadialGradient INHERIT QGradient + + VAR pParent + VAR pPtr + + METHOD New() + + METHOD center() INLINE Qt_QRadialGradient_center( ::pPtr ) + METHOD focalPoint() INLINE Qt_QRadialGradient_focalPoint( ::pPtr ) + METHOD radius() INLINE Qt_QRadialGradient_radius( ::pPtr ) + METHOD setCenter( pCenter ) INLINE Qt_QRadialGradient_setCenter( ::pPtr, pCenter ) + METHOD setCenter_1( nX, nY ) INLINE Qt_QRadialGradient_setCenter_1( ::pPtr, nX, nY ) + METHOD setFocalPoint( pFocalPoint ) INLINE Qt_QRadialGradient_setFocalPoint( ::pPtr, pFocalPoint ) + METHOD setFocalPoint_1( nX, nY ) INLINE Qt_QRadialGradient_setFocalPoint_1( ::pPtr, nX, nY ) + METHOD setRadius( nRadius ) INLINE Qt_QRadialGradient_setRadius( ::pPtr, nRadius ) + + ENDCLASS + +/*----------------------------------------------------------------------*/ + +METHOD New( pParent ) CLASS QRadialGradient + + ::pParent := pParent + + ::pPtr := Qt_QRadialGradient( pParent ) + + RETURN Self + +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/TQResource.prg b/harbour/contrib/hbqt/TQResource.prg new file mode 100644 index 0000000000..24714aeb61 --- /dev/null +++ b/harbour/contrib/hbqt/TQResource.prg @@ -0,0 +1,89 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT wrapper main header + * + * Copyright 2009 Marcos Antonio Gambeta + * 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. + * + */ +/*----------------------------------------------------------------------*/ + + +#include "hbclass.ch" + + +CREATE CLASS QResource + + VAR pParent + VAR pPtr + + METHOD New() + + METHOD absoluteFilePath() INLINE Qt_QResource_absoluteFilePath( ::pPtr ) + METHOD data() INLINE Qt_QResource_data( ::pPtr ) + METHOD fileName() INLINE Qt_QResource_fileName( ::pPtr ) + METHOD isCompressed() INLINE Qt_QResource_isCompressed( ::pPtr ) + METHOD isValid() INLINE Qt_QResource_isValid( ::pPtr ) + METHOD locale() INLINE Qt_QResource_locale( ::pPtr ) + METHOD setFileName( cFile ) INLINE Qt_QResource_setFileName( ::pPtr, cFile ) + METHOD setLocale( pLocale ) INLINE Qt_QResource_setLocale( ::pPtr, pLocale ) + METHOD size() INLINE Qt_QResource_size( ::pPtr ) + + ENDCLASS + +/*----------------------------------------------------------------------*/ + +METHOD New( pParent ) CLASS QResource + + ::pParent := pParent + + ::pPtr := Qt_QResource( pParent ) + + RETURN Self + +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/TQSizePolicy.prg b/harbour/contrib/hbqt/TQSizePolicy.prg new file mode 100644 index 0000000000..c95bf03b1d --- /dev/null +++ b/harbour/contrib/hbqt/TQSizePolicy.prg @@ -0,0 +1,94 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT wrapper main header + * + * Copyright 2009 Marcos Antonio Gambeta + * 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. + * + */ +/*----------------------------------------------------------------------*/ + + +#include "hbclass.ch" + + +CREATE CLASS QSizePolicy + + VAR pParent + VAR pPtr + + METHOD New() + + METHOD controlType() INLINE Qt_QSizePolicy_controlType( ::pPtr ) + METHOD expandingDirections() INLINE Qt_QSizePolicy_expandingDirections( ::pPtr ) + METHOD hasHeightForWidth() INLINE Qt_QSizePolicy_hasHeightForWidth( ::pPtr ) + METHOD horizontalPolicy() INLINE Qt_QSizePolicy_horizontalPolicy( ::pPtr ) + METHOD horizontalStretch() INLINE Qt_QSizePolicy_horizontalStretch( ::pPtr ) + METHOD setControlType( nType ) INLINE Qt_QSizePolicy_setControlType( ::pPtr, nType ) + METHOD setHeightForWidth( lDependent ) INLINE Qt_QSizePolicy_setHeightForWidth( ::pPtr, lDependent ) + METHOD setHorizontalPolicy( nPolicy ) INLINE Qt_QSizePolicy_setHorizontalPolicy( ::pPtr, nPolicy ) + METHOD setHorizontalStretch( nStretchFactor ) INLINE Qt_QSizePolicy_setHorizontalStretch( ::pPtr, nStretchFactor ) + METHOD setVerticalPolicy( nPolicy ) INLINE Qt_QSizePolicy_setVerticalPolicy( ::pPtr, nPolicy ) + METHOD setVerticalStretch( nStretchFactor ) INLINE Qt_QSizePolicy_setVerticalStretch( ::pPtr, nStretchFactor ) + METHOD transpose() INLINE Qt_QSizePolicy_transpose( ::pPtr ) + METHOD verticalPolicy() INLINE Qt_QSizePolicy_verticalPolicy( ::pPtr ) + METHOD verticalStretch() INLINE Qt_QSizePolicy_verticalStretch( ::pPtr ) + + ENDCLASS + +/*----------------------------------------------------------------------*/ + +METHOD New( pParent ) CLASS QSizePolicy + + ::pParent := pParent + + ::pPtr := Qt_QSizePolicy( pParent ) + + RETURN Self + +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/TQSound.prg b/harbour/contrib/hbqt/TQSound.prg new file mode 100644 index 0000000000..2f272e71af --- /dev/null +++ b/harbour/contrib/hbqt/TQSound.prg @@ -0,0 +1,85 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT wrapper main header + * + * Copyright 2009 Marcos Antonio Gambeta + * 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. + * + */ +/*----------------------------------------------------------------------*/ + + +#include "hbclass.ch" + + +CREATE CLASS QSound + + VAR pParent + VAR pPtr + + METHOD New() + + METHOD fileName() INLINE Qt_QSound_fileName( ::pPtr ) + METHOD isFinished() INLINE Qt_QSound_isFinished( ::pPtr ) + METHOD loops() INLINE Qt_QSound_loops( ::pPtr ) + METHOD loopsRemaining() INLINE Qt_QSound_loopsRemaining( ::pPtr ) + METHOD setLoops( nNumber ) INLINE Qt_QSound_setLoops( ::pPtr, nNumber ) + + ENDCLASS + +/*----------------------------------------------------------------------*/ + +METHOD New( pParent ) CLASS QSound + + ::pParent := pParent + + ::pPtr := Qt_QSound( pParent ) + + RETURN Self + +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/TQStandardItem.prg b/harbour/contrib/hbqt/TQStandardItem.prg new file mode 100644 index 0000000000..73976b011d --- /dev/null +++ b/harbour/contrib/hbqt/TQStandardItem.prg @@ -0,0 +1,151 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT wrapper main header + * + * Copyright 2009 Marcos Antonio Gambeta + * 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. + * + */ +/*----------------------------------------------------------------------*/ + + +#include "hbclass.ch" + + +CREATE CLASS QStandardItem + + VAR pParent + VAR pPtr + + METHOD New() + + METHOD accessibleDescription() INLINE Qt_QStandardItem_accessibleDescription( ::pPtr ) + METHOD accessibleText() INLINE Qt_QStandardItem_accessibleText( ::pPtr ) + METHOD appendRow( pItem ) INLINE Qt_QStandardItem_appendRow( ::pPtr, pItem ) + METHOD background() INLINE Qt_QStandardItem_background( ::pPtr ) + METHOD checkState() INLINE Qt_QStandardItem_checkState( ::pPtr ) + METHOD child( nRow, nColumn ) INLINE Qt_QStandardItem_child( ::pPtr, nRow, nColumn ) + METHOD clone() INLINE Qt_QStandardItem_clone( ::pPtr ) + METHOD column() INLINE Qt_QStandardItem_column( ::pPtr ) + METHOD columnCount() INLINE Qt_QStandardItem_columnCount( ::pPtr ) + METHOD data( nRole ) INLINE Qt_QStandardItem_data( ::pPtr, nRole ) + METHOD flags() INLINE Qt_QStandardItem_flags( ::pPtr ) + METHOD font() INLINE Qt_QStandardItem_font( ::pPtr ) + METHOD foreground() INLINE Qt_QStandardItem_foreground( ::pPtr ) + METHOD hasChildren() INLINE Qt_QStandardItem_hasChildren( ::pPtr ) + METHOD icon() INLINE Qt_QStandardItem_icon( ::pPtr ) + METHOD index() INLINE Qt_QStandardItem_index( ::pPtr ) + METHOD insertColumns( nColumn, nCount ) INLINE Qt_QStandardItem_insertColumns( ::pPtr, nColumn, nCount ) + METHOD insertRow( nRow, pItem ) INLINE Qt_QStandardItem_insertRow( ::pPtr, nRow, pItem ) + METHOD insertRows( nRow, nCount ) INLINE Qt_QStandardItem_insertRows( ::pPtr, nRow, nCount ) + METHOD isCheckable() INLINE Qt_QStandardItem_isCheckable( ::pPtr ) + METHOD isDragEnabled() INLINE Qt_QStandardItem_isDragEnabled( ::pPtr ) + METHOD isDropEnabled() INLINE Qt_QStandardItem_isDropEnabled( ::pPtr ) + METHOD isEditable() INLINE Qt_QStandardItem_isEditable( ::pPtr ) + METHOD isEnabled() INLINE Qt_QStandardItem_isEnabled( ::pPtr ) + METHOD isSelectable() INLINE Qt_QStandardItem_isSelectable( ::pPtr ) + METHOD isTristate() INLINE Qt_QStandardItem_isTristate( ::pPtr ) + METHOD model() INLINE Qt_QStandardItem_model( ::pPtr ) + METHOD parent() INLINE Qt_QStandardItem_parent( ::pPtr ) + METHOD read( pIn ) INLINE Qt_QStandardItem_read( ::pPtr, pIn ) + METHOD removeColumn( nColumn ) INLINE Qt_QStandardItem_removeColumn( ::pPtr, nColumn ) + METHOD removeColumns( nColumn, nCount ) INLINE Qt_QStandardItem_removeColumns( ::pPtr, nColumn, nCount ) + METHOD removeRow( nRow ) INLINE Qt_QStandardItem_removeRow( ::pPtr, nRow ) + METHOD removeRows( nRow, nCount ) INLINE Qt_QStandardItem_removeRows( ::pPtr, nRow, nCount ) + METHOD row() INLINE Qt_QStandardItem_row( ::pPtr ) + METHOD rowCount() INLINE Qt_QStandardItem_rowCount( ::pPtr ) + METHOD setAccessibleDescription( cAccessibleDescription ) INLINE Qt_QStandardItem_setAccessibleDescription( ::pPtr, cAccessibleDescription ) + METHOD setAccessibleText( cAccessibleText ) INLINE Qt_QStandardItem_setAccessibleText( ::pPtr, cAccessibleText ) + METHOD setBackground( pBrush ) INLINE Qt_QStandardItem_setBackground( ::pPtr, pBrush ) + METHOD setCheckState( nState ) INLINE Qt_QStandardItem_setCheckState( ::pPtr, nState ) + METHOD setCheckable( lCheckable ) INLINE Qt_QStandardItem_setCheckable( ::pPtr, lCheckable ) + METHOD setChild( nRow, nColumn, pItem ) INLINE Qt_QStandardItem_setChild( ::pPtr, nRow, nColumn, pItem ) + METHOD setChild_1( nRow, pItem ) INLINE Qt_QStandardItem_setChild_1( ::pPtr, nRow, pItem ) + METHOD setColumnCount( nColumns ) INLINE Qt_QStandardItem_setColumnCount( ::pPtr, nColumns ) + METHOD setData( pValue, nRole ) INLINE Qt_QStandardItem_setData( ::pPtr, pValue, nRole ) + METHOD setDragEnabled( lDragEnabled ) INLINE Qt_QStandardItem_setDragEnabled( ::pPtr, lDragEnabled ) + METHOD setDropEnabled( lDropEnabled ) INLINE Qt_QStandardItem_setDropEnabled( ::pPtr, lDropEnabled ) + METHOD setEditable( lEditable ) INLINE Qt_QStandardItem_setEditable( ::pPtr, lEditable ) + METHOD setEnabled( lEnabled ) INLINE Qt_QStandardItem_setEnabled( ::pPtr, lEnabled ) + METHOD setFlags( nFlags ) INLINE Qt_QStandardItem_setFlags( ::pPtr, nFlags ) + METHOD setFont( pFont ) INLINE Qt_QStandardItem_setFont( ::pPtr, pFont ) + METHOD setForeground( pBrush ) INLINE Qt_QStandardItem_setForeground( ::pPtr, pBrush ) + METHOD setIcon( cIcon ) INLINE Qt_QStandardItem_setIcon( ::pPtr, cIcon ) + METHOD setRowCount( nRows ) INLINE Qt_QStandardItem_setRowCount( ::pPtr, nRows ) + METHOD setSelectable( lSelectable ) INLINE Qt_QStandardItem_setSelectable( ::pPtr, lSelectable ) + METHOD setSizeHint( pSize ) INLINE Qt_QStandardItem_setSizeHint( ::pPtr, pSize ) + METHOD setStatusTip( cStatusTip ) INLINE Qt_QStandardItem_setStatusTip( ::pPtr, cStatusTip ) + METHOD setText( cText ) INLINE Qt_QStandardItem_setText( ::pPtr, cText ) + METHOD setTextAlignment( nAlignment ) INLINE Qt_QStandardItem_setTextAlignment( ::pPtr, nAlignment ) + METHOD setToolTip( cToolTip ) INLINE Qt_QStandardItem_setToolTip( ::pPtr, cToolTip ) + METHOD setTristate( lTristate ) INLINE Qt_QStandardItem_setTristate( ::pPtr, lTristate ) + METHOD setWhatsThis( cWhatsThis ) INLINE Qt_QStandardItem_setWhatsThis( ::pPtr, cWhatsThis ) + METHOD sizeHint() INLINE Qt_QStandardItem_sizeHint( ::pPtr ) + METHOD sortChildren( nColumn, nOrder ) INLINE Qt_QStandardItem_sortChildren( ::pPtr, nColumn, nOrder ) + METHOD statusTip() INLINE Qt_QStandardItem_statusTip( ::pPtr ) + METHOD takeChild( nRow, nColumn ) INLINE Qt_QStandardItem_takeChild( ::pPtr, nRow, nColumn ) + METHOD text() INLINE Qt_QStandardItem_text( ::pPtr ) + METHOD textAlignment() INLINE Qt_QStandardItem_textAlignment( ::pPtr ) + METHOD toolTip() INLINE Qt_QStandardItem_toolTip( ::pPtr ) + METHOD type() INLINE Qt_QStandardItem_type( ::pPtr ) + METHOD whatsThis() INLINE Qt_QStandardItem_whatsThis( ::pPtr ) + METHOD write( pOut ) INLINE Qt_QStandardItem_write( ::pPtr, pOut ) + + ENDCLASS + +/*----------------------------------------------------------------------*/ + +METHOD New( pParent ) CLASS QStandardItem + + ::pParent := pParent + + ::pPtr := Qt_QStandardItem( pParent ) + + RETURN Self + +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/TQStandardItemModel.prg b/harbour/contrib/hbqt/TQStandardItemModel.prg new file mode 100644 index 0000000000..8a8841c051 --- /dev/null +++ b/harbour/contrib/hbqt/TQStandardItemModel.prg @@ -0,0 +1,106 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT wrapper main header + * + * Copyright 2009 Marcos Antonio Gambeta + * 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. + * + */ +/*----------------------------------------------------------------------*/ + + +#include "hbclass.ch" + + +CREATE CLASS QStandardItemModel INHERIT QAbstractItemModeL + + VAR pParent + VAR pPtr + + METHOD New() + + METHOD appendRow( pItem ) INLINE Qt_QStandardItemModel_appendRow( ::pPtr, pItem ) + METHOD clear() INLINE Qt_QStandardItemModel_clear( ::pPtr ) + METHOD horizontalHeaderItem( nColumn ) INLINE Qt_QStandardItemModel_horizontalHeaderItem( ::pPtr, nColumn ) + METHOD indexFromItem( pItem ) INLINE Qt_QStandardItemModel_indexFromItem( ::pPtr, pItem ) + METHOD insertColumn( nColumn, pParent ) INLINE Qt_QStandardItemModel_insertColumn( ::pPtr, nColumn, pParent ) + METHOD insertRow( nRow, pParent ) INLINE Qt_QStandardItemModel_insertRow( ::pPtr, nRow, pParent ) + METHOD insertRow_1( nRow, pItem ) INLINE Qt_QStandardItemModel_insertRow_1( ::pPtr, nRow, pItem ) + METHOD invisibleRootItem() INLINE Qt_QStandardItemModel_invisibleRootItem( ::pPtr ) + METHOD item( nRow, nColumn ) INLINE Qt_QStandardItemModel_item( ::pPtr, nRow, nColumn ) + METHOD itemFromIndex( pIndex ) INLINE Qt_QStandardItemModel_itemFromIndex( ::pPtr, pIndex ) + METHOD itemPrototype() INLINE Qt_QStandardItemModel_itemPrototype( ::pPtr ) + METHOD setColumnCount( nColumns ) INLINE Qt_QStandardItemModel_setColumnCount( ::pPtr, nColumns ) + METHOD setHorizontalHeaderItem( nColumn, pItem ) INLINE Qt_QStandardItemModel_setHorizontalHeaderItem( ::pPtr, nColumn, pItem ) + METHOD setHorizontalHeaderLabels( pLabels ) INLINE Qt_QStandardItemModel_setHorizontalHeaderLabels( ::pPtr, pLabels ) + METHOD setItem( nRow, nColumn, pItem ) INLINE Qt_QStandardItemModel_setItem( ::pPtr, nRow, nColumn, pItem ) + METHOD setItem_1( nRow, pItem ) INLINE Qt_QStandardItemModel_setItem_1( ::pPtr, nRow, pItem ) + METHOD setItemPrototype( pItem ) INLINE Qt_QStandardItemModel_setItemPrototype( ::pPtr, pItem ) + METHOD setRowCount( nRows ) INLINE Qt_QStandardItemModel_setRowCount( ::pPtr, nRows ) + METHOD setSortRole( nRole ) INLINE Qt_QStandardItemModel_setSortRole( ::pPtr, nRole ) + METHOD setVerticalHeaderItem( nRow, pItem ) INLINE Qt_QStandardItemModel_setVerticalHeaderItem( ::pPtr, nRow, pItem ) + METHOD setVerticalHeaderLabels( pLabels ) INLINE Qt_QStandardItemModel_setVerticalHeaderLabels( ::pPtr, pLabels ) + METHOD sortRole() INLINE Qt_QStandardItemModel_sortRole( ::pPtr ) + METHOD takeHorizontalHeaderItem( nColumn ) INLINE Qt_QStandardItemModel_takeHorizontalHeaderItem( ::pPtr, nColumn ) + METHOD takeItem( nRow, nColumn ) INLINE Qt_QStandardItemModel_takeItem( ::pPtr, nRow, nColumn ) + METHOD takeVerticalHeaderItem( nRow ) INLINE Qt_QStandardItemModel_takeVerticalHeaderItem( ::pPtr, nRow ) + METHOD verticalHeaderItem( nRow ) INLINE Qt_QStandardItemModel_verticalHeaderItem( ::pPtr, nRow ) + + ENDCLASS + +/*----------------------------------------------------------------------*/ + +METHOD New( pParent ) CLASS QStandardItemModel + + ::pParent := pParent + + ::pPtr := Qt_QStandardItemModel( pParent ) + + RETURN Self + +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/generator/hbqtgen.prg b/harbour/contrib/hbqt/generator/hbqtgen.prg index 8684397404..d40853df51 100644 --- a/harbour/contrib/hbqt/generator/hbqtgen.prg +++ b/harbour/contrib/hbqt/generator/hbqtgen.prg @@ -635,10 +635,14 @@ STATIC FUNCTION ParseProto( cProto, cWidget, txt_, doc_, aEnum, func_ ) aA[ PRT_BODY ] := '&qr'+cDocNM aA[ PRT_DOC ] := '@n'+ cDocNM - CASE aA[ PRT_CAST ] $ 'double,qreal' + CASE aA[ PRT_CAST ] $ 'double,qreal,float' aA[ PRT_BODY ] := 'hb_parnd( '+ cHBIdx +' )' aA[ PRT_DOC ] := 'n'+ cDocNM + CASE aA[ PRT_CAST ] == 'uchar' + aA[ PRT_BODY ] := '( char ) hb_parni( '+ cHBIdx +' )' + aA[ PRT_DOC ] := 'n'+ 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 @@ -785,6 +789,10 @@ STATIC FUNCTION ParseProto( cProto, cWidget, txt_, doc_, aEnum, func_ ) cCmd := 'hb_retl( '+ cCmn +' )' cPrgRet := 'l'+cDocNM + CASE aA[ PRT_CAST ] == 'char' .AND. aA[ PRT_L_FAR ] + cCmd := 'hb_retc( '+ cCmn +' )' + cPrgRet := 'c'+cDocNM + CASE aA[ PRT_CAST ] == 'char' cCmd := 'hb_retni( '+ cCmn +' )' cPrgRet := 'c'+cDocNM @@ -1236,10 +1244,8 @@ STATIC FUNCTION Build_HBQT_H( cPathOut ) aadd( txt_, "#ifndef __HBQT_H " ) aadd( txt_, "#define __HBQT_H " ) aadd( txt_, " " ) -// aadd( txt_, "#include " ) aadd( txt_, "#include " ) aadd( txt_, "#include " ) - aadd( txt_, "/* #include */ " ) aadd( txt_, "#include " ) aadd( txt_, "#include " ) aadd( txt_, " " ) @@ -1448,6 +1454,18 @@ STATIC FUNCTION Build_HBQT_H( cPathOut ) aadd( txt_, "#define hbqt_par_QTextLayout( n ) ( ( QTextLayout* ) hb_parptr( n ) ) " ) aadd( txt_, "#define hbqt_par_QTextLength( n ) ( ( QTextLength* ) hb_parptr( n ) ) " ) aadd( txt_, "#define hbqt_par_QTextLine( n ) ( ( QTextLine* ) hb_parptr( n ) ) " ) + aadd( txt_, "#define hbqt_par_QGradient( n ) ( ( QGradient* ) hb_parptr( n ) ) " ) + aadd( txt_, "#define hbqt_par_QLinearGradient( n ) ( ( QLinearGradient* ) hb_parptr( n ) ) " ) + aadd( txt_, "#define hbqt_par_QRadialGradient( n ) ( ( QRadialGradient* ) hb_parptr( n ) ) " ) + aadd( txt_, "#define hbqt_par_QConicalGradient( n ) ( ( QConicalGradient* ) hb_parptr( n ) ) " ) + aadd( txt_, "#define hbqt_par_QGradientStops( n ) ( ( QGradientStops* ) hb_parptr( n ) ) " ) + aadd( txt_, "#define hbqt_par_QImageReader( n ) ( ( QImageReader* ) hb_parptr( n ) ) " ) + aadd( txt_, "#define hbqt_par_QImageWriter( n ) ( ( QImageWriter* ) hb_parptr( n ) ) " ) + aadd( txt_, "#define hbqt_par_QResource( n ) ( ( QResource* ) hb_parptr( n ) ) " ) + aadd( txt_, "#define hbqt_par_QSizePolicy( n ) ( ( QSizePolicy* ) hb_parptr( n ) ) " ) + aadd( txt_, "#define hbqt_par_QSound( n ) ( ( QSound* ) hb_parptr( n ) ) " ) + aadd( txt_, "#define hbqt_par_QStandardItem( n ) ( ( QStandardItem* ) hb_parptr( n ) ) " ) + aadd( txt_, "#define hbqt_par_QStandardItemModel( n ) ( ( QStandardItemModel* ) hb_parptr( n ) ) " ) aadd( txt_, " " ) aadd( txt_, "#define hbqt_par_QString( n ) ( ( QString ) hb_parc( n ) ) " ) aadd( txt_, "#define hbqt_par_QRgb( n ) ( hb_parnint( n ) ) " ) @@ -2479,3 +2497,4 @@ STATIC FUNCTION Build_Demo() RETURN CreateTarget( cFile, txt_ ) /*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/generator/qt45.qtp b/harbour/contrib/hbqt/generator/qt45.qtp index f1333f5dc9..189acaf623 100644 --- a/harbour/contrib/hbqt/generator/qt45.qtp +++ b/harbour/contrib/hbqt/generator/qt45.qtp @@ -30,6 +30,7 @@ QColorDialog.qth QComboBox.qth QCommandLinkButton.qth QCommonStyle.qth +QConicalGradient.qth QCoreApplication.qth QDateEdit.qth QDateTimeEdit.qth @@ -51,18 +52,24 @@ QFontInfo.qth QFormLayout.qth QFrame.qth QFtp.qth +QGradient.qth QGridLayout.qth QGroupBox.qth QHBoxLayout.qth QHeaderView.qth QHttp.qth QIcon.qth +QImage.qth +QImageReader.qth +QImageWriter.qth QInputDialog.qth QInputEvent.qth QLabel.qth QLayout.qth QLayoutItem.qth QLCDNumber.qth +QLine.qth +QLinearGradient.qth QLineEdit.qth QListView.qth QListWidget.qth @@ -76,7 +83,9 @@ QPaintDevice.qth QPageSetupDialog.qth QPainter.qth QPaintEvent.qth +QPalette.qth QPen.qth +QPicture.qth QPixmap.qth QPoint.qth QPointF.qth @@ -85,20 +94,26 @@ QPrintPreviewDialog.qth QProgressBar.qth QProgressDialog.qth QPushButton.qth +QRadialGradient.qth QRect.qth QRectF.qth QRadioButton.qth QRegion.qth +QResource.qth QScrollArea.qth QScrollBar.qth QSignalMapper.qth QSize.qth QSizeF.qth QSizeGrip.qth +QSizePolicy.qth QSlider.qth +QSound.qth QSpinBox.qth QSplashScreen.qth QSplitter.qth +QStandardItem.qth +QStandardItemModel.qth QStatusBar.qth QStyle.qth QTabBar.qth diff --git a/harbour/contrib/hbqt/hbqt.h b/harbour/contrib/hbqt/hbqt.h index 0d0969607b..2344eeb540 100644 --- a/harbour/contrib/hbqt/hbqt.h +++ b/harbour/contrib/hbqt/hbqt.h @@ -267,6 +267,18 @@ #define hbqt_par_QTextLayout( n ) ( ( QTextLayout* ) hb_parptr( n ) ) #define hbqt_par_QTextLength( n ) ( ( QTextLength* ) hb_parptr( n ) ) #define hbqt_par_QTextLine( n ) ( ( QTextLine* ) hb_parptr( n ) ) +#define hbqt_par_QGradient( n ) ( ( QGradient* ) hb_parptr( n ) ) +#define hbqt_par_QLinearGradient( n ) ( ( QLinearGradient* ) hb_parptr( n ) ) +#define hbqt_par_QRadialGradient( n ) ( ( QRadialGradient* ) hb_parptr( n ) ) +#define hbqt_par_QConicalGradient( n ) ( ( QConicalGradient* ) hb_parptr( n ) ) +#define hbqt_par_QGradientStops( n ) ( ( QGradientStops* ) hb_parptr( n ) ) +#define hbqt_par_QImageReader( n ) ( ( QImageReader* ) hb_parptr( n ) ) +#define hbqt_par_QImageWriter( n ) ( ( QImageWriter* ) hb_parptr( n ) ) +#define hbqt_par_QResource( n ) ( ( QResource* ) hb_parptr( n ) ) +#define hbqt_par_QSizePolicy( n ) ( ( QSizePolicy* ) hb_parptr( n ) ) +#define hbqt_par_QSound( n ) ( ( QSound* ) hb_parptr( n ) ) +#define hbqt_par_QStandardItem( n ) ( ( QStandardItem* ) hb_parptr( n ) ) +#define hbqt_par_QStandardItemModel( n ) ( ( QStandardItemModel* ) hb_parptr( n ) ) #define hbqt_par_QString( n ) ( ( QString ) hb_parc( n ) ) #define hbqt_par_QRgb( n ) ( hb_parnint( n ) ) diff --git a/harbour/contrib/hbqt/hbqt_qcolor.cpp b/harbour/contrib/hbqt/hbqt_qcolor.cpp index 0ec6703446..23a0808f36 100644 --- a/harbour/contrib/hbqt/hbqt_qcolor.cpp +++ b/harbour/contrib/hbqt/hbqt_qcolor.cpp @@ -73,7 +73,7 @@ QColor ( Qt::GlobalColor color ) */ HB_FUNC( QT_QCOLOR ) { - + hb_retptr( ( QColor* ) new QColor() ); } /* diff --git a/harbour/contrib/hbqt/hbqt_qconicalgradient.cpp b/harbour/contrib/hbqt/hbqt_qconicalgradient.cpp new file mode 100644 index 0000000000..efbbb2f2e0 --- /dev/null +++ b/harbour/contrib/hbqt/hbqt_qconicalgradient.cpp @@ -0,0 +1,120 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT wrapper main header + * + * Copyright 2009 Marcos Antonio Gambeta + * 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. + * + */ +/*----------------------------------------------------------------------*/ + +#include "hbapi.h" +#include "hbqt.h" + +/*----------------------------------------------------------------------*/ +#if QT_VERSION >= 0x040500 +/*----------------------------------------------------------------------*/ + + +#include + + +/* + * QConicalGradient () + * QConicalGradient ( const QPointF & center, qreal angle ) + * QConicalGradient ( qreal cx, qreal cy, qreal angle ) + */ +HB_FUNC( QT_ ) +{ + hb_retptr( ( QConicalGradient* ) new QConicalGradient() ); +} + +/* + * qreal angle () const + */ +HB_FUNC( QT_QCONICALGRADIENT_ANGLE ) +{ + hb_retnd( hbqt_par_QConicalGradient( 1 )->angle() ); +} + +/* + * QPointF center () const + */ +HB_FUNC( QT_QCONICALGRADIENT_CENTER ) +{ + hb_retptr( new QPointF( hbqt_par_QConicalGradient( 1 )->center() ) ); +} + +/* + * void setAngle ( qreal angle ) + */ +HB_FUNC( QT_QCONICALGRADIENT_SETANGLE ) +{ + hbqt_par_QConicalGradient( 1 )->setAngle( hb_parnd( 2 ) ); +} + +/* + * void setCenter ( const QPointF & center ) + */ +HB_FUNC( QT_QCONICALGRADIENT_SETCENTER ) +{ + hbqt_par_QConicalGradient( 1 )->setCenter( *hbqt_par_QPointF( 2 ) ); +} + +/* + * void setCenter ( qreal x, qreal y ) + */ +HB_FUNC( QT_QCONICALGRADIENT_SETCENTER_1 ) +{ + hbqt_par_QConicalGradient( 1 )->setCenter( hb_parnd( 2 ), hb_parnd( 3 ) ); +} + + +/*----------------------------------------------------------------------*/ +#endif /* #if QT_VERSION >= 0x040500 */ +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/hbqt_qgradient.cpp b/harbour/contrib/hbqt/hbqt_qgradient.cpp new file mode 100644 index 0000000000..ce6ca4b2a8 --- /dev/null +++ b/harbour/contrib/hbqt/hbqt_qgradient.cpp @@ -0,0 +1,142 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT wrapper main header + * + * Copyright 2009 Marcos Antonio Gambeta + * 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. + * + */ +/*----------------------------------------------------------------------*/ + +#include "hbapi.h" +#include "hbqt.h" + +/*----------------------------------------------------------------------*/ +#if QT_VERSION >= 0x040500 +/*----------------------------------------------------------------------*/ + + +#include + + +/* + * + */ +HB_FUNC( QT_QGRADIENT ) +{ + +} + +/* + * CoordinateMode coordinateMode () const + */ +HB_FUNC( QT_QGRADIENT_COORDINATEMODE ) +{ + hb_retni( ( QGradient::CoordinateMode ) hbqt_par_QGradient( 1 )->coordinateMode() ); +} + +/* + * void setColorAt ( qreal position, const QColor & color ) + */ +HB_FUNC( QT_QGRADIENT_SETCOLORAT ) +{ + hbqt_par_QGradient( 1 )->setColorAt( hb_parnd( 2 ), *hbqt_par_QColor( 3 ) ); +} + +/* + * void setCoordinateMode ( CoordinateMode mode ) + */ +HB_FUNC( QT_QGRADIENT_SETCOORDINATEMODE ) +{ + hbqt_par_QGradient( 1 )->setCoordinateMode( ( QGradient::CoordinateMode ) hb_parni( 2 ) ); +} + +/* + * void setSpread ( Spread method ) + */ +HB_FUNC( QT_QGRADIENT_SETSPREAD ) +{ + hbqt_par_QGradient( 1 )->setSpread( ( QGradient::Spread ) hb_parni( 2 ) ); +} + +/* + * void setStops ( const QGradientStops & stopPoints ) + */ +HB_FUNC( QT_QGRADIENT_SETSTOPS ) +{ + hbqt_par_QGradient( 1 )->setStops( *hbqt_par_QGradientStops( 2 ) ); +} + +/* + * Spread spread () const + */ +HB_FUNC( QT_QGRADIENT_SPREAD ) +{ + hb_retni( ( QGradient::Spread ) hbqt_par_QGradient( 1 )->spread() ); +} + +/* + * QGradientStops stops () const + */ +HB_FUNC( QT_QGRADIENT_STOPS ) +{ + hb_retptr( new QGradientStops( hbqt_par_QGradient( 1 )->stops() ) ); +} + +/* + * Type type () const + */ +HB_FUNC( QT_QGRADIENT_TYPE ) +{ + hb_retni( ( QGradient::Type ) hbqt_par_QGradient( 1 )->type() ); +} + + +/*----------------------------------------------------------------------*/ +#endif /* #if QT_VERSION >= 0x040500 */ +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/hbqt_qimage.cpp b/harbour/contrib/hbqt/hbqt_qimage.cpp new file mode 100644 index 0000000000..5fe1282951 --- /dev/null +++ b/harbour/contrib/hbqt/hbqt_qimage.cpp @@ -0,0 +1,580 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT wrapper main header + * + * Copyright 2009 Marcos Antonio Gambeta + * 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. + * + */ +/*----------------------------------------------------------------------*/ + +#include "hbapi.h" +#include "hbqt.h" + +/*----------------------------------------------------------------------*/ +#if QT_VERSION >= 0x040500 +/*----------------------------------------------------------------------*/ + +/* + * Constructed[ 60/63 [ 95.24% ] ] + * + * *** Unconvered Prototypes *** + * ----------------------------- + * + * QVector colorTable () const + * QImage convertToFormat ( Format format, const QVector & colorTable, Qt::ImageConversionFlags flags = Qt::AutoColor ) const + * void setColorTable ( const QVector colors ) + */ + + +#include + + +/* + * QImage () + * QImage ( const QSize & size, Format format ) + * QImage ( int width, int height, Format format ) + * QImage ( uchar * data, int width, int height, Format format ) + * QImage ( const uchar * data, int width, int height, Format format ) + * QImage ( uchar * data, int width, int height, int bytesPerLine, Format format ) + * QImage ( const uchar * data, int width, int height, int bytesPerLine, Format format ) + * QImage ( const char * const[] xpm ) + * QImage ( const QString & fileName, const char * format = 0 ) + * QImage ( const char * fileName, const char * format = 0 ) + * QImage ( const QImage & image ) + * ~QImage () + */ +HB_FUNC( QT_QIMAGE ) +{ + hb_retptr( ( QImage* ) new QImage() ); +} + +/* + * bool allGray () const + */ +HB_FUNC( QT_QIMAGE_ALLGRAY ) +{ + hb_retl( hbqt_par_QImage( 1 )->allGray() ); +} + +/* + * QImage alphaChannel () const + */ +HB_FUNC( QT_QIMAGE_ALPHACHANNEL ) +{ + hb_retptr( new QImage( hbqt_par_QImage( 1 )->alphaChannel() ) ); +} + +/* + * uchar * bits () + */ +HB_FUNC( QT_QIMAGE_BITS ) +{ + hb_retptr( ( uchar* ) hbqt_par_QImage( 1 )->bits() ); +} + +/* + * const uchar * bits () const + */ +HB_FUNC( QT_QIMAGE_BITS_1 ) +{ + hb_retptr( ( uchar* ) hbqt_par_QImage( 1 )->bits() ); +} + +/* + * int bytesPerLine () const + */ +HB_FUNC( QT_QIMAGE_BYTESPERLINE ) +{ + hb_retni( hbqt_par_QImage( 1 )->bytesPerLine() ); +} + +/* + * qint64 cacheKey () const + */ +HB_FUNC( QT_QIMAGE_CACHEKEY ) +{ + hb_retni( hbqt_par_QImage( 1 )->cacheKey() ); +} + +/* + * QRgb color ( int i ) const + */ +HB_FUNC( QT_QIMAGE_COLOR ) +{ + hb_retni( hbqt_par_QImage( 1 )->color( hb_parni( 2 ) ) ); +} + +/* + * QImage convertToFormat ( Format format, Qt::ImageConversionFlags flags = Qt::AutoColor ) const + */ +HB_FUNC( QT_QIMAGE_CONVERTTOFORMAT ) +{ + hb_retptr( new QImage( hbqt_par_QImage( 1 )->convertToFormat( ( QImage::Format ) hb_parni( 2 ), ( HB_ISNUM( 3 ) ? ( Qt::ImageConversionFlags ) hb_parni( 3 ) : ( Qt::ImageConversionFlags ) Qt::AutoColor ) ) ) ); +} + +/* + * QImage copy ( const QRect & rectangle = QRect() ) const + */ +HB_FUNC( QT_QIMAGE_COPY ) +{ + hb_retptr( new QImage( hbqt_par_QImage( 1 )->copy( *hbqt_par_QRect( 2 ) ) ) ); +} + +/* + * QImage copy ( int x, int y, int width, int height ) const + */ +HB_FUNC( QT_QIMAGE_COPY_1 ) +{ + hb_retptr( new QImage( hbqt_par_QImage( 1 )->copy( hb_parni( 2 ), hb_parni( 3 ), hb_parni( 4 ), hb_parni( 5 ) ) ) ); +} + +/* + * QImage createAlphaMask ( Qt::ImageConversionFlags flags = Qt::AutoColor ) const + */ +HB_FUNC( QT_QIMAGE_CREATEALPHAMASK ) +{ + hb_retptr( new QImage( hbqt_par_QImage( 1 )->createAlphaMask( ( HB_ISNUM( 2 ) ? ( Qt::ImageConversionFlags ) hb_parni( 2 ) : ( Qt::ImageConversionFlags ) Qt::AutoColor ) ) ) ); +} + +/* + * QImage createHeuristicMask ( bool clipTight = true ) const + */ +HB_FUNC( QT_QIMAGE_CREATEHEURISTICMASK ) +{ + hb_retptr( new QImage( hbqt_par_QImage( 1 )->createHeuristicMask( hb_parl( 2 ) ) ) ); +} + +/* + * QImage createMaskFromColor ( QRgb color, Qt::MaskMode mode = Qt::MaskInColor ) const + */ +HB_FUNC( QT_QIMAGE_CREATEMASKFROMCOLOR ) +{ + hb_retptr( new QImage( hbqt_par_QImage( 1 )->createMaskFromColor( hb_parni( 2 ), ( HB_ISNUM( 3 ) ? ( Qt::MaskMode ) hb_parni( 3 ) : ( Qt::MaskMode ) Qt::MaskInColor ) ) ) ); +} + +/* + * int depth () const + */ +HB_FUNC( QT_QIMAGE_DEPTH ) +{ + hb_retni( hbqt_par_QImage( 1 )->depth() ); +} + +/* + * int dotsPerMeterX () const + */ +HB_FUNC( QT_QIMAGE_DOTSPERMETERX ) +{ + hb_retni( hbqt_par_QImage( 1 )->dotsPerMeterX() ); +} + +/* + * int dotsPerMeterY () const + */ +HB_FUNC( QT_QIMAGE_DOTSPERMETERY ) +{ + hb_retni( hbqt_par_QImage( 1 )->dotsPerMeterY() ); +} + +/* + * void fill ( uint pixelValue ) + */ +HB_FUNC( QT_QIMAGE_FILL ) +{ + hbqt_par_QImage( 1 )->fill( hb_parni( 2 ) ); +} + +/* + * Format format () const + */ +HB_FUNC( QT_QIMAGE_FORMAT ) +{ + hb_retni( ( QImage::Format ) hbqt_par_QImage( 1 )->format() ); +} + +/* + * bool hasAlphaChannel () const + */ +HB_FUNC( QT_QIMAGE_HASALPHACHANNEL ) +{ + hb_retl( hbqt_par_QImage( 1 )->hasAlphaChannel() ); +} + +/* + * int height () const + */ +HB_FUNC( QT_QIMAGE_HEIGHT ) +{ + hb_retni( hbqt_par_QImage( 1 )->height() ); +} + +/* + * void invertPixels ( InvertMode mode = InvertRgb ) + */ +HB_FUNC( QT_QIMAGE_INVERTPIXELS ) +{ + hbqt_par_QImage( 1 )->invertPixels( ( HB_ISNUM( 2 ) ? ( QImage::InvertMode ) hb_parni( 2 ) : ( QImage::InvertMode ) QImage::InvertRgb ) ); +} + +/* + * bool isGrayscale () const + */ +HB_FUNC( QT_QIMAGE_ISGRAYSCALE ) +{ + hb_retl( hbqt_par_QImage( 1 )->isGrayscale() ); +} + +/* + * bool isNull () const + */ +HB_FUNC( QT_QIMAGE_ISNULL ) +{ + hb_retl( hbqt_par_QImage( 1 )->isNull() ); +} + +/* + * bool load ( const QString & fileName, const char * format = 0 ) + */ +HB_FUNC( QT_QIMAGE_LOAD ) +{ + hb_retl( hbqt_par_QImage( 1 )->load( hbqt_par_QString( 2 ), hbqt_par_char( 3 ) ) ); +} + +/* + * bool load ( QIODevice * device, const char * format ) + */ +HB_FUNC( QT_QIMAGE_LOAD_1 ) +{ + hb_retl( hbqt_par_QImage( 1 )->load( hbqt_par_QIODevice( 2 ), hbqt_par_char( 3 ) ) ); +} + +/* + * bool loadFromData ( const QByteArray & data, const char * format = 0 ) + */ +HB_FUNC( QT_QIMAGE_LOADFROMDATA ) +{ + hb_retl( hbqt_par_QImage( 1 )->loadFromData( *hbqt_par_QByteArray( 2 ), hbqt_par_char( 3 ) ) ); +} + +/* + * QImage mirrored ( bool horizontal = false, bool vertical = true ) const + */ +HB_FUNC( QT_QIMAGE_MIRRORED ) +{ + hb_retptr( new QImage( hbqt_par_QImage( 1 )->mirrored( hb_parl( 2 ), hb_parl( 3 ) ) ) ); +} + +/* + * int numBytes () const + */ +HB_FUNC( QT_QIMAGE_NUMBYTES ) +{ + hb_retni( hbqt_par_QImage( 1 )->numBytes() ); +} + +/* + * int numColors () const + */ +HB_FUNC( QT_QIMAGE_NUMCOLORS ) +{ + hb_retni( hbqt_par_QImage( 1 )->numColors() ); +} + +/* + * QPoint offset () const + */ +HB_FUNC( QT_QIMAGE_OFFSET ) +{ + hb_retptr( new QPoint( hbqt_par_QImage( 1 )->offset() ) ); +} + +/* + * QRgb pixel ( const QPoint & position ) const + */ +HB_FUNC( QT_QIMAGE_PIXEL ) +{ + hb_retni( hbqt_par_QImage( 1 )->pixel( *hbqt_par_QPoint( 2 ) ) ); +} + +/* + * QRgb pixel ( int x, int y ) const + */ +HB_FUNC( QT_QIMAGE_PIXEL_1 ) +{ + hb_retni( hbqt_par_QImage( 1 )->pixel( hb_parni( 2 ), hb_parni( 3 ) ) ); +} + +/* + * int pixelIndex ( const QPoint & position ) const + */ +HB_FUNC( QT_QIMAGE_PIXELINDEX ) +{ + hb_retni( hbqt_par_QImage( 1 )->pixelIndex( *hbqt_par_QPoint( 2 ) ) ); +} + +/* + * int pixelIndex ( int x, int y ) const + */ +HB_FUNC( QT_QIMAGE_PIXELINDEX_1 ) +{ + hb_retni( hbqt_par_QImage( 1 )->pixelIndex( hb_parni( 2 ), hb_parni( 3 ) ) ); +} + +/* + * QRect rect () const + */ +HB_FUNC( QT_QIMAGE_RECT ) +{ + hb_retptr( new QRect( hbqt_par_QImage( 1 )->rect() ) ); +} + +/* + * QImage rgbSwapped () const + */ +HB_FUNC( QT_QIMAGE_RGBSWAPPED ) +{ + hb_retptr( new QImage( hbqt_par_QImage( 1 )->rgbSwapped() ) ); +} + +/* + * bool save ( const QString & fileName, const char * format = 0, int quality = -1 ) const + */ +HB_FUNC( QT_QIMAGE_SAVE ) +{ + hb_retl( hbqt_par_QImage( 1 )->save( hbqt_par_QString( 2 ), hbqt_par_char( 3 ), ( HB_ISNUM( 4 ) ? hb_parni( 4 ) : -1 ) ) ); +} + +/* + * bool save ( QIODevice * device, const char * format = 0, int quality = -1 ) const + */ +HB_FUNC( QT_QIMAGE_SAVE_1 ) +{ + hb_retl( hbqt_par_QImage( 1 )->save( hbqt_par_QIODevice( 2 ), hbqt_par_char( 3 ), ( HB_ISNUM( 4 ) ? hb_parni( 4 ) : -1 ) ) ); +} + +/* + * QImage scaled ( const QSize & size, Qt::AspectRatioMode aspectRatioMode = Qt::IgnoreAspectRatio, Qt::TransformationMode transformMode = Qt::FastTransformation ) const + */ +HB_FUNC( QT_QIMAGE_SCALED ) +{ + hb_retptr( new QImage( hbqt_par_QImage( 1 )->scaled( *hbqt_par_QSize( 2 ), ( HB_ISNUM( 3 ) ? ( Qt::AspectRatioMode ) hb_parni( 3 ) : ( Qt::AspectRatioMode ) Qt::IgnoreAspectRatio ), ( HB_ISNUM( 4 ) ? ( Qt::TransformationMode ) hb_parni( 4 ) : ( Qt::TransformationMode ) Qt::FastTransformation ) ) ) ); +} + +/* + * QImage scaled ( int width, int height, Qt::AspectRatioMode aspectRatioMode = Qt::IgnoreAspectRatio, Qt::TransformationMode transformMode = Qt::FastTransformation ) const + */ +HB_FUNC( QT_QIMAGE_SCALED_1 ) +{ + hb_retptr( new QImage( hbqt_par_QImage( 1 )->scaled( hb_parni( 2 ), hb_parni( 3 ), ( HB_ISNUM( 4 ) ? ( Qt::AspectRatioMode ) hb_parni( 4 ) : ( Qt::AspectRatioMode ) Qt::IgnoreAspectRatio ), ( HB_ISNUM( 5 ) ? ( Qt::TransformationMode ) hb_parni( 5 ) : ( Qt::TransformationMode ) Qt::FastTransformation ) ) ) ); +} + +/* + * QImage scaledToHeight ( int height, Qt::TransformationMode mode = Qt::FastTransformation ) const + */ +HB_FUNC( QT_QIMAGE_SCALEDTOHEIGHT ) +{ + hb_retptr( new QImage( hbqt_par_QImage( 1 )->scaledToHeight( hb_parni( 2 ), ( HB_ISNUM( 3 ) ? ( Qt::TransformationMode ) hb_parni( 3 ) : ( Qt::TransformationMode ) Qt::FastTransformation ) ) ) ); +} + +/* + * QImage scaledToWidth ( int width, Qt::TransformationMode mode = Qt::FastTransformation ) const + */ +HB_FUNC( QT_QIMAGE_SCALEDTOWIDTH ) +{ + hb_retptr( new QImage( hbqt_par_QImage( 1 )->scaledToWidth( hb_parni( 2 ), ( HB_ISNUM( 3 ) ? ( Qt::TransformationMode ) hb_parni( 3 ) : ( Qt::TransformationMode ) Qt::FastTransformation ) ) ) ); +} + +/* + * uchar * scanLine ( int i ) + */ +HB_FUNC( QT_QIMAGE_SCANLINE ) +{ + hb_retptr( ( uchar* ) hbqt_par_QImage( 1 )->scanLine( hb_parni( 2 ) ) ); +} + +/* + * const uchar * scanLine ( int i ) const + */ +HB_FUNC( QT_QIMAGE_SCANLINE_1 ) +{ + hb_retptr( ( uchar* ) hbqt_par_QImage( 1 )->scanLine( hb_parni( 2 ) ) ); +} + +/* + * void setColor ( int index, QRgb colorValue ) + */ +HB_FUNC( QT_QIMAGE_SETCOLOR ) +{ + hbqt_par_QImage( 1 )->setColor( hb_parni( 2 ), hb_parni( 3 ) ); +} + +/* + * void setDotsPerMeterX ( int x ) + */ +HB_FUNC( QT_QIMAGE_SETDOTSPERMETERX ) +{ + hbqt_par_QImage( 1 )->setDotsPerMeterX( hb_parni( 2 ) ); +} + +/* + * void setDotsPerMeterY ( int y ) + */ +HB_FUNC( QT_QIMAGE_SETDOTSPERMETERY ) +{ + hbqt_par_QImage( 1 )->setDotsPerMeterY( hb_parni( 2 ) ); +} + +/* + * void setNumColors ( int numColors ) + */ +HB_FUNC( QT_QIMAGE_SETNUMCOLORS ) +{ + hbqt_par_QImage( 1 )->setNumColors( hb_parni( 2 ) ); +} + +/* + * void setOffset ( const QPoint & offset ) + */ +HB_FUNC( QT_QIMAGE_SETOFFSET ) +{ + hbqt_par_QImage( 1 )->setOffset( *hbqt_par_QPoint( 2 ) ); +} + +/* + * void setPixel ( const QPoint & position, uint index_or_rgb ) + */ +HB_FUNC( QT_QIMAGE_SETPIXEL ) +{ + hbqt_par_QImage( 1 )->setPixel( *hbqt_par_QPoint( 2 ), hb_parni( 3 ) ); +} + +/* + * void setPixel ( int x, int y, uint index_or_rgb ) + */ +HB_FUNC( QT_QIMAGE_SETPIXEL_1 ) +{ + hbqt_par_QImage( 1 )->setPixel( hb_parni( 2 ), hb_parni( 3 ), hb_parni( 4 ) ); +} + +/* + * void setText ( const QString & key, const QString & text ) + */ +HB_FUNC( QT_QIMAGE_SETTEXT ) +{ + hbqt_par_QImage( 1 )->setText( hbqt_par_QString( 2 ), hbqt_par_QString( 3 ) ); +} + +/* + * QSize size () const + */ +HB_FUNC( QT_QIMAGE_SIZE ) +{ + hb_retptr( new QSize( hbqt_par_QImage( 1 )->size() ) ); +} + +/* + * QString text ( const QString & key = QString() ) const + */ +HB_FUNC( QT_QIMAGE_TEXT ) +{ + hb_retc( hbqt_par_QImage( 1 )->text( hbqt_par_QString( 2 ) ).toLatin1().data() ); +} + +/* + * QStringList textKeys () const + */ +HB_FUNC( QT_QIMAGE_TEXTKEYS ) +{ + hb_retptr( new QStringList( hbqt_par_QImage( 1 )->textKeys() ) ); +} + +/* + * QImage transformed ( const QMatrix & matrix, Qt::TransformationMode mode = Qt::FastTransformation ) const + */ +HB_FUNC( QT_QIMAGE_TRANSFORMED ) +{ + hb_retptr( new QImage( hbqt_par_QImage( 1 )->transformed( *hbqt_par_QMatrix( 2 ), ( HB_ISNUM( 3 ) ? ( Qt::TransformationMode ) hb_parni( 3 ) : ( Qt::TransformationMode ) Qt::FastTransformation ) ) ) ); +} + +/* + * QImage transformed ( const QTransform & matrix, Qt::TransformationMode mode = Qt::FastTransformation ) const + */ +HB_FUNC( QT_QIMAGE_TRANSFORMED_1 ) +{ + hb_retptr( new QImage( hbqt_par_QImage( 1 )->transformed( *hbqt_par_QTransform( 2 ), ( HB_ISNUM( 3 ) ? ( Qt::TransformationMode ) hb_parni( 3 ) : ( Qt::TransformationMode ) Qt::FastTransformation ) ) ) ); +} + +/* + * bool valid ( const QPoint & pos ) const + */ +HB_FUNC( QT_QIMAGE_VALID ) +{ + hb_retl( hbqt_par_QImage( 1 )->valid( *hbqt_par_QPoint( 2 ) ) ); +} + +/* + * bool valid ( int x, int y ) const + */ +HB_FUNC( QT_QIMAGE_VALID_1 ) +{ + hb_retl( hbqt_par_QImage( 1 )->valid( hb_parni( 2 ), hb_parni( 3 ) ) ); +} + +/* + * int width () const + */ +HB_FUNC( QT_QIMAGE_WIDTH ) +{ + hb_retni( hbqt_par_QImage( 1 )->width() ); +} + + +/*----------------------------------------------------------------------*/ +#endif /* #if QT_VERSION >= 0x040500 */ +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/hbqt_qimagereader.cpp b/harbour/contrib/hbqt/hbqt_qimagereader.cpp new file mode 100644 index 0000000000..ff578a5cee --- /dev/null +++ b/harbour/contrib/hbqt/hbqt_qimagereader.cpp @@ -0,0 +1,369 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT wrapper main header + * + * Copyright 2009 Marcos Antonio Gambeta + * 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. + * + */ +/*----------------------------------------------------------------------*/ + +#include "hbapi.h" +#include "hbqt.h" + +/*----------------------------------------------------------------------*/ +#if QT_VERSION >= 0x040500 +/*----------------------------------------------------------------------*/ + + +#include + + +/* + * QImageReader () + * QImageReader ( QIODevice * device, const QByteArray & format = QByteArray() ) + * QImageReader ( const QString & fileName, const QByteArray & format = QByteArray() ) + * ~QImageReader () + */ +HB_FUNC( QT_QIMAGEREADER ) +{ + hb_retptr( ( QImageReader* ) new QImageReader() ); +} + +/* + * bool autoDetectImageFormat () const + */ +HB_FUNC( QT_QIMAGEREADER_AUTODETECTIMAGEFORMAT ) +{ + hb_retl( hbqt_par_QImageReader( 1 )->autoDetectImageFormat() ); +} + +/* + * QColor backgroundColor () const + */ +HB_FUNC( QT_QIMAGEREADER_BACKGROUNDCOLOR ) +{ + hb_retptr( new QColor( hbqt_par_QImageReader( 1 )->backgroundColor() ) ); +} + +/* + * bool canRead () const + */ +HB_FUNC( QT_QIMAGEREADER_CANREAD ) +{ + hb_retl( hbqt_par_QImageReader( 1 )->canRead() ); +} + +/* + * QRect clipRect () const + */ +HB_FUNC( QT_QIMAGEREADER_CLIPRECT ) +{ + hb_retptr( new QRect( hbqt_par_QImageReader( 1 )->clipRect() ) ); +} + +/* + * int currentImageNumber () const + */ +HB_FUNC( QT_QIMAGEREADER_CURRENTIMAGENUMBER ) +{ + hb_retni( hbqt_par_QImageReader( 1 )->currentImageNumber() ); +} + +/* + * QRect currentImageRect () const + */ +HB_FUNC( QT_QIMAGEREADER_CURRENTIMAGERECT ) +{ + hb_retptr( new QRect( hbqt_par_QImageReader( 1 )->currentImageRect() ) ); +} + +/* + * QIODevice * device () const + */ +HB_FUNC( QT_QIMAGEREADER_DEVICE ) +{ + hb_retptr( ( QIODevice* ) hbqt_par_QImageReader( 1 )->device() ); +} + +/* + * ImageReaderError error () const + */ +HB_FUNC( QT_QIMAGEREADER_ERROR ) +{ + hb_retni( ( QImageReader::ImageReaderError ) hbqt_par_QImageReader( 1 )->error() ); +} + +/* + * QString errorString () const + */ +HB_FUNC( QT_QIMAGEREADER_ERRORSTRING ) +{ + hb_retc( hbqt_par_QImageReader( 1 )->errorString().toLatin1().data() ); +} + +/* + * QString fileName () const + */ +HB_FUNC( QT_QIMAGEREADER_FILENAME ) +{ + hb_retc( hbqt_par_QImageReader( 1 )->fileName().toLatin1().data() ); +} + +/* + * QByteArray format () const + */ +HB_FUNC( QT_QIMAGEREADER_FORMAT ) +{ + hb_retptr( new QByteArray( hbqt_par_QImageReader( 1 )->format() ) ); +} + +/* + * int imageCount () const + */ +HB_FUNC( QT_QIMAGEREADER_IMAGECOUNT ) +{ + hb_retni( hbqt_par_QImageReader( 1 )->imageCount() ); +} + +/* + * QImage::Format imageFormat () const + */ +HB_FUNC( QT_QIMAGEREADER_IMAGEFORMAT ) +{ + hb_retni( ( QImage::Format ) hbqt_par_QImageReader( 1 )->imageFormat() ); +} + +/* + * bool jumpToImage ( int imageNumber ) + */ +HB_FUNC( QT_QIMAGEREADER_JUMPTOIMAGE ) +{ + hb_retl( hbqt_par_QImageReader( 1 )->jumpToImage( hb_parni( 2 ) ) ); +} + +/* + * bool jumpToNextImage () + */ +HB_FUNC( QT_QIMAGEREADER_JUMPTONEXTIMAGE ) +{ + hb_retl( hbqt_par_QImageReader( 1 )->jumpToNextImage() ); +} + +/* + * int loopCount () const + */ +HB_FUNC( QT_QIMAGEREADER_LOOPCOUNT ) +{ + hb_retni( hbqt_par_QImageReader( 1 )->loopCount() ); +} + +/* + * int nextImageDelay () const + */ +HB_FUNC( QT_QIMAGEREADER_NEXTIMAGEDELAY ) +{ + hb_retni( hbqt_par_QImageReader( 1 )->nextImageDelay() ); +} + +/* + * int quality () const + */ +HB_FUNC( QT_QIMAGEREADER_QUALITY ) +{ + hb_retni( hbqt_par_QImageReader( 1 )->quality() ); +} + +/* + * QImage read () + */ +HB_FUNC( QT_QIMAGEREADER_READ ) +{ + hb_retptr( new QImage( hbqt_par_QImageReader( 1 )->read() ) ); +} + +/* + * bool read ( QImage * image ) + */ +HB_FUNC( QT_QIMAGEREADER_READ_1 ) +{ + hb_retl( hbqt_par_QImageReader( 1 )->read( hbqt_par_QImage( 2 ) ) ); +} + +/* + * QRect scaledClipRect () const + */ +HB_FUNC( QT_QIMAGEREADER_SCALEDCLIPRECT ) +{ + hb_retptr( new QRect( hbqt_par_QImageReader( 1 )->scaledClipRect() ) ); +} + +/* + * QSize scaledSize () const + */ +HB_FUNC( QT_QIMAGEREADER_SCALEDSIZE ) +{ + hb_retptr( new QSize( hbqt_par_QImageReader( 1 )->scaledSize() ) ); +} + +/* + * void setAutoDetectImageFormat ( bool enabled ) + */ +HB_FUNC( QT_QIMAGEREADER_SETAUTODETECTIMAGEFORMAT ) +{ + hbqt_par_QImageReader( 1 )->setAutoDetectImageFormat( hb_parl( 2 ) ); +} + +/* + * void setBackgroundColor ( const QColor & color ) + */ +HB_FUNC( QT_QIMAGEREADER_SETBACKGROUNDCOLOR ) +{ + hbqt_par_QImageReader( 1 )->setBackgroundColor( *hbqt_par_QColor( 2 ) ); +} + +/* + * void setClipRect ( const QRect & rect ) + */ +HB_FUNC( QT_QIMAGEREADER_SETCLIPRECT ) +{ + hbqt_par_QImageReader( 1 )->setClipRect( *hbqt_par_QRect( 2 ) ); +} + +/* + * void setDevice ( QIODevice * device ) + */ +HB_FUNC( QT_QIMAGEREADER_SETDEVICE ) +{ + hbqt_par_QImageReader( 1 )->setDevice( hbqt_par_QIODevice( 2 ) ); +} + +/* + * void setFileName ( const QString & fileName ) + */ +HB_FUNC( QT_QIMAGEREADER_SETFILENAME ) +{ + hbqt_par_QImageReader( 1 )->setFileName( hbqt_par_QString( 2 ) ); +} + +/* + * void setFormat ( const QByteArray & format ) + */ +HB_FUNC( QT_QIMAGEREADER_SETFORMAT ) +{ + hbqt_par_QImageReader( 1 )->setFormat( *hbqt_par_QByteArray( 2 ) ); +} + +/* + * void setQuality ( int quality ) + */ +HB_FUNC( QT_QIMAGEREADER_SETQUALITY ) +{ + hbqt_par_QImageReader( 1 )->setQuality( hb_parni( 2 ) ); +} + +/* + * void setScaledClipRect ( const QRect & rect ) + */ +HB_FUNC( QT_QIMAGEREADER_SETSCALEDCLIPRECT ) +{ + hbqt_par_QImageReader( 1 )->setScaledClipRect( *hbqt_par_QRect( 2 ) ); +} + +/* + * void setScaledSize ( const QSize & size ) + */ +HB_FUNC( QT_QIMAGEREADER_SETSCALEDSIZE ) +{ + hbqt_par_QImageReader( 1 )->setScaledSize( *hbqt_par_QSize( 2 ) ); +} + +/* + * QSize size () const + */ +HB_FUNC( QT_QIMAGEREADER_SIZE ) +{ + hb_retptr( new QSize( hbqt_par_QImageReader( 1 )->size() ) ); +} + +/* + * bool supportsAnimation () const + */ +HB_FUNC( QT_QIMAGEREADER_SUPPORTSANIMATION ) +{ + hb_retl( hbqt_par_QImageReader( 1 )->supportsAnimation() ); +} + +/* + * bool supportsOption ( QImageIOHandler::ImageOption option ) const + */ +HB_FUNC( QT_QIMAGEREADER_SUPPORTSOPTION ) +{ + hb_retl( hbqt_par_QImageReader( 1 )->supportsOption( ( QImageIOHandler::ImageOption ) hb_parni( 2 ) ) ); +} + +/* + * QString text ( const QString & key ) const + */ +HB_FUNC( QT_QIMAGEREADER_TEXT ) +{ + hb_retc( hbqt_par_QImageReader( 1 )->text( hbqt_par_QString( 2 ) ).toLatin1().data() ); +} + +/* + * QStringList textKeys () const + */ +HB_FUNC( QT_QIMAGEREADER_TEXTKEYS ) +{ + hb_retptr( new QStringList( hbqt_par_QImageReader( 1 )->textKeys() ) ); +} + + +/*----------------------------------------------------------------------*/ +#endif /* #if QT_VERSION >= 0x040500 */ +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/hbqt_qimagewriter.cpp b/harbour/contrib/hbqt/hbqt_qimagewriter.cpp new file mode 100644 index 0000000000..2494bcff96 --- /dev/null +++ b/harbour/contrib/hbqt/hbqt_qimagewriter.cpp @@ -0,0 +1,225 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT wrapper main header + * + * Copyright 2009 Marcos Antonio Gambeta + * 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. + * + */ +/*----------------------------------------------------------------------*/ + +#include "hbapi.h" +#include "hbqt.h" + +/*----------------------------------------------------------------------*/ +#if QT_VERSION >= 0x040500 +/*----------------------------------------------------------------------*/ + + +#include + + +/* + * QImageWriter () + * QImageWriter ( QIODevice * device, const QByteArray & format ) + * QImageWriter ( const QString & fileName, const QByteArray & format = QByteArray() ) + * ~QImageWriter () + */ +HB_FUNC( QT_QIMAGEWRITER ) +{ + hb_retptr( ( QImageWriter* ) new QImageWriter() ); +} + +/* + * bool canWrite () const + */ +HB_FUNC( QT_QIMAGEWRITER_CANWRITE ) +{ + hb_retl( hbqt_par_QImageWriter( 1 )->canWrite() ); +} + +/* + * int compression () const + */ +HB_FUNC( QT_QIMAGEWRITER_COMPRESSION ) +{ + hb_retni( hbqt_par_QImageWriter( 1 )->compression() ); +} + +/* + * QIODevice * device () const + */ +HB_FUNC( QT_QIMAGEWRITER_DEVICE ) +{ + hb_retptr( ( QIODevice* ) hbqt_par_QImageWriter( 1 )->device() ); +} + +/* + * ImageWriterError error () const + */ +HB_FUNC( QT_QIMAGEWRITER_ERROR ) +{ + hb_retni( ( QImageWriter::ImageWriterError ) hbqt_par_QImageWriter( 1 )->error() ); +} + +/* + * QString errorString () const + */ +HB_FUNC( QT_QIMAGEWRITER_ERRORSTRING ) +{ + hb_retc( hbqt_par_QImageWriter( 1 )->errorString().toLatin1().data() ); +} + +/* + * QString fileName () const + */ +HB_FUNC( QT_QIMAGEWRITER_FILENAME ) +{ + hb_retc( hbqt_par_QImageWriter( 1 )->fileName().toLatin1().data() ); +} + +/* + * QByteArray format () const + */ +HB_FUNC( QT_QIMAGEWRITER_FORMAT ) +{ + hb_retptr( new QByteArray( hbqt_par_QImageWriter( 1 )->format() ) ); +} + +/* + * float gamma () const + */ +HB_FUNC( QT_QIMAGEWRITER_GAMMA ) +{ + hb_retptr( new float( hbqt_par_QImageWriter( 1 )->gamma() ) ); +} + +/* + * int quality () const + */ +HB_FUNC( QT_QIMAGEWRITER_QUALITY ) +{ + hb_retni( hbqt_par_QImageWriter( 1 )->quality() ); +} + +/* + * void setCompression ( int compression ) + */ +HB_FUNC( QT_QIMAGEWRITER_SETCOMPRESSION ) +{ + hbqt_par_QImageWriter( 1 )->setCompression( hb_parni( 2 ) ); +} + +/* + * void setDevice ( QIODevice * device ) + */ +HB_FUNC( QT_QIMAGEWRITER_SETDEVICE ) +{ + hbqt_par_QImageWriter( 1 )->setDevice( hbqt_par_QIODevice( 2 ) ); +} + +/* + * void setFileName ( const QString & fileName ) + */ +HB_FUNC( QT_QIMAGEWRITER_SETFILENAME ) +{ + hbqt_par_QImageWriter( 1 )->setFileName( hbqt_par_QString( 2 ) ); +} + +/* + * void setFormat ( const QByteArray & format ) + */ +HB_FUNC( QT_QIMAGEWRITER_SETFORMAT ) +{ + hbqt_par_QImageWriter( 1 )->setFormat( *hbqt_par_QByteArray( 2 ) ); +} + +/* + * void setGamma ( float gamma ) + */ +HB_FUNC( QT_QIMAGEWRITER_SETGAMMA ) +{ + hbqt_par_QImageWriter( 1 )->setGamma( hb_parnd( 2 ) ); +} + +/* + * void setQuality ( int quality ) + */ +HB_FUNC( QT_QIMAGEWRITER_SETQUALITY ) +{ + hbqt_par_QImageWriter( 1 )->setQuality( hb_parni( 2 ) ); +} + +/* + * void setText ( const QString & key, const QString & text ) + */ +HB_FUNC( QT_QIMAGEWRITER_SETTEXT ) +{ + hbqt_par_QImageWriter( 1 )->setText( hbqt_par_QString( 2 ), hbqt_par_QString( 3 ) ); +} + +/* + * bool supportsOption ( QImageIOHandler::ImageOption option ) const + */ +HB_FUNC( QT_QIMAGEWRITER_SUPPORTSOPTION ) +{ + hb_retl( hbqt_par_QImageWriter( 1 )->supportsOption( ( QImageIOHandler::ImageOption ) hb_parni( 2 ) ) ); +} + +/* + * bool write ( const QImage & image ) + */ +HB_FUNC( QT_QIMAGEWRITER_WRITE ) +{ + hb_retl( hbqt_par_QImageWriter( 1 )->write( *hbqt_par_QImage( 2 ) ) ); +} + + +/*----------------------------------------------------------------------*/ +#endif /* #if QT_VERSION >= 0x040500 */ +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/hbqt_qline.cpp b/harbour/contrib/hbqt/hbqt_qline.cpp new file mode 100644 index 0000000000..a26f0335c6 --- /dev/null +++ b/harbour/contrib/hbqt/hbqt_qline.cpp @@ -0,0 +1,216 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT wrapper main header + * + * Copyright 2009 Marcos Antonio Gambeta + * 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. + * + */ +/*----------------------------------------------------------------------*/ + +#include "hbapi.h" +#include "hbqt.h" + +/*----------------------------------------------------------------------*/ +#if QT_VERSION >= 0x040500 +/*----------------------------------------------------------------------*/ + + +#include + + +/* + * QLine () + * QLine ( const QPoint & p1, const QPoint & p2 ) + * QLine ( int x1, int y1, int x2, int y2 ) + */ +HB_FUNC( QT_QLINE ) +{ + hb_retptr( ( QLine* ) new QLine() ); +} + +/* + * QPoint p1 () const + */ +HB_FUNC( QT_QLINE_P1 ) +{ + hb_retptr( new QPoint( hbqt_par_QLine( 1 )->p1() ) ); +} + +/* + * QPoint p2 () const + */ +HB_FUNC( QT_QLINE_P2 ) +{ + hb_retptr( new QPoint( hbqt_par_QLine( 1 )->p2() ) ); +} + +/* + * int x1 () const + */ +HB_FUNC( QT_QLINE_X1 ) +{ + hb_retni( hbqt_par_QLine( 1 )->x1() ); +} + +/* + * int x2 () const + */ +HB_FUNC( QT_QLINE_X2 ) +{ + hb_retni( hbqt_par_QLine( 1 )->x2() ); +} + +/* + * int y1 () const + */ +HB_FUNC( QT_QLINE_Y1 ) +{ + hb_retni( hbqt_par_QLine( 1 )->y1() ); +} + +/* + * int y2 () const + */ +HB_FUNC( QT_QLINE_Y2 ) +{ + hb_retni( hbqt_par_QLine( 1 )->y2() ); +} + +/* + * int dx () const + */ +HB_FUNC( QT_QLINE_DX ) +{ + hb_retni( hbqt_par_QLine( 1 )->dx() ); +} + +/* + * int dy () const + */ +HB_FUNC( QT_QLINE_DY ) +{ + hb_retni( hbqt_par_QLine( 1 )->dy() ); +} + +/* + * bool isNull () const + */ +HB_FUNC( QT_QLINE_ISNULL ) +{ + hb_retl( hbqt_par_QLine( 1 )->isNull() ); +} + +/* + * void setP1 ( const QPoint & p1 ) + */ +HB_FUNC( QT_QLINE_SETP1 ) +{ + hbqt_par_QLine( 1 )->setP1( *hbqt_par_QPoint( 2 ) ); +} + +/* + * void setP2 ( const QPoint & p2 ) + */ +HB_FUNC( QT_QLINE_SETP2 ) +{ + hbqt_par_QLine( 1 )->setP2( *hbqt_par_QPoint( 2 ) ); +} + +/* + * void setLine ( int x1, int y1, int x2, int y2 ) + */ +HB_FUNC( QT_QLINE_SETLINE ) +{ + hbqt_par_QLine( 1 )->setLine( hb_parni( 2 ), hb_parni( 3 ), hb_parni( 4 ), hb_parni( 5 ) ); +} + +/* + * void setPoints ( const QPoint & p1, const QPoint & p2 ) + */ +HB_FUNC( QT_QLINE_SETPOINTS ) +{ + hbqt_par_QLine( 1 )->setPoints( *hbqt_par_QPoint( 2 ), *hbqt_par_QPoint( 3 ) ); +} + +/* + * void translate ( const QPoint & offset ) + */ +HB_FUNC( QT_QLINE_TRANSLATE ) +{ + hbqt_par_QLine( 1 )->translate( *hbqt_par_QPoint( 2 ) ); +} + +/* + * void translate ( int dx, int dy ) + */ +HB_FUNC( QT_QLINE_TRANSLATE_1 ) +{ + hbqt_par_QLine( 1 )->translate( hb_parni( 2 ), hb_parni( 3 ) ); +} + +/* + * QLine translated ( const QPoint & offset ) const + */ +HB_FUNC( QT_QLINE_TRANSLATED ) +{ + hb_retptr( new QLine( hbqt_par_QLine( 1 )->translated( *hbqt_par_QPoint( 2 ) ) ) ); +} + +/* + * QLine translated ( int dx, int dy ) const + */ +HB_FUNC( QT_QLINE_TRANSLATED_1 ) +{ + hb_retptr( new QLine( hbqt_par_QLine( 1 )->translated( hb_parni( 2 ), hb_parni( 3 ) ) ) ); +} + + +/*----------------------------------------------------------------------*/ +#endif /* #if QT_VERSION >= 0x040500 */ +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/hbqt_qlineargradient.cpp b/harbour/contrib/hbqt/hbqt_qlineargradient.cpp new file mode 100644 index 0000000000..5de3619d76 --- /dev/null +++ b/harbour/contrib/hbqt/hbqt_qlineargradient.cpp @@ -0,0 +1,128 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT wrapper main header + * + * Copyright 2009 Marcos Antonio Gambeta + * 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. + * + */ +/*----------------------------------------------------------------------*/ + +#include "hbapi.h" +#include "hbqt.h" + +/*----------------------------------------------------------------------*/ +#if QT_VERSION >= 0x040500 +/*----------------------------------------------------------------------*/ + + +#include + + +/* + * QLinearGradient () + * QLinearGradient ( const QPointF & start, const QPointF & finalStop ) + * QLinearGradient ( qreal x1, qreal y1, qreal x2, qreal y2 ) + */ +HB_FUNC( QT_ ) +{ + hb_retptr( ( QLinearGradient* ) new QLinearGradient() ); +} + +/* + * QPointF finalStop () const + */ +HB_FUNC( QT_QLINEARGRADIENT_FINALSTOP ) +{ + hb_retptr( new QPointF( hbqt_par_QLinearGradient( 1 )->finalStop() ) ); +} + +/* + * void setFinalStop ( const QPointF & stop ) + */ +HB_FUNC( QT_QLINEARGRADIENT_SETFINALSTOP ) +{ + hbqt_par_QLinearGradient( 1 )->setFinalStop( *hbqt_par_QPointF( 2 ) ); +} + +/* + * void setFinalStop ( qreal x, qreal y ) + */ +HB_FUNC( QT_QLINEARGRADIENT_SETFINALSTOP_1 ) +{ + hbqt_par_QLinearGradient( 1 )->setFinalStop( hb_parnd( 2 ), hb_parnd( 3 ) ); +} + +/* + * void setStart ( const QPointF & start ) + */ +HB_FUNC( QT_QLINEARGRADIENT_SETSTART ) +{ + hbqt_par_QLinearGradient( 1 )->setStart( *hbqt_par_QPointF( 2 ) ); +} + +/* + * void setStart ( qreal x, qreal y ) + */ +HB_FUNC( QT_QLINEARGRADIENT_SETSTART_1 ) +{ + hbqt_par_QLinearGradient( 1 )->setStart( hb_parnd( 2 ), hb_parnd( 3 ) ); +} + +/* + * QPointF start () const + */ +HB_FUNC( QT_QLINEARGRADIENT_START ) +{ + hb_retptr( new QPointF( hbqt_par_QLinearGradient( 1 )->start() ) ); +} + + +/*----------------------------------------------------------------------*/ +#endif /* #if QT_VERSION >= 0x040500 */ +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/hbqt_qpalette.cpp b/harbour/contrib/hbqt/hbqt_qpalette.cpp new file mode 100644 index 0000000000..b6a8e7ff7a --- /dev/null +++ b/harbour/contrib/hbqt/hbqt_qpalette.cpp @@ -0,0 +1,364 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT wrapper main header + * + * Copyright 2009 Marcos Antonio Gambeta + * 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. + * + */ +/*----------------------------------------------------------------------*/ + +#include "hbapi.h" +#include "hbqt.h" + +/*----------------------------------------------------------------------*/ +#if QT_VERSION >= 0x040500 +/*----------------------------------------------------------------------*/ + + +#include + + +/* + * QPalette () + * QPalette ( const QColor & button ) + * QPalette ( Qt::GlobalColor button ) + * QPalette ( const QColor & button, const QColor & window ) + * QPalette ( const QBrush & windowText, const QBrush & button, const QBrush & light, const QBrush & dark, const QBrush & mid, const QBrush & text, const QBrush & bright_text, const QBrush & base, const QBrush & window ) + * QPalette ( const QPalette & p ) + * ~QPalette () + */ +HB_FUNC( QT_QPALETTE ) +{ + hb_retptr( ( QPalette* ) new QPalette() ); +} + +/* + * const QBrush & alternateBase () const + */ +HB_FUNC( QT_QPALETTE_ALTERNATEBASE ) +{ + hb_retptr( new QBrush( hbqt_par_QPalette( 1 )->alternateBase() ) ); +} + +/* + * const QBrush & base () const + */ +HB_FUNC( QT_QPALETTE_BASE ) +{ + hb_retptr( new QBrush( hbqt_par_QPalette( 1 )->base() ) ); +} + +/* + * const QBrush & brightText () const + */ +HB_FUNC( QT_QPALETTE_BRIGHTTEXT ) +{ + hb_retptr( new QBrush( hbqt_par_QPalette( 1 )->brightText() ) ); +} + +/* + * const QBrush & brush ( ColorGroup group, ColorRole role ) const + */ +HB_FUNC( QT_QPALETTE_BRUSH ) +{ + hb_retptr( new QBrush( hbqt_par_QPalette( 1 )->brush( ( QPalette::ColorGroup ) hb_parni( 2 ), ( QPalette::ColorRole ) hb_parni( 3 ) ) ) ); +} + +/* + * const QBrush & brush ( ColorRole role ) const + */ +HB_FUNC( QT_QPALETTE_BRUSH_1 ) +{ + hb_retptr( new QBrush( hbqt_par_QPalette( 1 )->brush( ( QPalette::ColorRole ) hb_parni( 2 ) ) ) ); +} + +/* + * const QBrush & button () const + */ +HB_FUNC( QT_QPALETTE_BUTTON ) +{ + hb_retptr( new QBrush( hbqt_par_QPalette( 1 )->button() ) ); +} + +/* + * const QBrush & buttonText () const + */ +HB_FUNC( QT_QPALETTE_BUTTONTEXT ) +{ + hb_retptr( new QBrush( hbqt_par_QPalette( 1 )->buttonText() ) ); +} + +/* + * qint64 cacheKey () const + */ +HB_FUNC( QT_QPALETTE_CACHEKEY ) +{ + hb_retni( hbqt_par_QPalette( 1 )->cacheKey() ); +} + +/* + * const QColor & color ( ColorGroup group, ColorRole role ) const + */ +HB_FUNC( QT_QPALETTE_COLOR ) +{ + hb_retptr( new QColor( hbqt_par_QPalette( 1 )->color( ( QPalette::ColorGroup ) hb_parni( 2 ), ( QPalette::ColorRole ) hb_parni( 3 ) ) ) ); +} + +/* + * const QColor & color ( ColorRole role ) const + */ +HB_FUNC( QT_QPALETTE_COLOR_1 ) +{ + hb_retptr( new QColor( hbqt_par_QPalette( 1 )->color( ( QPalette::ColorRole ) hb_parni( 2 ) ) ) ); +} + +/* + * ColorGroup currentColorGroup () const + */ +HB_FUNC( QT_QPALETTE_CURRENTCOLORGROUP ) +{ + hb_retni( ( QPalette::ColorGroup ) hbqt_par_QPalette( 1 )->currentColorGroup() ); +} + +/* + * const QBrush & dark () const + */ +HB_FUNC( QT_QPALETTE_DARK ) +{ + hb_retptr( new QBrush( hbqt_par_QPalette( 1 )->dark() ) ); +} + +/* + * const QBrush & highlight () const + */ +HB_FUNC( QT_QPALETTE_HIGHLIGHT ) +{ + hb_retptr( new QBrush( hbqt_par_QPalette( 1 )->highlight() ) ); +} + +/* + * const QBrush & highlightedText () const + */ +HB_FUNC( QT_QPALETTE_HIGHLIGHTEDTEXT ) +{ + hb_retptr( new QBrush( hbqt_par_QPalette( 1 )->highlightedText() ) ); +} + +/* + * bool isBrushSet ( ColorGroup cg, ColorRole cr ) const + */ +HB_FUNC( QT_QPALETTE_ISBRUSHSET ) +{ + hb_retl( hbqt_par_QPalette( 1 )->isBrushSet( ( QPalette::ColorGroup ) hb_parni( 2 ), ( QPalette::ColorRole ) hb_parni( 3 ) ) ); +} + +/* + * bool isCopyOf ( const QPalette & p ) const + */ +HB_FUNC( QT_QPALETTE_ISCOPYOF ) +{ + hb_retl( hbqt_par_QPalette( 1 )->isCopyOf( *hbqt_par_QPalette( 2 ) ) ); +} + +/* + * bool isEqual ( ColorGroup cg1, ColorGroup cg2 ) const + */ +HB_FUNC( QT_QPALETTE_ISEQUAL ) +{ + hb_retl( hbqt_par_QPalette( 1 )->isEqual( ( QPalette::ColorGroup ) hb_parni( 2 ), ( QPalette::ColorGroup ) hb_parni( 3 ) ) ); +} + +/* + * const QBrush & light () const + */ +HB_FUNC( QT_QPALETTE_LIGHT ) +{ + hb_retptr( new QBrush( hbqt_par_QPalette( 1 )->light() ) ); +} + +/* + * const QBrush & link () const + */ +HB_FUNC( QT_QPALETTE_LINK ) +{ + hb_retptr( new QBrush( hbqt_par_QPalette( 1 )->link() ) ); +} + +/* + * const QBrush & linkVisited () const + */ +HB_FUNC( QT_QPALETTE_LINKVISITED ) +{ + hb_retptr( new QBrush( hbqt_par_QPalette( 1 )->linkVisited() ) ); +} + +/* + * const QBrush & mid () const + */ +HB_FUNC( QT_QPALETTE_MID ) +{ + hb_retptr( new QBrush( hbqt_par_QPalette( 1 )->mid() ) ); +} + +/* + * const QBrush & midlight () const + */ +HB_FUNC( QT_QPALETTE_MIDLIGHT ) +{ + hb_retptr( new QBrush( hbqt_par_QPalette( 1 )->midlight() ) ); +} + +/* + * QPalette resolve ( const QPalette & other ) const + */ +HB_FUNC( QT_QPALETTE_RESOLVE ) +{ + hb_retptr( new QPalette( hbqt_par_QPalette( 1 )->resolve( *hbqt_par_QPalette( 2 ) ) ) ); +} + +/* + * void setBrush ( ColorRole role, const QBrush & brush ) + */ +HB_FUNC( QT_QPALETTE_SETBRUSH ) +{ + hbqt_par_QPalette( 1 )->setBrush( ( QPalette::ColorRole ) hb_parni( 2 ), *hbqt_par_QBrush( 3 ) ); +} + +/* + * void setBrush ( ColorGroup group, ColorRole role, const QBrush & brush ) + */ +HB_FUNC( QT_QPALETTE_SETBRUSH_1 ) +{ + hbqt_par_QPalette( 1 )->setBrush( ( QPalette::ColorGroup ) hb_parni( 2 ), ( QPalette::ColorRole ) hb_parni( 3 ), *hbqt_par_QBrush( 4 ) ); +} + +/* + * void setColor ( ColorGroup group, ColorRole role, const QColor & color ) + */ +HB_FUNC( QT_QPALETTE_SETCOLOR ) +{ + hbqt_par_QPalette( 1 )->setColor( ( QPalette::ColorGroup ) hb_parni( 2 ), ( QPalette::ColorRole ) hb_parni( 3 ), *hbqt_par_QColor( 4 ) ); +} + +/* + * void setColor ( ColorRole role, const QColor & color ) + */ +HB_FUNC( QT_QPALETTE_SETCOLOR_1 ) +{ + hbqt_par_QPalette( 1 )->setColor( ( QPalette::ColorRole ) hb_parni( 2 ), *hbqt_par_QColor( 3 ) ); +} + +/* + * void setColorGroup ( ColorGroup cg, const QBrush & windowText, const QBrush & button, const QBrush & light, const QBrush & dark, const QBrush & mid, const QBrush & text, const QBrush & bright_text, const QBrush & base, const QBrush & window ) + */ +HB_FUNC( QT_QPALETTE_SETCOLORGROUP ) +{ + hbqt_par_QPalette( 1 )->setColorGroup( ( QPalette::ColorGroup ) hb_parni( 2 ), *hbqt_par_QBrush( 3 ), *hbqt_par_QBrush( 4 ), *hbqt_par_QBrush( 5 ), *hbqt_par_QBrush( 6 ), *hbqt_par_QBrush( 7 ), *hbqt_par_QBrush( 8 ), *hbqt_par_QBrush( 9 ), *hbqt_par_QBrush( 10 ), *hbqt_par_QBrush( 11 ) ); +} + +/* + * void setCurrentColorGroup ( ColorGroup cg ) + */ +HB_FUNC( QT_QPALETTE_SETCURRENTCOLORGROUP ) +{ + hbqt_par_QPalette( 1 )->setCurrentColorGroup( ( QPalette::ColorGroup ) hb_parni( 2 ) ); +} + +/* + * const QBrush & shadow () const + */ +HB_FUNC( QT_QPALETTE_SHADOW ) +{ + hb_retptr( new QBrush( hbqt_par_QPalette( 1 )->shadow() ) ); +} + +/* + * const QBrush & text () const + */ +HB_FUNC( QT_QPALETTE_TEXT ) +{ + hb_retptr( new QBrush( hbqt_par_QPalette( 1 )->text() ) ); +} + +/* + * const QBrush & toolTipBase () const + */ +HB_FUNC( QT_QPALETTE_TOOLTIPBASE ) +{ + hb_retptr( new QBrush( hbqt_par_QPalette( 1 )->toolTipBase() ) ); +} + +/* + * const QBrush & toolTipText () const + */ +HB_FUNC( QT_QPALETTE_TOOLTIPTEXT ) +{ + hb_retptr( new QBrush( hbqt_par_QPalette( 1 )->toolTipText() ) ); +} + +/* + * const QBrush & window () const + */ +HB_FUNC( QT_QPALETTE_WINDOW ) +{ + hb_retptr( new QBrush( hbqt_par_QPalette( 1 )->window() ) ); +} + +/* + * const QBrush & windowText () const + */ +HB_FUNC( QT_QPALETTE_WINDOWTEXT ) +{ + hb_retptr( new QBrush( hbqt_par_QPalette( 1 )->windowText() ) ); +} + + +/*----------------------------------------------------------------------*/ +#endif /* #if QT_VERSION >= 0x040500 */ +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/hbqt_qpicture.cpp b/harbour/contrib/hbqt/hbqt_qpicture.cpp new file mode 100644 index 0000000000..3935f93c6f --- /dev/null +++ b/harbour/contrib/hbqt/hbqt_qpicture.cpp @@ -0,0 +1,168 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT wrapper main header + * + * Copyright 2009 Marcos Antonio Gambeta + * 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. + * + */ +/*----------------------------------------------------------------------*/ + +#include "hbapi.h" +#include "hbqt.h" + +/*----------------------------------------------------------------------*/ +#if QT_VERSION >= 0x040500 +/*----------------------------------------------------------------------*/ + + +#include + + +/* + * QPicture ( int formatVersion = -1 ) + * QPicture ( const QPicture & pic ) + * ~QPicture () + */ +HB_FUNC( QT_QPICTURE ) +{ + hb_retptr( ( QPicture* ) new QPicture() ); +} + +/* + * QRect boundingRect () const + */ +HB_FUNC( QT_QPICTURE_BOUNDINGRECT ) +{ + hb_retptr( new QRect( hbqt_par_QPicture( 1 )->boundingRect() ) ); +} + +/* + * const char * data () const + */ +HB_FUNC( QT_QPICTURE_DATA ) +{ + hb_retc( hbqt_par_QPicture( 1 )->data() ); +} + +/* + * bool isNull () const + */ +HB_FUNC( QT_QPICTURE_ISNULL ) +{ + hb_retl( hbqt_par_QPicture( 1 )->isNull() ); +} + +/* + * bool load ( const QString & fileName, const char * format = 0 ) + */ +HB_FUNC( QT_QPICTURE_LOAD ) +{ + hb_retl( hbqt_par_QPicture( 1 )->load( hbqt_par_QString( 2 ), hbqt_par_char( 3 ) ) ); +} + +/* + * bool load ( QIODevice * dev, const char * format = 0 ) + */ +HB_FUNC( QT_QPICTURE_LOAD_1 ) +{ + hb_retl( hbqt_par_QPicture( 1 )->load( hbqt_par_QIODevice( 2 ), hbqt_par_char( 3 ) ) ); +} + +/* + * bool play ( QPainter * painter ) + */ +HB_FUNC( QT_QPICTURE_PLAY ) +{ + hb_retl( hbqt_par_QPicture( 1 )->play( hbqt_par_QPainter( 2 ) ) ); +} + +/* + * bool save ( const QString & fileName, const char * format = 0 ) + */ +HB_FUNC( QT_QPICTURE_SAVE ) +{ + hb_retl( hbqt_par_QPicture( 1 )->save( hbqt_par_QString( 2 ), hbqt_par_char( 3 ) ) ); +} + +/* + * bool save ( QIODevice * dev, const char * format = 0 ) + */ +HB_FUNC( QT_QPICTURE_SAVE_1 ) +{ + hb_retl( hbqt_par_QPicture( 1 )->save( hbqt_par_QIODevice( 2 ), hbqt_par_char( 3 ) ) ); +} + +/* + * void setBoundingRect ( const QRect & r ) + */ +HB_FUNC( QT_QPICTURE_SETBOUNDINGRECT ) +{ + hbqt_par_QPicture( 1 )->setBoundingRect( *hbqt_par_QRect( 2 ) ); +} + +/* + * virtual void setData ( const char * data, uint size ) + */ +HB_FUNC( QT_QPICTURE_SETDATA ) +{ + hbqt_par_QPicture( 1 )->setData( hbqt_par_char( 2 ), hb_parni( 3 ) ); +} + +/* + * uint size () const + */ +HB_FUNC( QT_QPICTURE_SIZE ) +{ + hb_retni( hbqt_par_QPicture( 1 )->size() ); +} + + +/*----------------------------------------------------------------------*/ +#endif /* #if QT_VERSION >= 0x040500 */ +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/hbqt_qradialgradient.cpp b/harbour/contrib/hbqt/hbqt_qradialgradient.cpp new file mode 100644 index 0000000000..84d1e77b3b --- /dev/null +++ b/harbour/contrib/hbqt/hbqt_qradialgradient.cpp @@ -0,0 +1,146 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT wrapper main header + * + * Copyright 2009 Marcos Antonio Gambeta + * 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. + * + */ +/*----------------------------------------------------------------------*/ + +#include "hbapi.h" +#include "hbqt.h" + +/*----------------------------------------------------------------------*/ +#if QT_VERSION >= 0x040500 +/*----------------------------------------------------------------------*/ + + +#include + + +/* + * QRadialGradient () + * QRadialGradient ( const QPointF & center, qreal radius, const QPointF & focalPoint ) + * QRadialGradient ( qreal cx, qreal cy, qreal radius, qreal fx, qreal fy ) + * QRadialGradient ( const QPointF & center, qreal radius ) + * QRadialGradient ( qreal cx, qreal cy, qreal radius ) + */ +HB_FUNC( QT_RADIALGRADIENT ) +{ + hb_retptr( ( QRadialGradient* ) new QRadialGradient() ); +} + +/* + * QPointF center () const + */ +HB_FUNC( QT_QRADIALGRADIENT_CENTER ) +{ + hb_retptr( new QPointF( hbqt_par_QRadialGradient( 1 )->center() ) ); +} + +/* + * QPointF focalPoint () const + */ +HB_FUNC( QT_QRADIALGRADIENT_FOCALPOINT ) +{ + hb_retptr( new QPointF( hbqt_par_QRadialGradient( 1 )->focalPoint() ) ); +} + +/* + * qreal radius () const + */ +HB_FUNC( QT_QRADIALGRADIENT_RADIUS ) +{ + hb_retnd( hbqt_par_QRadialGradient( 1 )->radius() ); +} + +/* + * void setCenter ( const QPointF & center ) + */ +HB_FUNC( QT_QRADIALGRADIENT_SETCENTER ) +{ + hbqt_par_QRadialGradient( 1 )->setCenter( *hbqt_par_QPointF( 2 ) ); +} + +/* + * void setCenter ( qreal x, qreal y ) + */ +HB_FUNC( QT_QRADIALGRADIENT_SETCENTER_1 ) +{ + hbqt_par_QRadialGradient( 1 )->setCenter( hb_parnd( 2 ), hb_parnd( 3 ) ); +} + +/* + * void setFocalPoint ( const QPointF & focalPoint ) + */ +HB_FUNC( QT_QRADIALGRADIENT_SETFOCALPOINT ) +{ + hbqt_par_QRadialGradient( 1 )->setFocalPoint( *hbqt_par_QPointF( 2 ) ); +} + +/* + * void setFocalPoint ( qreal x, qreal y ) + */ +HB_FUNC( QT_QRADIALGRADIENT_SETFOCALPOINT_1 ) +{ + hbqt_par_QRadialGradient( 1 )->setFocalPoint( hb_parnd( 2 ), hb_parnd( 3 ) ); +} + +/* + * void setRadius ( qreal radius ) + */ +HB_FUNC( QT_QRADIALGRADIENT_SETRADIUS ) +{ + hbqt_par_QRadialGradient( 1 )->setRadius( hb_parnd( 2 ) ); +} + + +/*----------------------------------------------------------------------*/ +#endif /* #if QT_VERSION >= 0x040500 */ +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/hbqt_qresource.cpp b/harbour/contrib/hbqt/hbqt_qresource.cpp new file mode 100644 index 0000000000..43ae50d468 --- /dev/null +++ b/harbour/contrib/hbqt/hbqt_qresource.cpp @@ -0,0 +1,151 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT wrapper main header + * + * Copyright 2009 Marcos Antonio Gambeta + * 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. + * + */ +/*----------------------------------------------------------------------*/ + +#include "hbapi.h" +#include "hbqt.h" + +/*----------------------------------------------------------------------*/ +#if QT_VERSION >= 0x040500 +/*----------------------------------------------------------------------*/ + + +#include + + +/* + * QResource ( const QString & file = QString(), const QLocale & locale = QLocale() ) + * ~QResource () + */ +HB_FUNC( QT_QRESOURCE ) +{ + hb_retptr( ( QResource* ) new QResource() ); +} + +/* + * QString absoluteFilePath () const + */ +HB_FUNC( QT_QRESOURCE_ABSOLUTEFILEPATH ) +{ + hb_retc( hbqt_par_QResource( 1 )->absoluteFilePath().toLatin1().data() ); +} + +/* + * const uchar * data () const + */ +HB_FUNC( QT_QRESOURCE_DATA ) +{ + hb_retptr( ( uchar* ) hbqt_par_QResource( 1 )->data() ); +} + +/* + * QString fileName () const + */ +HB_FUNC( QT_QRESOURCE_FILENAME ) +{ + hb_retc( hbqt_par_QResource( 1 )->fileName().toLatin1().data() ); +} + +/* + * bool isCompressed () const + */ +HB_FUNC( QT_QRESOURCE_ISCOMPRESSED ) +{ + hb_retl( hbqt_par_QResource( 1 )->isCompressed() ); +} + +/* + * bool isValid () const + */ +HB_FUNC( QT_QRESOURCE_ISVALID ) +{ + hb_retl( hbqt_par_QResource( 1 )->isValid() ); +} + +/* + * QLocale locale () const + */ +HB_FUNC( QT_QRESOURCE_LOCALE ) +{ + hb_retptr( new QLocale( hbqt_par_QResource( 1 )->locale() ) ); +} + +/* + * void setFileName ( const QString & file ) + */ +HB_FUNC( QT_QRESOURCE_SETFILENAME ) +{ + hbqt_par_QResource( 1 )->setFileName( hbqt_par_QString( 2 ) ); +} + +/* + * void setLocale ( const QLocale & locale ) + */ +HB_FUNC( QT_QRESOURCE_SETLOCALE ) +{ + hbqt_par_QResource( 1 )->setLocale( *hbqt_par_QLocale( 2 ) ); +} + +/* + * qint64 size () const + */ +HB_FUNC( QT_QRESOURCE_SIZE ) +{ + hb_retni( hbqt_par_QResource( 1 )->size() ); +} + + +/*----------------------------------------------------------------------*/ +#endif /* #if QT_VERSION >= 0x040500 */ +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/hbqt_qsizepolicy.cpp b/harbour/contrib/hbqt/hbqt_qsizepolicy.cpp new file mode 100644 index 0000000000..27a9766273 --- /dev/null +++ b/harbour/contrib/hbqt/hbqt_qsizepolicy.cpp @@ -0,0 +1,192 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT wrapper main header + * + * Copyright 2009 Marcos Antonio Gambeta + * 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. + * + */ +/*----------------------------------------------------------------------*/ + +#include "hbapi.h" +#include "hbqt.h" + +/*----------------------------------------------------------------------*/ +#if QT_VERSION >= 0x040500 +/*----------------------------------------------------------------------*/ + + +#include + + +/* + * QSizePolicy () + * QSizePolicy ( Policy horizontal, Policy vertical ) + * QSizePolicy ( Policy horizontal, Policy vertical, ControlType type ) + */ +HB_FUNC( QT_QSIZEPOLICY ) +{ + hb_retptr( ( QSizePolicy* ) new QSizePolicy() ); +} + +/* + * ControlType controlType () const + */ +HB_FUNC( QT_QSIZEPOLICY_CONTROLTYPE ) +{ + hb_retni( ( QSizePolicy::ControlType ) hbqt_par_QSizePolicy( 1 )->controlType() ); +} + +/* + * Qt::Orientations expandingDirections () const + */ +HB_FUNC( QT_QSIZEPOLICY_EXPANDINGDIRECTIONS ) +{ + hb_retni( ( Qt::Orientations ) hbqt_par_QSizePolicy( 1 )->expandingDirections() ); +} + +/* + * bool hasHeightForWidth () const + */ +HB_FUNC( QT_QSIZEPOLICY_HASHEIGHTFORWIDTH ) +{ + hb_retl( hbqt_par_QSizePolicy( 1 )->hasHeightForWidth() ); +} + +/* + * Policy horizontalPolicy () const + */ +HB_FUNC( QT_QSIZEPOLICY_HORIZONTALPOLICY ) +{ + hb_retni( ( QSizePolicy::Policy ) hbqt_par_QSizePolicy( 1 )->horizontalPolicy() ); +} + +/* + * int horizontalStretch () const + */ +HB_FUNC( QT_QSIZEPOLICY_HORIZONTALSTRETCH ) +{ + hb_retni( hbqt_par_QSizePolicy( 1 )->horizontalStretch() ); +} + +/* + * void setControlType ( ControlType type ) + */ +HB_FUNC( QT_QSIZEPOLICY_SETCONTROLTYPE ) +{ + hbqt_par_QSizePolicy( 1 )->setControlType( ( QSizePolicy::ControlType ) hb_parni( 2 ) ); +} + +/* + * void setHeightForWidth ( bool dependent ) + */ +HB_FUNC( QT_QSIZEPOLICY_SETHEIGHTFORWIDTH ) +{ + hbqt_par_QSizePolicy( 1 )->setHeightForWidth( hb_parl( 2 ) ); +} + +/* + * void setHorizontalPolicy ( Policy policy ) + */ +HB_FUNC( QT_QSIZEPOLICY_SETHORIZONTALPOLICY ) +{ + hbqt_par_QSizePolicy( 1 )->setHorizontalPolicy( ( QSizePolicy::Policy ) hb_parni( 2 ) ); +} + +/* + * void setHorizontalStretch ( uchar stretchFactor ) + */ +HB_FUNC( QT_QSIZEPOLICY_SETHORIZONTALSTRETCH ) +{ + hbqt_par_QSizePolicy( 1 )->setHorizontalStretch( ( char ) hb_parni( 2 ) ); +} + +/* + * void setVerticalPolicy ( Policy policy ) + */ +HB_FUNC( QT_QSIZEPOLICY_SETVERTICALPOLICY ) +{ + hbqt_par_QSizePolicy( 1 )->setVerticalPolicy( ( QSizePolicy::Policy ) hb_parni( 2 ) ); +} + +/* + * void setVerticalStretch ( uchar stretchFactor ) + */ +HB_FUNC( QT_QSIZEPOLICY_SETVERTICALSTRETCH ) +{ + hbqt_par_QSizePolicy( 1 )->setVerticalStretch( ( char ) hb_parni( 2 ) ); +} + +/* + * void transpose () + */ +HB_FUNC( QT_QSIZEPOLICY_TRANSPOSE ) +{ + hbqt_par_QSizePolicy( 1 )->transpose(); +} + +/* + * Policy verticalPolicy () const + */ +HB_FUNC( QT_QSIZEPOLICY_VERTICALPOLICY ) +{ + hb_retni( ( QSizePolicy::Policy ) hbqt_par_QSizePolicy( 1 )->verticalPolicy() ); +} + +/* + * int verticalStretch () const + */ +HB_FUNC( QT_QSIZEPOLICY_VERTICALSTRETCH ) +{ + hb_retni( hbqt_par_QSizePolicy( 1 )->verticalStretch() ); +} + + +/*----------------------------------------------------------------------*/ +#endif /* #if QT_VERSION >= 0x040500 */ +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/hbqt_qsound.cpp b/harbour/contrib/hbqt/hbqt_qsound.cpp new file mode 100644 index 0000000000..31c5e1b732 --- /dev/null +++ b/harbour/contrib/hbqt/hbqt_qsound.cpp @@ -0,0 +1,119 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT wrapper main header + * + * Copyright 2009 Marcos Antonio Gambeta + * 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. + * + */ +/*----------------------------------------------------------------------*/ + +#include "hbapi.h" +#include "hbqt.h" + +/*----------------------------------------------------------------------*/ +#if QT_VERSION >= 0x040500 +/*----------------------------------------------------------------------*/ + + +#include + + +/* + * QSound ( const QString & filename, QObject * parent = 0 ) + * ~QSound () + */ +HB_FUNC( QT_QSOUND ) +{ + hb_retptr( ( QSound* ) new QSound( hbqt_par_QString( 1 ) ) ); +} + +/* + * QString fileName () const + */ +HB_FUNC( QT_QSOUND_FILENAME ) +{ + hb_retc( hbqt_par_QSound( 1 )->fileName().toLatin1().data() ); +} + +/* + * bool isFinished () const + */ +HB_FUNC( QT_QSOUND_ISFINISHED ) +{ + hb_retl( hbqt_par_QSound( 1 )->isFinished() ); +} + +/* + * int loops () const + */ +HB_FUNC( QT_QSOUND_LOOPS ) +{ + hb_retni( hbqt_par_QSound( 1 )->loops() ); +} + +/* + * int loopsRemaining () const + */ +HB_FUNC( QT_QSOUND_LOOPSREMAINING ) +{ + hb_retni( hbqt_par_QSound( 1 )->loopsRemaining() ); +} + +/* + * void setLoops ( int number ) + */ +HB_FUNC( QT_QSOUND_SETLOOPS ) +{ + hbqt_par_QSound( 1 )->setLoops( hb_parni( 2 ) ); +} + + +/*----------------------------------------------------------------------*/ +#endif /* #if QT_VERSION >= 0x040500 */ +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/hbqt_qstandarditem.cpp b/harbour/contrib/hbqt/hbqt_qstandarditem.cpp new file mode 100644 index 0000000000..f5eba2a629 --- /dev/null +++ b/harbour/contrib/hbqt/hbqt_qstandarditem.cpp @@ -0,0 +1,666 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT wrapper main header + * + * Copyright 2009 Marcos Antonio Gambeta + * 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. + * + */ +/*----------------------------------------------------------------------*/ + +#include "hbapi.h" +#include "hbqt.h" + +/*----------------------------------------------------------------------*/ +#if QT_VERSION >= 0x040500 +/*----------------------------------------------------------------------*/ + +/* + * Constructed[ 71/79 [ 89.87% ] ] + * + * *** Unconvered Prototypes *** + * ----------------------------- + * + * void appendColumn ( const QList & items ) + * void appendRow ( const QList & items ) + * void appendRows ( const QList & items ) + * void insertColumn ( int column, const QList & items ) + * void insertRow ( int row, const QList & items ) + * void insertRows ( int row, const QList & items ) + * QList takeColumn ( int column ) + * QList takeRow ( int row ) + */ + + +#include + + +/* + * QStandardItem () + * QStandardItem ( const QString & text ) + * QStandardItem ( const QIcon & icon, const QString & text ) + * QStandardItem ( int rows, int columns = 1 ) + * virtual ~QStandardItem () + */ +HB_FUNC( QT_QSTANDARDITEM ) +{ + hb_retptr( ( QStandardItem* ) new QStandardItem() ); +} + +/* + * QString accessibleDescription () const + */ +HB_FUNC( QT_QSTANDARDITEM_ACCESSIBLEDESCRIPTION ) +{ + hb_retc( hbqt_par_QStandardItem( 1 )->accessibleDescription().toLatin1().data() ); +} + +/* + * QString accessibleText () const + */ +HB_FUNC( QT_QSTANDARDITEM_ACCESSIBLETEXT ) +{ + hb_retc( hbqt_par_QStandardItem( 1 )->accessibleText().toLatin1().data() ); +} + +/* + * void appendRow ( QStandardItem * item ) + */ +HB_FUNC( QT_QSTANDARDITEM_APPENDROW ) +{ + hbqt_par_QStandardItem( 1 )->appendRow( hbqt_par_QStandardItem( 2 ) ); +} + +/* + * QBrush background () const + */ +HB_FUNC( QT_QSTANDARDITEM_BACKGROUND ) +{ + hb_retptr( new QBrush( hbqt_par_QStandardItem( 1 )->background() ) ); +} + +/* + * Qt::CheckState checkState () const + */ +HB_FUNC( QT_QSTANDARDITEM_CHECKSTATE ) +{ + hb_retni( ( Qt::CheckState ) hbqt_par_QStandardItem( 1 )->checkState() ); +} + +/* + * QStandardItem * child ( int row, int column = 0 ) const + */ +HB_FUNC( QT_QSTANDARDITEM_CHILD ) +{ + hb_retptr( ( QStandardItem* ) hbqt_par_QStandardItem( 1 )->child( hb_parni( 2 ), hb_parni( 3 ) ) ); +} + +/* + * virtual QStandardItem * clone () const + */ +HB_FUNC( QT_QSTANDARDITEM_CLONE ) +{ + hb_retptr( ( QStandardItem* ) hbqt_par_QStandardItem( 1 )->clone() ); +} + +/* + * int column () const + */ +HB_FUNC( QT_QSTANDARDITEM_COLUMN ) +{ + hb_retni( hbqt_par_QStandardItem( 1 )->column() ); +} + +/* + * int columnCount () const + */ +HB_FUNC( QT_QSTANDARDITEM_COLUMNCOUNT ) +{ + hb_retni( hbqt_par_QStandardItem( 1 )->columnCount() ); +} + +/* + * virtual QVariant data ( int role = Qt::UserRole + 1 ) const + */ +HB_FUNC( QT_QSTANDARDITEM_DATA ) +{ + hb_retptr( new QVariant( hbqt_par_QStandardItem( 1 )->data( ( HB_ISNUM( 2 ) ? hb_parni( 2 ) : Qt::UserRole + 1 ) ) ) ); +} + +/* + * Qt::ItemFlags flags () const + */ +HB_FUNC( QT_QSTANDARDITEM_FLAGS ) +{ + hb_retni( ( Qt::ItemFlags ) hbqt_par_QStandardItem( 1 )->flags() ); +} + +/* + * QFont font () const + */ +HB_FUNC( QT_QSTANDARDITEM_FONT ) +{ + hb_retptr( new QFont( hbqt_par_QStandardItem( 1 )->font() ) ); +} + +/* + * QBrush foreground () const + */ +HB_FUNC( QT_QSTANDARDITEM_FOREGROUND ) +{ + hb_retptr( new QBrush( hbqt_par_QStandardItem( 1 )->foreground() ) ); +} + +/* + * bool hasChildren () const + */ +HB_FUNC( QT_QSTANDARDITEM_HASCHILDREN ) +{ + hb_retl( hbqt_par_QStandardItem( 1 )->hasChildren() ); +} + +/* + * QIcon icon () const + */ +HB_FUNC( QT_QSTANDARDITEM_ICON ) +{ + hb_retptr( new QIcon( hbqt_par_QStandardItem( 1 )->icon() ) ); +} + +/* + * QModelIndex index () const + */ +HB_FUNC( QT_QSTANDARDITEM_INDEX ) +{ + hb_retptr( new QModelIndex( hbqt_par_QStandardItem( 1 )->index() ) ); +} + +/* + * void insertColumns ( int column, int count ) + */ +HB_FUNC( QT_QSTANDARDITEM_INSERTCOLUMNS ) +{ + hbqt_par_QStandardItem( 1 )->insertColumns( hb_parni( 2 ), hb_parni( 3 ) ); +} + +/* + * void insertRow ( int row, QStandardItem * item ) + */ +HB_FUNC( QT_QSTANDARDITEM_INSERTROW ) +{ + hbqt_par_QStandardItem( 1 )->insertRow( hb_parni( 2 ), hbqt_par_QStandardItem( 3 ) ); +} + +/* + * void insertRows ( int row, int count ) + */ +HB_FUNC( QT_QSTANDARDITEM_INSERTROWS ) +{ + hbqt_par_QStandardItem( 1 )->insertRows( hb_parni( 2 ), hb_parni( 3 ) ); +} + +/* + * bool isCheckable () const + */ +HB_FUNC( QT_QSTANDARDITEM_ISCHECKABLE ) +{ + hb_retl( hbqt_par_QStandardItem( 1 )->isCheckable() ); +} + +/* + * bool isDragEnabled () const + */ +HB_FUNC( QT_QSTANDARDITEM_ISDRAGENABLED ) +{ + hb_retl( hbqt_par_QStandardItem( 1 )->isDragEnabled() ); +} + +/* + * bool isDropEnabled () const + */ +HB_FUNC( QT_QSTANDARDITEM_ISDROPENABLED ) +{ + hb_retl( hbqt_par_QStandardItem( 1 )->isDropEnabled() ); +} + +/* + * bool isEditable () const + */ +HB_FUNC( QT_QSTANDARDITEM_ISEDITABLE ) +{ + hb_retl( hbqt_par_QStandardItem( 1 )->isEditable() ); +} + +/* + * bool isEnabled () const + */ +HB_FUNC( QT_QSTANDARDITEM_ISENABLED ) +{ + hb_retl( hbqt_par_QStandardItem( 1 )->isEnabled() ); +} + +/* + * bool isSelectable () const + */ +HB_FUNC( QT_QSTANDARDITEM_ISSELECTABLE ) +{ + hb_retl( hbqt_par_QStandardItem( 1 )->isSelectable() ); +} + +/* + * bool isTristate () const + */ +HB_FUNC( QT_QSTANDARDITEM_ISTRISTATE ) +{ + hb_retl( hbqt_par_QStandardItem( 1 )->isTristate() ); +} + +/* + * QStandardItemModel * model () const + */ +HB_FUNC( QT_QSTANDARDITEM_MODEL ) +{ + hb_retptr( ( QStandardItemModel* ) hbqt_par_QStandardItem( 1 )->model() ); +} + +/* + * QStandardItem * parent () const + */ +HB_FUNC( QT_QSTANDARDITEM_PARENT ) +{ + hb_retptr( ( QStandardItem* ) hbqt_par_QStandardItem( 1 )->parent() ); +} + +/* + * virtual void read ( QDataStream & in ) + */ +HB_FUNC( QT_QSTANDARDITEM_READ ) +{ + hbqt_par_QStandardItem( 1 )->read( *hbqt_par_QDataStream( 2 ) ); +} + +/* + * void removeColumn ( int column ) + */ +HB_FUNC( QT_QSTANDARDITEM_REMOVECOLUMN ) +{ + hbqt_par_QStandardItem( 1 )->removeColumn( hb_parni( 2 ) ); +} + +/* + * void removeColumns ( int column, int count ) + */ +HB_FUNC( QT_QSTANDARDITEM_REMOVECOLUMNS ) +{ + hbqt_par_QStandardItem( 1 )->removeColumns( hb_parni( 2 ), hb_parni( 3 ) ); +} + +/* + * void removeRow ( int row ) + */ +HB_FUNC( QT_QSTANDARDITEM_REMOVEROW ) +{ + hbqt_par_QStandardItem( 1 )->removeRow( hb_parni( 2 ) ); +} + +/* + * void removeRows ( int row, int count ) + */ +HB_FUNC( QT_QSTANDARDITEM_REMOVEROWS ) +{ + hbqt_par_QStandardItem( 1 )->removeRows( hb_parni( 2 ), hb_parni( 3 ) ); +} + +/* + * int row () const + */ +HB_FUNC( QT_QSTANDARDITEM_ROW ) +{ + hb_retni( hbqt_par_QStandardItem( 1 )->row() ); +} + +/* + * int rowCount () const + */ +HB_FUNC( QT_QSTANDARDITEM_ROWCOUNT ) +{ + hb_retni( hbqt_par_QStandardItem( 1 )->rowCount() ); +} + +/* + * void setAccessibleDescription ( const QString & accessibleDescription ) + */ +HB_FUNC( QT_QSTANDARDITEM_SETACCESSIBLEDESCRIPTION ) +{ + hbqt_par_QStandardItem( 1 )->setAccessibleDescription( hbqt_par_QString( 2 ) ); +} + +/* + * void setAccessibleText ( const QString & accessibleText ) + */ +HB_FUNC( QT_QSTANDARDITEM_SETACCESSIBLETEXT ) +{ + hbqt_par_QStandardItem( 1 )->setAccessibleText( hbqt_par_QString( 2 ) ); +} + +/* + * void setBackground ( const QBrush & brush ) + */ +HB_FUNC( QT_QSTANDARDITEM_SETBACKGROUND ) +{ + hbqt_par_QStandardItem( 1 )->setBackground( *hbqt_par_QBrush( 2 ) ); +} + +/* + * void setCheckState ( Qt::CheckState state ) + */ +HB_FUNC( QT_QSTANDARDITEM_SETCHECKSTATE ) +{ + hbqt_par_QStandardItem( 1 )->setCheckState( ( Qt::CheckState ) hb_parni( 2 ) ); +} + +/* + * void setCheckable ( bool checkable ) + */ +HB_FUNC( QT_QSTANDARDITEM_SETCHECKABLE ) +{ + hbqt_par_QStandardItem( 1 )->setCheckable( hb_parl( 2 ) ); +} + +/* + * void setChild ( int row, int column, QStandardItem * item ) + */ +HB_FUNC( QT_QSTANDARDITEM_SETCHILD ) +{ + hbqt_par_QStandardItem( 1 )->setChild( hb_parni( 2 ), hb_parni( 3 ), hbqt_par_QStandardItem( 4 ) ); +} + +/* + * void setChild ( int row, QStandardItem * item ) + */ +HB_FUNC( QT_QSTANDARDITEM_SETCHILD_1 ) +{ + hbqt_par_QStandardItem( 1 )->setChild( hb_parni( 2 ), hbqt_par_QStandardItem( 3 ) ); +} + +/* + * void setColumnCount ( int columns ) + */ +HB_FUNC( QT_QSTANDARDITEM_SETCOLUMNCOUNT ) +{ + hbqt_par_QStandardItem( 1 )->setColumnCount( hb_parni( 2 ) ); +} + +/* + * virtual void setData ( const QVariant & value, int role = Qt::UserRole + 1 ) + */ +HB_FUNC( QT_QSTANDARDITEM_SETDATA ) +{ + hbqt_par_QStandardItem( 1 )->setData( *hbqt_par_QVariant( 2 ), ( HB_ISNUM( 3 ) ? hb_parni( 3 ) : Qt::UserRole + 1 ) ); +} + +/* + * void setDragEnabled ( bool dragEnabled ) + */ +HB_FUNC( QT_QSTANDARDITEM_SETDRAGENABLED ) +{ + hbqt_par_QStandardItem( 1 )->setDragEnabled( hb_parl( 2 ) ); +} + +/* + * void setDropEnabled ( bool dropEnabled ) + */ +HB_FUNC( QT_QSTANDARDITEM_SETDROPENABLED ) +{ + hbqt_par_QStandardItem( 1 )->setDropEnabled( hb_parl( 2 ) ); +} + +/* + * void setEditable ( bool editable ) + */ +HB_FUNC( QT_QSTANDARDITEM_SETEDITABLE ) +{ + hbqt_par_QStandardItem( 1 )->setEditable( hb_parl( 2 ) ); +} + +/* + * void setEnabled ( bool enabled ) + */ +HB_FUNC( QT_QSTANDARDITEM_SETENABLED ) +{ + hbqt_par_QStandardItem( 1 )->setEnabled( hb_parl( 2 ) ); +} + +/* + * void setFlags ( Qt::ItemFlags flags ) + */ +HB_FUNC( QT_QSTANDARDITEM_SETFLAGS ) +{ + hbqt_par_QStandardItem( 1 )->setFlags( ( Qt::ItemFlags ) hb_parni( 2 ) ); +} + +/* + * void setFont ( const QFont & font ) + */ +HB_FUNC( QT_QSTANDARDITEM_SETFONT ) +{ + hbqt_par_QStandardItem( 1 )->setFont( *hbqt_par_QFont( 2 ) ); +} + +/* + * void setForeground ( const QBrush & brush ) + */ +HB_FUNC( QT_QSTANDARDITEM_SETFOREGROUND ) +{ + hbqt_par_QStandardItem( 1 )->setForeground( *hbqt_par_QBrush( 2 ) ); +} + +/* + * void setIcon ( const QIcon & icon ) + */ +HB_FUNC( QT_QSTANDARDITEM_SETICON ) +{ + hbqt_par_QStandardItem( 1 )->setIcon( QIcon( hbqt_par_QString( 2 ) ) ); +} + +/* + * void setRowCount ( int rows ) + */ +HB_FUNC( QT_QSTANDARDITEM_SETROWCOUNT ) +{ + hbqt_par_QStandardItem( 1 )->setRowCount( hb_parni( 2 ) ); +} + +/* + * void setSelectable ( bool selectable ) + */ +HB_FUNC( QT_QSTANDARDITEM_SETSELECTABLE ) +{ + hbqt_par_QStandardItem( 1 )->setSelectable( hb_parl( 2 ) ); +} + +/* + * void setSizeHint ( const QSize & size ) + */ +HB_FUNC( QT_QSTANDARDITEM_SETSIZEHINT ) +{ + hbqt_par_QStandardItem( 1 )->setSizeHint( *hbqt_par_QSize( 2 ) ); +} + +/* + * void setStatusTip ( const QString & statusTip ) + */ +HB_FUNC( QT_QSTANDARDITEM_SETSTATUSTIP ) +{ + hbqt_par_QStandardItem( 1 )->setStatusTip( hbqt_par_QString( 2 ) ); +} + +/* + * void setText ( const QString & text ) + */ +HB_FUNC( QT_QSTANDARDITEM_SETTEXT ) +{ + hbqt_par_QStandardItem( 1 )->setText( hbqt_par_QString( 2 ) ); +} + +/* + * void setTextAlignment ( Qt::Alignment alignment ) + */ +HB_FUNC( QT_QSTANDARDITEM_SETTEXTALIGNMENT ) +{ + hbqt_par_QStandardItem( 1 )->setTextAlignment( ( Qt::Alignment ) hb_parni( 2 ) ); +} + +/* + * void setToolTip ( const QString & toolTip ) + */ +HB_FUNC( QT_QSTANDARDITEM_SETTOOLTIP ) +{ + hbqt_par_QStandardItem( 1 )->setToolTip( hbqt_par_QString( 2 ) ); +} + +/* + * void setTristate ( bool tristate ) + */ +HB_FUNC( QT_QSTANDARDITEM_SETTRISTATE ) +{ + hbqt_par_QStandardItem( 1 )->setTristate( hb_parl( 2 ) ); +} + +/* + * void setWhatsThis ( const QString & whatsThis ) + */ +HB_FUNC( QT_QSTANDARDITEM_SETWHATSTHIS ) +{ + hbqt_par_QStandardItem( 1 )->setWhatsThis( hbqt_par_QString( 2 ) ); +} + +/* + * QSize sizeHint () const + */ +HB_FUNC( QT_QSTANDARDITEM_SIZEHINT ) +{ + hb_retptr( new QSize( hbqt_par_QStandardItem( 1 )->sizeHint() ) ); +} + +/* + * void sortChildren ( int column, Qt::SortOrder order = Qt::AscendingOrder ) + */ +HB_FUNC( QT_QSTANDARDITEM_SORTCHILDREN ) +{ + hbqt_par_QStandardItem( 1 )->sortChildren( hb_parni( 2 ), ( HB_ISNUM( 3 ) ? ( Qt::SortOrder ) hb_parni( 3 ) : ( Qt::SortOrder ) Qt::AscendingOrder ) ); +} + +/* + * QString statusTip () const + */ +HB_FUNC( QT_QSTANDARDITEM_STATUSTIP ) +{ + hb_retc( hbqt_par_QStandardItem( 1 )->statusTip().toLatin1().data() ); +} + +/* + * QStandardItem * takeChild ( int row, int column = 0 ) + */ +HB_FUNC( QT_QSTANDARDITEM_TAKECHILD ) +{ + hb_retptr( ( QStandardItem* ) hbqt_par_QStandardItem( 1 )->takeChild( hb_parni( 2 ), hb_parni( 3 ) ) ); +} + +/* + * QString text () const + */ +HB_FUNC( QT_QSTANDARDITEM_TEXT ) +{ + hb_retc( hbqt_par_QStandardItem( 1 )->text().toLatin1().data() ); +} + +/* + * Qt::Alignment textAlignment () const + */ +HB_FUNC( QT_QSTANDARDITEM_TEXTALIGNMENT ) +{ + hb_retni( ( Qt::Alignment ) hbqt_par_QStandardItem( 1 )->textAlignment() ); +} + +/* + * QString toolTip () const + */ +HB_FUNC( QT_QSTANDARDITEM_TOOLTIP ) +{ + hb_retc( hbqt_par_QStandardItem( 1 )->toolTip().toLatin1().data() ); +} + +/* + * virtual int type () const + */ +HB_FUNC( QT_QSTANDARDITEM_TYPE ) +{ + hb_retni( hbqt_par_QStandardItem( 1 )->type() ); +} + +/* + * QString whatsThis () const + */ +HB_FUNC( QT_QSTANDARDITEM_WHATSTHIS ) +{ + hb_retc( hbqt_par_QStandardItem( 1 )->whatsThis().toLatin1().data() ); +} + +/* + * virtual void write ( QDataStream & out ) const + */ +HB_FUNC( QT_QSTANDARDITEM_WRITE ) +{ + hbqt_par_QStandardItem( 1 )->write( *hbqt_par_QDataStream( 2 ) ); +} + + +/*----------------------------------------------------------------------*/ +#endif /* #if QT_VERSION >= 0x040500 */ +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/hbqt_qstandarditemmodel.cpp b/harbour/contrib/hbqt/hbqt_qstandarditemmodel.cpp new file mode 100644 index 0000000000..73ca26606c --- /dev/null +++ b/harbour/contrib/hbqt/hbqt_qstandarditemmodel.cpp @@ -0,0 +1,303 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT wrapper main header + * + * Copyright 2009 Marcos Antonio Gambeta + * 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. + * + */ +/*----------------------------------------------------------------------*/ + +#include "hbapi.h" +#include "hbqt.h" + +/*----------------------------------------------------------------------*/ +#if QT_VERSION >= 0x040500 +/*----------------------------------------------------------------------*/ + +/* + * Constructed[ 26/33 [ 78.79% ] ] + * + * *** Unconvered Prototypes *** + * ----------------------------- + * + * void appendColumn ( const QList & items ) + * void appendRow ( const QList & items ) + * QList findItems ( const QString & text, Qt::MatchFlags flags = Qt::MatchExactly, int column = 0 ) const + * void insertColumn ( int column, const QList & items ) + * void insertRow ( int row, const QList & items ) + * QList takeColumn ( int column ) + * QList takeRow ( int row ) + */ + + +#include + + +/* + * QStandardItemModel ( QObject * parent = 0 ) + * QStandardItemModel ( int rows, int columns, QObject * parent = 0 ) + * ~QStandardItemModel () + */ +HB_FUNC( QT_QSTANDARDITEMMODEL ) +{ + hb_retptr( ( QStandardItemModel* ) new QStandardItemModel( hbqt_par_QObject( 1 ) ) ); +} + +/* + * void appendRow ( QStandardItem * item ) + */ +HB_FUNC( QT_QSTANDARDITEMMODEL_APPENDROW ) +{ + hbqt_par_QStandardItemModel( 1 )->appendRow( hbqt_par_QStandardItem( 2 ) ); +} + +/* + * void clear () + */ +HB_FUNC( QT_QSTANDARDITEMMODEL_CLEAR ) +{ + hbqt_par_QStandardItemModel( 1 )->clear(); +} + +/* + * QStandardItem * horizontalHeaderItem ( int column ) const + */ +HB_FUNC( QT_QSTANDARDITEMMODEL_HORIZONTALHEADERITEM ) +{ + hb_retptr( ( QStandardItem* ) hbqt_par_QStandardItemModel( 1 )->horizontalHeaderItem( hb_parni( 2 ) ) ); +} + +/* + * QModelIndex indexFromItem ( const QStandardItem * item ) const + */ +HB_FUNC( QT_QSTANDARDITEMMODEL_INDEXFROMITEM ) +{ + hb_retptr( new QModelIndex( hbqt_par_QStandardItemModel( 1 )->indexFromItem( hbqt_par_QStandardItem( 2 ) ) ) ); +} + +/* + * bool insertColumn ( int column, const QModelIndex & parent = QModelIndex() ) + */ +HB_FUNC( QT_QSTANDARDITEMMODEL_INSERTCOLUMN ) +{ + hb_retl( hbqt_par_QStandardItemModel( 1 )->insertColumn( hb_parni( 2 ), *hbqt_par_QModelIndex( 3 ) ) ); +} + +/* + * bool insertRow ( int row, const QModelIndex & parent = QModelIndex() ) + */ +HB_FUNC( QT_QSTANDARDITEMMODEL_INSERTROW ) +{ + hb_retl( hbqt_par_QStandardItemModel( 1 )->insertRow( hb_parni( 2 ), *hbqt_par_QModelIndex( 3 ) ) ); +} + +/* + * void insertRow ( int row, QStandardItem * item ) + */ +HB_FUNC( QT_QSTANDARDITEMMODEL_INSERTROW_1 ) +{ + hbqt_par_QStandardItemModel( 1 )->insertRow( hb_parni( 2 ), hbqt_par_QStandardItem( 3 ) ); +} + +/* + * QStandardItem * invisibleRootItem () const + */ +HB_FUNC( QT_QSTANDARDITEMMODEL_INVISIBLEROOTITEM ) +{ + hb_retptr( ( QStandardItem* ) hbqt_par_QStandardItemModel( 1 )->invisibleRootItem() ); +} + +/* + * QStandardItem * item ( int row, int column = 0 ) const + */ +HB_FUNC( QT_QSTANDARDITEMMODEL_ITEM ) +{ + hb_retptr( ( QStandardItem* ) hbqt_par_QStandardItemModel( 1 )->item( hb_parni( 2 ), hb_parni( 3 ) ) ); +} + +/* + * QStandardItem * itemFromIndex ( const QModelIndex & index ) const + */ +HB_FUNC( QT_QSTANDARDITEMMODEL_ITEMFROMINDEX ) +{ + hb_retptr( ( QStandardItem* ) hbqt_par_QStandardItemModel( 1 )->itemFromIndex( *hbqt_par_QModelIndex( 2 ) ) ); +} + +/* + * const QStandardItem * itemPrototype () const + */ +HB_FUNC( QT_QSTANDARDITEMMODEL_ITEMPROTOTYPE ) +{ + hb_retptr( ( QStandardItem* ) hbqt_par_QStandardItemModel( 1 )->itemPrototype() ); +} + +/* + * void setColumnCount ( int columns ) + */ +HB_FUNC( QT_QSTANDARDITEMMODEL_SETCOLUMNCOUNT ) +{ + hbqt_par_QStandardItemModel( 1 )->setColumnCount( hb_parni( 2 ) ); +} + +/* + * void setHorizontalHeaderItem ( int column, QStandardItem * item ) + */ +HB_FUNC( QT_QSTANDARDITEMMODEL_SETHORIZONTALHEADERITEM ) +{ + hbqt_par_QStandardItemModel( 1 )->setHorizontalHeaderItem( hb_parni( 2 ), hbqt_par_QStandardItem( 3 ) ); +} + +/* + * void setHorizontalHeaderLabels ( const QStringList & labels ) + */ +HB_FUNC( QT_QSTANDARDITEMMODEL_SETHORIZONTALHEADERLABELS ) +{ + hbqt_par_QStandardItemModel( 1 )->setHorizontalHeaderLabels( *hbqt_par_QStringList( 2 ) ); +} + +/* + * void setItem ( int row, int column, QStandardItem * item ) + */ +HB_FUNC( QT_QSTANDARDITEMMODEL_SETITEM ) +{ + hbqt_par_QStandardItemModel( 1 )->setItem( hb_parni( 2 ), hb_parni( 3 ), hbqt_par_QStandardItem( 4 ) ); +} + +/* + * void setItem ( int row, QStandardItem * item ) + */ +HB_FUNC( QT_QSTANDARDITEMMODEL_SETITEM_1 ) +{ + hbqt_par_QStandardItemModel( 1 )->setItem( hb_parni( 2 ), hbqt_par_QStandardItem( 3 ) ); +} + +/* + * void setItemPrototype ( const QStandardItem * item ) + */ +HB_FUNC( QT_QSTANDARDITEMMODEL_SETITEMPROTOTYPE ) +{ + hbqt_par_QStandardItemModel( 1 )->setItemPrototype( hbqt_par_QStandardItem( 2 ) ); +} + +/* + * void setRowCount ( int rows ) + */ +HB_FUNC( QT_QSTANDARDITEMMODEL_SETROWCOUNT ) +{ + hbqt_par_QStandardItemModel( 1 )->setRowCount( hb_parni( 2 ) ); +} + +/* + * void setSortRole ( int role ) + */ +HB_FUNC( QT_QSTANDARDITEMMODEL_SETSORTROLE ) +{ + hbqt_par_QStandardItemModel( 1 )->setSortRole( hb_parni( 2 ) ); +} + +/* + * void setVerticalHeaderItem ( int row, QStandardItem * item ) + */ +HB_FUNC( QT_QSTANDARDITEMMODEL_SETVERTICALHEADERITEM ) +{ + hbqt_par_QStandardItemModel( 1 )->setVerticalHeaderItem( hb_parni( 2 ), hbqt_par_QStandardItem( 3 ) ); +} + +/* + * void setVerticalHeaderLabels ( const QStringList & labels ) + */ +HB_FUNC( QT_QSTANDARDITEMMODEL_SETVERTICALHEADERLABELS ) +{ + hbqt_par_QStandardItemModel( 1 )->setVerticalHeaderLabels( *hbqt_par_QStringList( 2 ) ); +} + +/* + * int sortRole () const + */ +HB_FUNC( QT_QSTANDARDITEMMODEL_SORTROLE ) +{ + hb_retni( hbqt_par_QStandardItemModel( 1 )->sortRole() ); +} + +/* + * QStandardItem * takeHorizontalHeaderItem ( int column ) + */ +HB_FUNC( QT_QSTANDARDITEMMODEL_TAKEHORIZONTALHEADERITEM ) +{ + hb_retptr( ( QStandardItem* ) hbqt_par_QStandardItemModel( 1 )->takeHorizontalHeaderItem( hb_parni( 2 ) ) ); +} + +/* + * QStandardItem * takeItem ( int row, int column = 0 ) + */ +HB_FUNC( QT_QSTANDARDITEMMODEL_TAKEITEM ) +{ + hb_retptr( ( QStandardItem* ) hbqt_par_QStandardItemModel( 1 )->takeItem( hb_parni( 2 ), hb_parni( 3 ) ) ); +} + +/* + * QStandardItem * takeVerticalHeaderItem ( int row ) + */ +HB_FUNC( QT_QSTANDARDITEMMODEL_TAKEVERTICALHEADERITEM ) +{ + hb_retptr( ( QStandardItem* ) hbqt_par_QStandardItemModel( 1 )->takeVerticalHeaderItem( hb_parni( 2 ) ) ); +} + +/* + * QStandardItem * verticalHeaderItem ( int row ) const + */ +HB_FUNC( QT_QSTANDARDITEMMODEL_VERTICALHEADERITEM ) +{ + hb_retptr( ( QStandardItem* ) hbqt_par_QStandardItemModel( 1 )->verticalHeaderItem( hb_parni( 2 ) ) ); +} + + +/*----------------------------------------------------------------------*/ +#endif /* #if QT_VERSION >= 0x040500 */ +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/qth/QColor.qth b/harbour/contrib/hbqt/qth/QColor.qth index c96507dc5a..2b84ef4cd9 100644 --- a/harbour/contrib/hbqt/qth/QColor.qth +++ b/harbour/contrib/hbqt/qth/QColor.qth @@ -54,6 +54,11 @@ ; Header File to Generate QT Wrapper Sources ; + +Inherits = +Type = Core +New = + #include @@ -69,7 +74,7 @@ QColor ( Qt::GlobalColor color ) */ HB_FUNC( QT_QCOLOR ) { - + hb_retptr( ( QColor* ) new QColor() ); } diff --git a/harbour/contrib/hbqt/qth/QConicalGradient.qth b/harbour/contrib/hbqt/qth/QConicalGradient.qth new file mode 100644 index 0000000000..4f74df0dd3 --- /dev/null +++ b/harbour/contrib/hbqt/qth/QConicalGradient.qth @@ -0,0 +1,100 @@ +/* + * $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 +; + + +Inherits = QGradient +Type = Core +New = + + + +#include + + +/* + * QConicalGradient () + * QConicalGradient ( const QPointF & center, qreal angle ) + * QConicalGradient ( qreal cx, qreal cy, qreal angle ) + */ +HB_FUNC( QT_ ) +{ + hb_retptr( ( QConicalGradient* ) new QConicalGradient() ); +} + + + +enum CoordinateMode { LogicalMode, StretchToDeviceMode, ObjectBoundingMode } +enum Spread { PadSpread, RepeatSpread, ReflectSpread } +enum Type { LinearGradient, RadialGradient, ConicalGradient, NoGradient } + + + +qreal angle () const +QPointF center () const +void setAngle ( qreal angle ) +void setCenter ( const QPointF & center ) +void setCenter ( qreal x, qreal y ) + + + + + + + + + + + diff --git a/harbour/contrib/hbqt/qth/QGradient.qth b/harbour/contrib/hbqt/qth/QGradient.qth new file mode 100644 index 0000000000..f111fdc5c3 --- /dev/null +++ b/harbour/contrib/hbqt/qth/QGradient.qth @@ -0,0 +1,101 @@ +/* + * $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 +; + + +Inherits = +Type = Core +New = + + + +#include + + +/* + * + */ +HB_FUNC( QT_QGRADIENT ) +{ + +} + + + +enum CoordinateMode { LogicalMode, StretchToDeviceMode, ObjectBoundingMode } +enum Spread { PadSpread, RepeatSpread, ReflectSpread } +enum Type { LinearGradient, RadialGradient, ConicalGradient, NoGradient } + + + +CoordinateMode coordinateMode () const +void setColorAt ( qreal position, const QColor & color ) +void setCoordinateMode ( CoordinateMode mode ) +void setSpread ( Spread method ) +void setStops ( const QGradientStops & stopPoints ) +Spread spread () const +QGradientStops stops () const +Type type () const + + + + + + + + + + + diff --git a/harbour/contrib/hbqt/qth/QImage.qth b/harbour/contrib/hbqt/qth/QImage.qth new file mode 100644 index 0000000000..70e8db5858 --- /dev/null +++ b/harbour/contrib/hbqt/qth/QImage.qth @@ -0,0 +1,167 @@ +/* + * $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 +; + + +Inherits = +Type = Core +New = + + + +#include + + +/* + * QImage () + * QImage ( const QSize & size, Format format ) + * QImage ( int width, int height, Format format ) + * QImage ( uchar * data, int width, int height, Format format ) + * QImage ( const uchar * data, int width, int height, Format format ) + * QImage ( uchar * data, int width, int height, int bytesPerLine, Format format ) + * QImage ( const uchar * data, int width, int height, int bytesPerLine, Format format ) + * QImage ( const char * const[] xpm ) + * QImage ( const QString & fileName, const char * format = 0 ) + * QImage ( const char * fileName, const char * format = 0 ) + * QImage ( const QImage & image ) + * ~QImage () + */ +HB_FUNC( QT_QIMAGE ) +{ + hb_retptr( ( QImage* ) new QImage() ); +} + + + +enum Format { Format_Invalid, Format_Mono, Format_MonoLSB, Format_Indexed8, ..., Format_ARGB4444_Premultiplied } +enum InvertMode { InvertRgb, InvertRgba } + + + +bool allGray () const +QImage alphaChannel () const +uchar * bits () +const uchar * bits () const +int bytesPerLine () const +qint64 cacheKey () const +QRgb color ( int i ) const +QVector colorTable () const +QImage convertToFormat ( Format format, Qt::ImageConversionFlags flags = Qt::AutoColor ) const +QImage convertToFormat ( Format format, const QVector & colorTable, Qt::ImageConversionFlags flags = Qt::AutoColor ) const +QImage copy ( const QRect & rectangle = QRect() ) const +QImage copy ( int x, int y, int width, int height ) const +QImage createAlphaMask ( Qt::ImageConversionFlags flags = Qt::AutoColor ) const +QImage createHeuristicMask ( bool clipTight = true ) const +QImage createMaskFromColor ( QRgb color, Qt::MaskMode mode = Qt::MaskInColor ) const +int depth () const +int dotsPerMeterX () const +int dotsPerMeterY () const +void fill ( uint pixelValue ) +Format format () const +bool hasAlphaChannel () const +int height () const +void invertPixels ( InvertMode mode = InvertRgb ) +bool isGrayscale () const +bool isNull () const +bool load ( const QString & fileName, const char * format = 0 ) +bool load ( QIODevice * device, const char * format ) +// bool loadFromData ( const uchar * data, int len, const char * format = 0 ) +bool loadFromData ( const QByteArray & data, const char * format = 0 ) +QImage mirrored ( bool horizontal = false, bool vertical = true ) const +int numBytes () const +int numColors () const +QPoint offset () const +QRgb pixel ( const QPoint & position ) const +QRgb pixel ( int x, int y ) const +int pixelIndex ( const QPoint & position ) const +int pixelIndex ( int x, int y ) const +QRect rect () const +QImage rgbSwapped () const +bool save ( const QString & fileName, const char * format = 0, int quality = -1 ) const +bool save ( QIODevice * device, const char * format = 0, int quality = -1 ) const +QImage scaled ( const QSize & size, Qt::AspectRatioMode aspectRatioMode = Qt::IgnoreAspectRatio, Qt::TransformationMode transformMode = Qt::FastTransformation ) const +QImage scaled ( int width, int height, Qt::AspectRatioMode aspectRatioMode = Qt::IgnoreAspectRatio, Qt::TransformationMode transformMode = Qt::FastTransformation ) const +QImage scaledToHeight ( int height, Qt::TransformationMode mode = Qt::FastTransformation ) const +QImage scaledToWidth ( int width, Qt::TransformationMode mode = Qt::FastTransformation ) const +uchar * scanLine ( int i ) +const uchar * scanLine ( int i ) const +void setColor ( int index, QRgb colorValue ) +void setColorTable ( const QVector colors ) +void setDotsPerMeterX ( int x ) +void setDotsPerMeterY ( int y ) +void setNumColors ( int numColors ) +void setOffset ( const QPoint & offset ) +void setPixel ( const QPoint & position, uint index_or_rgb ) +void setPixel ( int x, int y, uint index_or_rgb ) +void setText ( const QString & key, const QString & text ) +QSize size () const +QString text ( const QString & key = QString() ) const +QStringList textKeys () const +QImage transformed ( const QMatrix & matrix, Qt::TransformationMode mode = Qt::FastTransformation ) const +QImage transformed ( const QTransform & matrix, Qt::TransformationMode mode = Qt::FastTransformation ) const +bool valid ( const QPoint & pos ) const +bool valid ( int x, int y ) const +int width () const + + + + + + + + + + + diff --git a/harbour/contrib/hbqt/qth/QImageReader.qth b/harbour/contrib/hbqt/qth/QImageReader.qth new file mode 100644 index 0000000000..c35968f94f --- /dev/null +++ b/harbour/contrib/hbqt/qth/QImageReader.qth @@ -0,0 +1,130 @@ +/* + * $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 +; + + +Inherits = +Type = Core +New = + + + +#include + + +/* + * QImageReader () + * QImageReader ( QIODevice * device, const QByteArray & format = QByteArray() ) + * QImageReader ( const QString & fileName, const QByteArray & format = QByteArray() ) + * ~QImageReader () + */ +HB_FUNC( QT_QIMAGEREADER ) +{ + hb_retptr( ( QImageReader* ) new QImageReader() ); +} + + + +enum ImageReaderError { FileNotFoundError, DeviceError, UnsupportedFormatError, InvalidDataError, UnknownError } + + + +bool autoDetectImageFormat () const +QColor backgroundColor () const +bool canRead () const +QRect clipRect () const +int currentImageNumber () const +QRect currentImageRect () const +QIODevice * device () const +ImageReaderError error () const +QString errorString () const +QString fileName () const +QByteArray format () const +int imageCount () const +QImage::Format imageFormat () const +bool jumpToImage ( int imageNumber ) +bool jumpToNextImage () +int loopCount () const +int nextImageDelay () const +int quality () const +QImage read () +bool read ( QImage * image ) +QRect scaledClipRect () const +QSize scaledSize () const +void setAutoDetectImageFormat ( bool enabled ) +void setBackgroundColor ( const QColor & color ) +void setClipRect ( const QRect & rect ) +void setDevice ( QIODevice * device ) +void setFileName ( const QString & fileName ) +void setFormat ( const QByteArray & format ) +void setQuality ( int quality ) +void setScaledClipRect ( const QRect & rect ) +void setScaledSize ( const QSize & size ) +QSize size () const +bool supportsAnimation () const +bool supportsOption ( QImageIOHandler::ImageOption option ) const +QString text ( const QString & key ) const +QStringList textKeys () const + + + + + + + + + + + diff --git a/harbour/contrib/hbqt/qth/QImageWriter.qth b/harbour/contrib/hbqt/qth/QImageWriter.qth new file mode 100644 index 0000000000..b517a96562 --- /dev/null +++ b/harbour/contrib/hbqt/qth/QImageWriter.qth @@ -0,0 +1,112 @@ +/* + * $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 +; + + +Inherits = +Type = Core +New = + + + +#include + + +/* + * QImageWriter () + * QImageWriter ( QIODevice * device, const QByteArray & format ) + * QImageWriter ( const QString & fileName, const QByteArray & format = QByteArray() ) + * ~QImageWriter () + */ +HB_FUNC( QT_QIMAGEWRITER ) +{ + hb_retptr( ( QImageWriter* ) new QImageWriter() ); +} + + + +enum ImageWriterError { DeviceError, UnsupportedFormatError, UnknownError } + + + +bool canWrite () const +int compression () const +QIODevice * device () const +ImageWriterError error () const +QString errorString () const +QString fileName () const +QByteArray format () const +float gamma () const +int quality () const +void setCompression ( int compression ) +void setDevice ( QIODevice * device ) +void setFileName ( const QString & fileName ) +void setFormat ( const QByteArray & format ) +void setGamma ( float gamma ) +void setQuality ( int quality ) +void setText ( const QString & key, const QString & text ) +bool supportsOption ( QImageIOHandler::ImageOption option ) const +bool write ( const QImage & image ) + + + + + + + + + + + diff --git a/harbour/contrib/hbqt/qth/QLine.qth b/harbour/contrib/hbqt/qth/QLine.qth new file mode 100644 index 0000000000..82aa834da9 --- /dev/null +++ b/harbour/contrib/hbqt/qth/QLine.qth @@ -0,0 +1,109 @@ +/* + * $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 +; + + +Inherits = +Type = Core +New = + + + +#include + + +/* + * QLine () + * QLine ( const QPoint & p1, const QPoint & p2 ) + * QLine ( int x1, int y1, int x2, int y2 ) + */ +HB_FUNC( QT_QLINE ) +{ + hb_retptr( ( QLine* ) new QLine() ); +} + + + + + + +QPoint p1 () const +QPoint p2 () const +int x1 () const +int x2 () const +int y1 () const +int y2 () const +int dx () const +int dy () const +bool isNull () const +void setP1 ( const QPoint & p1 ) +void setP2 ( const QPoint & p2 ) +void setLine ( int x1, int y1, int x2, int y2 ) +void setPoints ( const QPoint & p1, const QPoint & p2 ) +void translate ( const QPoint & offset ) +void translate ( int dx, int dy ) +QLine translated ( const QPoint & offset ) const +QLine translated ( int dx, int dy ) const + + + + + + + + + + + diff --git a/harbour/contrib/hbqt/qth/QLinearGradient.qth b/harbour/contrib/hbqt/qth/QLinearGradient.qth new file mode 100644 index 0000000000..29fe928d27 --- /dev/null +++ b/harbour/contrib/hbqt/qth/QLinearGradient.qth @@ -0,0 +1,101 @@ +/* + * $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 +; + + +Inherits = QGradient +Type = Core +New = + + + +#include + + +/* + * QLinearGradient () + * QLinearGradient ( const QPointF & start, const QPointF & finalStop ) + * QLinearGradient ( qreal x1, qreal y1, qreal x2, qreal y2 ) + */ +HB_FUNC( QT_ ) +{ + hb_retptr( ( QLinearGradient* ) new QLinearGradient() ); +} + + + +enum CoordinateMode { LogicalMode, StretchToDeviceMode, ObjectBoundingMode } +enum Spread { PadSpread, RepeatSpread, ReflectSpread } +enum Type { LinearGradient, RadialGradient, ConicalGradient, NoGradient } + + + +QPointF finalStop () const +void setFinalStop ( const QPointF & stop ) +void setFinalStop ( qreal x, qreal y ) +void setStart ( const QPointF & start ) +void setStart ( qreal x, qreal y ) +QPointF start () const + + + + + + + + + + + diff --git a/harbour/contrib/hbqt/qth/QPalette.qth b/harbour/contrib/hbqt/qth/QPalette.qth new file mode 100644 index 0000000000..67380a7791 --- /dev/null +++ b/harbour/contrib/hbqt/qth/QPalette.qth @@ -0,0 +1,133 @@ +/* + * $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 +; + + +Inherits = +Type = Core +New = + + + +#include + + +/* + * QPalette () + * QPalette ( const QColor & button ) + * QPalette ( Qt::GlobalColor button ) + * QPalette ( const QColor & button, const QColor & window ) + * QPalette ( const QBrush & windowText, const QBrush & button, const QBrush & light, const QBrush & dark, const QBrush & mid, const QBrush & text, const QBrush & bright_text, const QBrush & base, const QBrush & window ) + * QPalette ( const QPalette & p ) + * ~QPalette () + */ +HB_FUNC( QT_QPALETTE ) +{ + hb_retptr( ( QPalette* ) new QPalette() ); +} + + + +enum ColorGroup { Disabled, Active, Inactive, Normal } +enum ColorRole { Window, Background, WindowText, Foreground, ..., NoRole } + + + +const QBrush & alternateBase () const +const QBrush & base () const +const QBrush & brightText () const +const QBrush & brush ( ColorGroup group, ColorRole role ) const +const QBrush & brush ( ColorRole role ) const +const QBrush & button () const +const QBrush & buttonText () const +qint64 cacheKey () const +const QColor & color ( ColorGroup group, ColorRole role ) const +const QColor & color ( ColorRole role ) const +ColorGroup currentColorGroup () const +const QBrush & dark () const +const QBrush & highlight () const +const QBrush & highlightedText () const +bool isBrushSet ( ColorGroup cg, ColorRole cr ) const +bool isCopyOf ( const QPalette & p ) const +bool isEqual ( ColorGroup cg1, ColorGroup cg2 ) const +const QBrush & light () const +const QBrush & link () const +const QBrush & linkVisited () const +const QBrush & mid () const +const QBrush & midlight () const +QPalette resolve ( const QPalette & other ) const +void setBrush ( ColorRole role, const QBrush & brush ) +void setBrush ( ColorGroup group, ColorRole role, const QBrush & brush ) +void setColor ( ColorGroup group, ColorRole role, const QColor & color ) +void setColor ( ColorRole role, const QColor & color ) +void setColorGroup ( ColorGroup cg, const QBrush & windowText, const QBrush & button, const QBrush & light, const QBrush & dark, const QBrush & mid, const QBrush & text, const QBrush & bright_text, const QBrush & base, const QBrush & window ) +void setCurrentColorGroup ( ColorGroup cg ) +const QBrush & shadow () const +const QBrush & text () const +const QBrush & toolTipBase () const +const QBrush & toolTipText () const +const QBrush & window () const +const QBrush & windowText () const + + + + + + + + + + + diff --git a/harbour/contrib/hbqt/qth/QPicture.qth b/harbour/contrib/hbqt/qth/QPicture.qth new file mode 100644 index 0000000000..1942e58ea3 --- /dev/null +++ b/harbour/contrib/hbqt/qth/QPicture.qth @@ -0,0 +1,103 @@ +/* + * $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 +; + + +Inherits = QPaintDevice +Type = Core +New = + + + +#include + + +/* + * QPicture ( int formatVersion = -1 ) + * QPicture ( const QPicture & pic ) + * ~QPicture () + */ +HB_FUNC( QT_QPICTURE ) +{ + hb_retptr( ( QPicture* ) new QPicture() ); +} + + + + + + +QRect boundingRect () const +const char * data () const +bool isNull () const +bool load ( const QString & fileName, const char * format = 0 ) +bool load ( QIODevice * dev, const char * format = 0 ) +bool play ( QPainter * painter ) +bool save ( const QString & fileName, const char * format = 0 ) +bool save ( QIODevice * dev, const char * format = 0 ) +void setBoundingRect ( const QRect & r ) +virtual void setData ( const char * data, uint size ) +uint size () const + + + + + + + + + + + diff --git a/harbour/contrib/hbqt/qth/QRadialGradient.qth b/harbour/contrib/hbqt/qth/QRadialGradient.qth new file mode 100644 index 0000000000..9bbbb8c6b4 --- /dev/null +++ b/harbour/contrib/hbqt/qth/QRadialGradient.qth @@ -0,0 +1,105 @@ +/* + * $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 +; + + +Inherits = QGradient +Type = Core +New = + + + +#include + + +/* + * QRadialGradient () + * QRadialGradient ( const QPointF & center, qreal radius, const QPointF & focalPoint ) + * QRadialGradient ( qreal cx, qreal cy, qreal radius, qreal fx, qreal fy ) + * QRadialGradient ( const QPointF & center, qreal radius ) + * QRadialGradient ( qreal cx, qreal cy, qreal radius ) + */ +HB_FUNC( QT_RADIALGRADIENT ) +{ + hb_retptr( ( QRadialGradient* ) new QRadialGradient() ); +} + + + +enum CoordinateMode { LogicalMode, StretchToDeviceMode, ObjectBoundingMode } +enum Spread { PadSpread, RepeatSpread, ReflectSpread } +enum Type { LinearGradient, RadialGradient, ConicalGradient, NoGradient } + + + +QPointF center () const +QPointF focalPoint () const +qreal radius () const +void setCenter ( const QPointF & center ) +void setCenter ( qreal x, qreal y ) +void setFocalPoint ( const QPointF & focalPoint ) +void setFocalPoint ( qreal x, qreal y ) +void setRadius ( qreal radius ) + + + + + + + + + + + diff --git a/harbour/contrib/hbqt/qth/QResource.qth b/harbour/contrib/hbqt/qth/QResource.qth new file mode 100644 index 0000000000..0b81598fbf --- /dev/null +++ b/harbour/contrib/hbqt/qth/QResource.qth @@ -0,0 +1,100 @@ +/* + * $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 +; + + +Inherits = +Type = Core +New = + + + +#include + + +/* + * QResource ( const QString & file = QString(), const QLocale & locale = QLocale() ) + * ~QResource () + */ +HB_FUNC( QT_QRESOURCE ) +{ + hb_retptr( ( QResource* ) new QResource() ); +} + + + + + + +QString absoluteFilePath () const +const uchar * data () const +QString fileName () const +bool isCompressed () const +bool isValid () const +QLocale locale () const +void setFileName ( const QString & file ) +void setLocale ( const QLocale & locale ) +qint64 size () const + + + + + + + + + + + diff --git a/harbour/contrib/hbqt/qth/QSizePolicy.qth b/harbour/contrib/hbqt/qth/QSizePolicy.qth new file mode 100644 index 0000000000..c557101cd8 --- /dev/null +++ b/harbour/contrib/hbqt/qth/QSizePolicy.qth @@ -0,0 +1,110 @@ +/* + * $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 +; + + +Inherits = +Type = Core +New = + + + +#include + + +/* + * QSizePolicy () + * QSizePolicy ( Policy horizontal, Policy vertical ) + * QSizePolicy ( Policy horizontal, Policy vertical, ControlType type ) + */ +HB_FUNC( QT_QSIZEPOLICY ) +{ + hb_retptr( ( QSizePolicy* ) new QSizePolicy() ); +} + + + +enum Policy { Fixed, Minimum, Maximum, Preferred, ..., Ignored } +enum PolicyFlag { GrowFlag, ExpandFlag, ShrinkFlag, IgnoreFlag } +enum ControlType { DefaultType, ButtonBox, CheckBox, ComboBox, ..., ToolButton } +flags ControlTypes + + + +ControlType controlType () const +Qt::Orientations expandingDirections () const +bool hasHeightForWidth () const +Policy horizontalPolicy () const +int horizontalStretch () const +void setControlType ( ControlType type ) +void setHeightForWidth ( bool dependent ) +void setHorizontalPolicy ( Policy policy ) +void setHorizontalStretch ( uchar stretchFactor ) +void setVerticalPolicy ( Policy policy ) +void setVerticalStretch ( uchar stretchFactor ) +void transpose () +Policy verticalPolicy () const +int verticalStretch () const + + + + + + + + + + + diff --git a/harbour/contrib/hbqt/qth/QSound.qth b/harbour/contrib/hbqt/qth/QSound.qth new file mode 100644 index 0000000000..85bc5cbf71 --- /dev/null +++ b/harbour/contrib/hbqt/qth/QSound.qth @@ -0,0 +1,96 @@ +/* + * $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 +; + + +Inherits = +Type = Core +New = + + + +#include + + +/* + * QSound ( const QString & filename, QObject * parent = 0 ) + * ~QSound () + */ +HB_FUNC( QT_QSOUND ) +{ + hb_retptr( ( QSound* ) new QSound( hbqt_par_QString( 1 ) ) ); +} + + + + + + +QString fileName () const +bool isFinished () const +int loops () const +int loopsRemaining () const +void setLoops ( int number ) + + + + + + + + + + + diff --git a/harbour/contrib/hbqt/qth/QStandardItem.qth b/harbour/contrib/hbqt/qth/QStandardItem.qth new file mode 100644 index 0000000000..b43ace5413 --- /dev/null +++ b/harbour/contrib/hbqt/qth/QStandardItem.qth @@ -0,0 +1,174 @@ +/* + * $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 +; + + +Inherits = +Type = Core +New = + + + +#include + + +/* + * QStandardItem () + * QStandardItem ( const QString & text ) + * QStandardItem ( const QIcon & icon, const QString & text ) + * QStandardItem ( int rows, int columns = 1 ) + * virtual ~QStandardItem () + */ +HB_FUNC( QT_QSTANDARDITEM ) +{ + hb_retptr( ( QStandardItem* ) new QStandardItem() ); +} + + + +enum ItemType { Type, UserType } + + + +QString accessibleDescription () const +QString accessibleText () const +void appendColumn ( const QList & items ) +void appendRow ( const QList & items ) +void appendRow ( QStandardItem * item ) +void appendRows ( const QList & items ) +QBrush background () const +Qt::CheckState checkState () const +QStandardItem * child ( int row, int column = 0 ) const +virtual QStandardItem * clone () const +int column () const +int columnCount () const +virtual QVariant data ( int role = Qt::UserRole + 1 ) const +Qt::ItemFlags flags () const +QFont font () const +QBrush foreground () const +bool hasChildren () const +QIcon icon () const +QModelIndex index () const +void insertColumn ( int column, const QList & items ) +void insertColumns ( int column, int count ) +void insertRow ( int row, const QList & items ) +void insertRow ( int row, QStandardItem * item ) +void insertRows ( int row, const QList & items ) +void insertRows ( int row, int count ) +bool isCheckable () const +bool isDragEnabled () const +bool isDropEnabled () const +bool isEditable () const +bool isEnabled () const +bool isSelectable () const +bool isTristate () const +QStandardItemModel * model () const +QStandardItem * parent () const +virtual void read ( QDataStream & in ) +void removeColumn ( int column ) +void removeColumns ( int column, int count ) +void removeRow ( int row ) +void removeRows ( int row, int count ) +int row () const +int rowCount () const +void setAccessibleDescription ( const QString & accessibleDescription ) +void setAccessibleText ( const QString & accessibleText ) +void setBackground ( const QBrush & brush ) +void setCheckState ( Qt::CheckState state ) +void setCheckable ( bool checkable ) +void setChild ( int row, int column, QStandardItem * item ) +void setChild ( int row, QStandardItem * item ) +void setColumnCount ( int columns ) +virtual void setData ( const QVariant & value, int role = Qt::UserRole + 1 ) +void setDragEnabled ( bool dragEnabled ) +void setDropEnabled ( bool dropEnabled ) +void setEditable ( bool editable ) +void setEnabled ( bool enabled ) +void setFlags ( Qt::ItemFlags flags ) +void setFont ( const QFont & font ) +void setForeground ( const QBrush & brush ) +void setIcon ( const QIcon & icon ) +void setRowCount ( int rows ) +void setSelectable ( bool selectable ) +void setSizeHint ( const QSize & size ) +void setStatusTip ( const QString & statusTip ) +void setText ( const QString & text ) +void setTextAlignment ( Qt::Alignment alignment ) +void setToolTip ( const QString & toolTip ) +void setTristate ( bool tristate ) +void setWhatsThis ( const QString & whatsThis ) +QSize sizeHint () const +void sortChildren ( int column, Qt::SortOrder order = Qt::AscendingOrder ) +QString statusTip () const +QStandardItem * takeChild ( int row, int column = 0 ) +QList takeColumn ( int column ) +QList takeRow ( int row ) +QString text () const +Qt::Alignment textAlignment () const +QString toolTip () const +virtual int type () const +QString whatsThis () const +virtual void write ( QDataStream & out ) const + + + + + + + + + + + diff --git a/harbour/contrib/hbqt/qth/QStandardItemModel.qth b/harbour/contrib/hbqt/qth/QStandardItemModel.qth new file mode 100644 index 0000000000..d50be73a6e --- /dev/null +++ b/harbour/contrib/hbqt/qth/QStandardItemModel.qth @@ -0,0 +1,126 @@ +/* + * $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 +; + + +Inherits = QAbstractItemModeL +Type = Core +New = + + + +#include + + +/* + * QStandardItemModel ( QObject * parent = 0 ) + * QStandardItemModel ( int rows, int columns, QObject * parent = 0 ) + * ~QStandardItemModel () + */ +HB_FUNC( QT_QSTANDARDITEMMODEL ) +{ + hb_retptr( ( QStandardItemModel* ) new QStandardItemModel( hbqt_par_QObject( 1 ) ) ); +} + + + + + + +void appendColumn ( const QList & items ) +void appendRow ( const QList & items ) +void appendRow ( QStandardItem * item ) +void clear () +QList findItems ( const QString & text, Qt::MatchFlags flags = Qt::MatchExactly, int column = 0 ) const +QStandardItem * horizontalHeaderItem ( int column ) const +QModelIndex indexFromItem ( const QStandardItem * item ) const +void insertColumn ( int column, const QList & items ) +bool insertColumn ( int column, const QModelIndex & parent = QModelIndex() ) +void insertRow ( int row, const QList & items ) +bool insertRow ( int row, const QModelIndex & parent = QModelIndex() ) +void insertRow ( int row, QStandardItem * item ) +QStandardItem * invisibleRootItem () const +QStandardItem * item ( int row, int column = 0 ) const +QStandardItem * itemFromIndex ( const QModelIndex & index ) const +const QStandardItem * itemPrototype () const +void setColumnCount ( int columns ) +void setHorizontalHeaderItem ( int column, QStandardItem * item ) +void setHorizontalHeaderLabels ( const QStringList & labels ) +void setItem ( int row, int column, QStandardItem * item ) +void setItem ( int row, QStandardItem * item ) +void setItemPrototype ( const QStandardItem * item ) +void setRowCount ( int rows ) +void setSortRole ( int role ) +void setVerticalHeaderItem ( int row, QStandardItem * item ) +void setVerticalHeaderLabels ( const QStringList & labels ) +int sortRole () const +QList takeColumn ( int column ) +QStandardItem * takeHorizontalHeaderItem ( int column ) +QStandardItem * takeItem ( int row, int column = 0 ) +QList takeRow ( int row ) +QStandardItem * takeVerticalHeaderItem ( int row ) +QStandardItem * verticalHeaderItem ( int row ) const + + + + + + +void itemChanged ( QStandardItem * item ) + + + + +