2009-08-04 23:34 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com)
* contrib/hbqt/generator/qt45.qtp
+ contrib/hbqt/qth/QFontMetricsF.qth
+ contrib/hbqt/qth/QStyleFactory.qth
* contrib/hbqt/hbqt.h
* contrib/hbqt/Makefile_gen
+ contrib/hbqt/QFontMetricsF.cpp
+ contrib/hbqt/QStyleFactory.cpp
+ contrib/hbqt/TQFontMetricsF.prg
+ contrib/hbqt/TQStyleFactory.prg
+ Added two more classes.
This commit is contained in:
@@ -17,6 +17,20 @@
|
||||
past entries belonging to author(s): Viktor Szakats.
|
||||
*/
|
||||
|
||||
2009-08-04 23:34 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com)
|
||||
* contrib/hbqt/generator/qt45.qtp
|
||||
|
||||
+ contrib/hbqt/qth/QFontMetricsF.qth
|
||||
+ contrib/hbqt/qth/QStyleFactory.qth
|
||||
|
||||
* contrib/hbqt/hbqt.h
|
||||
* contrib/hbqt/Makefile_gen
|
||||
+ contrib/hbqt/QFontMetricsF.cpp
|
||||
+ contrib/hbqt/QStyleFactory.cpp
|
||||
+ contrib/hbqt/TQFontMetricsF.prg
|
||||
+ contrib/hbqt/TQStyleFactory.prg
|
||||
+ Added two more classes.
|
||||
|
||||
2009-08-04 19:43 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
|
||||
* source/pp/pplib.c
|
||||
* source/compiler/hbstripl.c
|
||||
|
||||
@@ -62,6 +62,7 @@ CPP_SOURCES=\
|
||||
QFontInfo.cpp \
|
||||
QFormLayout.cpp \
|
||||
QFontMetrics.cpp \
|
||||
QFontMetricsF.cpp \
|
||||
QFrame.cpp \
|
||||
QFtp.cpp \
|
||||
QGradient.cpp \
|
||||
@@ -144,6 +145,7 @@ CPP_SOURCES=\
|
||||
QStringListModel.cpp \
|
||||
QStyle.cpp \
|
||||
QStyledItemDelegate.cpp \
|
||||
QStyleFactory.cpp \
|
||||
QStyleHintReturn.cpp \
|
||||
QStyleHintReturnMask.cpp \
|
||||
QStyleHintReturnVariant.cpp \
|
||||
@@ -287,6 +289,7 @@ PRG_SOURCES=\
|
||||
TQFontDialog.prg \
|
||||
TQFontInfo.prg \
|
||||
TQFontMetrics.prg \
|
||||
TQFontMetricsF.prg \
|
||||
TQFormLayout.prg \
|
||||
TQFrame.prg \
|
||||
TQFtp.prg \
|
||||
@@ -370,6 +373,7 @@ PRG_SOURCES=\
|
||||
TQStringListModel.prg \
|
||||
TQStyle.prg \
|
||||
TQStyledItemDelegate.prg \
|
||||
TQStyleFactory.prg \
|
||||
TQStyleHintReturn.prg \
|
||||
TQStyleHintReturnMask.prg \
|
||||
TQStyleHintReturnVariant.prg \
|
||||
|
||||
317
harbour/contrib/hbqt/QFontMetricsF.cpp
Normal file
317
harbour/contrib/hbqt/QFontMetricsF.cpp
Normal file
@@ -0,0 +1,317 @@
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
/*
|
||||
* Harbour Project source code:
|
||||
* QT wrapper main header
|
||||
*
|
||||
* Copyright 2009 Pritpal Bedi <pritpal@vouchcac.com>
|
||||
*
|
||||
* Copyright 2009 Marcos Antonio Gambeta <marcosgambeta at gmail dot com>
|
||||
* www - http://www.harbour-project.org
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this software; see the file COPYING. If not, write to
|
||||
* the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
|
||||
* Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/).
|
||||
*
|
||||
* As a special exception, the Harbour Project gives permission for
|
||||
* additional uses of the text contained in its release of Harbour.
|
||||
*
|
||||
* The exception is that, if you link the Harbour libraries with other
|
||||
* files to produce an executable, this does not by itself cause the
|
||||
* resulting executable to be covered by the GNU General Public License.
|
||||
* Your use of that executable is in no way restricted on account of
|
||||
* linking the Harbour library code into it.
|
||||
*
|
||||
* This exception does not however invalidate any other reasons why
|
||||
* the executable file might be covered by the GNU General Public License.
|
||||
*
|
||||
* This exception applies only to the code released by the Harbour
|
||||
* Project under the name Harbour. If you copy code from other
|
||||
* Harbour Project or Free Software Foundation releases into a copy of
|
||||
* Harbour, as the General Public License permits, the exception does
|
||||
* not apply to the code that you add in this way. To avoid misleading
|
||||
* anyone as to the status of such modified files, you must delete
|
||||
* this exception notice from them.
|
||||
*
|
||||
* If you write modifications of your own for Harbour, it is your choice
|
||||
* whether to permit this exception to apply to your modifications.
|
||||
* If you do not wish that, delete this exception notice.
|
||||
*
|
||||
*/
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
#include "hbapi.h"
|
||||
#include "hbqt.h"
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
#if QT_VERSION >= 0x040500
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
|
||||
#include <QtGui/QFontMetricsF>
|
||||
|
||||
|
||||
/*
|
||||
* QFontMetricsF ( const QFont & font )
|
||||
* QFontMetricsF ( const QFont & font, QPaintDevice * paintdevice )
|
||||
* QFontMetricsF ( const QFontMetrics & fontMetrics )
|
||||
* QFontMetricsF ( const QFontMetricsF & fm )
|
||||
* ~QFontMetricsF ()
|
||||
*/
|
||||
HB_FUNC( QT_QFONTMETRICSF )
|
||||
{
|
||||
if( hb_pcount() == 1 && HB_ISPOINTER( 1 ) )
|
||||
{
|
||||
hb_retptr( ( QFontMetricsF* ) new QFontMetricsF( *hbqt_par_QFontMetricsF( 1 ) ) );
|
||||
}
|
||||
else if( hb_pcount() == 2 && HB_ISCHAR( 1 ) && HB_ISPOINTER( 2 ) )
|
||||
{
|
||||
if( hbqt_par_QString( 1 ) == ( QString ) "QFont" )
|
||||
{
|
||||
hb_retptr( ( QFontMetricsF* ) new QFontMetricsF( *hbqt_par_QFont( 2 ) ) );
|
||||
}
|
||||
else if( hbqt_par_QString( 1 ) == ( QString ) "QFontMetrics" )
|
||||
{
|
||||
hb_retptr( ( QFontMetricsF* ) new QFontMetricsF( *hbqt_par_QFontMetrics( 2 ) ) );
|
||||
}
|
||||
}
|
||||
else if( hb_pcount() == 2 && HB_ISPOINTER( 1 ) && HB_ISPOINTER( 2 ) )
|
||||
{
|
||||
hb_retptr( ( QFontMetricsF* ) new QFontMetricsF( *hbqt_par_QFont( 1 ), hbqt_par_QPaintDevice( 2 ) ) );
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* DESTRUCTOR
|
||||
*/
|
||||
HB_FUNC( QT_QFONTMETRICSF_DESTROY )
|
||||
{
|
||||
hbqt_par_QFontMetricsF( 1 )->~QFontMetricsF();
|
||||
}
|
||||
|
||||
/*
|
||||
* qreal ascent () const
|
||||
*/
|
||||
HB_FUNC( QT_QFONTMETRICSF_ASCENT )
|
||||
{
|
||||
hb_retnd( hbqt_par_QFontMetricsF( 1 )->ascent() );
|
||||
}
|
||||
|
||||
/*
|
||||
* qreal averageCharWidth () const
|
||||
*/
|
||||
HB_FUNC( QT_QFONTMETRICSF_AVERAGECHARWIDTH )
|
||||
{
|
||||
hb_retnd( hbqt_par_QFontMetricsF( 1 )->averageCharWidth() );
|
||||
}
|
||||
|
||||
/*
|
||||
* QRectF boundingRect ( const QString & text ) const
|
||||
*/
|
||||
HB_FUNC( QT_QFONTMETRICSF_BOUNDINGRECT )
|
||||
{
|
||||
hb_retptr( new QRectF( hbqt_par_QFontMetricsF( 1 )->boundingRect( hbqt_par_QString( 2 ) ) ) );
|
||||
}
|
||||
|
||||
/*
|
||||
* QRectF boundingRect ( QChar ch ) const
|
||||
*/
|
||||
HB_FUNC( QT_QFONTMETRICSF_BOUNDINGRECT_1 )
|
||||
{
|
||||
hb_retptr( new QRectF( hbqt_par_QFontMetricsF( 1 )->boundingRect( hb_parni( 2 ) ) ) );
|
||||
}
|
||||
|
||||
/*
|
||||
* QRectF boundingRect ( const QRectF & rect, int flags, const QString & text, int tabStops = 0, int * tabArray = 0 ) const
|
||||
*/
|
||||
HB_FUNC( QT_QFONTMETRICSF_BOUNDINGRECT_2 )
|
||||
{
|
||||
int iTabArray = 0;
|
||||
|
||||
hb_retptr( new QRectF( hbqt_par_QFontMetricsF( 1 )->boundingRect( *hbqt_par_QRectF( 2 ), hb_parni( 3 ), hbqt_par_QString( 4 ), hb_parni( 5 ), &iTabArray ) ) );
|
||||
|
||||
hb_storni( iTabArray, 6 );
|
||||
}
|
||||
|
||||
/*
|
||||
* qreal descent () const
|
||||
*/
|
||||
HB_FUNC( QT_QFONTMETRICSF_DESCENT )
|
||||
{
|
||||
hb_retnd( hbqt_par_QFontMetricsF( 1 )->descent() );
|
||||
}
|
||||
|
||||
/*
|
||||
* QString elidedText ( const QString & text, Qt::TextElideMode mode, qreal width, int flags = 0 ) const
|
||||
*/
|
||||
HB_FUNC( QT_QFONTMETRICSF_ELIDEDTEXT )
|
||||
{
|
||||
hb_retc( hbqt_par_QFontMetricsF( 1 )->elidedText( hbqt_par_QString( 2 ), ( Qt::TextElideMode ) hb_parni( 3 ), hb_parnd( 4 ), hb_parni( 5 ) ).toLatin1().data() );
|
||||
}
|
||||
|
||||
/*
|
||||
* qreal height () const
|
||||
*/
|
||||
HB_FUNC( QT_QFONTMETRICSF_HEIGHT )
|
||||
{
|
||||
hb_retnd( hbqt_par_QFontMetricsF( 1 )->height() );
|
||||
}
|
||||
|
||||
/*
|
||||
* bool inFont ( QChar ch ) const
|
||||
*/
|
||||
HB_FUNC( QT_QFONTMETRICSF_INFONT )
|
||||
{
|
||||
hb_retl( hbqt_par_QFontMetricsF( 1 )->inFont( hb_parni( 2 ) ) );
|
||||
}
|
||||
|
||||
/*
|
||||
* qreal leading () const
|
||||
*/
|
||||
HB_FUNC( QT_QFONTMETRICSF_LEADING )
|
||||
{
|
||||
hb_retnd( hbqt_par_QFontMetricsF( 1 )->leading() );
|
||||
}
|
||||
|
||||
/*
|
||||
* qreal leftBearing ( QChar ch ) const
|
||||
*/
|
||||
HB_FUNC( QT_QFONTMETRICSF_LEFTBEARING )
|
||||
{
|
||||
hb_retnd( hbqt_par_QFontMetricsF( 1 )->leftBearing( hb_parni( 2 ) ) );
|
||||
}
|
||||
|
||||
/*
|
||||
* qreal lineSpacing () const
|
||||
*/
|
||||
HB_FUNC( QT_QFONTMETRICSF_LINESPACING )
|
||||
{
|
||||
hb_retnd( hbqt_par_QFontMetricsF( 1 )->lineSpacing() );
|
||||
}
|
||||
|
||||
/*
|
||||
* qreal lineWidth () const
|
||||
*/
|
||||
HB_FUNC( QT_QFONTMETRICSF_LINEWIDTH )
|
||||
{
|
||||
hb_retnd( hbqt_par_QFontMetricsF( 1 )->lineWidth() );
|
||||
}
|
||||
|
||||
/*
|
||||
* qreal maxWidth () const
|
||||
*/
|
||||
HB_FUNC( QT_QFONTMETRICSF_MAXWIDTH )
|
||||
{
|
||||
hb_retnd( hbqt_par_QFontMetricsF( 1 )->maxWidth() );
|
||||
}
|
||||
|
||||
/*
|
||||
* qreal minLeftBearing () const
|
||||
*/
|
||||
HB_FUNC( QT_QFONTMETRICSF_MINLEFTBEARING )
|
||||
{
|
||||
hb_retnd( hbqt_par_QFontMetricsF( 1 )->minLeftBearing() );
|
||||
}
|
||||
|
||||
/*
|
||||
* qreal minRightBearing () const
|
||||
*/
|
||||
HB_FUNC( QT_QFONTMETRICSF_MINRIGHTBEARING )
|
||||
{
|
||||
hb_retnd( hbqt_par_QFontMetricsF( 1 )->minRightBearing() );
|
||||
}
|
||||
|
||||
/*
|
||||
* qreal overlinePos () const
|
||||
*/
|
||||
HB_FUNC( QT_QFONTMETRICSF_OVERLINEPOS )
|
||||
{
|
||||
hb_retnd( hbqt_par_QFontMetricsF( 1 )->overlinePos() );
|
||||
}
|
||||
|
||||
/*
|
||||
* qreal rightBearing ( QChar ch ) const
|
||||
*/
|
||||
HB_FUNC( QT_QFONTMETRICSF_RIGHTBEARING )
|
||||
{
|
||||
hb_retnd( hbqt_par_QFontMetricsF( 1 )->rightBearing( hb_parni( 2 ) ) );
|
||||
}
|
||||
|
||||
/*
|
||||
* QSizeF size ( int flags, const QString & text, int tabStops = 0, int * tabArray = 0 ) const
|
||||
*/
|
||||
HB_FUNC( QT_QFONTMETRICSF_SIZE )
|
||||
{
|
||||
int iTabArray = 0;
|
||||
|
||||
hb_retptr( new QSizeF( hbqt_par_QFontMetricsF( 1 )->size( hb_parni( 2 ), hbqt_par_QString( 3 ), hb_parni( 4 ), &iTabArray ) ) );
|
||||
|
||||
hb_storni( iTabArray, 5 );
|
||||
}
|
||||
|
||||
/*
|
||||
* qreal strikeOutPos () const
|
||||
*/
|
||||
HB_FUNC( QT_QFONTMETRICSF_STRIKEOUTPOS )
|
||||
{
|
||||
hb_retnd( hbqt_par_QFontMetricsF( 1 )->strikeOutPos() );
|
||||
}
|
||||
|
||||
/*
|
||||
* QRectF tightBoundingRect ( const QString & text ) const
|
||||
*/
|
||||
HB_FUNC( QT_QFONTMETRICSF_TIGHTBOUNDINGRECT )
|
||||
{
|
||||
hb_retptr( new QRectF( hbqt_par_QFontMetricsF( 1 )->tightBoundingRect( hbqt_par_QString( 2 ) ) ) );
|
||||
}
|
||||
|
||||
/*
|
||||
* qreal underlinePos () const
|
||||
*/
|
||||
HB_FUNC( QT_QFONTMETRICSF_UNDERLINEPOS )
|
||||
{
|
||||
hb_retnd( hbqt_par_QFontMetricsF( 1 )->underlinePos() );
|
||||
}
|
||||
|
||||
/*
|
||||
* qreal width ( const QString & text ) const
|
||||
*/
|
||||
HB_FUNC( QT_QFONTMETRICSF_WIDTH )
|
||||
{
|
||||
hb_retnd( hbqt_par_QFontMetricsF( 1 )->width( hbqt_par_QString( 2 ) ) );
|
||||
}
|
||||
|
||||
/*
|
||||
* qreal width ( QChar ch ) const
|
||||
*/
|
||||
HB_FUNC( QT_QFONTMETRICSF_WIDTH_1 )
|
||||
{
|
||||
hb_retnd( hbqt_par_QFontMetricsF( 1 )->width( hb_parni( 2 ) ) );
|
||||
}
|
||||
|
||||
/*
|
||||
* qreal xHeight () const
|
||||
*/
|
||||
HB_FUNC( QT_QFONTMETRICSF_XHEIGHT )
|
||||
{
|
||||
hb_retnd( hbqt_par_QFontMetricsF( 1 )->xHeight() );
|
||||
}
|
||||
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
#endif /* #if QT_VERSION >= 0x040500 */
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
103
harbour/contrib/hbqt/QStyleFactory.cpp
Normal file
103
harbour/contrib/hbqt/QStyleFactory.cpp
Normal file
@@ -0,0 +1,103 @@
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
/*
|
||||
* Harbour Project source code:
|
||||
* QT wrapper main header
|
||||
*
|
||||
* Copyright 2009 Pritpal Bedi <pritpal@vouchcac.com>
|
||||
*
|
||||
* Copyright 2009 Marcos Antonio Gambeta <marcosgambeta at gmail dot com>
|
||||
* www - http://www.harbour-project.org
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this software; see the file COPYING. If not, write to
|
||||
* the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
|
||||
* Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/).
|
||||
*
|
||||
* As a special exception, the Harbour Project gives permission for
|
||||
* additional uses of the text contained in its release of Harbour.
|
||||
*
|
||||
* The exception is that, if you link the Harbour libraries with other
|
||||
* files to produce an executable, this does not by itself cause the
|
||||
* resulting executable to be covered by the GNU General Public License.
|
||||
* Your use of that executable is in no way restricted on account of
|
||||
* linking the Harbour library code into it.
|
||||
*
|
||||
* This exception does not however invalidate any other reasons why
|
||||
* the executable file might be covered by the GNU General Public License.
|
||||
*
|
||||
* This exception applies only to the code released by the Harbour
|
||||
* Project under the name Harbour. If you copy code from other
|
||||
* Harbour Project or Free Software Foundation releases into a copy of
|
||||
* Harbour, as the General Public License permits, the exception does
|
||||
* not apply to the code that you add in this way. To avoid misleading
|
||||
* anyone as to the status of such modified files, you must delete
|
||||
* this exception notice from them.
|
||||
*
|
||||
* If you write modifications of your own for Harbour, it is your choice
|
||||
* whether to permit this exception to apply to your modifications.
|
||||
* If you do not wish that, delete this exception notice.
|
||||
*
|
||||
*/
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
#include "hbapi.h"
|
||||
#include "hbqt.h"
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
#if QT_VERSION >= 0x040500
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
|
||||
#include <QtGui/QStyleFactory>
|
||||
|
||||
|
||||
/*
|
||||
*
|
||||
*/
|
||||
HB_FUNC( QT_QSTYLEFACTORY )
|
||||
{
|
||||
hb_retptr( new QStyleFactory() );
|
||||
}
|
||||
|
||||
/*
|
||||
* DESTRUCTOR
|
||||
*/
|
||||
HB_FUNC( QT_QSTYLEFACTORY_DESTROY )
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* QStyle * create ( const QString & key )
|
||||
*/
|
||||
HB_FUNC( QT_QSTYLEFACTORY_CREATE )
|
||||
{
|
||||
hb_retptr( ( QStyle* ) hbqt_par_QStyleFactory( 1 )->create( hbqt_par_QString( 2 ) ) );
|
||||
}
|
||||
|
||||
/*
|
||||
* QStringList keys ()
|
||||
*/
|
||||
HB_FUNC( QT_QSTYLEFACTORY_KEYS )
|
||||
{
|
||||
hb_retptr( new QStringList( hbqt_par_QStyleFactory( 1 )->keys() ) );
|
||||
}
|
||||
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
#endif /* #if QT_VERSION >= 0x040500 */
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
118
harbour/contrib/hbqt/TQFontMetricsF.prg
Normal file
118
harbour/contrib/hbqt/TQFontMetricsF.prg
Normal file
@@ -0,0 +1,118 @@
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
/*
|
||||
* Harbour Project source code:
|
||||
* QT wrapper main header
|
||||
*
|
||||
* Copyright 2009 Pritpal Bedi <pritpal@vouchcac.com>
|
||||
*
|
||||
* Copyright 2009 Marcos Antonio Gambeta <marcosgambeta at gmail dot com>
|
||||
* www - http://www.harbour-project.org
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this software; see the file COPYING. If not, write to
|
||||
* the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
|
||||
* Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/).
|
||||
*
|
||||
* As a special exception, the Harbour Project gives permission for
|
||||
* additional uses of the text contained in its release of Harbour.
|
||||
*
|
||||
* The exception is that, if you link the Harbour libraries with other
|
||||
* files to produce an executable, this does not by itself cause the
|
||||
* resulting executable to be covered by the GNU General Public License.
|
||||
* Your use of that executable is in no way restricted on account of
|
||||
* linking the Harbour library code into it.
|
||||
*
|
||||
* This exception does not however invalidate any other reasons why
|
||||
* the executable file might be covered by the GNU General Public License.
|
||||
*
|
||||
* This exception applies only to the code released by the Harbour
|
||||
* Project under the name Harbour. If you copy code from other
|
||||
* Harbour Project or Free Software Foundation releases into a copy of
|
||||
* Harbour, as the General Public License permits, the exception does
|
||||
* not apply to the code that you add in this way. To avoid misleading
|
||||
* anyone as to the status of such modified files, you must delete
|
||||
* this exception notice from them.
|
||||
*
|
||||
* If you write modifications of your own for Harbour, it is your choice
|
||||
* whether to permit this exception to apply to your modifications.
|
||||
* If you do not wish that, delete this exception notice.
|
||||
*
|
||||
*/
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
|
||||
#include "hbclass.ch"
|
||||
|
||||
|
||||
CREATE CLASS QFontMetricsF
|
||||
|
||||
VAR pParent
|
||||
VAR pPtr
|
||||
|
||||
METHOD New()
|
||||
METHOD Configure( xObject )
|
||||
METHOD Destroy() INLINE Qt_QFontMetricsF_destroy( ::pPtr )
|
||||
|
||||
METHOD ascent() INLINE Qt_QFontMetricsF_ascent( ::pPtr )
|
||||
METHOD averageCharWidth() INLINE Qt_QFontMetricsF_averageCharWidth( ::pPtr )
|
||||
METHOD boundingRect( cText ) INLINE Qt_QFontMetricsF_boundingRect( ::pPtr, cText )
|
||||
METHOD boundingRect_1( nCh ) INLINE Qt_QFontMetricsF_boundingRect_1( ::pPtr, nCh )
|
||||
METHOD boundingRect_2( pRect, nFlags, cText, nTabStops, nTabArray ) INLINE Qt_QFontMetricsF_boundingRect_2( ::pPtr, pRect, nFlags, cText, nTabStops, nTabArray )
|
||||
METHOD descent() INLINE Qt_QFontMetricsF_descent( ::pPtr )
|
||||
METHOD elidedText( cText, nMode, nWidth, nFlags ) INLINE Qt_QFontMetricsF_elidedText( ::pPtr, cText, nMode, nWidth, nFlags )
|
||||
METHOD height() INLINE Qt_QFontMetricsF_height( ::pPtr )
|
||||
METHOD inFont( nCh ) INLINE Qt_QFontMetricsF_inFont( ::pPtr, nCh )
|
||||
METHOD leading() INLINE Qt_QFontMetricsF_leading( ::pPtr )
|
||||
METHOD leftBearing( nCh ) INLINE Qt_QFontMetricsF_leftBearing( ::pPtr, nCh )
|
||||
METHOD lineSpacing() INLINE Qt_QFontMetricsF_lineSpacing( ::pPtr )
|
||||
METHOD lineWidth() INLINE Qt_QFontMetricsF_lineWidth( ::pPtr )
|
||||
METHOD maxWidth() INLINE Qt_QFontMetricsF_maxWidth( ::pPtr )
|
||||
METHOD minLeftBearing() INLINE Qt_QFontMetricsF_minLeftBearing( ::pPtr )
|
||||
METHOD minRightBearing() INLINE Qt_QFontMetricsF_minRightBearing( ::pPtr )
|
||||
METHOD overlinePos() INLINE Qt_QFontMetricsF_overlinePos( ::pPtr )
|
||||
METHOD rightBearing( nCh ) INLINE Qt_QFontMetricsF_rightBearing( ::pPtr, nCh )
|
||||
METHOD size( nFlags, cText, nTabStops, nTabArray ) INLINE Qt_QFontMetricsF_size( ::pPtr, nFlags, cText, nTabStops, nTabArray )
|
||||
METHOD strikeOutPos() INLINE Qt_QFontMetricsF_strikeOutPos( ::pPtr )
|
||||
METHOD tightBoundingRect( cText ) INLINE Qt_QFontMetricsF_tightBoundingRect( ::pPtr, cText )
|
||||
METHOD underlinePos() INLINE Qt_QFontMetricsF_underlinePos( ::pPtr )
|
||||
METHOD width( cText ) INLINE Qt_QFontMetricsF_width( ::pPtr, cText )
|
||||
METHOD width_1( nCh ) INLINE Qt_QFontMetricsF_width_1( ::pPtr, nCh )
|
||||
METHOD xHeight() INLINE Qt_QFontMetricsF_xHeight( ::pPtr )
|
||||
|
||||
ENDCLASS
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
METHOD New( ... ) CLASS QFontMetricsF
|
||||
|
||||
::pPtr := Qt_QFontMetricsF( ... )
|
||||
|
||||
RETURN Self
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
METHOD Configure( xObject ) CLASS QFontMetricsF
|
||||
|
||||
IF hb_isObject( xObject )
|
||||
::pPtr := xObject:pPtr
|
||||
ELSEIF hb_isPointer( xObject )
|
||||
::pPtr := xObject
|
||||
ENDIF
|
||||
|
||||
RETURN Self
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
97
harbour/contrib/hbqt/TQStyleFactory.prg
Normal file
97
harbour/contrib/hbqt/TQStyleFactory.prg
Normal file
@@ -0,0 +1,97 @@
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
/*
|
||||
* Harbour Project source code:
|
||||
* QT wrapper main header
|
||||
*
|
||||
* Copyright 2009 Pritpal Bedi <pritpal@vouchcac.com>
|
||||
*
|
||||
* Copyright 2009 Marcos Antonio Gambeta <marcosgambeta at gmail dot com>
|
||||
* www - http://www.harbour-project.org
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this software; see the file COPYING. If not, write to
|
||||
* the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
|
||||
* Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/).
|
||||
*
|
||||
* As a special exception, the Harbour Project gives permission for
|
||||
* additional uses of the text contained in its release of Harbour.
|
||||
*
|
||||
* The exception is that, if you link the Harbour libraries with other
|
||||
* files to produce an executable, this does not by itself cause the
|
||||
* resulting executable to be covered by the GNU General Public License.
|
||||
* Your use of that executable is in no way restricted on account of
|
||||
* linking the Harbour library code into it.
|
||||
*
|
||||
* This exception does not however invalidate any other reasons why
|
||||
* the executable file might be covered by the GNU General Public License.
|
||||
*
|
||||
* This exception applies only to the code released by the Harbour
|
||||
* Project under the name Harbour. If you copy code from other
|
||||
* Harbour Project or Free Software Foundation releases into a copy of
|
||||
* Harbour, as the General Public License permits, the exception does
|
||||
* not apply to the code that you add in this way. To avoid misleading
|
||||
* anyone as to the status of such modified files, you must delete
|
||||
* this exception notice from them.
|
||||
*
|
||||
* If you write modifications of your own for Harbour, it is your choice
|
||||
* whether to permit this exception to apply to your modifications.
|
||||
* If you do not wish that, delete this exception notice.
|
||||
*
|
||||
*/
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
|
||||
#include "hbclass.ch"
|
||||
|
||||
|
||||
CREATE CLASS QStyleFactory
|
||||
|
||||
VAR pParent
|
||||
VAR pPtr
|
||||
|
||||
METHOD New()
|
||||
METHOD Configure( xObject )
|
||||
METHOD Destroy() INLINE Qt_QStyleFactory_destroy( ::pPtr )
|
||||
|
||||
METHOD create( cKey ) INLINE Qt_QStyleFactory_create( ::pPtr, cKey )
|
||||
METHOD keys() INLINE Qt_QStyleFactory_keys( ::pPtr )
|
||||
|
||||
ENDCLASS
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
METHOD New( pParent ) CLASS QStyleFactory
|
||||
|
||||
::pParent := pParent
|
||||
|
||||
::pPtr := Qt_QStyleFactory( pParent )
|
||||
|
||||
RETURN Self
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
METHOD Configure( xObject ) CLASS QStyleFactory
|
||||
|
||||
IF hb_isObject( xObject )
|
||||
::pPtr := xObject:pPtr
|
||||
ELSEIF hb_isPointer( xObject )
|
||||
::pPtr := xObject
|
||||
ENDIF
|
||||
|
||||
RETURN Self
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
@@ -64,6 +64,7 @@ QFontDatabase.qth
|
||||
QFontDialog.qth
|
||||
QFontInfo.qth
|
||||
QFontMetrics.qth
|
||||
QFontMetricsF.qth
|
||||
QFormLayout.qth
|
||||
QFrame.qth
|
||||
QFtp.qth
|
||||
@@ -150,6 +151,8 @@ QStringListModel.qth
|
||||
QStyle.qth
|
||||
QStyledItemDelegate.qth
|
||||
|
||||
QStyleFactory.qth
|
||||
|
||||
QStyleHintReturn.qth
|
||||
QStyleHintReturnMask.qth
|
||||
QStyleHintReturnVariant.qth
|
||||
|
||||
@@ -129,6 +129,7 @@
|
||||
#define hbqt_par_QFontDialog( n ) ( ( QFontDialog* ) hb_parptr( n ) )
|
||||
#define hbqt_par_QFontInfo( n ) ( ( QFontInfo* ) hb_parptr( n ) )
|
||||
#define hbqt_par_QFontMetrics( n ) ( ( QFontMetrics* ) hb_parptr( n ) )
|
||||
#define hbqt_par_QFontMetricsF( n ) ( ( QFontMetricsF* ) hb_parptr( n ) )
|
||||
#define hbqt_par_QFormLayout( n ) ( ( QFormLayout* ) hb_parptr( n ) )
|
||||
#define hbqt_par_QFrame( n ) ( ( QFrame* ) hb_parptr( n ) )
|
||||
#define hbqt_par_QFtp( n ) ( ( QFtp* ) hb_parptr( n ) )
|
||||
@@ -158,6 +159,7 @@
|
||||
#define hbqt_par_QLayout( n ) ( ( QLayout* ) hb_parptr( n ) )
|
||||
#define hbqt_par_QLayoutItem( n ) ( ( QLayoutItem* ) hb_parptr( n ) )
|
||||
#define hbqt_par_QLCDNumber( n ) ( ( QLCDNumber* ) hb_parptr( n ) )
|
||||
#define hbqt_par_QLibraryInfo( n ) ( ( QLibraryInfo* ) hb_parptr( n ) )
|
||||
#define hbqt_par_QLine( n ) ( ( QLine* ) hb_parptr( n ) )
|
||||
#define hbqt_par_QLinearGradient( n ) ( ( QLinearGradient* ) hb_parptr( n ) )
|
||||
#define hbqt_par_QLineEdit( n ) ( ( QLineEdit* ) hb_parptr( n ) )
|
||||
@@ -231,6 +233,7 @@
|
||||
#define hbqt_par_QStringListModel( n ) ( ( QStringListModel* ) hb_parptr( n ) )
|
||||
#define hbqt_par_QStyle( n ) ( ( QStyle* ) hb_parptr( n ) )
|
||||
#define hbqt_par_QStyledItemDelegate( n ) ( ( QStyledItemDelegate* ) hb_parptr( n ) )
|
||||
#define hbqt_par_QStyleFactory( n ) ( ( QStyleFactory* ) hb_parptr( n ) )
|
||||
#define hbqt_par_QStyleHintReturn( n ) ( ( QStyleHintReturn* ) hb_parptr( n ) )
|
||||
#define hbqt_par_QStyleOption( n ) ( ( QStyleOption* ) hb_parptr( n ) )
|
||||
#define hbqt_par_QStyleOptionButton( n ) ( ( QStyleOptionButton* ) hb_parptr( n ) )
|
||||
|
||||
146
harbour/contrib/hbqt/qth/QFontMetricsF.qth
Normal file
146
harbour/contrib/hbqt/qth/QFontMetricsF.qth
Normal file
@@ -0,0 +1,146 @@
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
/*
|
||||
* Harbour Project source code:
|
||||
* QT Source Generator for Harbour
|
||||
*
|
||||
* Copyright 2009 Pritpal Bedi <pritpal@vouchcac.com>
|
||||
* www - http://www.harbour-project.org
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this software; see the file COPYING. If not, write to
|
||||
* the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
|
||||
* Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/).
|
||||
*
|
||||
* As a special exception, the Harbour Project gives permission for
|
||||
* additional uses of the text contained in its release of Harbour.
|
||||
*
|
||||
* The exception is that, if you link the Harbour libraries with other
|
||||
* files to produce an executable, this does not by itself cause the
|
||||
* resulting executable to be covered by the GNU General Public License.
|
||||
* Your use of that executable is in no way restricted on account of
|
||||
* linking the Harbour library code into it.
|
||||
*
|
||||
* This exception does not however invalidate any other reasons why
|
||||
* the executable file might be covered by the GNU General Public License.
|
||||
*
|
||||
* This exception applies only to the code released by the Harbour
|
||||
* Project under the name Harbour. If you copy code from other
|
||||
* Harbour Project or Free Software Foundation releases into a copy of
|
||||
* Harbour, as the General Public License permits, the exception does
|
||||
* not apply to the code that you add in this way. To avoid misleading
|
||||
* anyone as to the status of such modified files, you must delete
|
||||
* this exception notice from them.
|
||||
*
|
||||
* If you write modifications of your own for Harbour, it is your choice
|
||||
* whether to permit this exception to apply to your modifications.
|
||||
* If you do not wish that, delete this exception notice.
|
||||
*
|
||||
*/
|
||||
/*----------------------------------------------------------------------*/
|
||||
;
|
||||
; Header File to Generate QT Wrapper Sources
|
||||
;
|
||||
|
||||
<CLASS>
|
||||
Inherits =
|
||||
Type = PlainObject
|
||||
New =
|
||||
</CLASS>
|
||||
|
||||
<DOC>
|
||||
oFontMetricsF := QFontMetricsF():new( pQFontMetricsF )
|
||||
oFontMetricsF := QFontMetricsF():new( "QFontMetrics", pQFontMetrics )
|
||||
oFontMetricsF := QFontMetricsF():new( "QFont", pQFont )
|
||||
oFontMetricsF := QFontMetricsF():new( pQFont, pQPaintDevice )
|
||||
</DOC>
|
||||
|
||||
<CODE>
|
||||
#include <QtGui/QFontMetricsF>
|
||||
|
||||
|
||||
/*
|
||||
* QFontMetricsF ( const QFont & font )
|
||||
* QFontMetricsF ( const QFont & font, QPaintDevice * paintdevice )
|
||||
* QFontMetricsF ( const QFontMetrics & fontMetrics )
|
||||
* QFontMetricsF ( const QFontMetricsF & fm )
|
||||
* ~QFontMetricsF ()
|
||||
*/
|
||||
HB_FUNC( QT_QFONTMETRICSF )
|
||||
{
|
||||
if( hb_pcount() == 1 && HB_ISPOINTER( 1 ) )
|
||||
{
|
||||
hb_retptr( ( QFontMetricsF* ) new QFontMetricsF( *hbqt_par_QFontMetricsF( 1 ) ) );
|
||||
}
|
||||
else if( hb_pcount() == 2 && HB_ISCHAR( 1 ) && HB_ISPOINTER( 2 ) )
|
||||
{
|
||||
if( hbqt_par_QString( 1 ) == ( QString ) "QFont" )
|
||||
{
|
||||
hb_retptr( ( QFontMetricsF* ) new QFontMetricsF( *hbqt_par_QFont( 2 ) ) );
|
||||
}
|
||||
else if( hbqt_par_QString( 1 ) == ( QString ) "QFontMetrics" )
|
||||
{
|
||||
hb_retptr( ( QFontMetricsF* ) new QFontMetricsF( *hbqt_par_QFontMetrics( 2 ) ) );
|
||||
}
|
||||
}
|
||||
else if( hb_pcount() == 2 && HB_ISPOINTER( 1 ) && HB_ISPOINTER( 2 ) )
|
||||
{
|
||||
hb_retptr( ( QFontMetricsF* ) new QFontMetricsF( *hbqt_par_QFont( 1 ), hbqt_par_QPaintDevice( 2 ) ) );
|
||||
}
|
||||
}
|
||||
</CODE>
|
||||
|
||||
<ENUMS>
|
||||
</ENUMS>
|
||||
|
||||
<PROTOS>
|
||||
qreal ascent () const
|
||||
qreal averageCharWidth () const
|
||||
QRectF boundingRect ( const QString & text ) const
|
||||
QRectF boundingRect ( QChar ch ) const
|
||||
QRectF boundingRect ( const QRectF & rect, int flags, const QString & text, int tabStops = 0, int * tabArray = 0 ) const
|
||||
qreal descent () const
|
||||
QString elidedText ( const QString & text, Qt::TextElideMode mode, qreal width, int flags = 0 ) const
|
||||
qreal height () const
|
||||
bool inFont ( QChar ch ) const
|
||||
qreal leading () const
|
||||
qreal leftBearing ( QChar ch ) const
|
||||
qreal lineSpacing () const
|
||||
qreal lineWidth () const
|
||||
qreal maxWidth () const
|
||||
qreal minLeftBearing () const
|
||||
qreal minRightBearing () const
|
||||
qreal overlinePos () const
|
||||
qreal rightBearing ( QChar ch ) const
|
||||
QSizeF size ( int flags, const QString & text, int tabStops = 0, int * tabArray = 0 ) const
|
||||
qreal strikeOutPos () const
|
||||
QRectF tightBoundingRect ( const QString & text ) const
|
||||
qreal underlinePos () const
|
||||
qreal width ( const QString & text ) const
|
||||
qreal width ( QChar ch ) const
|
||||
qreal xHeight () const
|
||||
</PROTOS>
|
||||
|
||||
<SLOTS>
|
||||
</SLOTS>
|
||||
|
||||
<SIGNALS>
|
||||
</SIGNALS>
|
||||
|
||||
<VARIABLES>
|
||||
</VARIABLES>
|
||||
|
||||
|
||||
|
||||
94
harbour/contrib/hbqt/qth/QStyleFactory.qth
Normal file
94
harbour/contrib/hbqt/qth/QStyleFactory.qth
Normal file
@@ -0,0 +1,94 @@
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
/*
|
||||
* Harbour Project source code:
|
||||
* QT Source Generator for Harbour
|
||||
*
|
||||
* Copyright 2009 Pritpal Bedi <pritpal@vouchcac.com>
|
||||
* www - http://www.harbour-project.org
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this software; see the file COPYING. If not, write to
|
||||
* the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
|
||||
* Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/).
|
||||
*
|
||||
* As a special exception, the Harbour Project gives permission for
|
||||
* additional uses of the text contained in its release of Harbour.
|
||||
*
|
||||
* The exception is that, if you link the Harbour libraries with other
|
||||
* files to produce an executable, this does not by itself cause the
|
||||
* resulting executable to be covered by the GNU General Public License.
|
||||
* Your use of that executable is in no way restricted on account of
|
||||
* linking the Harbour library code into it.
|
||||
*
|
||||
* This exception does not however invalidate any other reasons why
|
||||
* the executable file might be covered by the GNU General Public License.
|
||||
*
|
||||
* This exception applies only to the code released by the Harbour
|
||||
* Project under the name Harbour. If you copy code from other
|
||||
* Harbour Project or Free Software Foundation releases into a copy of
|
||||
* Harbour, as the General Public License permits, the exception does
|
||||
* not apply to the code that you add in this way. To avoid misleading
|
||||
* anyone as to the status of such modified files, you must delete
|
||||
* this exception notice from them.
|
||||
*
|
||||
* If you write modifications of your own for Harbour, it is your choice
|
||||
* whether to permit this exception to apply to your modifications.
|
||||
* If you do not wish that, delete this exception notice.
|
||||
*
|
||||
*/
|
||||
/*----------------------------------------------------------------------*/
|
||||
;
|
||||
; Header File to Generate QT Wrapper Sources
|
||||
;
|
||||
|
||||
<CLASS>
|
||||
Inherits =
|
||||
Type = Core
|
||||
New =
|
||||
</CLASS>
|
||||
|
||||
<CODE>
|
||||
#include <QtGui/QStyleFactory>
|
||||
|
||||
|
||||
/*
|
||||
*
|
||||
*/
|
||||
HB_FUNC( QT_QSTYLEFACTORY )
|
||||
{
|
||||
hb_retptr( new QStyleFactory() );
|
||||
}
|
||||
</CODE>
|
||||
|
||||
<ENUMS>
|
||||
</ENUMS>
|
||||
|
||||
<PROTOS>
|
||||
QStyle * create ( const QString & key )
|
||||
QStringList keys ()
|
||||
</PROTOS>
|
||||
|
||||
<SLOTS>
|
||||
</SLOTS>
|
||||
|
||||
<SIGNALS>
|
||||
</SIGNALS>
|
||||
|
||||
<VARIABLES>
|
||||
</VARIABLES>
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user