source/QtMultimediaWidgets: updated

source/QtMultimediaWidgets: updated

Modified:
source/QtMultimediaWidgets/QGraphicsVideoItem.prg

/*

  Qt5xHb - Bindings libraries for Harbour/xHarbour and Qt Framework 5

  Copyright (C) 2018 Marcos Antonio Gambeta <marcosgambeta AT outlook DOT com>

*/

/*
  DO NOT EDIT THIS FILE - the content was created using a source code generator
*/

#include "hbclass.ch"

#ifndef QT5XHB_NO_REQUESTS
REQUEST QMEDIAOBJECT
REQUEST QPOINTF
REQUEST QRECTF
REQUEST QSIZEF
#endif

CLASS QGraphicsVideoItem INHERIT QGraphicsObject,QMediaBindableInterface

   METHOD new
   METHOD delete
   METHOD mediaObject
   METHOD aspectRatioMode
   METHOD setAspectRatioMode
   METHOD offset
   METHOD setOffset
   METHOD size
   METHOD setSize
   METHOD nativeSize
   METHOD boundingRect
   METHOD paint

   METHOD onNativeSizeChanged

   DESTRUCTOR destroyObject

END CLASS

PROCEDURE destroyObject () CLASS QGraphicsVideoItem
   IF ::self_destruction
      ::delete()
   ENDIF
RETURN

#pragma BEGINDUMP

#include <Qt>

#ifndef __XHARBOUR__
#include <QGraphicsVideoItem>
#endif

#include "qt5xhb_common.h"
#include "qt5xhb_macros.h"
#include "qt5xhb_utils.h"

#ifdef __XHARBOUR__
#include <QGraphicsVideoItem>
#endif

/*
QGraphicsVideoItem(QGraphicsItem *parent = 0)
*/
HB_FUNC_STATIC( QGRAPHICSVIDEOITEM_NEW )
{
  if( ISBETWEEN(0,1) && (ISQGRAPHICSITEM(1)||ISNIL(1)) )
  {
    QGraphicsVideoItem * o = new QGraphicsVideoItem ( ISNIL(1)? 0 : (QGraphicsItem *) _qt5xhb_itemGetPtr(1) );
    _qt5xhb_returnNewObject( o, false );
  }
  else
  {
    hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
  }
}

HB_FUNC_STATIC( QGRAPHICSVIDEOITEM_DELETE )
{
  QGraphicsVideoItem * obj = (QGraphicsVideoItem *) _qt5xhb_itemGetPtrStackSelfItem();

  if( obj )
  {
    delete obj;
    obj = NULL;
    PHB_ITEM self = hb_stackSelfItem();
    PHB_ITEM ptr = hb_itemPutPtr( NULL, NULL );
    hb_objSendMsg( self, "_pointer", 1, ptr );
    hb_itemRelease( ptr );
  }

  hb_itemReturn( hb_stackSelfItem() );
}

/*
QMediaObject *mediaObject() const
*/
HB_FUNC_STATIC( QGRAPHICSVIDEOITEM_MEDIAOBJECT )
{
  QGraphicsVideoItem * obj = (QGraphicsVideoItem *) _qt5xhb_itemGetPtrStackSelfItem();

  if( obj )
  {
    if( ISNUMPAR(0) )
    {
      QMediaObject * ptr = obj->mediaObject ();
      _qt5xhb_createReturnQObjectClass ( ptr, "QMEDIAOBJECT" );
    }
    else
    {
      hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
    }
  }
}

/*
Qt::AspectRatioMode aspectRatioMode() const
*/
HB_FUNC_STATIC( QGRAPHICSVIDEOITEM_ASPECTRATIOMODE )
{
  QGraphicsVideoItem * obj = (QGraphicsVideoItem *) _qt5xhb_itemGetPtrStackSelfItem();

  if( obj )
  {
    if( ISNUMPAR(0) )
    {
      RENUM( obj->aspectRatioMode () );
    }
    else
    {
      hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
    }
  }
}

/*
void setAspectRatioMode(Qt::AspectRatioMode mode)
*/
HB_FUNC_STATIC( QGRAPHICSVIDEOITEM_SETASPECTRATIOMODE )
{
  QGraphicsVideoItem * obj = (QGraphicsVideoItem *) _qt5xhb_itemGetPtrStackSelfItem();

  if( obj )
  {
    if( ISNUMPAR(1) && ISNUM(1) )
    {
      obj->setAspectRatioMode ( (Qt::AspectRatioMode) hb_parni(1) );
    }
    else
    {
      hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
    }
  }

  hb_itemReturn( hb_stackSelfItem() );
}

/*
QPointF offset() const
*/
HB_FUNC_STATIC( QGRAPHICSVIDEOITEM_OFFSET )
{
  QGraphicsVideoItem * obj = (QGraphicsVideoItem *) _qt5xhb_itemGetPtrStackSelfItem();

  if( obj )
  {
    if( ISNUMPAR(0) )
    {
      QPointF * ptr = new QPointF( obj->offset () );
      _qt5xhb_createReturnClass ( ptr, "QPOINTF", true );
    }
    else
    {
      hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
    }
  }
}

/*
void setOffset(const QPointF &offset)
*/
HB_FUNC_STATIC( QGRAPHICSVIDEOITEM_SETOFFSET )
{
  QGraphicsVideoItem * obj = (QGraphicsVideoItem *) _qt5xhb_itemGetPtrStackSelfItem();

  if( obj )
  {
    if( ISNUMPAR(1) && ISQPOINTF(1) )
    {
      obj->setOffset ( *PQPOINTF(1) );
    }
    else
    {
      hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
    }
  }

  hb_itemReturn( hb_stackSelfItem() );
}

/*
QSizeF size() const
*/
HB_FUNC_STATIC( QGRAPHICSVIDEOITEM_SIZE )
{
  QGraphicsVideoItem * obj = (QGraphicsVideoItem *) _qt5xhb_itemGetPtrStackSelfItem();

  if( obj )
  {
    if( ISNUMPAR(0) )
    {
      QSizeF * ptr = new QSizeF( obj->size () );
      _qt5xhb_createReturnClass ( ptr, "QSIZEF", true );
    }
    else
    {
      hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
    }
  }
}

/*
void setSize(const QSizeF &size)
*/
HB_FUNC_STATIC( QGRAPHICSVIDEOITEM_SETSIZE )
{
  QGraphicsVideoItem * obj = (QGraphicsVideoItem *) _qt5xhb_itemGetPtrStackSelfItem();

  if( obj )
  {
    if( ISNUMPAR(1) && ISQSIZEF(1) )
    {
      obj->setSize ( *PQSIZEF(1) );
    }
    else
    {
      hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
    }
  }

  hb_itemReturn( hb_stackSelfItem() );
}

/*
QSizeF nativeSize() const
*/
HB_FUNC_STATIC( QGRAPHICSVIDEOITEM_NATIVESIZE )
{
  QGraphicsVideoItem * obj = (QGraphicsVideoItem *) _qt5xhb_itemGetPtrStackSelfItem();

  if( obj )
  {
    if( ISNUMPAR(0) )
    {
      QSizeF * ptr = new QSizeF( obj->nativeSize () );
      _qt5xhb_createReturnClass ( ptr, "QSIZEF", true );
    }
    else
    {
      hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
    }
  }
}

/*
QRectF boundingRect() const
*/
HB_FUNC_STATIC( QGRAPHICSVIDEOITEM_BOUNDINGRECT )
{
  QGraphicsVideoItem * obj = (QGraphicsVideoItem *) _qt5xhb_itemGetPtrStackSelfItem();

  if( obj )
  {
    if( ISNUMPAR(0) )
    {
      QRectF * ptr = new QRectF( obj->boundingRect () );
      _qt5xhb_createReturnClass ( ptr, "QRECTF", true );
    }
    else
    {
      hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
    }
  }
}

/*
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0)
*/
HB_FUNC_STATIC( QGRAPHICSVIDEOITEM_PAINT )
{
  QGraphicsVideoItem * obj = (QGraphicsVideoItem *) _qt5xhb_itemGetPtrStackSelfItem();

  if( obj )
  {
    if( ISBETWEEN(2,3) && ISQPAINTER(1) && ISQSTYLEOPTIONGRAPHICSITEM(2) && (ISQWIDGET(3)||ISNIL(3)) )
    {
      obj->paint ( PQPAINTER(1), PQSTYLEOPTIONGRAPHICSITEM(2), OPQWIDGET(3,0) );
    }
    else
    {
      hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
    }
  }

  hb_itemReturn( hb_stackSelfItem() );
}

void QGraphicsVideoItemSlots_connect_signal ( const QString & signal, const QString & slot );

HB_FUNC_STATIC( QGRAPHICSVIDEOITEM_ONNATIVESIZECHANGED )
{
  QGraphicsVideoItemSlots_connect_signal( "nativeSizeChanged(QSizeF)", "nativeSizeChanged(QSizeF)" );
}

#pragma ENDDUMP

/*

  Qt5xHb - Bindings libraries for Harbour/xHarbour and Qt Framework 5

  Copyright (C) 2018 Marcos Antonio Gambeta <marcosgambeta AT outlook DOT com>

*/

/*
  DO NOT EDIT THIS FILE - the content was created using a source code generator
*/

#include "hbclass.ch"

#ifndef QT5XHB_NO_REQUESTS
REQUEST QMEDIAOBJECT
REQUEST QPOINTF
REQUEST QSIZEF
REQUEST QRECTF
#endif

CLASS QGraphicsVideoItem INHERIT QGraphicsObject,QMediaBindableInterface

   METHOD new
   METHOD delete
   METHOD mediaObject
   METHOD aspectRatioMode
   METHOD setAspectRatioMode
   METHOD offset
   METHOD setOffset
   METHOD size
   METHOD setSize
   METHOD nativeSize
   METHOD boundingRect
   METHOD paint

   METHOD onNativeSizeChanged

   DESTRUCTOR destroyObject

END CLASS

PROCEDURE destroyObject () CLASS QGraphicsVideoItem
   IF ::self_destruction
      ::delete()
   ENDIF
RETURN

#pragma BEGINDUMP

#include <Qt>

#ifndef __XHARBOUR__
#include <QGraphicsVideoItem>
#endif

#include "qt5xhb_common.h"
#include "qt5xhb_macros.h"
#include "qt5xhb_utils.h"

#ifdef __XHARBOUR__
#include <QGraphicsVideoItem>
#endif

/*
QGraphicsVideoItem(QGraphicsItem *parent = 0)
*/
HB_FUNC_STATIC( QGRAPHICSVIDEOITEM_NEW )
{
  if( ISBETWEEN(0,1) && (ISQGRAPHICSITEM(1)||ISNIL(1)) )
  {
    QGraphicsVideoItem * o = new QGraphicsVideoItem ( ISNIL(1)? 0 : (QGraphicsItem *) _qt5xhb_itemGetPtr(1) );
    _qt5xhb_returnNewObject( o, false );
  }
  else
  {
    hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
  }
}

HB_FUNC_STATIC( QGRAPHICSVIDEOITEM_DELETE )
{
  QGraphicsVideoItem * obj = (QGraphicsVideoItem *) _qt5xhb_itemGetPtrStackSelfItem();

  if( obj )
  {
    delete obj;
    obj = NULL;
    PHB_ITEM self = hb_stackSelfItem();
    PHB_ITEM ptr = hb_itemPutPtr( NULL, NULL );
    hb_objSendMsg( self, "_pointer", 1, ptr );
    hb_itemRelease( ptr );
  }

  hb_itemReturn( hb_stackSelfItem() );
}

/*
QMediaObject *mediaObject() const
*/
HB_FUNC_STATIC( QGRAPHICSVIDEOITEM_MEDIAOBJECT )
{
  QGraphicsVideoItem * obj = (QGraphicsVideoItem *) _qt5xhb_itemGetPtrStackSelfItem();

  if( obj )
  {
    if( ISNUMPAR(0) )
    {
      QMediaObject * ptr = obj->mediaObject ();
      _qt5xhb_createReturnQObjectClass ( ptr, "QMEDIAOBJECT" );
    }
    else
    {
      hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
    }
  }
}

/*
Qt::AspectRatioMode aspectRatioMode() const
*/
HB_FUNC_STATIC( QGRAPHICSVIDEOITEM_ASPECTRATIOMODE )
{
  QGraphicsVideoItem * obj = (QGraphicsVideoItem *) _qt5xhb_itemGetPtrStackSelfItem();

  if( obj )
  {
    if( ISNUMPAR(0) )
    {
      RENUM( obj->aspectRatioMode () );
    }
    else
    {
      hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
    }
  }
}

/*
void setAspectRatioMode(Qt::AspectRatioMode mode)
*/
HB_FUNC_STATIC( QGRAPHICSVIDEOITEM_SETASPECTRATIOMODE )
{
  QGraphicsVideoItem * obj = (QGraphicsVideoItem *) _qt5xhb_itemGetPtrStackSelfItem();

  if( obj )
  {
    if( ISNUMPAR(1) && ISNUM(1) )
    {
      obj->setAspectRatioMode ( (Qt::AspectRatioMode) hb_parni(1) );
    }
    else
    {
      hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
    }
  }

  hb_itemReturn( hb_stackSelfItem() );
}

/*
QPointF offset() const
*/
HB_FUNC_STATIC( QGRAPHICSVIDEOITEM_OFFSET )
{
  QGraphicsVideoItem * obj = (QGraphicsVideoItem *) _qt5xhb_itemGetPtrStackSelfItem();

  if( obj )
  {
    if( ISNUMPAR(0) )
    {
      QPointF * ptr = new QPointF( obj->offset () );
      _qt5xhb_createReturnClass ( ptr, "QPOINTF", true );
    }
    else
    {
      hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
    }
  }
}

/*
void setOffset(const QPointF &offset)
*/
HB_FUNC_STATIC( QGRAPHICSVIDEOITEM_SETOFFSET )
{
  QGraphicsVideoItem * obj = (QGraphicsVideoItem *) _qt5xhb_itemGetPtrStackSelfItem();

  if( obj )
  {
    if( ISNUMPAR(1) && ISQPOINTF(1) )
    {
      obj->setOffset ( *PQPOINTF(1) );
    }
    else
    {
      hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
    }
  }

  hb_itemReturn( hb_stackSelfItem() );
}

/*
QSizeF size() const
*/
HB_FUNC_STATIC( QGRAPHICSVIDEOITEM_SIZE )
{
  QGraphicsVideoItem * obj = (QGraphicsVideoItem *) _qt5xhb_itemGetPtrStackSelfItem();

  if( obj )
  {
    if( ISNUMPAR(0) )
    {
      QSizeF * ptr = new QSizeF( obj->size () );
      _qt5xhb_createReturnClass ( ptr, "QSIZEF", true );
    }
    else
    {
      hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
    }
  }
}

/*
void setSize(const QSizeF &size)
*/
HB_FUNC_STATIC( QGRAPHICSVIDEOITEM_SETSIZE )
{
  QGraphicsVideoItem * obj = (QGraphicsVideoItem *) _qt5xhb_itemGetPtrStackSelfItem();

  if( obj )
  {
    if( ISNUMPAR(1) && ISQSIZEF(1) )
    {
      obj->setSize ( *PQSIZEF(1) );
    }
    else
    {
      hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
    }
  }

  hb_itemReturn( hb_stackSelfItem() );
}

/*
QSizeF nativeSize() const
*/
HB_FUNC_STATIC( QGRAPHICSVIDEOITEM_NATIVESIZE )
{
  QGraphicsVideoItem * obj = (QGraphicsVideoItem *) _qt5xhb_itemGetPtrStackSelfItem();

  if( obj )
  {
    if( ISNUMPAR(0) )
    {
      QSizeF * ptr = new QSizeF( obj->nativeSize () );
      _qt5xhb_createReturnClass ( ptr, "QSIZEF", true );
    }
    else
    {
      hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
    }
  }
}

/*
QRectF boundingRect() const
*/
HB_FUNC_STATIC( QGRAPHICSVIDEOITEM_BOUNDINGRECT )
{
  QGraphicsVideoItem * obj = (QGraphicsVideoItem *) _qt5xhb_itemGetPtrStackSelfItem();

  if( obj )
  {
    if( ISNUMPAR(0) )
    {
      QRectF * ptr = new QRectF( obj->boundingRect () );
      _qt5xhb_createReturnClass ( ptr, "QRECTF", true );
    }
    else
    {
      hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
    }
  }
}

/*
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0)
*/
HB_FUNC_STATIC( QGRAPHICSVIDEOITEM_PAINT )
{
  QGraphicsVideoItem * obj = (QGraphicsVideoItem *) _qt5xhb_itemGetPtrStackSelfItem();

  if( obj )
  {
    if( ISBETWEEN(2,3) && ISQPAINTER(1) && ISQSTYLEOPTIONGRAPHICSITEM(2) && (ISQWIDGET(3)||ISNIL(3)) )
    {
      obj->paint ( PQPAINTER(1), PQSTYLEOPTIONGRAPHICSITEM(2), OPQWIDGET(3,0) );
    }
    else
    {
      hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
    }
  }

  hb_itemReturn( hb_stackSelfItem() );
}

void QGraphicsVideoItemSlots_connect_signal ( const QString & signal, const QString & slot );

HB_FUNC_STATIC( QGRAPHICSVIDEOITEM_ONNATIVESIZECHANGED )
{
  QGraphicsVideoItemSlots_connect_signal( "nativeSizeChanged(QSizeF)", "nativeSizeChanged(QSizeF)" );
}

#pragma ENDDUMP


[runtime tests] Added DBAppend() tests

[runtime tests] Added DBAppend() tests

//
// Copyright (c) XSharp B.V.  All Rights Reserved.
// Licensed under the Apache License, Version 2.0.
// See License.txt in the project root for license information.
//
USING System
USING System.Collections.Generic
USING System.Linq
USING System.Text
USING XUnit
USING System.Globalization

BEGIN NAMESPACE XSharp.VO.Tests

	CLASS TransFormTests

		[Fact, Trait("Category", "TransForm")];
		METHOD TransformLogicalTest() AS VOID
			// with @R other chars are appended, but only a single YN or TF flag is written. Other positions become a space
			Assert.Equal("Y", Transform(TRUE, "Y"))
			Assert.Equal("N", Transform(FALSE, "Y"))
			Assert.Equal("T", Transform(TRUE, "L"))
			Assert.Equal("F", Transform(FALSE, "L"))
			Assert.Equal("T x", Transform(TRUE, "@R L x"))
			Assert.Equal("F x", Transform(FALSE, "@R L x"))
			Assert.Equal("Y x", Transform(TRUE, "@R YYx"))
			Assert.Equal("N x", Transform(FALSE, "@R YYx"))
			SetNatDll("French.DLL")
			Assert.Equal("O", Transform(TRUE, "Y"))
			Assert.Equal("N", Transform(FALSE, "Y"))
			Assert.Equal("T", Transform(TRUE, "L"))     // you would expect V but VO returns T
			Assert.Equal("F", Transform(FALSE, "L"))
			Assert.Equal("T x", Transform(TRUE, "@R L x"))  // you would expect V but VO returns T x
			Assert.Equal("F x", Transform(FALSE, "@R L x"))
			Assert.Equal("O x", Transform(TRUE, "@R YYx"))
			Assert.Equal("N x", Transform(FALSE, "@R YYx"))

		[Fact, Trait("Category", "TransForm")];
		METHOD TransformDateTest() AS VOID
			// with @R other chars are appended, but only a single YN or TF flag is written. Other positions become a space
            SetCentury(TRUE)
			Assert.Equal("10/12/2010", Transform(2010.12.10,"@E"))
			Assert.Equal("20/11/2010", Transform(2010.11.20,"@E"))
			SetDateFormat("dd-mm-yyyy")
			Assert.Equal("20-11-2010", Transform(2010.11.20,"@D"))
			SetDateFormat("dd-mm-yy")
			Assert.Equal("20-11-10", Transform(2010.11.20,"@D"))

		[Fact, Trait("Category", "TransForm")];
		METHOD TransformStringTest() AS VOID
			Assert.Equal("ABC", Transform("abc", "@!"))
			Assert.Equal("AbC", Transform("abc", "!a!"))
			Assert.Equal("1234 AB", Transform("1234ab", "@R! 9999 AA"))
			Assert.Equal("1234 AB", Transform("1234ab", "@R 9999 !!"))

		[Fact, Trait("Category", "TransForm")];
		METHOD TransformLongTest() AS VOID
			SetDecimalSep('.')
			SetThousandSep(',')
			Assert.Equal("  1", Transform(1, "999"))
			Assert.Equal("123", Transform(123, "###"))
			Assert.Equal("**", Transform(123, "##"))
			Assert.Equal("**", Transform(123, "99"))
			Assert.Equal("(1)", Transform(-1, "@( 99"))
			Assert.Equal("(-1)", Transform(-1, "@( 999"))
			Assert.Equal("( -1)", Transform(-1, "@( 9999"))
			Assert.Equal("(-1)", Transform(-1, "@) 9999"))
			Assert.Equal(" (-1)", Transform(-1, "@) 99999"))
			Assert.Equal("   ", Transform(0, "@Z 999"))
			Assert.Equal(" -1 DB", Transform(-1, "@X 999"))
			Assert.Equal(" -1 DB", Transform(-1, "@XC 999"))
			Assert.Equal("  1 CR", Transform(1, "@XC 999"))
			Assert.Equal("  1 CR", Transform(1, "@C 999"))
			Assert.Equal("  0", Transform(0, "@C 999"))
			Assert.Equal("1,234", Transform(1234, "9,999"))
			SetDecimalSep(',')
			SetThousandSep('.')
			Assert.Equal("1.234", Transform(1234, "9,999"))

		[Fact, Trait("Category", "TransForm")];
		METHOD TransformFLoatTest() AS VOID
			SetDecimalSep('.')
			SetThousandSep(',')
			Assert.Equal("1.23", Transform(1.23, "9.99"))
			Assert.Equal("1,23", Transform(1.23, "@E 9.99"))
			Assert.Equal("*.**", Transform(12.34, "9.99"))
        [Fact, Trait("Category", "TransForm")];
        METHOD TransformNumericTest AS VOID
			SetDecimalSep(',')
			SetThousandSep('.')
            Assert.Equal("      2,45", Transform (    2.45 , "@R 999,999.99" ) )
            Assert.Equal("     -2,45", Transform (   -2.45 , "@R 999,999.99" ) )
            Assert.Equal("    124,00", Transform (     124 , "@R 999,999.99" )  )
            Assert.Equal("   -124,00", Transform (    -124 , "@R 999,999.99" )  )

        [Fact, Trait("Category", "Unformat")];
        METHOD UnformatCTest AS VOID
            Assert.Equal("8161XV", Unformat("8161 XV", "@R! 9999 AA","C"))
            Assert.Equal("8161 XV", Unformat("8161 XV", "@! 9999 AA","C"))

       [Fact, Trait("Category", "Unformat")];
        METHOD UnformatNTest AS VOID
			SetDecimalSep(',')
			SetThousandSep('.')
            Assert.Equal( 1.234d, (REAL8)(FLOAT) Unformat("1,234", "9.999","N"))
            Assert.Equal( 1234567.89d, (REAL8)(FLOAT) Unformat("1.234.567,89", "9,999,999.99","N"))

// some new failing tests:
	[Fact, Trait("Category", "TransForm")];
	METHOD IntLiteralTest() AS VOID
		LOCAL dec AS DWORD
		LOCAL thou AS DWORD

		dec := SetDecimalSep(Asc(","))
		thou := SetThousandSep(Asc("."))
		Assert.Equal(" 12.345,00" , Transform(12345.0, "999,999.99"))
		// this fails:
		Assert.Equal(" 12.345,00" , Transform(12345, "999,999.99"))

		SetDecimalSep(Asc("."))
		SetThousandSep(Asc(","))
		Assert.Equal(" 12,345.00" , Transform(12345.0, "999,999.99"))
		Assert.Equal(" 12,345.00" , Transform(12345, "999,999.99"))

		SetDecimalSep(dec)
		SetThousandSep(thou)
	RETURN

// Tests that need to be moved in separate files in VO.Tests:
	[Fact, Trait("Category", "StringEq")];
	METHOD StringEquality() AS VOID
		LOCAL c1,c2 AS STRING
		LOCAL u1,u2 AS USUAL
		LOCAL exact AS LOGIC
		u1 := c1 := "TESTLONG"
		u2 := c2 := "TEST"
		exact := SetExact( FALSE )

		Assert.Equal(TRUE, c1 = c2)
		Assert.Equal(TRUE, c1 != c2)

		Assert.Equal(TRUE, u1 = u2)
		Assert.Equal(FALSE, u1 != u2)

		SetExact( exact )
	RETURN

	[Fact, Trait("Category", "Str")];
	METHOD StrTests() AS VOID
		LOCAL exact,thou,digit,decimal,fixed_,digitfixed AS USUAL
		exact := SetDecimalSep(Asc("."))
		thou := SetThousandSep(Asc(","))
		digit := SetDigit(6)
		decimal := SetDecimal(3)
		fixed_ := SetFixed(FALSE)
		digitfixed := SetDigitFixed(FALSE)

		Assert.Equal( "     1.2"			, Str(1.2) )
		Assert.Equal( "    12.3"			, Str(12.3) )
		Assert.Equal( "    12.34"			, Str(12.34) )
		Assert.Equal( "   123.456"			, Str(123.456) )
		Assert.Equal( "  1234.567"			, Str(1234.567) )
		Assert.Equal( "  1234.5678"			, Str(1234.5678) )
		Assert.Equal( "  1234.5679012345"	, Str(1234.5679012345) )
		Assert.Equal( "123456.78901234568"	, Str(123456.78901234567) )
		Assert.Equal( "999999" , Str(999999) )
		Assert.Equal( "******" , Str(1000000) )

		SetDecimalSep(exact)
		SetThousandSep(thou)
		SetDigit(digit)
		SetDecimal(decimal)
		SetFixed(fixed_)
		SetDigitFixed(digitfixed)
	RETURN

	[Fact, Trait("Category", "Str")];
	METHOD Str_With_SetFixed_TRUE() AS VOID

	   SetDecimalSep(Asc("."))
	   SetThousandSep(Asc(","))
	   SetDecimal(3)
	   SetDigit(12)

	   SetFixed(TRUE)
	   SetDigitFixed(TRUE)

	   Assert.Equal( Str(12.34)            		, "          12.340")
	   Assert.Equal( Str1(12.34)          		, "          12.340")
	   Assert.Equal( Str(123.456)         		, "         123.456")
	   Assert.Equal( Str1(123.456)       		, "         123.456")
	   Assert.Equal( Str(1230.4567)         	, "        1230.457")
	   Assert.Equal( Str1(1230.4567)        	, "        1230.457")
	   Assert.Equal( Str(100000001234.4567)		, "100000001234.457")
	   Assert.Equal( Str1(100000001234.4567)	, "100000001234.457")
	   Assert.Equal( Str(1000000001234.4567)	, "****************")
	   Assert.Equal( Str1(1000000001234.4567)	, "****************")
	   Assert.Equal( Str(12.3)              	, "          12.300")
	   Assert.Equal( Str1(12.3)            		, "          12.300")
	   Assert.Equal( Str(12.34567)        	 	, "          12.346")
	   Assert.Equal( Str1(12.34567)        		, "          12.346")
	   Assert.Equal( Str(12.34 , 10, 2)    		, "     12.34")
	   Assert.Equal( Str(12.34 , 5, 2)     		, "12.34")
	   Assert.Equal( Str(12.34 , 4, 2)     		, "****") // VO wrong: 12.3
	   Assert.Equal( Str(12.34 , 4, 1)     		, "12.3")
	   Assert.Equal( Str(12.34 , 2, 1)     		, "**")
	   Assert.Equal( Str3(12.34 , 10, 2)   		, "     12.34")
	   Assert.Equal( Str3(12.34 , 5, 2)    		, "12.34")
	   Assert.Equal( Str3(12.34 , 4, 2)     	, "****") // VO wrong: 12.3
	   Assert.Equal( Str3(12.34 , 4, 1)     	, "12.3")
	   Assert.Equal( Str3(12.34 , 2, 1)    		, "**")
	   Assert.Equal( Str(-12.34)            	, "         -12.340")
	   Assert.Equal( Str1(-12.34)           	, "         -12.340")
	   Assert.Equal( Str(-12.3456)         		, "         -12.346")
	   Assert.Equal( Str1(-12.3456)         	, "         -12.346")
	   Assert.Equal( Str(-12.34 , 10, 2)    	, "    -12.34")
	   Assert.Equal( Str(-12.34 , 5, 2)     	, "*****")	 //VO wrong: -2.34
	   Assert.Equal( Str(-12.34 , 4, 2)     	, "****")    // VO wrong: -12.
	   Assert.Equal( Str(-12.34 , 4, 1)     	, "****")    //VO wrong: -2.3
       Assert.Equal( Str(-12.34 , 4, 0)     	, " -12")    //VO wrong: -2.3
	   Assert.Equal( Str(-12.34 , 2, 1)     	, "**")
	RETURN

	[Fact, Trait("Category", "Str")];
	METHOD Str_With_SetFixed_FALSE() AS VOID

	   SetDecimalSep(Asc("."))
	   SetThousandSep(Asc(","))
	   SetDecimal(3)
	   SetDigit(12)

	   SetFixed(FALSE)
	   SetDigitFixed(FALSE)

	   Assert.Equal( Str(12.34)            		, "          12.34")
	   Assert.Equal( Str1(12.34)          		, "          12.34")
	   Assert.Equal( Str(123.456)         		, "         123.456")
	   Assert.Equal( Str1(123.456)				, "         123.456")
	   Assert.Equal( Str(1230.4567)         	, "        1230.4567")
	   Assert.Equal( Str1(1230.4567)        	, "        1230.4567")
	   Assert.Equal( Str(100000001234.4567)		, "100000001234.4567")
	   Assert.Equal( Str1(100000001234.4567)	, "100000001234.4567")
	   Assert.Equal( Str(1000000001234.4567)	, "*****************")
	   Assert.Equal( Str1(1000000001234.4567)	, "*****************")
	   Assert.Equal( Str(12.3)              	, "          12.3")
	   Assert.Equal( Str1(12.3)            		, "          12.3")
	   Assert.Equal( Str(12.34567)         		, "          12.34567")
	   Assert.Equal( Str1(12.34567)        		, "          12.34567")
	   Assert.Equal( Str(12.34 , 10, 2)    		, "     12.34")
	   Assert.Equal( Str(12.34 , 5, 2)     		, "12.34")
	   Assert.Equal( Str(12.34 , 4, 2)     		, "****") // VO returns 12.3
	   Assert.Equal( Str(12.34 , 4, 1)     		, "12.3")
	   Assert.Equal( Str(12.34 , 2, 1)     		, "**")
	   Assert.Equal( Str3(12.34 , 10, 2)   		, "     12.34")
	   Assert.Equal( Str3(12.34 , 5, 2)    		, "12.34")
	   Assert.Equal( Str3(12.34 , 4, 2)     	, "****")   // VO 12.3
	   Assert.Equal( Str3(12.34 , 4, 1)     	, "12.3")
	   Assert.Equal( Str3(12.34 , 2, 1)    		, "**")
	   Assert.Equal( Str(-12.34)            	, "         -12.34")
	   Assert.Equal( Str1(-12.34)           	, "         -12.34")
	   Assert.Equal( Str(-12.3456)         		, "         -12.3456")
	   Assert.Equal( Str1(-12.3456)         	, "         -12.3456")
	   Assert.Equal( Str(-12.34 , 10, 2)    	, "    -12.34")
	   Assert.Equal( Str(-12.34 , 5, 2)     	, "*****")	 //VO: -2.34
	   Assert.Equal( Str(-12.34 , 4, 2)     	, "****")    // VO
	   Assert.Equal( Str(-12.34 , 4, 1)     	, "****")    //VO: -2.3
	   Assert.Equal( Str(-12.34 , 2, 1)     	, "**")

	[Fact, Trait("Category", "Val")];
	METHOD ValTests() AS VOID
		SetDecimalSep(',')
		SetThousandSep('.')
		Assert.Equal(123, (INT) Val("123") )
		Assert.Equal(123.456, (FLOAT) Val("123,456") )

		Assert.Equal(0, (INT) Val("") )

		Assert.Equal(0, (INT) Val("abc") )
		Assert.Equal(123, (INT) Val("123abc") )
		Assert.Equal(123, (INT) Val("123abc456") )
		Assert.Equal(123, (INT) Val("123abc456,789") )
		Assert.Equal(0, (INT) Val("abc123456,789") )
		Assert.Equal(255, (INT) Val("0xFF") )
		Assert.Equal(0xFFFF, (INT) Val("0xFFFF") )
		Assert.Equal(4294967295, (INT64) Val("0xFFFFFFFF") )
		Assert.Equal(11, (INT) Val("11L11") )

		Assert.Equal(1.0001, (FLOAT) Val("1,000.1") )
		Assert.Equal(1.0011, (FLOAT) Val("1,001.1") )
		SetDecimalSep('.')
		SetThousandSep(',')
		Assert.Equal(1000.1, (FLOAT) Val("1,000.1") )
		Assert.Equal(1001.1, (FLOAT) Val("1,001.1") )
	RETURN

	[Fact, Trait("Category", "SplitPath")];
	METHOD SplitPathTests() AS VOID
		LOCAL cDrive := "",cDir := "",cFile := "",cExt := "" AS STRING
		SplitPath("C:\folder\file.ext" ,  REF cDrive , REF cDir , REF cFile , REF cExt)

		Assert.Equal("C:" , cDrive)
		Assert.Equal("\folder\" , cDir)

		Assert.Equal("file" , cFile)
		Assert.Equal(".ext" , cExt)
	RETURN

	[Fact, Trait("Category", "SplitPathVO")];
	METHOD SplitPathVO() AS VOID
		LOCAL cPath ,cDrive ,cDir ,cFile ,cExt AS STRING
		LOCAL pszDrive, pszDir AS PSZ
		LOCAL pszFile, pszExt AS PSZ

		cPath := "C:\testfolder\testfile.prg"

		pszDrive := MemAlloc(2+1)
		pszDir   := MemAlloc(255+1)
		pszFile  := MemAlloc(255+1)
		pszExt   := MemAlloc(7+1)

		SplitPath( String2Psz(cPath), pszDrive, pszDir, pszFile, pszExt)

		cDrive := Psz2String(pszDrive)
		cDir   := Psz2String(pszDir)
		cFile  := Psz2String(pszFile)
		cExt   := Psz2String(pszExt)

		MemFree(pszDrive)
		MemFree(pszDir)
		MemFree(pszFile)
		MemFree(pszExt)

		Assert.Equal("\testfolder\" , cDir)
		Assert.Equal("\testfolder\" , cDir)
		Assert.Equal("testfile" , cFile)
		Assert.Equal(".prg" , cExt)
	RETURN

	[Fact, Trait("Category", "Directory")];
	METHOD DirectoryTests() AS VOID
		Assert.Equal(0u , ALen(Directory("K:\drive does not exist")))
		Assert.Equal(0u , ALen(Directory("K:\drive does not exist","V")))
		Assert.Equal(0u , ALen(Directory("C:\invalid:path")))
		Assert.Equal(1u , ALen(Directory("C:\invalid:path","V")))
		Assert.Equal(0u , ALen(Directory("C:invalid:path")))
		Assert.Equal(1u , ALen(Directory("C:invalid:path","V")))
		Assert.Equal(0u , ALen(Directory("N:")))
		Assert.Equal(0u , ALen(Directory("N:","V")))

	[Fact, Trait("Category", "Empty")];
	METHOD EmptyFuncTests() AS VOID
		Assert.True(Empty(0))
		Assert.True(Empty(FALSE))
		Assert.True(Empty(""))
		Assert.True(Empty(Chr(10) + Chr(9) + Chr(13)))
		Assert.True(Empty(NULL_SYMBOL))
		Assert.True(Empty(0000.00.00))
		Assert.True(Empty({}))

		Assert.True(Empty(NULL_PTR))
		LOCAL p AS PTR
		p := NULL_PTR
		Assert.True(Empty(p))

		Assert.True(Empty(NULL_PSZ))
		LOCAL z AS PSZ
		z := NULL_PSZ
		Assert.True(Empty(z))

		Assert.False(Empty(1))
		Assert.False(Empty(TRUE))
		Assert.False(Empty("a"))
		Assert.False(Empty(Chr(1)))
		Assert.False(Empty(#abc))
		Assert.False(Empty(2000.01.01))
		Assert.False(Empty({{}}))

		p := @p
		Assert.False(Empty(p))
		z := String2Psz("test")
		Assert.False(Empty(z))

	[Fact, Trait("Category", "AClone")];
	METHOD AClone_Tests() AS VOID
		Assert.True(ALen(AClone({1}))==1)
		Assert.True(ALen(AClone({1,2}))==2)
		Assert.True(  AClone({1,2})[2] ==2  )
		Assert.True(  AClone({1,{2,3},4})[2,2] == 3  )
		Assert.True(  AClone({1,{},4})[3] == 4  )

		Assert.True(AClone(NULL_ARRAY)==NULL_ARRAY)
		LOCAL aNull := NULL_ARRAY AS ARRAY
		Assert.True(AClone(aNull)==NULL_ARRAY)
		Assert.True(ALen(AClone({}))==0)
		Assert.True(ALen(AClone({{}}))==1)

	[Fact, Trait("Category", "ACloneShallow")];
	METHOD ACloneShallow_Tests() AS VOID
		Assert.True(ALen(ACloneShallow({1}))==1)
		Assert.True(ALen(ACloneShallow({1,2}))==2)
		Assert.True(  ACloneShallow({1,2})[2] ==2  )
		Assert.True(  ACloneShallow({1,{2,3},4})[2,2] == 3  )
		Assert.True(  ACloneShallow({1,{},4})[3] == 4  )

		LOCAL aSub AS ARRAY
		aSub := {1,2}
		Assert.True(  ACloneShallow({1,aSub,3})[2] == aSub  )

		Assert.True(ACloneShallow(NULL_ARRAY)==NULL_ARRAY)
		LOCAL aNull AS ARRAY
		aNull := NULL_ARRAY
		Assert.True(ACloneShallow(aNull)==NULL_ARRAY)
		Assert.True(ALen(ACloneShallow({}))==0)
		Assert.True(ALen(ACloneShallow({{}}))==1)

	[Fact, Trait("Category", "AClone")];
	METHOD ACloneWith_NULL_ARRAY_as_Elements() AS VOID
		Assert.True(  ALen(  AClone({NULL_ARRAY,NULL_ARRAY}) ) == 2  )
		Assert.True(  AClone({NULL_ARRAY})[1] == NULL_ARRAY  )

		Assert.True(  ALen(  ACloneShallow({NULL_ARRAY,NULL_ARRAY}) ) == 2  )
		Assert.True(  ACloneShallow({NULL_ARRAY})[1] == NULL_ARRAY  )

	[Fact, Trait("Category", "DBFFuncs")];
	METHOD DBCreate_Tests() AS VOID
		LOCAL aFields AS ARRAY
		aFields := {{"TEST","C",10,0}}

		LOCAL cFileName_WithExt AS STRING
		LOCAL cFileName_NoExt AS STRING
		cFileName_NoExt := "C:\TEMP\testdbf"
		cFileName_WithExt := cFileName_NoExt + ".dbf"
		IF System.IO.File.Exists(cFileName_WithExt)
			System.IO.File.Delete(cFileName_WithExt)
		END IF
		Assert.True(  DBCreate(cFileName_NoExt , aFields , "DBFNTX")  )
		Assert.True(  System.IO.File.Exists(cFileName_WithExt) )

		IF System.IO.File.Exists(cFileName_WithExt)
			System.IO.File.Delete(cFileName_WithExt)
		END IF
		Assert.True(  DBCreate(cFileName_WithExt , aFields , "DBFNTX")  )
		Assert.True(  System.IO.File.Exists(cFileName_WithExt) )

		cFileName_WithExt := cFileName_NoExt + ".none"
		IF System.IO.File.Exists(cFileName_WithExt)
			System.IO.File.Delete(cFileName_WithExt)
		END IF
		Assert.True(  DBCreate(cFileName_WithExt , aFields , "DBFNTX")  )
		Assert.True(  System.IO.File.Exists(cFileName_WithExt) )

	[Fact, Trait("Category", "DBFFuncs")];
	METHOD DBAppend_Exclusive() AS VOID
		LOCAL aFields AS ARRAY
		LOCAL cFileName AS STRING
		aFields := {{"TEST","C",10,0}}
		cFileName := "C:\TEMP\testdbf"

		Assert.True(  DBCreate(cFileName , aFields , "DBFNTX")  )
		Assert.True(  DBUseArea(,"DBFNTX",cFileName,,FALSE) )
		Assert.True(  RecCount() == 0 )
		Assert.True(  DBAppend() )
		FieldPut(1 , "test")
		Assert.True(  AllTrim(FieldGet(1)) == "test" )
		Assert.True(  DBCloseArea() )

	[Fact, Trait("Category", "DBFFuncs")];
	METHOD DBAppend_Shared() AS VOID
		LOCAL aFields AS ARRAY
		LOCAL cFileName AS STRING
		aFields := {{"TEST","C",10,0}}
		cFileName := "C:\TEMP\testdbf"

		Assert.True(  DBCreate(cFileName , aFields , "DBFNTX")  )
		Assert.True(  DBUseArea(,"DBFNTX",cFileName,,TRUE) )
		Assert.True(  RecCount() == 0 )
		Assert.True(  DBAppend() )
		FieldPut(1 , "test")
		Assert.True(  AllTrim(FieldGet(1)) == "test" )
		Assert.True(  DBCloseArea() )

	END CLASS
END NAMESPACE

CLASS TestClassParent
END CLASS
CLASS TestClassChild INHERIT TestClassParent
END CLASS

//
// Copyright (c) XSharp B.V.  All Rights Reserved.
// Licensed under the Apache License, Version 2.0.
// See License.txt in the project root for license information.
//
USING System
USING System.Collections.Generic
USING System.Linq
USING System.Text
USING XUnit
USING System.Globalization

BEGIN NAMESPACE XSharp.VO.Tests

	CLASS TransFormTests

		[Fact, Trait("Category", "TransForm")];
		METHOD TransformLogicalTest() AS VOID
			// with @R other chars are appended, but only a single YN or TF flag is written. Other positions become a space
			Assert.Equal("Y", Transform(TRUE, "Y"))
			Assert.Equal("N", Transform(FALSE, "Y"))
			Assert.Equal("T", Transform(TRUE, "L"))
			Assert.Equal("F", Transform(FALSE, "L"))
			Assert.Equal("T x", Transform(TRUE, "@R L x"))
			Assert.Equal("F x", Transform(FALSE, "@R L x"))
			Assert.Equal("Y x", Transform(TRUE, "@R YYx"))
			Assert.Equal("N x", Transform(FALSE, "@R YYx"))
			SetNatDll("French.DLL")
			Assert.Equal("O", Transform(TRUE, "Y"))
			Assert.Equal("N", Transform(FALSE, "Y"))
			Assert.Equal("T", Transform(TRUE, "L"))     // you would expect V but VO returns T
			Assert.Equal("F", Transform(FALSE, "L"))
			Assert.Equal("T x", Transform(TRUE, "@R L x"))  // you would expect V but VO returns T x
			Assert.Equal("F x", Transform(FALSE, "@R L x"))
			Assert.Equal("O x", Transform(TRUE, "@R YYx"))
			Assert.Equal("N x", Transform(FALSE, "@R YYx"))

		[Fact, Trait("Category", "TransForm")];
		METHOD TransformDateTest() AS VOID
			// with @R other chars are appended, but only a single YN or TF flag is written. Other positions become a space
            SetCentury(TRUE)
			Assert.Equal("10/12/2010", Transform(2010.12.10,"@E"))
			Assert.Equal("20/11/2010", Transform(2010.11.20,"@E"))
			SetDateFormat("dd-mm-yyyy")
			Assert.Equal("20-11-2010", Transform(2010.11.20,"@D"))
			SetDateFormat("dd-mm-yy")
			Assert.Equal("20-11-10", Transform(2010.11.20,"@D"))

		[Fact, Trait("Category", "TransForm")];
		METHOD TransformStringTest() AS VOID
			Assert.Equal("ABC", Transform("abc", "@!"))
			Assert.Equal("AbC", Transform("abc", "!a!"))
			Assert.Equal("1234 AB", Transform("1234ab", "@R! 9999 AA"))
			Assert.Equal("1234 AB", Transform("1234ab", "@R 9999 !!"))

		[Fact, Trait("Category", "TransForm")];
		METHOD TransformLongTest() AS VOID
			SetDecimalSep('.')
			SetThousandSep(',')
			Assert.Equal("  1", Transform(1, "999"))
			Assert.Equal("123", Transform(123, "###"))
			Assert.Equal("**", Transform(123, "##"))
			Assert.Equal("**", Transform(123, "99"))
			Assert.Equal("(1)", Transform(-1, "@( 99"))
			Assert.Equal("(-1)", Transform(-1, "@( 999"))
			Assert.Equal("( -1)", Transform(-1, "@( 9999"))
			Assert.Equal("(-1)", Transform(-1, "@) 9999"))
			Assert.Equal(" (-1)", Transform(-1, "@) 99999"))
			Assert.Equal("   ", Transform(0, "@Z 999"))
			Assert.Equal(" -1 DB", Transform(-1, "@X 999"))
			Assert.Equal(" -1 DB", Transform(-1, "@XC 999"))
			Assert.Equal("  1 CR", Transform(1, "@XC 999"))
			Assert.Equal("  1 CR", Transform(1, "@C 999"))
			Assert.Equal("  0", Transform(0, "@C 999"))
			Assert.Equal("1,234", Transform(1234, "9,999"))
			SetDecimalSep(',')
			SetThousandSep('.')
			Assert.Equal("1.234", Transform(1234, "9,999"))

		[Fact, Trait("Category", "TransForm")];
		METHOD TransformFLoatTest() AS VOID
			SetDecimalSep('.')
			SetThousandSep(',')
			Assert.Equal("1.23", Transform(1.23, "9.99"))
			Assert.Equal("1,23", Transform(1.23, "@E 9.99"))
			Assert.Equal("*.**", Transform(12.34, "9.99"))
        [Fact, Trait("Category", "TransForm")];
        METHOD TransformNumericTest AS VOID
			SetDecimalSep(',')
			SetThousandSep('.')
            Assert.Equal("      2,45", Transform (    2.45 , "@R 999,999.99" ) )
            Assert.Equal("     -2,45", Transform (   -2.45 , "@R 999,999.99" ) )
            Assert.Equal("    124,00", Transform (     124 , "@R 999,999.99" )  )
            Assert.Equal("   -124,00", Transform (    -124 , "@R 999,999.99" )  )

        [Fact, Trait("Category", "Unformat")];
        METHOD UnformatCTest AS VOID
            Assert.Equal("8161XV", Unformat("8161 XV", "@R! 9999 AA","C"))
            Assert.Equal("8161 XV", Unformat("8161 XV", "@! 9999 AA","C"))

       [Fact, Trait("Category", "Unformat")];
        METHOD UnformatNTest AS VOID
			SetDecimalSep(',')
			SetThousandSep('.')
            Assert.Equal( 1.234d, (REAL8)(FLOAT) Unformat("1,234", "9.999","N"))
            Assert.Equal( 1234567.89d, (REAL8)(FLOAT) Unformat("1.234.567,89", "9,999,999.99","N"))

// some new failing tests:
	[Fact, Trait("Category", "TransForm")];
	METHOD IntLiteralTest() AS VOID
		LOCAL dec AS DWORD
		LOCAL thou AS DWORD

		dec := SetDecimalSep(Asc(","))
		thou := SetThousandSep(Asc("."))
		Assert.Equal(" 12.345,00" , Transform(12345.0, "999,999.99"))
		// this fails:
		Assert.Equal(" 12.345,00" , Transform(12345, "999,999.99"))

		SetDecimalSep(Asc("."))
		SetThousandSep(Asc(","))
		Assert.Equal(" 12,345.00" , Transform(12345.0, "999,999.99"))
		Assert.Equal(" 12,345.00" , Transform(12345, "999,999.99"))

		SetDecimalSep(dec)
		SetThousandSep(thou)
	RETURN

// Tests that need to be moved in separate files in VO.Tests:
	[Fact, Trait("Category", "StringEq")];
	METHOD StringEquality() AS VOID
		LOCAL c1,c2 AS STRING
		LOCAL u1,u2 AS USUAL
		LOCAL exact AS LOGIC
		u1 := c1 := "TESTLONG"
		u2 := c2 := "TEST"
		exact := SetExact( FALSE )

		Assert.Equal(TRUE, c1 = c2)
		Assert.Equal(TRUE, c1 != c2)

		Assert.Equal(TRUE, u1 = u2)
		Assert.Equal(FALSE, u1 != u2)

		SetExact( exact )
	RETURN

	[Fact, Trait("Category", "Str")];
	METHOD StrTests() AS VOID
		LOCAL exact,thou,digit,decimal,fixed_,digitfixed AS USUAL
		exact := SetDecimalSep(Asc("."))
		thou := SetThousandSep(Asc(","))
		digit := SetDigit(6)
		decimal := SetDecimal(3)
		fixed_ := SetFixed(FALSE)
		digitfixed := SetDigitFixed(FALSE)

		Assert.Equal( "     1.2"			, Str(1.2) )
		Assert.Equal( "    12.3"			, Str(12.3) )
		Assert.Equal( "    12.34"			, Str(12.34) )
		Assert.Equal( "   123.456"			, Str(123.456) )
		Assert.Equal( "  1234.567"			, Str(1234.567) )
		Assert.Equal( "  1234.5678"			, Str(1234.5678) )
		Assert.Equal( "  1234.5679012345"	, Str(1234.5679012345) )
		Assert.Equal( "123456.78901234568"	, Str(123456.78901234567) )
		Assert.Equal( "999999" , Str(999999) )
		Assert.Equal( "******" , Str(1000000) )

		SetDecimalSep(exact)
		SetThousandSep(thou)
		SetDigit(digit)
		SetDecimal(decimal)
		SetFixed(fixed_)
		SetDigitFixed(digitfixed)
	RETURN

	[Fact, Trait("Category", "Str")];
	METHOD Str_With_SetFixed_TRUE() AS VOID

	   SetDecimalSep(Asc("."))
	   SetThousandSep(Asc(","))
	   SetDecimal(3)
	   SetDigit(12)

	   SetFixed(TRUE)
	   SetDigitFixed(TRUE)

	   Assert.Equal( Str(12.34)            		, "          12.340")
	   Assert.Equal( Str1(12.34)          		, "          12.340")
	   Assert.Equal( Str(123.456)         		, "         123.456")
	   Assert.Equal( Str1(123.456)       		, "         123.456")
	   Assert.Equal( Str(1230.4567)         	, "        1230.457")
	   Assert.Equal( Str1(1230.4567)        	, "        1230.457")
	   Assert.Equal( Str(100000001234.4567)		, "100000001234.457")
	   Assert.Equal( Str1(100000001234.4567)	, "100000001234.457")
	   Assert.Equal( Str(1000000001234.4567)	, "****************")
	   Assert.Equal( Str1(1000000001234.4567)	, "****************")
	   Assert.Equal( Str(12.3)              	, "          12.300")
	   Assert.Equal( Str1(12.3)            		, "          12.300")
	   Assert.Equal( Str(12.34567)        	 	, "          12.346")
	   Assert.Equal( Str1(12.34567)        		, "          12.346")
	   Assert.Equal( Str(12.34 , 10, 2)    		, "     12.34")
	   Assert.Equal( Str(12.34 , 5, 2)     		, "12.34")
	   Assert.Equal( Str(12.34 , 4, 2)     		, "****") // VO wrong: 12.3
	   Assert.Equal( Str(12.34 , 4, 1)     		, "12.3")
	   Assert.Equal( Str(12.34 , 2, 1)     		, "**")
	   Assert.Equal( Str3(12.34 , 10, 2)   		, "     12.34")
	   Assert.Equal( Str3(12.34 , 5, 2)    		, "12.34")
	   Assert.Equal( Str3(12.34 , 4, 2)     	, "****") // VO wrong: 12.3
	   Assert.Equal( Str3(12.34 , 4, 1)     	, "12.3")
	   Assert.Equal( Str3(12.34 , 2, 1)    		, "**")
	   Assert.Equal( Str(-12.34)            	, "         -12.340")
	   Assert.Equal( Str1(-12.34)           	, "         -12.340")
	   Assert.Equal( Str(-12.3456)         		, "         -12.346")
	   Assert.Equal( Str1(-12.3456)         	, "         -12.346")
	   Assert.Equal( Str(-12.34 , 10, 2)    	, "    -12.34")
	   Assert.Equal( Str(-12.34 , 5, 2)     	, "*****")	 //VO wrong: -2.34
	   Assert.Equal( Str(-12.34 , 4, 2)     	, "****")    // VO wrong: -12.
	   Assert.Equal( Str(-12.34 , 4, 1)     	, "****")    //VO wrong: -2.3
       Assert.Equal( Str(-12.34 , 4, 0)     	, " -12")    //VO wrong: -2.3
	   Assert.Equal( Str(-12.34 , 2, 1)     	, "**")
	RETURN

	[Fact, Trait("Category", "Str")];
	METHOD Str_With_SetFixed_FALSE() AS VOID

	   SetDecimalSep(Asc("."))
	   SetThousandSep(Asc(","))
	   SetDecimal(3)
	   SetDigit(12)

	   SetFixed(FALSE)
	   SetDigitFixed(FALSE)

	   Assert.Equal( Str(12.34)            		, "          12.34")
	   Assert.Equal( Str1(12.34)          		, "          12.34")
	   Assert.Equal( Str(123.456)         		, "         123.456")
	   Assert.Equal( Str1(123.456)				, "         123.456")
	   Assert.Equal( Str(1230.4567)         	, "        1230.4567")
	   Assert.Equal( Str1(1230.4567)        	, "        1230.4567")
	   Assert.Equal( Str(100000001234.4567)		, "100000001234.4567")
	   Assert.Equal( Str1(100000001234.4567)	, "100000001234.4567")
	   Assert.Equal( Str(1000000001234.4567)	, "*****************")
	   Assert.Equal( Str1(1000000001234.4567)	, "*****************")
	   Assert.Equal( Str(12.3)              	, "          12.3")
	   Assert.Equal( Str1(12.3)            		, "          12.3")
	   Assert.Equal( Str(12.34567)         		, "          12.34567")
	   Assert.Equal( Str1(12.34567)        		, "          12.34567")
	   Assert.Equal( Str(12.34 , 10, 2)    		, "     12.34")
	   Assert.Equal( Str(12.34 , 5, 2)     		, "12.34")
	   Assert.Equal( Str(12.34 , 4, 2)     		, "****") // VO returns 12.3
	   Assert.Equal( Str(12.34 , 4, 1)     		, "12.3")
	   Assert.Equal( Str(12.34 , 2, 1)     		, "**")
	   Assert.Equal( Str3(12.34 , 10, 2)   		, "     12.34")
	   Assert.Equal( Str3(12.34 , 5, 2)    		, "12.34")
	   Assert.Equal( Str3(12.34 , 4, 2)     	, "****")   // VO 12.3
	   Assert.Equal( Str3(12.34 , 4, 1)     	, "12.3")
	   Assert.Equal( Str3(12.34 , 2, 1)    		, "**")
	   Assert.Equal( Str(-12.34)            	, "         -12.34")
	   Assert.Equal( Str1(-12.34)           	, "         -12.34")
	   Assert.Equal( Str(-12.3456)         		, "         -12.3456")
	   Assert.Equal( Str1(-12.3456)         	, "         -12.3456")
	   Assert.Equal( Str(-12.34 , 10, 2)    	, "    -12.34")
	   Assert.Equal( Str(-12.34 , 5, 2)     	, "*****")	 //VO: -2.34
	   Assert.Equal( Str(-12.34 , 4, 2)     	, "****")    // VO
	   Assert.Equal( Str(-12.34 , 4, 1)     	, "****")    //VO: -2.3
	   Assert.Equal( Str(-12.34 , 2, 1)     	, "**")

	[Fact, Trait("Category", "Val")];
	METHOD ValTests() AS VOID
		SetDecimalSep(',')
		SetThousandSep('.')
		Assert.Equal(123, (INT) Val("123") )
		Assert.Equal(123.456, (FLOAT) Val("123,456") )

		Assert.Equal(0, (INT) Val("") )

		Assert.Equal(0, (INT) Val("abc") )
		Assert.Equal(123, (INT) Val("123abc") )
		Assert.Equal(123, (INT) Val("123abc456") )
		Assert.Equal(123, (INT) Val("123abc456,789") )
		Assert.Equal(0, (INT) Val("abc123456,789") )
		Assert.Equal(255, (INT) Val("0xFF") )
		Assert.Equal(0xFFFF, (INT) Val("0xFFFF") )
		Assert.Equal(4294967295, (INT64) Val("0xFFFFFFFF") )
		Assert.Equal(11, (INT) Val("11L11") )

		Assert.Equal(1.0001, (FLOAT) Val("1,000.1") )
		Assert.Equal(1.0011, (FLOAT) Val("1,001.1") )
		SetDecimalSep('.')
		SetThousandSep(',')
		Assert.Equal(1000.1, (FLOAT) Val("1,000.1") )
		Assert.Equal(1001.1, (FLOAT) Val("1,001.1") )
	RETURN

	[Fact, Trait("Category", "SplitPath")];
	METHOD SplitPathTests() AS VOID
		LOCAL cDrive := "",cDir := "",cFile := "",cExt := "" AS STRING
		SplitPath("C:\folder\file.ext" ,  REF cDrive , REF cDir , REF cFile , REF cExt)

		Assert.Equal("C:" , cDrive)
		Assert.Equal("\folder\" , cDir)

		Assert.Equal("file" , cFile)
		Assert.Equal(".ext" , cExt)
	RETURN

	[Fact, Trait("Category", "SplitPathVO")];
	METHOD SplitPathVO() AS VOID
		LOCAL cPath ,cDrive ,cDir ,cFile ,cExt AS STRING
		LOCAL pszDrive, pszDir AS PSZ
		LOCAL pszFile, pszExt AS PSZ

		cPath := "C:\testfolder\testfile.prg"

		pszDrive := MemAlloc(2+1)
		pszDir   := MemAlloc(255+1)
		pszFile  := MemAlloc(255+1)
		pszExt   := MemAlloc(7+1)

		SplitPath( String2Psz(cPath), pszDrive, pszDir, pszFile, pszExt)

		cDrive := Psz2String(pszDrive)
		cDir   := Psz2String(pszDir)
		cFile  := Psz2String(pszFile)
		cExt   := Psz2String(pszExt)

		MemFree(pszDrive)
		MemFree(pszDir)
		MemFree(pszFile)
		MemFree(pszExt)

		Assert.Equal("\testfolder\" , cDir)
		Assert.Equal("\testfolder\" , cDir)
		Assert.Equal("testfile" , cFile)
		Assert.Equal(".prg" , cExt)
	RETURN

	[Fact, Trait("Category", "Directory")];
	METHOD DirectoryTests() AS VOID
		Assert.Equal(0u , ALen(Directory("K:\drive does not exist")))
		Assert.Equal(0u , ALen(Directory("K:\drive does not exist","V")))
		Assert.Equal(0u , ALen(Directory("C:\invalid:path")))
		Assert.Equal(1u , ALen(Directory("C:\invalid:path","V")))
		Assert.Equal(0u , ALen(Directory("C:invalid:path")))
		Assert.Equal(1u , ALen(Directory("C:invalid:path","V")))
		Assert.Equal(0u , ALen(Directory("N:")))
		Assert.Equal(0u , ALen(Directory("N:","V")))

	[Fact, Trait("Category", "Empty")];
	METHOD EmptyFuncTests() AS VOID
		Assert.True(Empty(0))
		Assert.True(Empty(FALSE))
		Assert.True(Empty(""))
		Assert.True(Empty(Chr(10) + Chr(9) + Chr(13)))
		Assert.True(Empty(NULL_SYMBOL))
		Assert.True(Empty(0000.00.00))
		Assert.True(Empty({}))

		Assert.True(Empty(NULL_PTR))
		LOCAL p AS PTR
		p := NULL_PTR
		Assert.True(Empty(p))

		Assert.True(Empty(NULL_PSZ))
		LOCAL z AS PSZ
		z := NULL_PSZ
		Assert.True(Empty(z))

		Assert.False(Empty(1))
		Assert.False(Empty(TRUE))
		Assert.False(Empty("a"))
		Assert.False(Empty(Chr(1)))
		Assert.False(Empty(#abc))
		Assert.False(Empty(2000.01.01))
		Assert.False(Empty({{}}))

		p := @p
		Assert.False(Empty(p))
		z := String2Psz("test")
		Assert.False(Empty(z))

	[Fact, Trait("Category", "AClone")];
	METHOD AClone_Tests() AS VOID
		Assert.True(ALen(AClone({1}))==1)
		Assert.True(ALen(AClone({1,2}))==2)
		Assert.True(  AClone({1,2})[2] ==2  )
		Assert.True(  AClone({1,{2,3},4})[2,2] == 3  )
		Assert.True(  AClone({1,{},4})[3] == 4  )

		Assert.True(AClone(NULL_ARRAY)==NULL_ARRAY)
		LOCAL aNull := NULL_ARRAY AS ARRAY
		Assert.True(AClone(aNull)==NULL_ARRAY)
		Assert.True(ALen(AClone({}))==0)
		Assert.True(ALen(AClone({{}}))==1)

	[Fact, Trait("Category", "ACloneShallow")];
	METHOD ACloneShallow_Tests() AS VOID
		Assert.True(ALen(ACloneShallow({1}))==1)
		Assert.True(ALen(ACloneShallow({1,2}))==2)
		Assert.True(  ACloneShallow({1,2})[2] ==2  )
		Assert.True(  ACloneShallow({1,{2,3},4})[2,2] == 3  )
		Assert.True(  ACloneShallow({1,{},4})[3] == 4  )

		LOCAL aSub AS ARRAY
		aSub := {1,2}
		Assert.True(  ACloneShallow({1,aSub,3})[2] == aSub  )

		Assert.True(ACloneShallow(NULL_ARRAY)==NULL_ARRAY)
		LOCAL aNull AS ARRAY
		aNull := NULL_ARRAY
		Assert.True(ACloneShallow(aNull)==NULL_ARRAY)
		Assert.True(ALen(ACloneShallow({}))==0)
		Assert.True(ALen(ACloneShallow({{}}))==1)

	[Fact, Trait("Category", "AClone")];
	METHOD ACloneWith_NULL_ARRAY_as_Elements() AS VOID
		Assert.True(  ALen(  AClone({NULL_ARRAY,NULL_ARRAY}) ) == 2  )
		Assert.True(  AClone({NULL_ARRAY})[1] == NULL_ARRAY  )

		Assert.True(  ALen(  ACloneShallow({NULL_ARRAY,NULL_ARRAY}) ) == 2  )
		Assert.True(  ACloneShallow({NULL_ARRAY})[1] == NULL_ARRAY  )

	[Fact, Trait("Category", "DBFFuncs")];
	METHOD DBCreate_Tests() AS VOID
		LOCAL aFields AS ARRAY
		aFields := {{"TEST","C",10,0}}

		LOCAL cFileName_WithExt AS STRING
		LOCAL cFileName_NoExt AS STRING
		cFileName_NoExt := "C:\TEMP\testdbf"
		cFileName_WithExt := cFileName_NoExt + ".dbf"
		IF System.IO.File.Exists(cFileName_WithExt)
			System.IO.File.Delete(cFileName_WithExt)
		END IF
		Assert.True(  DBCreate(cFileName_NoExt , aFields , "DBFNTX")  )
		Assert.True(  System.IO.File.Exists(cFileName_WithExt) )

		IF System.IO.File.Exists(cFileName_WithExt)
			System.IO.File.Delete(cFileName_WithExt)
		END IF
		Assert.True(  DBCreate(cFileName_WithExt , aFields , "DBFNTX")  )
		Assert.True(  System.IO.File.Exists(cFileName_WithExt) )
	END CLASS
END NAMESPACE

CLASS TestClassParent
END CLASS
CLASS TestClassChild INHERIT TestClassParent
END CLASS


QtSvg: module updated to use ISOPTQOBJECT

/*

  Qt5xHb - bibliotecas de ligao entre Harbour/xHarbour e Qt Framework 5

  Copyright (C) 2012-2017 Marcos Antonio Gambeta <marcosgambeta@uol.com.br>

*/

#include "hbclass.ch"
#include "qt5xhb_clsid.ch"

#ifndef QT5XHB_NO_REQUESTS
REQUEST QRECTF
REQUEST QSIZE
REQUEST QMATRIX
REQUEST QRECT
#endif

CLASS QSvgRenderer INHERIT QObject

   DATA class_id INIT Class_Id_QSvgRenderer
   DATA class_flags INIT 1
   DATA self_destruction INIT .F.

   METHOD new1
   METHOD new2
   METHOD new3
   METHOD new4
   METHOD new
   METHOD delete
   METHOD animated
   METHOD boundsOnElement
   METHOD defaultSize
   METHOD elementExists
   METHOD framesPerSecond
   METHOD isValid
   METHOD matrixForElement
   METHOD setFramesPerSecond
   METHOD setViewBox1
   METHOD setViewBox2
   METHOD setViewBox
   METHOD viewBox
   METHOD viewBoxF
   METHOD load1
   METHOD load2
   METHOD load3
   METHOD load
   METHOD render1
   METHOD render2
   METHOD render3
   METHOD render

   METHOD onRepaintNeeded

   DESTRUCTOR destroyObject

END CLASS

PROCEDURE destroyObject () CLASS QSvgRenderer
   IF ::self_destruction
      ::delete()
   ENDIF
RETURN

#pragma BEGINDUMP

#include <Qt>

#ifndef __XHARBOUR__
#include <QSvgRenderer>
#endif

#include "qt5xhb_common.h"
#include "qt5xhb_clsid.h"
#include "qt5xhb_utils.h"

#ifdef __XHARBOUR__
#include <QSvgRenderer>
#endif

/*
QSvgRenderer ( QObject * parent = 0 )
*/
HB_FUNC_STATIC( QSVGRENDERER_NEW1 )
{
  QObject * par1 = ISNIL(1)? 0 : (QObject *) _qt5xhb_itemGetPtr(1);
  QSvgRenderer * o = new QSvgRenderer ( par1 );
  _qt5xhb_storePointerAndFlag( o, false );
}

/*
QSvgRenderer ( const QString & filename, QObject * parent = 0 )
*/
HB_FUNC_STATIC( QSVGRENDERER_NEW2 )
{
  QString par1 = QLatin1String( hb_parc(1) );
  QObject * par2 = ISNIL(2)? 0 : (QObject *) _qt5xhb_itemGetPtr(2);
  QSvgRenderer * o = new QSvgRenderer ( par1, par2 );
  _qt5xhb_storePointerAndFlag( o, false );
}

/*
QSvgRenderer ( const QByteArray & contents, QObject * parent = 0 )
*/
HB_FUNC_STATIC( QSVGRENDERER_NEW3 )
{
  QByteArray * par1 = (QByteArray *) _qt5xhb_itemGetPtr(1);
  QObject * par2 = ISNIL(2)? 0 : (QObject *) _qt5xhb_itemGetPtr(2);
  QSvgRenderer * o = new QSvgRenderer ( *par1, par2 );
  _qt5xhb_storePointerAndFlag( o, false );
}

/*
QSvgRenderer ( QXmlStreamReader * contents, QObject * parent = 0 )
*/
HB_FUNC_STATIC( QSVGRENDERER_NEW4 )
{
  QXmlStreamReader * par1 = (QXmlStreamReader *) _qt5xhb_itemGetPtr(1);
  QObject * par2 = ISNIL(2)? 0 : (QObject *) _qt5xhb_itemGetPtr(2);
  QSvgRenderer * o = new QSvgRenderer ( par1, par2 );
  _qt5xhb_storePointerAndFlag( o, false );
}

//[1]QSvgRenderer ( QObject * parent = 0 )
//[2]QSvgRenderer ( const QString & filename, QObject * parent = 0 )
//[3]QSvgRenderer ( const QByteArray & contents, QObject * parent = 0 )
//[4]QSvgRenderer ( QXmlStreamReader * contents, QObject * parent = 0 )

HB_FUNC_STATIC( QSVGRENDERER_NEW )
{
  if( ISBETWEEN(0,1) && ISOPTQOBJECT(1) )
  {
    HB_FUNC_EXEC( QSVGRENDERER_NEW1 );
  }
  else if( ISBETWEEN(1,2) && ISCHAR(1) && ISOPTQOBJECT(2) )
  {
    HB_FUNC_EXEC( QSVGRENDERER_NEW2 );
  }
  else if( ISBETWEEN(1,2) && ISQBYTEARRAY(1) && ISOPTQOBJECT(2) )
  {
    HB_FUNC_EXEC( QSVGRENDERER_NEW3 );
  }
  else if( ISBETWEEN(1,2) && ISQXMLSTREAMREADER(1) && ISOPTQOBJECT(2) )
  {
    HB_FUNC_EXEC( QSVGRENDERER_NEW4 );
  }
  else
  {
    hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
  }
}

HB_FUNC_STATIC( QSVGRENDERER_DELETE )
{
  QSvgRenderer * obj = (QSvgRenderer *) hb_itemGetPtr( hb_objSendMsg( hb_stackSelfItem(), "POINTER", 0 ) );
  if( obj )
  {
    delete obj;
    obj = NULL;
    PHB_ITEM self = hb_stackSelfItem();
    PHB_ITEM ptr = hb_itemPutPtr( NULL, NULL );
    hb_objSendMsg( self, "_pointer", 1, ptr );
    hb_itemRelease( ptr );
  }
  hb_itemReturn( hb_stackSelfItem() );
}

/*
bool animated () const
*/
HB_FUNC_STATIC( QSVGRENDERER_ANIMATED )
{
  QSvgRenderer * obj = (QSvgRenderer *) _qt5xhb_itemGetPtrStackSelfItem();
  if( obj )
  {
    hb_retl( obj->animated (  ) );
  }
}

/*
QRectF boundsOnElement ( const QString & id ) const
*/
HB_FUNC_STATIC( QSVGRENDERER_BOUNDSONELEMENT )
{
  QSvgRenderer * obj = (QSvgRenderer *) _qt5xhb_itemGetPtrStackSelfItem();
  if( obj )
  {
    QString par1 = QLatin1String( hb_parc(1) );
    QRectF * ptr = new QRectF( obj->boundsOnElement ( par1 ) );
    _qt5xhb_createReturnClass ( ptr, "QRECTF", true );
  }
}

/*
QSize defaultSize () const
*/
HB_FUNC_STATIC( QSVGRENDERER_DEFAULTSIZE )
{
  QSvgRenderer * obj = (QSvgRenderer *) _qt5xhb_itemGetPtrStackSelfItem();
  if( obj )
  {
    QSize * ptr = new QSize( obj->defaultSize (  ) );
    _qt5xhb_createReturnClass ( ptr, "QSIZE", true );
  }
}

/*
bool elementExists ( const QString & id ) const
*/
HB_FUNC_STATIC( QSVGRENDERER_ELEMENTEXISTS )
{
  QSvgRenderer * obj = (QSvgRenderer *) _qt5xhb_itemGetPtrStackSelfItem();
  if( obj )
  {
    QString par1 = QLatin1String( hb_parc(1) );
    hb_retl( obj->elementExists ( par1 ) );
  }
}

/*
int framesPerSecond () const
*/
HB_FUNC_STATIC( QSVGRENDERER_FRAMESPERSECOND )
{
  QSvgRenderer * obj = (QSvgRenderer *) _qt5xhb_itemGetPtrStackSelfItem();
  if( obj )
  {
    hb_retni( obj->framesPerSecond (  ) );
  }
}

/*
bool isValid () const
*/
HB_FUNC_STATIC( QSVGRENDERER_ISVALID )
{
  QSvgRenderer * obj = (QSvgRenderer *) _qt5xhb_itemGetPtrStackSelfItem();
  if( obj )
  {
    hb_retl( obj->isValid (  ) );
  }
}

/*
QMatrix matrixForElement ( const QString & id ) const
*/
HB_FUNC_STATIC( QSVGRENDERER_MATRIXFORELEMENT )
{
  QSvgRenderer * obj = (QSvgRenderer *) _qt5xhb_itemGetPtrStackSelfItem();
  if( obj )
  {
    QString par1 = QLatin1String( hb_parc(1) );
    QMatrix * ptr = new QMatrix( obj->matrixForElement ( par1 ) );
    _qt5xhb_createReturnClass ( ptr, "QMATRIX" );
  }
}

/*
void setFramesPerSecond ( int num )
*/
HB_FUNC_STATIC( QSVGRENDERER_SETFRAMESPERSECOND )
{
  QSvgRenderer * obj = (QSvgRenderer *) _qt5xhb_itemGetPtrStackSelfItem();
  if( obj )
  {
    obj->setFramesPerSecond ( (int) hb_parni(1) );
  }
  hb_itemReturn( hb_stackSelfItem() );
}

/*
void setViewBox ( const QRect & viewbox )
*/
HB_FUNC_STATIC( QSVGRENDERER_SETVIEWBOX1 )
{
  QSvgRenderer * obj = (QSvgRenderer *) _qt5xhb_itemGetPtrStackSelfItem();
  if( obj )
  {
    QRect * par1 = (QRect *) _qt5xhb_itemGetPtr(1);
    obj->setViewBox ( *par1 );
  }
  hb_itemReturn( hb_stackSelfItem() );
}

/*
void setViewBox ( const QRectF & viewbox )
*/
HB_FUNC_STATIC( QSVGRENDERER_SETVIEWBOX2 )
{
  QSvgRenderer * obj = (QSvgRenderer *) _qt5xhb_itemGetPtrStackSelfItem();
  if( obj )
  {
    QRectF * par1 = (QRectF *) _qt5xhb_itemGetPtr(1);
    obj->setViewBox ( *par1 );
  }
  hb_itemReturn( hb_stackSelfItem() );
}

//[1]void setViewBox ( const QRect & viewbox )
//[2]void setViewBox ( const QRectF & viewbox )

HB_FUNC_STATIC( QSVGRENDERER_SETVIEWBOX )
{
  if( ISNUMPAR(1) && ISQRECT(1) )
  {
    HB_FUNC_EXEC( QSVGRENDERER_SETVIEWBOX1 );
  }
  else if( ISNUMPAR(1) && ISQRECTF(1) )
  {
    HB_FUNC_EXEC( QSVGRENDERER_SETVIEWBOX2 );
  }
  else
  {
    hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
  }
}

/*
QRect viewBox () const
*/
HB_FUNC_STATIC( QSVGRENDERER_VIEWBOX )
{
  QSvgRenderer * obj = (QSvgRenderer *) _qt5xhb_itemGetPtrStackSelfItem();
  if( obj )
  {
    QRect * ptr = new QRect( obj->viewBox (  ) );
    _qt5xhb_createReturnClass ( ptr, "QRECT", true );
  }
}

/*
QRectF viewBoxF () const
*/
HB_FUNC_STATIC( QSVGRENDERER_VIEWBOXF )
{
  QSvgRenderer * obj = (QSvgRenderer *) _qt5xhb_itemGetPtrStackSelfItem();
  if( obj )
  {
    QRectF * ptr = new QRectF( obj->viewBoxF (  ) );
    _qt5xhb_createReturnClass ( ptr, "QRECTF", true );
  }
}

/*
bool load ( const QString & filename )
*/
HB_FUNC_STATIC( QSVGRENDERER_LOAD1 )
{
  QSvgRenderer * obj = (QSvgRenderer *) _qt5xhb_itemGetPtrStackSelfItem();
  if( obj )
  {
    QString par1 = QLatin1String( hb_parc(1) );
    hb_retl( obj->load ( par1 ) );
  }
}

/*
bool load ( const QByteArray & contents )
*/
HB_FUNC_STATIC( QSVGRENDERER_LOAD2 )
{
  QSvgRenderer * obj = (QSvgRenderer *) _qt5xhb_itemGetPtrStackSelfItem();
  if( obj )
  {
    QByteArray * par1 = (QByteArray *) _qt5xhb_itemGetPtr(1);
    hb_retl( obj->load ( *par1 ) );
  }
}

/*
bool load ( QXmlStreamReader * contents )
*/
HB_FUNC_STATIC( QSVGRENDERER_LOAD3 )
{
  QSvgRenderer * obj = (QSvgRenderer *) _qt5xhb_itemGetPtrStackSelfItem();
  if( obj )
  {
    QXmlStreamReader * par1 = (QXmlStreamReader *) _qt5xhb_itemGetPtr(1);
    hb_retl( obj->load ( par1 ) );
  }
}

//[1]bool load ( const QString & filename )
//[2]bool load ( const QByteArray & contents )
//[3]bool load ( QXmlStreamReader * contents )

HB_FUNC_STATIC( QSVGRENDERER_LOAD )
{
  if( ISNUMPAR(1) && ISCHAR(1) )
  {
    HB_FUNC_EXEC( QSVGRENDERER_LOAD1 );
  }
  else if( ISNUMPAR(1) && ISQBYTEARRAY(1) )
  {
    HB_FUNC_EXEC( QSVGRENDERER_LOAD2 );
  }
  else if( ISNUMPAR(1) && ISQXMLSTREAMREADER(1) )
  {
    HB_FUNC_EXEC( QSVGRENDERER_LOAD3 );
  }
  else
  {
    hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
  }
}

/*
void render ( QPainter * painter )
*/
HB_FUNC_STATIC( QSVGRENDERER_RENDER1 )
{
  QSvgRenderer * obj = (QSvgRenderer *) _qt5xhb_itemGetPtrStackSelfItem();
  if( obj )
  {
    QPainter * par1 = (QPainter *) _qt5xhb_itemGetPtr(1);
    obj->render ( par1 );
  }
  hb_itemReturn( hb_stackSelfItem() );
}

/*
void render ( QPainter * painter, const QRectF & bounds )
*/
HB_FUNC_STATIC( QSVGRENDERER_RENDER2 )
{
  QSvgRenderer * obj = (QSvgRenderer *) _qt5xhb_itemGetPtrStackSelfItem();
  if( obj )
  {
    QPainter * par1 = (QPainter *) _qt5xhb_itemGetPtr(1);
    QRectF * par2 = (QRectF *) _qt5xhb_itemGetPtr(2);
    obj->render ( par1, *par2 );
  }
  hb_itemReturn( hb_stackSelfItem() );
}

/*
void render ( QPainter * painter, const QString & elementId, const QRectF & bounds = QRectF() )
*/
HB_FUNC_STATIC( QSVGRENDERER_RENDER3 )
{
  QSvgRenderer * obj = (QSvgRenderer *) _qt5xhb_itemGetPtrStackSelfItem();
  if( obj )
  {
    QPainter * par1 = (QPainter *) _qt5xhb_itemGetPtr(1);
    QString par2 = QLatin1String( hb_parc(2) );
    QRectF par3 = ISNIL(3)? QRectF() : *(QRectF *) _qt5xhb_itemGetPtr(3);
    obj->render ( par1, par2, par3 );
  }
  hb_itemReturn( hb_stackSelfItem() );
}

//[1]void render ( QPainter * painter )
//[2]void render ( QPainter * painter, const QRectF & bounds )
//[3]void render ( QPainter * painter, const QString & elementId, const QRectF & bounds = QRectF() )

HB_FUNC_STATIC( QSVGRENDERER_RENDER )
{
  if( ISNUMPAR(1) && ISQPAINTER(1) )
  {
    HB_FUNC_EXEC( QSVGRENDERER_RENDER1 );
  }
  else if( ISNUMPAR(2) && ISQPAINTER(1) && ISQRECTF(2) )
  {
    HB_FUNC_EXEC( QSVGRENDERER_RENDER2 );
  }
  else if( ISBETWEEN(2,3) && ISQPAINTER(1) && ISCHAR(2) && (ISQRECTF(3)||ISNIL(3)) )
  {
    HB_FUNC_EXEC( QSVGRENDERER_RENDER3 );
  }
  else
  {
    hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
  }
}

#pragma ENDDUMP

/*

  Qt5xHb - bibliotecas de ligao entre Harbour/xHarbour e Qt Framework 5

  Copyright (C) 2012-2017 Marcos Antonio Gambeta <marcosgambeta@uol.com.br>

*/

#include "hbclass.ch"
#include "qt5xhb_clsid.ch"

#ifndef QT5XHB_NO_REQUESTS
REQUEST QRECTF
REQUEST QSIZE
REQUEST QMATRIX
REQUEST QRECT
#endif

CLASS QSvgRenderer INHERIT QObject

   DATA class_id INIT Class_Id_QSvgRenderer
   DATA class_flags INIT 1
   DATA self_destruction INIT .F.

   METHOD new1
   METHOD new2
   METHOD new3
   METHOD new4
   METHOD new
   METHOD delete
   METHOD animated
   METHOD boundsOnElement
   METHOD defaultSize
   METHOD elementExists
   METHOD framesPerSecond
   METHOD isValid
   METHOD matrixForElement
   METHOD setFramesPerSecond
   METHOD setViewBox1
   METHOD setViewBox2
   METHOD setViewBox
   METHOD viewBox
   METHOD viewBoxF
   METHOD load1
   METHOD load2
   METHOD load3
   METHOD load
   METHOD render1
   METHOD render2
   METHOD render3
   METHOD render

   METHOD onRepaintNeeded

   DESTRUCTOR destroyObject

END CLASS

PROCEDURE destroyObject () CLASS QSvgRenderer
   IF ::self_destruction
      ::delete()
   ENDIF
RETURN

#pragma BEGINDUMP

#include <Qt>

#ifndef __XHARBOUR__
#include <QSvgRenderer>
#endif

#include "qt5xhb_common.h"
#include "qt5xhb_clsid.h"
#include "qt5xhb_utils.h"

#ifdef __XHARBOUR__
#include <QSvgRenderer>
#endif

/*
QSvgRenderer ( QObject * parent = 0 )
*/
HB_FUNC_STATIC( QSVGRENDERER_NEW1 )
{
  QObject * par1 = ISNIL(1)? 0 : (QObject *) _qt5xhb_itemGetPtr(1);
  QSvgRenderer * o = new QSvgRenderer ( par1 );
  _qt5xhb_storePointerAndFlag( o, false );
}

/*
QSvgRenderer ( const QString & filename, QObject * parent = 0 )
*/
HB_FUNC_STATIC( QSVGRENDERER_NEW2 )
{
  QString par1 = QLatin1String( hb_parc(1) );
  QObject * par2 = ISNIL(2)? 0 : (QObject *) _qt5xhb_itemGetPtr(2);
  QSvgRenderer * o = new QSvgRenderer ( par1, par2 );
  _qt5xhb_storePointerAndFlag( o, false );
}

/*
QSvgRenderer ( const QByteArray & contents, QObject * parent = 0 )
*/
HB_FUNC_STATIC( QSVGRENDERER_NEW3 )
{
  QByteArray * par1 = (QByteArray *) _qt5xhb_itemGetPtr(1);
  QObject * par2 = ISNIL(2)? 0 : (QObject *) _qt5xhb_itemGetPtr(2);
  QSvgRenderer * o = new QSvgRenderer ( *par1, par2 );
  _qt5xhb_storePointerAndFlag( o, false );
}

/*
QSvgRenderer ( QXmlStreamReader * contents, QObject * parent = 0 )
*/
HB_FUNC_STATIC( QSVGRENDERER_NEW4 )
{
  QXmlStreamReader * par1 = (QXmlStreamReader *) _qt5xhb_itemGetPtr(1);
  QObject * par2 = ISNIL(2)? 0 : (QObject *) _qt5xhb_itemGetPtr(2);
  QSvgRenderer * o = new QSvgRenderer ( par1, par2 );
  _qt5xhb_storePointerAndFlag( o, false );
}

//[1]QSvgRenderer ( QObject * parent = 0 )
//[2]QSvgRenderer ( const QString & filename, QObject * parent = 0 )
//[3]QSvgRenderer ( const QByteArray & contents, QObject * parent = 0 )
//[4]QSvgRenderer ( QXmlStreamReader * contents, QObject * parent = 0 )

HB_FUNC_STATIC( QSVGRENDERER_NEW )
{
  if( ISBETWEEN(0,1) && (ISQOBJECT(1)||ISNIL(1)) )
  {
    HB_FUNC_EXEC( QSVGRENDERER_NEW1 );
  }
  else if( ISBETWEEN(1,2) && ISCHAR(1) && (ISQOBJECT(2)||ISNIL(2)) )
  {
    HB_FUNC_EXEC( QSVGRENDERER_NEW2 );
  }
  else if( ISBETWEEN(1,2) && ISQBYTEARRAY(1) && (ISQOBJECT(2)||ISNIL(2)) )
  {
    HB_FUNC_EXEC( QSVGRENDERER_NEW3 );
  }
  else if( ISBETWEEN(1,2) && ISQXMLSTREAMREADER(1) && (ISQOBJECT(2)||ISNIL(2)) )
  {
    HB_FUNC_EXEC( QSVGRENDERER_NEW4 );
  }
  else
  {
    hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
  }
}

HB_FUNC_STATIC( QSVGRENDERER_DELETE )
{
  QSvgRenderer * obj = (QSvgRenderer *) hb_itemGetPtr( hb_objSendMsg( hb_stackSelfItem(), "POINTER", 0 ) );
  if( obj )
  {
    delete obj;
    obj = NULL;
    PHB_ITEM self = hb_stackSelfItem();
    PHB_ITEM ptr = hb_itemPutPtr( NULL, NULL );
    hb_objSendMsg( self, "_pointer", 1, ptr );
    hb_itemRelease( ptr );
  }
  hb_itemReturn( hb_stackSelfItem() );
}

/*
bool animated () const
*/
HB_FUNC_STATIC( QSVGRENDERER_ANIMATED )
{
  QSvgRenderer * obj = (QSvgRenderer *) _qt5xhb_itemGetPtrStackSelfItem();
  if( obj )
  {
    hb_retl( obj->animated (  ) );
  }
}

/*
QRectF boundsOnElement ( const QString & id ) const
*/
HB_FUNC_STATIC( QSVGRENDERER_BOUNDSONELEMENT )
{
  QSvgRenderer * obj = (QSvgRenderer *) _qt5xhb_itemGetPtrStackSelfItem();
  if( obj )
  {
    QString par1 = QLatin1String( hb_parc(1) );
    QRectF * ptr = new QRectF( obj->boundsOnElement ( par1 ) );
    _qt5xhb_createReturnClass ( ptr, "QRECTF", true );
  }
}

/*
QSize defaultSize () const
*/
HB_FUNC_STATIC( QSVGRENDERER_DEFAULTSIZE )
{
  QSvgRenderer * obj = (QSvgRenderer *) _qt5xhb_itemGetPtrStackSelfItem();
  if( obj )
  {
    QSize * ptr = new QSize( obj->defaultSize (  ) );
    _qt5xhb_createReturnClass ( ptr, "QSIZE", true );
  }
}

/*
bool elementExists ( const QString & id ) const
*/
HB_FUNC_STATIC( QSVGRENDERER_ELEMENTEXISTS )
{
  QSvgRenderer * obj = (QSvgRenderer *) _qt5xhb_itemGetPtrStackSelfItem();
  if( obj )
  {
    QString par1 = QLatin1String( hb_parc(1) );
    hb_retl( obj->elementExists ( par1 ) );
  }
}

/*
int framesPerSecond () const
*/
HB_FUNC_STATIC( QSVGRENDERER_FRAMESPERSECOND )
{
  QSvgRenderer * obj = (QSvgRenderer *) _qt5xhb_itemGetPtrStackSelfItem();
  if( obj )
  {
    hb_retni( obj->framesPerSecond (  ) );
  }
}

/*
bool isValid () const
*/
HB_FUNC_STATIC( QSVGRENDERER_ISVALID )
{
  QSvgRenderer * obj = (QSvgRenderer *) _qt5xhb_itemGetPtrStackSelfItem();
  if( obj )
  {
    hb_retl( obj->isValid (  ) );
  }
}

/*
QMatrix matrixForElement ( const QString & id ) const
*/
HB_FUNC_STATIC( QSVGRENDERER_MATRIXFORELEMENT )
{
  QSvgRenderer * obj = (QSvgRenderer *) _qt5xhb_itemGetPtrStackSelfItem();
  if( obj )
  {
    QString par1 = QLatin1String( hb_parc(1) );
    QMatrix * ptr = new QMatrix( obj->matrixForElement ( par1 ) );
    _qt5xhb_createReturnClass ( ptr, "QMATRIX" );
  }
}

/*
void setFramesPerSecond ( int num )
*/
HB_FUNC_STATIC( QSVGRENDERER_SETFRAMESPERSECOND )
{
  QSvgRenderer * obj = (QSvgRenderer *) _qt5xhb_itemGetPtrStackSelfItem();
  if( obj )
  {
    obj->setFramesPerSecond ( (int) hb_parni(1) );
  }
  hb_itemReturn( hb_stackSelfItem() );
}

/*
void setViewBox ( const QRect & viewbox )
*/
HB_FUNC_STATIC( QSVGRENDERER_SETVIEWBOX1 )
{
  QSvgRenderer * obj = (QSvgRenderer *) _qt5xhb_itemGetPtrStackSelfItem();
  if( obj )
  {
    QRect * par1 = (QRect *) _qt5xhb_itemGetPtr(1);
    obj->setViewBox ( *par1 );
  }
  hb_itemReturn( hb_stackSelfItem() );
}

/*
void setViewBox ( const QRectF & viewbox )
*/
HB_FUNC_STATIC( QSVGRENDERER_SETVIEWBOX2 )
{
  QSvgRenderer * obj = (QSvgRenderer *) _qt5xhb_itemGetPtrStackSelfItem();
  if( obj )
  {
    QRectF * par1 = (QRectF *) _qt5xhb_itemGetPtr(1);
    obj->setViewBox ( *par1 );
  }
  hb_itemReturn( hb_stackSelfItem() );
}

//[1]void setViewBox ( const QRect & viewbox )
//[2]void setViewBox ( const QRectF & viewbox )

HB_FUNC_STATIC( QSVGRENDERER_SETVIEWBOX )
{
  if( ISNUMPAR(1) && ISQRECT(1) )
  {
    HB_FUNC_EXEC( QSVGRENDERER_SETVIEWBOX1 );
  }
  else if( ISNUMPAR(1) && ISQRECTF(1) )
  {
    HB_FUNC_EXEC( QSVGRENDERER_SETVIEWBOX2 );
  }
  else
  {
    hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
  }
}

/*
QRect viewBox () const
*/
HB_FUNC_STATIC( QSVGRENDERER_VIEWBOX )
{
  QSvgRenderer * obj = (QSvgRenderer *) _qt5xhb_itemGetPtrStackSelfItem();
  if( obj )
  {
    QRect * ptr = new QRect( obj->viewBox (  ) );
    _qt5xhb_createReturnClass ( ptr, "QRECT", true );
  }
}

/*
QRectF viewBoxF () const
*/
HB_FUNC_STATIC( QSVGRENDERER_VIEWBOXF )
{
  QSvgRenderer * obj = (QSvgRenderer *) _qt5xhb_itemGetPtrStackSelfItem();
  if( obj )
  {
    QRectF * ptr = new QRectF( obj->viewBoxF (  ) );
    _qt5xhb_createReturnClass ( ptr, "QRECTF", true );
  }
}

/*
bool load ( const QString & filename )
*/
HB_FUNC_STATIC( QSVGRENDERER_LOAD1 )
{
  QSvgRenderer * obj = (QSvgRenderer *) _qt5xhb_itemGetPtrStackSelfItem();
  if( obj )
  {
    QString par1 = QLatin1String( hb_parc(1) );
    hb_retl( obj->load ( par1 ) );
  }
}

/*
bool load ( const QByteArray & contents )
*/
HB_FUNC_STATIC( QSVGRENDERER_LOAD2 )
{
  QSvgRenderer * obj = (QSvgRenderer *) _qt5xhb_itemGetPtrStackSelfItem();
  if( obj )
  {
    QByteArray * par1 = (QByteArray *) _qt5xhb_itemGetPtr(1);
    hb_retl( obj->load ( *par1 ) );
  }
}

/*
bool load ( QXmlStreamReader * contents )
*/
HB_FUNC_STATIC( QSVGRENDERER_LOAD3 )
{
  QSvgRenderer * obj = (QSvgRenderer *) _qt5xhb_itemGetPtrStackSelfItem();
  if( obj )
  {
    QXmlStreamReader * par1 = (QXmlStreamReader *) _qt5xhb_itemGetPtr(1);
    hb_retl( obj->load ( par1 ) );
  }
}

//[1]bool load ( const QString & filename )
//[2]bool load ( const QByteArray & contents )
//[3]bool load ( QXmlStreamReader * contents )

HB_FUNC_STATIC( QSVGRENDERER_LOAD )
{
  if( ISNUMPAR(1) && ISCHAR(1) )
  {
    HB_FUNC_EXEC( QSVGRENDERER_LOAD1 );
  }
  else if( ISNUMPAR(1) && ISQBYTEARRAY(1) )
  {
    HB_FUNC_EXEC( QSVGRENDERER_LOAD2 );
  }
  else if( ISNUMPAR(1) && ISQXMLSTREAMREADER(1) )
  {
    HB_FUNC_EXEC( QSVGRENDERER_LOAD3 );
  }
  else
  {
    hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
  }
}

/*
void render ( QPainter * painter )
*/
HB_FUNC_STATIC( QSVGRENDERER_RENDER1 )
{
  QSvgRenderer * obj = (QSvgRenderer *) _qt5xhb_itemGetPtrStackSelfItem();
  if( obj )
  {
    QPainter * par1 = (QPainter *) _qt5xhb_itemGetPtr(1);
    obj->render ( par1 );
  }
  hb_itemReturn( hb_stackSelfItem() );
}

/*
void render ( QPainter * painter, const QRectF & bounds )
*/
HB_FUNC_STATIC( QSVGRENDERER_RENDER2 )
{
  QSvgRenderer * obj = (QSvgRenderer *) _qt5xhb_itemGetPtrStackSelfItem();
  if( obj )
  {
    QPainter * par1 = (QPainter *) _qt5xhb_itemGetPtr(1);
    QRectF * par2 = (QRectF *) _qt5xhb_itemGetPtr(2);
    obj->render ( par1, *par2 );
  }
  hb_itemReturn( hb_stackSelfItem() );
}

/*
void render ( QPainter * painter, const QString & elementId, const QRectF & bounds = QRectF() )
*/
HB_FUNC_STATIC( QSVGRENDERER_RENDER3 )
{
  QSvgRenderer * obj = (QSvgRenderer *) _qt5xhb_itemGetPtrStackSelfItem();
  if( obj )
  {
    QPainter * par1 = (QPainter *) _qt5xhb_itemGetPtr(1);
    QString par2 = QLatin1String( hb_parc(2) );
    QRectF par3 = ISNIL(3)? QRectF() : *(QRectF *) _qt5xhb_itemGetPtr(3);
    obj->render ( par1, par2, par3 );
  }
  hb_itemReturn( hb_stackSelfItem() );
}

//[1]void render ( QPainter * painter )
//[2]void render ( QPainter * painter, const QRectF & bounds )
//[3]void render ( QPainter * painter, const QString & elementId, const QRectF & bounds = QRectF() )

HB_FUNC_STATIC( QSVGRENDERER_RENDER )
{
  if( ISNUMPAR(1) && ISQPAINTER(1) )
  {
    HB_FUNC_EXEC( QSVGRENDERER_RENDER1 );
  }
  else if( ISNUMPAR(2) && ISQPAINTER(1) && ISQRECTF(2) )
  {
    HB_FUNC_EXEC( QSVGRENDERER_RENDER2 );
  }
  else if( ISBETWEEN(2,3) && ISQPAINTER(1) && ISCHAR(2) && (ISQRECTF(3)||ISNIL(3)) )
  {
    HB_FUNC_EXEC( QSVGRENDERER_RENDER3 );
  }
  else
  {
    hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
  }
}

#pragma ENDDUMP


remove fallout of r153 (Bind eliminated)

-- Copyright (c) Tim Sheard
-- OGI School of Science & Engineering, Oregon Health & Science University
-- Maseeh College of Engineering, Portland State University
-- Subject to conditions of distribution and use; see LICENSE.txt for details.
-- Mon Mar 31 02:56:16 Pacific Daylight Time 2008
-- Omega Interpreter: version 1.4.2

-- primitives

apply f x = f x          -- f $ g 5 --> apply f (g 5)
compose f g x = f(g x)   -- f . g   --> compose f g
id x = x

data Monad :: (*0 ~> *0) ~> *0 where
   Monad :: forall (m:: *0 ~> *0) .
                   ((forall a . a -> m a)) ->
                   ((forall a b . (m a) -> (a -> m b) -> m b)) ->
                   ((forall a . String -> m a)) ->
                   Monad m

{-
data Monad m =
   Monad (forall a . a -> m a)
         (forall a b . m a -> (a -> m b) -> m b)
         (forall a . [Char] -> m a)
-}

maybeM =  (Monad Just bind fail)
  where return x = Just x
        fail s = Nothing
        bind Nothing g = Nothing
        bind (Just x) g = g x

listM =  (Monad unit bind fail)
  where unit x = [x]
        fail s = []
        bind [] f = []
        bind (x:xs) f = f x ++ bind xs f

ioM = Monad returnIO bindIO failIO

const x _ = x

primitive freshAtom  :: forall (k :: *1) (a::k) . IO(Atom a)
primitive same  :: forall (k :: *1) (a::k) (b::k).Atom a -> Atom b -> Maybe(Equal a b)
primitive swapAtom :: forall (k :: *1) (a::k) (b::k) c . Atom a -> Atom b -> c -> c

xyzzy = 5

sameAtom :: forall (k :: *1)(a::k)(b::k).Atom a -> Atom b -> IO(Equal a b)
sameAtom x y = case same x y of
                 Just x -> returnIO x
                 Nothing -> failIO ("Different atoms")

monad ioM

------------------------------------
-- useful list functions

head (x:xs) = x
tail (x:xs) = xs

len [] = 0
len (x:xs) = 1 + len xs

foldr c n []     = n
foldr c n (x:xs) = c x (foldr c n xs)

foldl f acc []     = acc
foldl f acc (x:xs) = foldl f (f acc x) xs

append xs ys = if null xs then ys else (head xs) : (append (tail xs) ys)

lookup x [] = Nothing
lookup x ((y,z):xs) = if x==y then Just z else lookup x xs

member x [] = False
member x (y:ys) = if x==y then True else member x ys

map f [] = []
map f (x:xs) = f x : map f xs

fst (x,y) = x
snd (x,y) = y

max a b = if a >= b then a else b

otherwise = True

----------------------------------

data ContM :: *0 ~> *0 ~> *0 where
   C :: ((i -> o) -> o) -> ContM o i

unContM (C x) = x

runCont :: ContM i i -> i
runCont m       = unContM m id

contM :: Monad (ContM a)
contM = (Monad return bind fail)
  where return x = C (\k -> k x)
        fail s = error s
        bind (C m) f = C (\k -> m (\i -> unContM (f i) k))

-- Copyright (c) Tim Sheard
-- OGI School of Science & Engineering, Oregon Health & Science University
-- Maseeh College of Engineering, Portland State University
-- Subject to conditions of distribution and use; see LICENSE.txt for details.
-- Mon Mar 31 02:56:16 Pacific Daylight Time 2008
-- Omega Interpreter: version 1.4.2

-- primitives

apply f x = f x          -- f $ g 5 --> apply f (g 5)
compose f g x = f(g x)   -- f . g   --> compose f g
id x = x

data Monad :: (*0 ~> *0) ~> *0 where
   Monad :: forall (m:: *0 ~> *0) .
                   ((forall a . a -> m a)) ->
                   ((forall a b . (m a) -> (a -> m b) -> m b)) ->
                   ((forall a . String -> m a)) ->
                   Monad m

{-
data Monad m =
   Monad (forall a . a -> m a)
         (forall a b . m a -> (a -> m b) -> m b)
         (forall a . [Char] -> m a)
-}

maybeM =  (Monad Just bind fail)
  where return x = Just x
        fail s = Nothing
        bind Nothing g = Nothing
        bind (Just x) g = g x

listM =  (Monad unit bind fail)
  where unit x = [x]
        fail s = []
        bind [] f = []
        bind (x:xs) f = f x ++ bind xs f

ioM = Monad returnIO bindIO failIO

const x _ = x

primitive freshAtom  :: forall (k :: *1) (a::k) . IO(Atom a)
primitive same  :: forall (k :: *1) (a::k) (b::k).Atom a -> Atom b -> Maybe(Equal a b)
primitive swapAtom :: forall (k :: *1) (a::k) (b::k) c . Atom a -> Atom b -> c -> c
primitive fuse :: a -> b -> Bind a b
primitive melt :: Bind a b -> IO(a,b)

xyzzy = 5

sameAtom :: forall (k :: *1)(a::k)(b::k).Atom a -> Atom b -> IO(Equal a b)
sameAtom x y = case same x y of
                 Just x -> returnIO x
                 Nothing -> failIO ("Different atoms")

monad ioM

------------------------------------
-- useful list functions

head (x:xs) = x
tail (x:xs) = xs

len [] = 0
len (x:xs) = 1 + len xs

foldr c n []     = n
foldr c n (x:xs) = c x (foldr c n xs)

foldl f acc []     = acc
foldl f acc (x:xs) = foldl f (f acc x) xs

append xs ys = if null xs then ys else (head xs) : (append (tail xs) ys)

lookup x [] = Nothing
lookup x ((y,z):xs) = if x==y then Just z else lookup x xs

member x [] = False
member x (y:ys) = if x==y then True else member x ys

map f [] = []
map f (x:xs) = f x : map f xs

fst (x,y) = x
snd (x,y) = y

max a b = if a >= b then a else b

otherwise = True

----------------------------------

data ContM :: *0 ~> *0 ~> *0 where
   C :: ((i -> o) -> o) -> ContM o i

unContM (C x) = x

runCont :: ContM i i -> i
runCont m       = unContM m id

contM :: Monad (ContM a)
contM = (Monad return bind fail)
  where return x = C (\k -> k x)
        fail s = error s
        bind (C m) f = C (\k -> m (\i -> unContM (f i) k))


QtCharts: updated

QtCharts: updated

Modified:
source/QtCharts/QAbstractBarSeries.prg

/*

  Qt5xHb - Bindings libraries for Harbour/xHarbour and Qt Framework 5

  Copyright (C) 2018 Marcos Antonio Gambeta <marcosgambeta AT outlook DOT com>

*/

/*
  DO NOT EDIT THIS FILE - the content was created using a source code generator
*/

#include "hbclass.ch"

CLASS QAbstractBarSeries INHERIT QAbstractSeries

   METHOD delete

   METHOD append
   METHOD barSets
   METHOD barWidth
   METHOD clear
   METHOD count
   METHOD insert
   METHOD isLabelsVisible
   METHOD labelsAngle
   METHOD labelsFormat
   METHOD labelsPosition
   METHOD remove
   METHOD setBarWidth
   METHOD setLabelsAngle
   METHOD setLabelsFormat
   METHOD setLabelsPosition
   METHOD setLabelsVisible
   METHOD take

   METHOD onBarsetsAdded
   METHOD onBarsetsRemoved
   METHOD onClicked
   METHOD onCountChanged
   METHOD onDoubleClicked
   METHOD onHovered
   METHOD onLabelsAngleChanged
   METHOD onLabelsFormatChanged
   METHOD onLabelsPositionChanged
   METHOD onLabelsVisibleChanged
   METHOD onPressed
   METHOD onReleased

   DESTRUCTOR destroyObject

END CLASS

PROCEDURE destroyObject () CLASS QAbstractBarSeries
   IF ::self_destruction
      ::delete()
   ENDIF
RETURN

#pragma BEGINDUMP

#include <Qt>

#ifndef __XHARBOUR__
#include <QAbstractBarSeries>
#endif

#include "qt5xhb_common.h"
#include "qt5xhb_macros.h"
#include "qt5xhb_utils.h"

#ifdef __XHARBOUR__
#include <QAbstractBarSeries>
#endif

/*
explicit QAbstractBarSeries(QAbstractBarSeriesPrivate &d, QObject *parent = Q_NULLPTR) (protected)
*/

/*
virtual ~QAbstractBarSeries()
*/
HB_FUNC_STATIC( QABSTRACTBARSERIES_DELETE )
{
  QAbstractBarSeries * obj = (QAbstractBarSeries *) _qt5xhb_itemGetPtrStackSelfItem();

  if( obj )
  {
    delete obj;
    obj = NULL;
    PHB_ITEM self = hb_stackSelfItem();
    PHB_ITEM ptr = hb_itemPutPtr( NULL, NULL );
    hb_objSendMsg( self, "_pointer", 1, ptr );
    hb_itemRelease( ptr );
  }

  hb_itemReturn( hb_stackSelfItem() );
}

/*
qreal barWidth() const
*/
HB_FUNC_STATIC( QABSTRACTBARSERIES_BARWIDTH )
{
  QAbstractBarSeries * obj = (QAbstractBarSeries *) _qt5xhb_itemGetPtrStackSelfItem();

  if( obj )
  {
    if( ISNUMPAR(0) )
    {
      RQREAL( obj->barWidth () );
    }
    else
    {
      hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
    }
  }
}

/*
void setBarWidth(qreal width)
*/
HB_FUNC_STATIC( QABSTRACTBARSERIES_SETBARWIDTH )
{
  QAbstractBarSeries * obj = (QAbstractBarSeries *) _qt5xhb_itemGetPtrStackSelfItem();

  if( obj )
  {
    if( ISNUMPAR(1) && ISNUM(1) )
    {
      obj->setBarWidth ( PQREAL(1) );
    }
    else
    {
      hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
    }
  }

  hb_itemReturn( hb_stackSelfItem() );
}

/*
int count() const
*/
HB_FUNC_STATIC( QABSTRACTBARSERIES_COUNT )
{
  QAbstractBarSeries * obj = (QAbstractBarSeries *) _qt5xhb_itemGetPtrStackSelfItem();

  if( obj )
  {
    if( ISNUMPAR(0) )
    {
      RINT( obj->count () );
    }
    else
    {
      hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
    }
  }
}

/*
bool isLabelsVisible() const
*/
HB_FUNC_STATIC( QABSTRACTBARSERIES_ISLABELSVISIBLE )
{
  QAbstractBarSeries * obj = (QAbstractBarSeries *) _qt5xhb_itemGetPtrStackSelfItem();

  if( obj )
  {
    if( ISNUMPAR(0) )
    {
      RBOOL( obj->isLabelsVisible () );
    }
    else
    {
      hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
    }
  }
}

/*
void setLabelsVisible(bool visible = true)
*/
HB_FUNC_STATIC( QABSTRACTBARSERIES_SETLABELSVISIBLE )
{
  QAbstractBarSeries * obj = (QAbstractBarSeries *) _qt5xhb_itemGetPtrStackSelfItem();

  if( obj )
  {
    if( ISBETWEEN(0,1) && ISOPTLOG(1) )
    {
      obj->setLabelsVisible ( OPBOOL(1,true) );
    }
    else
    {
      hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
    }
  }

  hb_itemReturn( hb_stackSelfItem() );
}

/*
QString labelsFormat() const
*/
HB_FUNC_STATIC( QABSTRACTBARSERIES_LABELSFORMAT )
{
  QAbstractBarSeries * obj = (QAbstractBarSeries *) _qt5xhb_itemGetPtrStackSelfItem();

  if( obj )
  {
    if( ISNUMPAR(0) )
    {
      RQSTRING( obj->labelsFormat () );
    }
    else
    {
      hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
    }
  }
}

/*
void setLabelsFormat(const QString &format)
*/
HB_FUNC_STATIC( QABSTRACTBARSERIES_SETLABELSFORMAT )
{
  QAbstractBarSeries * obj = (QAbstractBarSeries *) _qt5xhb_itemGetPtrStackSelfItem();

  if( obj )
  {
    if( ISNUMPAR(1) && ISCHAR(1) )
    {
      obj->setLabelsFormat ( PQSTRING(1) );
    }
    else
    {
      hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
    }
  }

  hb_itemReturn( hb_stackSelfItem() );
}

/*
qreal labelsAngle() const
*/
HB_FUNC_STATIC( QABSTRACTBARSERIES_LABELSANGLE )
{
  QAbstractBarSeries * obj = (QAbstractBarSeries *) _qt5xhb_itemGetPtrStackSelfItem();

  if( obj )
  {
    if( ISNUMPAR(0) )
    {
      RQREAL( obj->labelsAngle () );
    }
    else
    {
      hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
    }
  }
}

/*
void setLabelsAngle(qreal angle)
*/
HB_FUNC_STATIC( QABSTRACTBARSERIES_SETLABELSANGLE )
{
  QAbstractBarSeries * obj = (QAbstractBarSeries *) _qt5xhb_itemGetPtrStackSelfItem();

  if( obj )
  {
    if( ISNUMPAR(1) && ISNUM(1) )
    {
      obj->setLabelsAngle ( PQREAL(1) );
    }
    else
    {
      hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
    }
  }

  hb_itemReturn( hb_stackSelfItem() );
}

/*
QAbstractBarSeries::LabelsPosition labelsPosition() const
*/
HB_FUNC_STATIC( QABSTRACTBARSERIES_LABELSPOSITION )
{
  QAbstractBarSeries * obj = (QAbstractBarSeries *) _qt5xhb_itemGetPtrStackSelfItem();

  if( obj )
  {
    if( ISNUMPAR(0) )
    {
      RENUM( obj->labelsPosition () );
    }
    else
    {
      hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
    }
  }
}

/*
void setLabelsPosition(QAbstractBarSeries::LabelsPosition position)
*/
HB_FUNC_STATIC( QABSTRACTBARSERIES_SETLABELSPOSITION )
{
  QAbstractBarSeries * obj = (QAbstractBarSeries *) _qt5xhb_itemGetPtrStackSelfItem();

  if( obj )
  {
    if( ISNUMPAR(1) && ISNUM(1) )
    {
      obj->setLabelsPosition ( (QAbstractBarSeries::LabelsPosition) hb_parni(1) );
    }
    else
    {
      hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
    }
  }

  hb_itemReturn( hb_stackSelfItem() );
}

/*
bool append(QBarSet *set)
*/
void QAbstractBarSeries_append1 ()
{
  QAbstractBarSeries * obj = (QAbstractBarSeries *) _qt5xhb_itemGetPtrStackSelfItem();

  if( obj )
  {
      RBOOL( obj->append ( PQBARSET(1) ) );
  }
}

/*
bool append(QList<QBarSet *> sets)
*/
void QAbstractBarSeries_append2 ()
{
  QAbstractBarSeries * obj = (QAbstractBarSeries *) _qt5xhb_itemGetPtrStackSelfItem();

  if( obj )
  {
       QList<QBarSet *> par1;
PHB_ITEM aList1 = hb_param(1, HB_IT_ARRAY);
int i1;
int nLen1 = hb_arrayLen(aList1);
for (i1=0;i1<nLen1;i1++)
{
  par1 << (QBarSet *) hb_itemGetPtr( hb_objSendMsg( hb_arrayGetItemPtr( aList1, i1+1 ), "POINTER", 0 ) );
}
      RBOOL( obj->append ( par1 ) );
  }
}

//[1]bool append(QBarSet *set)
//[2]bool append(QList<QBarSet *> sets)

HB_FUNC_STATIC( QABSTRACTBARSERIES_APPEND )
{
  if( ISNUMPAR(1) && ISQBARSET(1) )
  {
    QAbstractBarSeries_append1();
  }
  else if( ISNUMPAR(1) && ISARRAY(1) )
  {
    QAbstractBarSeries_append2();
  }
  else
  {
    hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
  }
}

/*
bool remove(QBarSet *set)
*/
HB_FUNC_STATIC( QABSTRACTBARSERIES_REMOVE )
{
  QAbstractBarSeries * obj = (QAbstractBarSeries *) _qt5xhb_itemGetPtrStackSelfItem();

  if( obj )
  {
    if( ISNUMPAR(1) && ISQBARSET(1) )
    {
      RBOOL( obj->remove ( PQBARSET(1) ) );
    }
    else
    {
      hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
    }
  }
}

/*
bool take(QBarSet *set)
*/
HB_FUNC_STATIC( QABSTRACTBARSERIES_TAKE )
{
  QAbstractBarSeries * obj = (QAbstractBarSeries *) _qt5xhb_itemGetPtrStackSelfItem();

  if( obj )
  {
    if( ISNUMPAR(1) && ISQBARSET(1) )
    {
      RBOOL( obj->take ( PQBARSET(1) ) );
    }
    else
    {
      hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
    }
  }
}

/*
bool insert(int index, QBarSet *set)
*/
HB_FUNC_STATIC( QABSTRACTBARSERIES_INSERT )
{
  QAbstractBarSeries * obj = (QAbstractBarSeries *) _qt5xhb_itemGetPtrStackSelfItem();

  if( obj )
  {
    if( ISNUMPAR(2) && ISNUM(1) && ISQBARSET(2) )
    {
      RBOOL( obj->insert ( PINT(1), PQBARSET(2) ) );
    }
    else
    {
      hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
    }
  }
}

/*
QList<QBarSet *> barSets() const
*/
HB_FUNC_STATIC( QABSTRACTBARSERIES_BARSETS )
{
  QAbstractBarSeries * obj = (QAbstractBarSeries *) _qt5xhb_itemGetPtrStackSelfItem();

  if( obj )
  {
    if( ISNUMPAR(0) )
    {
      QList<QBarSet *> list = obj->barSets ();
      PHB_DYNS pDynSym = hb_dynsymFindName( "QBARSET" );
      PHB_ITEM pArray = hb_itemArrayNew(0);
      int i;
      for(i=0;i<list.count();i++)
      {
        if( pDynSym )
        {
          hb_vmPushDynSym( pDynSym );
          hb_vmPushNil();
          hb_vmDo( 0 );
          PHB_ITEM pObject = hb_itemNew( NULL );
          hb_itemCopy( pObject, hb_stackReturnItem() );
          PHB_ITEM pItem = hb_itemNew( NULL );
          hb_itemPutPtr( pItem, (QBarSet *) list[i] );
          hb_objSendMsg( pObject, "_POINTER", 1, pItem );
          hb_itemRelease( pItem );
          hb_arrayAddForward( pArray, pObject );
          hb_itemRelease( pObject );
        }
        else
        {
          hb_errRT_BASE( EG_NOFUNC, 1001, NULL, "QBARSET", HB_ERR_ARGS_BASEPARAMS );
        }
      }
      hb_itemReturnRelease(pArray);
    }
    else
    {
      hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
    }
  }
}

/*
void clear()
*/
HB_FUNC_STATIC( QABSTRACTBARSERIES_CLEAR )
{
  QAbstractBarSeries * obj = (QAbstractBarSeries *) _qt5xhb_itemGetPtrStackSelfItem();

  if( obj )
  {
    if( ISNUMPAR(0) )
    {
      obj->clear ();
    }
    else
    {
      hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
    }
  }

  hb_itemReturn( hb_stackSelfItem() );
}

#pragma ENDDUMP

/*

  Qt5xHb - Bindings libraries for Harbour/xHarbour and Qt Framework 5

  Copyright (C) 2018 Marcos Antonio Gambeta <marcosgambeta AT outlook DOT com>

*/

/*
  DO NOT EDIT THIS FILE - the content was created using a source code generator
*/

#include "hbclass.ch"

CLASS QAbstractBarSeries INHERIT QAbstractSeries

   METHOD delete

   METHOD append1
   METHOD append2
   METHOD append
   METHOD barSets
   METHOD barWidth
   METHOD clear
   METHOD count
   METHOD insert
   METHOD isLabelsVisible
   METHOD labelsAngle
   METHOD labelsFormat
   METHOD labelsPosition
   METHOD remove
   METHOD setBarWidth
   METHOD setLabelsAngle
   METHOD setLabelsFormat
   METHOD setLabelsPosition
   METHOD setLabelsVisible
   METHOD take

   METHOD onBarsetsAdded
   METHOD onBarsetsRemoved
   METHOD onClicked
   METHOD onCountChanged
   METHOD onDoubleClicked
   METHOD onHovered
   METHOD onLabelsAngleChanged
   METHOD onLabelsFormatChanged
   METHOD onLabelsPositionChanged
   METHOD onLabelsVisibleChanged
   METHOD onPressed
   METHOD onReleased

   DESTRUCTOR destroyObject

END CLASS

PROCEDURE destroyObject () CLASS QAbstractBarSeries
   IF ::self_destruction
      ::delete()
   ENDIF
RETURN

#pragma BEGINDUMP

#include <Qt>

#ifndef __XHARBOUR__
#include <QAbstractBarSeries>
#endif

#include "qt5xhb_common.h"
#include "qt5xhb_macros.h"
#include "qt5xhb_utils.h"

#ifdef __XHARBOUR__
#include <QAbstractBarSeries>
#endif

/*
explicit QAbstractBarSeries(QAbstractBarSeriesPrivate &d, QObject *parent = Q_NULLPTR) (protected)
*/

/*
virtual ~QAbstractBarSeries()
*/
HB_FUNC_STATIC( QABSTRACTBARSERIES_DELETE )
{
  QAbstractBarSeries * obj = (QAbstractBarSeries *) _qt5xhb_itemGetPtrStackSelfItem();

  if( obj )
  {
    delete obj;
    obj = NULL;
    PHB_ITEM self = hb_stackSelfItem();
    PHB_ITEM ptr = hb_itemPutPtr( NULL, NULL );
    hb_objSendMsg( self, "_pointer", 1, ptr );
    hb_itemRelease( ptr );
  }

  hb_itemReturn( hb_stackSelfItem() );
}

/*
qreal barWidth() const
*/
HB_FUNC_STATIC( QABSTRACTBARSERIES_BARWIDTH )
{
  QAbstractBarSeries * obj = (QAbstractBarSeries *) _qt5xhb_itemGetPtrStackSelfItem();

  if( obj )
  {
    if( ISNUMPAR(0) )
    {
      RQREAL( obj->barWidth () );
    }
    else
    {
      hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
    }
  }
}

/*
void setBarWidth(qreal width)
*/
HB_FUNC_STATIC( QABSTRACTBARSERIES_SETBARWIDTH )
{
  QAbstractBarSeries * obj = (QAbstractBarSeries *) _qt5xhb_itemGetPtrStackSelfItem();

  if( obj )
  {
    if( ISNUMPAR(1) && ISNUM(1) )
    {
      obj->setBarWidth ( PQREAL(1) );
    }
    else
    {
      hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
    }
  }

  hb_itemReturn( hb_stackSelfItem() );
}

/*
int count() const
*/
HB_FUNC_STATIC( QABSTRACTBARSERIES_COUNT )
{
  QAbstractBarSeries * obj = (QAbstractBarSeries *) _qt5xhb_itemGetPtrStackSelfItem();

  if( obj )
  {
    if( ISNUMPAR(0) )
    {
      RINT( obj->count () );
    }
    else
    {
      hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
    }
  }
}

/*
bool isLabelsVisible() const
*/
HB_FUNC_STATIC( QABSTRACTBARSERIES_ISLABELSVISIBLE )
{
  QAbstractBarSeries * obj = (QAbstractBarSeries *) _qt5xhb_itemGetPtrStackSelfItem();

  if( obj )
  {
    if( ISNUMPAR(0) )
    {
      RBOOL( obj->isLabelsVisible () );
    }
    else
    {
      hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
    }
  }
}

/*
void setLabelsVisible(bool visible = true)
*/
HB_FUNC_STATIC( QABSTRACTBARSERIES_SETLABELSVISIBLE )
{
  QAbstractBarSeries * obj = (QAbstractBarSeries *) _qt5xhb_itemGetPtrStackSelfItem();

  if( obj )
  {
    if( ISBETWEEN(0,1) && ISOPTLOG(1) )
    {
      obj->setLabelsVisible ( OPBOOL(1,true) );
    }
    else
    {
      hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
    }
  }

  hb_itemReturn( hb_stackSelfItem() );
}

/*
QString labelsFormat() const
*/
HB_FUNC_STATIC( QABSTRACTBARSERIES_LABELSFORMAT )
{
  QAbstractBarSeries * obj = (QAbstractBarSeries *) _qt5xhb_itemGetPtrStackSelfItem();

  if( obj )
  {
    if( ISNUMPAR(0) )
    {
      RQSTRING( obj->labelsFormat () );
    }
    else
    {
      hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
    }
  }
}

/*
void setLabelsFormat(const QString &format)
*/
HB_FUNC_STATIC( QABSTRACTBARSERIES_SETLABELSFORMAT )
{
  QAbstractBarSeries * obj = (QAbstractBarSeries *) _qt5xhb_itemGetPtrStackSelfItem();

  if( obj )
  {
    if( ISNUMPAR(1) && ISCHAR(1) )
    {
      obj->setLabelsFormat ( PQSTRING(1) );
    }
    else
    {
      hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
    }
  }

  hb_itemReturn( hb_stackSelfItem() );
}

/*
qreal labelsAngle() const
*/
HB_FUNC_STATIC( QABSTRACTBARSERIES_LABELSANGLE )
{
  QAbstractBarSeries * obj = (QAbstractBarSeries *) _qt5xhb_itemGetPtrStackSelfItem();

  if( obj )
  {
    if( ISNUMPAR(0) )
    {
      RQREAL( obj->labelsAngle () );
    }
    else
    {
      hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
    }
  }
}

/*
void setLabelsAngle(qreal angle)
*/
HB_FUNC_STATIC( QABSTRACTBARSERIES_SETLABELSANGLE )
{
  QAbstractBarSeries * obj = (QAbstractBarSeries *) _qt5xhb_itemGetPtrStackSelfItem();

  if( obj )
  {
    if( ISNUMPAR(1) && ISNUM(1) )
    {
      obj->setLabelsAngle ( PQREAL(1) );
    }
    else
    {
      hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
    }
  }

  hb_itemReturn( hb_stackSelfItem() );
}

/*
QAbstractBarSeries::LabelsPosition labelsPosition() const
*/
HB_FUNC_STATIC( QABSTRACTBARSERIES_LABELSPOSITION )
{
  QAbstractBarSeries * obj = (QAbstractBarSeries *) _qt5xhb_itemGetPtrStackSelfItem();

  if( obj )
  {
    if( ISNUMPAR(0) )
    {
      RENUM( obj->labelsPosition () );
    }
    else
    {
      hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
    }
  }
}

/*
void setLabelsPosition(QAbstractBarSeries::LabelsPosition position)
*/
HB_FUNC_STATIC( QABSTRACTBARSERIES_SETLABELSPOSITION )
{
  QAbstractBarSeries * obj = (QAbstractBarSeries *) _qt5xhb_itemGetPtrStackSelfItem();

  if( obj )
  {
    if( ISNUMPAR(1) && ISNUM(1) )
    {
      obj->setLabelsPosition ( (QAbstractBarSeries::LabelsPosition) hb_parni(1) );
    }
    else
    {
      hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
    }
  }

  hb_itemReturn( hb_stackSelfItem() );
}

/*
bool append(QBarSet *set)
*/
HB_FUNC_STATIC( QABSTRACTBARSERIES_APPEND1 )
{
  QAbstractBarSeries * obj = (QAbstractBarSeries *) _qt5xhb_itemGetPtrStackSelfItem();

  if( obj )
  {
    if( ISNUMPAR(1) && ISQBARSET(1) )
    {
      RBOOL( obj->append ( PQBARSET(1) ) );
    }
    else
    {
      hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
    }
  }
}

/*
bool append(QList<QBarSet *> sets)
*/
HB_FUNC_STATIC( QABSTRACTBARSERIES_APPEND2 )
{
  QAbstractBarSeries * obj = (QAbstractBarSeries *) _qt5xhb_itemGetPtrStackSelfItem();

  if( obj )
  {
    if( ISNUMPAR(1) && ISARRAY(1) )
    {
      QList<QBarSet *> par1;
PHB_ITEM aList1 = hb_param(1, HB_IT_ARRAY);
int i1;
int nLen1 = hb_arrayLen(aList1);
for (i1=0;i1<nLen1;i1++)
{
  par1 << (QBarSet *) hb_itemGetPtr( hb_objSendMsg( hb_arrayGetItemPtr( aList1, i1+1 ), "POINTER", 0 ) );
}
      RBOOL( obj->append ( par1 ) );
    }
    else
    {
      hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
    }
  }
}

//[1]bool append(QBarSet *set)
//[2]bool append(QList<QBarSet *> sets)

HB_FUNC_STATIC( QABSTRACTBARSERIES_APPEND )
{
}

/*
bool remove(QBarSet *set)
*/
HB_FUNC_STATIC( QABSTRACTBARSERIES_REMOVE )
{
  QAbstractBarSeries * obj = (QAbstractBarSeries *) _qt5xhb_itemGetPtrStackSelfItem();

  if( obj )
  {
    if( ISNUMPAR(1) && ISQBARSET(1) )
    {
      RBOOL( obj->remove ( PQBARSET(1) ) );
    }
    else
    {
      hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
    }
  }
}

/*
bool take(QBarSet *set)
*/
HB_FUNC_STATIC( QABSTRACTBARSERIES_TAKE )
{
  QAbstractBarSeries * obj = (QAbstractBarSeries *) _qt5xhb_itemGetPtrStackSelfItem();

  if( obj )
  {
    if( ISNUMPAR(1) && ISQBARSET(1) )
    {
      RBOOL( obj->take ( PQBARSET(1) ) );
    }
    else
    {
      hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
    }
  }
}

/*
bool insert(int index, QBarSet *set)
*/
HB_FUNC_STATIC( QABSTRACTBARSERIES_INSERT )
{
  QAbstractBarSeries * obj = (QAbstractBarSeries *) _qt5xhb_itemGetPtrStackSelfItem();

  if( obj )
  {
    if( ISNUMPAR(2) && ISNUM(1) && ISQBARSET(2) )
    {
      RBOOL( obj->insert ( PINT(1), PQBARSET(2) ) );
    }
    else
    {
      hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
    }
  }
}

/*
QList<QBarSet *> barSets() const
*/
HB_FUNC_STATIC( QABSTRACTBARSERIES_BARSETS )
{
  QAbstractBarSeries * obj = (QAbstractBarSeries *) _qt5xhb_itemGetPtrStackSelfItem();

  if( obj )
  {
    if( ISNUMPAR(0) )
    {
      QList<QBarSet *> list = obj->barSets ();
      PHB_DYNS pDynSym = hb_dynsymFindName( "QBARSET" );
      PHB_ITEM pArray = hb_itemArrayNew(0);
      int i;
      for(i=0;i<list.count();i++)
      {
        if( pDynSym )
        {
          hb_vmPushDynSym( pDynSym );
          hb_vmPushNil();
          hb_vmDo( 0 );
          PHB_ITEM pObject = hb_itemNew( NULL );
          hb_itemCopy( pObject, hb_stackReturnItem() );
          PHB_ITEM pItem = hb_itemNew( NULL );
          hb_itemPutPtr( pItem, (QBarSet *) list[i] );
          hb_objSendMsg( pObject, "_POINTER", 1, pItem );
          hb_itemRelease( pItem );
          hb_arrayAddForward( pArray, pObject );
          hb_itemRelease( pObject );
        }
        else
        {
          hb_errRT_BASE( EG_NOFUNC, 1001, NULL, "QBARSET", HB_ERR_ARGS_BASEPARAMS );
        }
      }
      hb_itemReturnRelease(pArray);
    }
    else
    {
      hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
    }
  }
}

/*
void clear()
*/
HB_FUNC_STATIC( QABSTRACTBARSERIES_CLEAR )
{
  QAbstractBarSeries * obj = (QAbstractBarSeries *) _qt5xhb_itemGetPtrStackSelfItem();

  if( obj )
  {
    if( ISNUMPAR(0) )
    {
      obj->clear ();
    }
    else
    {
      hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
    }
  }

  hb_itemReturn( hb_stackSelfItem() );
}

#pragma ENDDUMP