2012-07-06 17:21 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)

* contrib/hbqt/hbmk2_qt.hb
    + Added: casting "const QString &".

  + contrib/hbqt/qtsvg
  + contrib/hbqt/qtsvg/doc
  + contrib/hbqt/qtsvg/doc/en
  + contrib/hbqt/qtsvg/hbqt_init.cpp
  + contrib/hbqt/qtsvg/hbqtsvg.ch
  + contrib/hbqt/qtsvg/hbqtsvg.hbc
  + contrib/hbqt/qtsvg/hbqtsvg.hbm
  + contrib/hbqt/qtsvg/hbqtsvg.hbp
  + contrib/hbqt/qtsvg/hbqtsvg.hbx
  + contrib/hbqt/qtsvg/hbqtsvgs.hbp
  + contrib/hbqt/qtsvg/qth
  + contrib/hbqt/qtsvg/qth/filelist.hbm
  + contrib/hbqt/qtsvg/qth/QGraphicsSvgItem.qth
  + contrib/hbqt/qtsvg/qth/QSvgGenerator.qth
  + contrib/hbqt/qtsvg/qth/QSvgRenderer.qth
  + contrib/hbqt/qtsvg/qth/QSvgWidget.qth
    + Added: Qt's QtSvg module specific classes.
This commit is contained in:
Pritpal Bedi
2012-07-07 00:26:12 +00:00
parent 870efbdbdd
commit 2befa0c05c
14 changed files with 611 additions and 0 deletions

View File

@@ -16,6 +16,28 @@
The license applies to all entries newer than 2009-04-28.
*/
2012-07-06 17:21 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
* contrib/hbqt/hbmk2_qt.hb
+ Added: casting "const QString &".
+ contrib/hbqt/qtsvg
+ contrib/hbqt/qtsvg/doc
+ contrib/hbqt/qtsvg/doc/en
+ contrib/hbqt/qtsvg/hbqt_init.cpp
+ contrib/hbqt/qtsvg/hbqtsvg.ch
+ contrib/hbqt/qtsvg/hbqtsvg.hbc
+ contrib/hbqt/qtsvg/hbqtsvg.hbm
+ contrib/hbqt/qtsvg/hbqtsvg.hbp
+ contrib/hbqt/qtsvg/hbqtsvg.hbx
+ contrib/hbqt/qtsvg/hbqtsvgs.hbp
+ contrib/hbqt/qtsvg/qth
+ contrib/hbqt/qtsvg/qth/filelist.hbm
+ contrib/hbqt/qtsvg/qth/QGraphicsSvgItem.qth
+ contrib/hbqt/qtsvg/qth/QSvgGenerator.qth
+ contrib/hbqt/qtsvg/qth/QSvgRenderer.qth
+ contrib/hbqt/qtsvg/qth/QSvgWidget.qth
+ Added: Qt's QtSvg module specific classes.
2012-07-06 01:08 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
+ contrib/hbqt/qtxml
+ contrib/hbqt/qtxml/doc

View File

@@ -2430,6 +2430,8 @@ METHOD HbQtSource:parseProto( cProto, fBody_ )
CASE oArg:cCast == "QString"
IF oArg:lFar
oArg:cBody := "( QString * ) hb_parstr_utf8( " + cHBIdx + ", &pText%%%, NULL )"
ELSEIF oArg:lConst
oArg:cBody := "( QString ) hb_parstr_utf8( " + cHBIdx + ", &pText%%%, NULL )"
ELSE
oArg:cBody := "hb_parstr_utf8( " + cHBIdx + ", &pText%%%, NULL )"
ENDIF
@@ -3398,6 +3400,8 @@ STATIC FUNCTION qth_is_QObject( cWidget )
aadd( aQObjects, "QGLShader" )
aadd( aQObjects, "QGLShaderProgram" )
aadd( aQObjects, "QGLWidget" )
aadd( aQObjects, "QGraphicsSvgItem" )
ENDIF
RETURN ascan( aQObjects, {|e| e == cWidget } ) > 0

View File

@@ -0,0 +1,97 @@
/*
* $Id$
*/
/*
* Harbour Project source code:
* QT wrapper main header
*
* Copyright 2009-12 Pritpal Bedi (bedipritpal@hotmail.com)
* Copyright 2010 Viktor Szakats (harbour syenar.net)
* www - http://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 "hbqt.h"
#include "hbqtinit.h"
#include "hbvm.h"
#include "hbinit.h"
#if QT_VERSION >= 0x040500
/*----------------------------------------------------------------------*/
static void hbqt_registerCallbacks( void )
{
}
/*----------------------------------------------------------------------*/
HB_FUNC( __HBQTSVG ) {;}
static void hbqt_lib_init( void * cargo )
{
HB_SYMBOL_UNUSED( cargo );
hbqt_registerCallbacks();
}
static void hbqt_lib_exit( void * cargo )
{
HB_SYMBOL_UNUSED( cargo );
}
HB_CALL_ON_STARTUP_BEGIN( _hbqtsvg_init_ )
hb_vmAtInit( hbqt_lib_init, NULL );
hb_vmAtExit( hbqt_lib_exit, NULL );
HB_CALL_ON_STARTUP_END( _hbqtsvg_init_ )
#if defined( HB_PRAGMA_STARTUP )
#pragma startup _hbqtopengl_init__hbqtsvg_init_
#elif defined( HB_DATASEG_STARTUP )
#define HB_DATASEG_BODY HB_DATASEG_FUNC( _hbqtsvg_init_ )
#include "hbiniseg.h"
#endif
#endif

View File

@@ -0,0 +1,56 @@
/*
* $Id$
*/
/*
* Harbour Project source code:
*
* Copyright 2009-2012 Pritpal Bedi <bedipritpal@hotmail.com>
* http://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.
*
*/
#ifndef _HBQTSVG_CH
#define _HBQTSVG_CH
#endif

View File

@@ -0,0 +1,22 @@
#
# $Id$
#
# ---------------------------------------------------------------
# Copyright 2010 Viktor Szakats (harbour syenar.net)
# See COPYING for licensing terms.
# ---------------------------------------------------------------
incpaths=.
libs=../qtcore/hbqtcore.hbc
libs=../qtgui/hbqtgui.hbc
libs=../qtnetwork/hbqtnetwork.hbc
{!HB_STATIC_QT}libs=${_HB_DYNPREF}${hb_name}${_HB_DYNSUFF}
{!HB_STATIC_QT&(allwin|os2)}libs=QtSvg4
{!HB_STATIC_QT&(linux|beos|symbian)}libs=QtSvg
{!HB_STATIC_QT&darwin}frameworks=QtSvg
{HB_STATIC_QT&allwin}libs=${_HB_DYNPREF}${hb_name}s${_HB_DYNSUFF}
{HB_STATIC_QT&linux|beos}libs=${_HB_DYNPREF}${hb_name}${_HB_DYNSUFF}
{HB_STATIC_QT&(allwin|linux|beos)}libs=QtSvg

View File

@@ -0,0 +1,26 @@
#
# $Id$
#
-i.
qth/filelist.hbm
hbqtopengl.hbx
hbqt_init.cpp
../qtcore/hbqtcore.hbc
../qtgui/hbqtgui.hbc
../qtnetwork/hbqtnetwork.hbc
-deppkgname=qtsvg:QtOpenGL
-depkeyhead=qtsvg:QtSvg/QtSvg
-depcontrol=qtsvg:${HB_WITH_QT}
{!darwin}-depincpath=qtsvg:/usr/include/qt4
{!darwin}-depincpath=qtsvg:/usr/lib/qt4/include
{!darwin}-depincpath=qtsvg:/usr/include
{bsd}-depincpath=qt:/usr/local/include/qt4
{darwin}-depincpath=qtsvg:/Developer/qt/include
{darwin}-depincpath=qtsvg:/Library/Frameworks
{darwin}-depincpath=qtsvg:/usr/local/include

View File

@@ -0,0 +1,12 @@
#
# $Id$
#
../hbqt_common.hbm
hbqtsvg.hbm
-instfile=inc:hbqtsvg.ch
-instfile=inc:hbqtsvg.hbx
hbqtsvgs.hbp

View File

@@ -0,0 +1,42 @@
/*
* $Id$
*/
/* -------------------------------------------------------------------- */
/* NOTE: You can add manual override which functions to include or */
/* exclude from automatically generated EXTERNAL/DYNAMIC list. */
/* Syntax: // HB_FUNC_INCLUDE <func> */
/* // HB_FUNC_EXCLUDE <func> */
/* -------------------------------------------------------------------- */
/* -------------------------------------------------------------------- */
/* WARNING: Automatically generated code below. DO NOT EDIT! */
/* Regenerate using hbmk2 '-hbx=' option. */
/* -------------------------------------------------------------------- */
#ifndef __HBEXTERN_CH__HBQTSVG__
#define __HBEXTERN_CH__HBQTSVG__
#if defined( __HBEXTREQ__ ) .OR. defined( __HBEXTERN__HBQTSVG__ANNOUNCE )
ANNOUNCE __HBEXTERN__HBQTSVG__
#endif
#if defined( __HBEXTREQ__ ) .OR. defined( __HBEXTERN__HBQTSVG__REQUEST )
#command DYNAMIC <fncs,...> => EXTERNAL <fncs>
#endif
DYNAMIC HB_QGRAPHICSSVGITEM
DYNAMIC HB_QSVGGENERATOR
DYNAMIC HB_QSVGRENDERER
DYNAMIC HB_QSVGWIDGET
DYNAMIC QGRAPHICSSVGITEM
DYNAMIC QSVGGENERATOR
DYNAMIC QSVGRENDERER
DYNAMIC QSVGWIDGET
DYNAMIC __HBQTSVG
#if defined( __HBEXTREQ__ ) .OR. defined( __HBEXTERN__HBQTSVG__REQUEST )
#uncommand DYNAMIC <fncs,...> => EXTERNAL <fncs>
#endif
#endif

View File

@@ -0,0 +1,7 @@
#
# $Id$
#
../hbqt_commons.hbm
hbqtsvg.hbm

View File

@@ -0,0 +1,75 @@
/*
* $Id$
*/
/*
* Harbour Qt wrapper generator control file
*
* Copyright 2009-2012 Pritpal Bedi <bedipritpal@hotmail.com>
* www - http://www.harbour-project.org
*
* See COPYING for licensing terms.
*/
<CLASS>
Inherit = QGraphicsObject
QObject = yes
</CLASS>
<CODE>
#include <QtSvg/QGraphicsSvgItem>
/*
* QGraphicsSvgItem ( QGraphicsItem * parent = 0 )
* QGraphicsSvgItem ( const QString & fileName, QGraphicsItem * parent = 0 )
*/
HB_FUNC( QT_QGRAPHICSSVGITEM )
{
if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QGRAPHICSITEM" ) )
{
__HB_RETPTRGC__( new QGraphicsSvgItem( hbqt_par_QGraphicsItem( 1 ) ) );
}
else if( hb_pcount() == 2 && HB_ISCHAR( 1 ) && hbqt_par_isDerivedFrom( 2, "QGRAPHICSITEM" ) )
{
void * pText01 = NULL;
__HB_RETPTRGC__( new QGraphicsSvgItem( hb_parstr_utf8( 1, &pText01, NULL ), hbqt_par_QGraphicsItem( 2 ) ) );
hb_strfree( pText01 );
}
else if( hb_pcount() == 1 && HB_ISCHAR( 1 ) )
{
void * pText01 = NULL;
__HB_RETPTRGC__( new QGraphicsSvgItem( hb_parstr_utf8( 1, &pText01, NULL ) ) );
hb_strfree( pText01 );
}
else
{
__HB_RETPTRGC__( new QGraphicsSvgItem() );
}
}
</CODE>
<ENUMS>
</ENUMS>
<PROTOS>
QString elementId () const
QSize maximumCacheSize () const
QSvgRenderer * renderer () const
void setElementId ( const QString & id )
void setMaximumCacheSize ( const QSize & size )
void setSharedRenderer ( QSvgRenderer * renderer )
virtual QRectF boundingRect () const
virtual void paint ( QPainter * painter, const QStyleOptionGraphicsItem * option, QWidget * widget = 0 )
virtual int type () const
</PROTOS>
<SLOTS>
</SLOTS>
<SIGNALS>
</SIGNALS>

View File

@@ -0,0 +1,62 @@
/*
* $Id$
*/
/*
* Harbour Qt wrapper generator control file
*
* Copyright 2009-2012 Pritpal Bedi <bedipritpal@hotmail.com>
* www - http://www.harbour-project.org
*
* See COPYING for licensing terms.
*/
<CLASS>
Inherit = QPaintDevice
QObject = no
</CLASS>
<CODE>
#include <QtSvg/QSvgGenerator>
/*
* QSvgGenerator ()
* ~QSvgGenerator ()
*/
HB_FUNC( QT_QSVGGENERATOR )
{
__HB_RETPTRGC__( new QSvgGenerator() );
}
</CODE>
<ENUMS>
</ENUMS>
<PROTOS>
QString description () const
QString fileName () const
QIODevice * outputDevice () const
int resolution () const
void setDescription ( const QString & description )
void setFileName ( const QString & fileName )
void setOutputDevice ( QIODevice * outputDevice )
void setResolution ( int dpi )
void setSize ( const QSize & size )
void setTitle ( const QString & title )
void setViewBox ( const QRect & viewBox )
void setViewBox ( const QRectF & viewBox )
QSize size () const
QString title () const
QRect viewBox () const
QRectF viewBoxF () const
</PROTOS>
<SLOTS>
</SLOTS>
<SIGNALS>
</SIGNALS>

View File

@@ -0,0 +1,103 @@
/*
* $Id$
*/
/*
* Harbour Qt wrapper generator control file
*
* Copyright 2009-2012 Pritpal Bedi <bedipritpal@hotmail.com>
* www - http://www.harbour-project.org
*
* See COPYING for licensing terms.
*/
<CLASS>
Inherit = QObject
QObject = yes
</CLASS>
<CODE>
#include <QtSvg/QSvgRenderer>
/*
* QSvgRenderer ( QObject * parent = 0 )
* QSvgRenderer ( const QString & filename, QObject * parent = 0 )
* QSvgRenderer ( const QByteArray & contents, QObject * parent = 0 )
* QSvgRenderer ( QXmlStreamReader * contents, QObject * parent = 0 )
* ~QSvgRenderer ()
*/
HB_FUNC( QT_QSVGRENDERER )
{
if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QOBJECT" ) )
{
__HB_RETPTRGC__( new QSvgRenderer( hbqt_par_QObject( 1 ) ) );
}
else if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QBYTEARRAY" ) )
{
__HB_RETPTRGC__( new QSvgRenderer( *hbqt_par_QByteArray( 1 ) ) );
}
else if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QXMLSTREAMREADER" ) )
{
__HB_RETPTRGC__( new QSvgRenderer( hbqt_par_QXmlStreamReader( 1 ) ) );
}
else if( hb_pcount() == 1 && HB_ISCHAR( 1 ) )
{
void * pText01 = NULL;
__HB_RETPTRGC__( new QSvgRenderer( ( QString ) hb_parstr_utf8( 1, &pText01, NULL ) ) );
hb_strfree( pText01 );
}
else if( hb_pcount() == 2 && hbqt_par_isDerivedFrom( 1, "QBYTEARRAY" ) && hbqt_par_isDerivedFrom( 2, "QOBJECT" ) )
{
__HB_RETPTRGC__( new QSvgRenderer( *hbqt_par_QByteArray( 1 ), hbqt_par_QObject( 2 ) ) );
}
else if( hb_pcount() == 2 && hbqt_par_isDerivedFrom( 1, "QXMLSTREAMREADER" ) && hbqt_par_isDerivedFrom( 2, "QOBJECT" ) )
{
__HB_RETPTRGC__( new QSvgRenderer( hbqt_par_QXmlStreamReader( 1 ), hbqt_par_QObject( 2 ) ) );
}
else if( hb_pcount() == 2 && HB_ISCHAR( 1 ) && hbqt_par_isDerivedFrom( 2, "QOBJECT" ) )
{
void * pText01 = NULL;
__HB_RETPTRGC__( new QSvgRenderer( ( QString ) hb_parstr_utf8( 1, &pText01, NULL ), hbqt_par_QObject( 2 ) ) );
hb_strfree( pText01 );
}
else
{
__HB_RETPTRGC__( new QSvgRenderer() );
}
}
</CODE>
<ENUMS>
</ENUMS>
<PROTOS>
bool animated () const
QRectF boundsOnElement ( const QString & id ) const
QSize defaultSize () const
bool elementExists ( const QString & id ) const
int framesPerSecond () const
bool isValid () const
QMatrix matrixForElement ( const QString & id ) const
void setFramesPerSecond ( int num )
void setViewBox ( const QRect & viewbox )
void setViewBox ( const QRectF & viewbox )
QRect viewBox () const
QRectF viewBoxF () const
</PROTOS>
<SLOTS>
bool load ( const QString & filename )
bool load ( const QByteArray & contents )
bool load ( QXmlStreamReader * contents )
void render ( QPainter * painter )
void render ( QPainter * painter, const QRectF & bounds )
void render ( QPainter * painter, const QString & elementId, const QRectF & bounds = QRectF() )
</SLOTS>
<SIGNALS>
void repaintNeeded ()
</SIGNALS>

View File

@@ -0,0 +1,71 @@
/*
* $Id$
*/
/*
* Harbour Qt wrapper generator control file
*
* Copyright 2009-2012 Pritpal Bedi <bedipritpal@hotmail.com>
* www - http://www.harbour-project.org
*
* See COPYING for licensing terms.
*/
<CLASS>
Inherit = QWidget
QObject = yes
</CLASS>
<CODE>
#include <QtSvg/QSvgWidget>
/*
* QSvgWidget ( QWidget * parent = 0 )
* QSvgWidget ( const QString & file, QWidget * parent = 0 )
* ~QSvgWidget ()
*/
HB_FUNC( QT_QSVGWIDGET )
{
if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QWIDGET" ) )
{
__HB_RETPTRGC__( new QSvgWidget( hbqt_par_QWidget( 1 ) ) );
}
else if( hb_pcount() == 1 && HB_ISCHAR( 1 ) )
{
void * pText01 = NULL;
__HB_RETPTRGC__( new QSvgWidget( ( QString ) hb_parstr_utf8( 1, &pText01, NULL ) ) );
hb_strfree( pText01 );
}
else if( hb_pcount() == 2 && HB_ISCHAR( 1 ) && hbqt_par_isDerivedFrom( 2, "QWIDGET" ) )
{
void * pText01 = NULL;
__HB_RETPTRGC__( new QSvgWidget( ( QString ) hb_parstr_utf8( 1, &pText01, NULL ), hbqt_par_QWidget( 2 ) ) );
hb_strfree( pText01 );
}
else
{
__HB_RETPTRGC__( new QSvgWidget() );
}
}
</CODE>
<ENUMS>
</ENUMS>
<PROTOS>
QSvgRenderer * renderer () const
virtual QSize sizeHint () const
</PROTOS>
<SLOTS>
void load ( const QString & file )
void load ( const QByteArray & contents )
</SLOTS>
<SIGNALS>
</SIGNALS>

View File

@@ -0,0 +1,12 @@
#
# $Id$
#
-pflag=-qtver=0x040500
-pflag=-qtmodule=qtsvg
-pflag=-qthdocdir=../doc/
QGraphicsSvgItem.qth
QSvgGenerator.qth
QSvgRenderer.qth
QSvgWidget.qth