diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 3818b64a24..c9bb94f744 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,7 +8,51 @@ 2009-12-31 13:59 UTC+0100 Foo Bar (foo.bar foobar.org) */ -2009-04-26 11:17 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com) +2009-04-26 22:14 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com) + * harbour/contrib/hbqt/generator/hbqtgen.prg + * harbour/contrib/hbqt/generator/qt45.qtp + * harbour/contrib/hbqt/hbqt.h + * harbour/contrib/hbqt/Makefile_gen + + + harbour/contrib/hbqt/hbqt_qtextcodec.cpp + + harbour/contrib/hbqt/hbqt_qtextencoder.cpp + + harbour/contrib/hbqt/hbqt_qtextfragment.cpp + + harbour/contrib/hbqt/hbqt_qtextframe.cpp + + harbour/contrib/hbqt/hbqt_qtextframeformat.cpp + + harbour/contrib/hbqt/hbqt_qtextimageformat.cpp + + harbour/contrib/hbqt/hbqt_qtextinlineobject.cpp + + harbour/contrib/hbqt/hbqt_qtextitem.cpp + + harbour/contrib/hbqt/hbqt_qtextlayout.cpp + + harbour/contrib/hbqt/hbqt_qtextlength.cpp + + harbour/contrib/hbqt/hbqt_qtextline.cpp + + + harbour/contrib/hbqt/TQTextCodec.prg + + harbour/contrib/hbqt/TQTextEncoder.prg + + harbour/contrib/hbqt/TQTextFragment.prg + + harbour/contrib/hbqt/TQTextFrame.prg + + harbour/contrib/hbqt/TQTextFrameFormat.prg + + harbour/contrib/hbqt/TQTextImageFormat.prg + + harbour/contrib/hbqt/TQTextInlineObject.prg + + harbour/contrib/hbqt/TQTextItem.prg + + harbour/contrib/hbqt/TQTextLayout.prg + + harbour/contrib/hbqt/TQTextLength.prg + + harbour/contrib/hbqt/TQTextLine.prg + + + harbour/contrib/hbqt/qth/QTextCodec.qth + + harbour/contrib/hbqt/qth/QTextEncoder.qth + + harbour/contrib/hbqt/qth/QTextFragment.qth + + harbour/contrib/hbqt/qth/QTextFrame.qth + + harbour/contrib/hbqt/qth/QTextFrameFormat.qth + + harbour/contrib/hbqt/qth/QTextImageFormat.qth + + harbour/contrib/hbqt/qth/QTextInlineObject.qth + + harbour/contrib/hbqt/qth/QTextItem.qth + + harbour/contrib/hbqt/qth/QTextLayout.qth + + harbour/contrib/hbqt/qth/QTextLength.qth + + harbour/contrib/hbqt/qth/QTextLine.qth + + + Added more classes. + +2009-04-26 18:43 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com) * harbour/contrib/gtqtc/gtqtc.cpp * harbour/contrib/gtqtc/tests/wvtext.cpp + Implemented all BOX characters including B_THIN and B_FAT. diff --git a/harbour/contrib/hbqt/Makefile_gen b/harbour/contrib/hbqt/Makefile_gen index 07ac0e7b43..a6439e2eab 100644 --- a/harbour/contrib/hbqt/Makefile_gen +++ b/harbour/contrib/hbqt/Makefile_gen @@ -105,13 +105,24 @@ CPP_SOURCES=\ hbqt_qtextbrowser.cpp \ hbqt_qtextboundaryfinder.cpp \ hbqt_qtextcharformat.cpp \ + hbqt_qtextcodec.cpp \ hbqt_qtextcursor.cpp \ hbqt_qtextdecoder.cpp \ hbqt_qtextdocument.cpp \ hbqt_qtextdocumentfragment.cpp \ hbqt_qtextdocumentwriter.cpp \ hbqt_qtextedit.cpp \ + hbqt_qtextencoder.cpp \ hbqt_qtextformat.cpp \ + hbqt_qtextfragment.cpp \ + hbqt_qtextframe.cpp \ + hbqt_qtextframeformat.cpp \ + hbqt_qtextimageformat.cpp \ + hbqt_qtextinlineobject.cpp \ + hbqt_qtextitem.cpp \ + hbqt_qtextlayout.cpp \ + hbqt_qtextlength.cpp \ + hbqt_qtextline.cpp \ hbqt_qtextstream.cpp \ hbqt_qtimeedit.cpp \ hbqt_qtimer.cpp \ @@ -242,13 +253,24 @@ PRG_SOURCES=\ TQTextBrowser.prg \ TQTextBoundaryFinder.prg \ TQTextCharFormat.prg \ + TQTextCodec.prg \ TQTextCursor.prg \ TQTextDecoder.prg \ TQTextDocument.prg \ TQTextDocumentFragment.prg \ TQTextDocumentWriter.prg \ TQTextEdit.prg \ + TQTextEncoder.prg \ TQTextFormat.prg \ + TQTextFragment.prg \ + TQTextFrame.prg \ + TQTextFrameFormat.prg \ + TQTextImageFormat.prg \ + TQTextInlineObject.prg \ + TQTextItem.prg \ + TQTextLayout.prg \ + TQTextLength.prg \ + TQTextLine.prg \ TQTextStream.prg \ TQTimeEdit.prg \ TQTimer.prg \ diff --git a/harbour/contrib/hbqt/TQTextCodec.prg b/harbour/contrib/hbqt/TQTextCodec.prg new file mode 100644 index 0000000000..c9b693f946 --- /dev/null +++ b/harbour/contrib/hbqt/TQTextCodec.prg @@ -0,0 +1,89 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT wrapper main header + * + * Copyright 2009 Marcos Antonio Gambeta + * Copyright 2009 Pritpal Bedi + * www - http://www.harbour-project.org + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this software; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, + * Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/). + * + * As a special exception, the Harbour Project gives permission for + * additional uses of the text contained in its release of Harbour. + * + * The exception is that, if you link the Harbour libraries with other + * files to produce an executable, this does not by itself cause the + * resulting executable to be covered by the GNU General Public License. + * Your use of that executable is in no way restricted on account of + * linking the Harbour library code into it. + * + * This exception does not however invalidate any other reasons why + * the executable file might be covered by the GNU General Public License. + * + * This exception applies only to the code released by the Harbour + * Project under the name Harbour. If you copy code from other + * Harbour Project or Free Software Foundation releases into a copy of + * Harbour, as the General Public License permits, the exception does + * not apply to the code that you add in this way. To avoid misleading + * anyone as to the status of such modified files, you must delete + * this exception notice from them. + * + * If you write modifications of your own for Harbour, it is your choice + * whether to permit this exception to apply to your modifications. + * If you do not wish that, delete this exception notice. + * + */ +/*----------------------------------------------------------------------*/ + + +#include "hbclass.ch" + + +CREATE CLASS QTextCodec + + VAR pParent + VAR pPtr + + METHOD New() + + METHOD canEncode( nCh ) INLINE Qt_QTextCodec_canEncode( ::pPtr, nCh ) + METHOD canEncode_1( cS ) INLINE Qt_QTextCodec_canEncode_1( ::pPtr, cS ) + METHOD fromUnicode( cStr ) INLINE Qt_QTextCodec_fromUnicode( ::pPtr, cStr ) + METHOD makeDecoder() INLINE Qt_QTextCodec_makeDecoder( ::pPtr ) + METHOD makeEncoder() INLINE Qt_QTextCodec_makeEncoder( ::pPtr ) + METHOD mibEnum() INLINE Qt_QTextCodec_mibEnum( ::pPtr ) + METHOD name() INLINE Qt_QTextCodec_name( ::pPtr ) + METHOD toUnicode( pA ) INLINE Qt_QTextCodec_toUnicode( ::pPtr, pA ) + METHOD toUnicode_1( pChars ) INLINE Qt_QTextCodec_toUnicode_1( ::pPtr, pChars ) + + ENDCLASS + +/*----------------------------------------------------------------------*/ + +METHOD New( pParent ) CLASS QTextCodec + + ::pParent := pParent + + ::pPtr := Qt_QTextCodec( pParent ) + + RETURN Self + +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/TQTextEncoder.prg b/harbour/contrib/hbqt/TQTextEncoder.prg new file mode 100644 index 0000000000..85343e4816 --- /dev/null +++ b/harbour/contrib/hbqt/TQTextEncoder.prg @@ -0,0 +1,81 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT wrapper main header + * + * Copyright 2009 Marcos Antonio Gambeta + * Copyright 2009 Pritpal Bedi + * www - http://www.harbour-project.org + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this software; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, + * Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/). + * + * As a special exception, the Harbour Project gives permission for + * additional uses of the text contained in its release of Harbour. + * + * The exception is that, if you link the Harbour libraries with other + * files to produce an executable, this does not by itself cause the + * resulting executable to be covered by the GNU General Public License. + * Your use of that executable is in no way restricted on account of + * linking the Harbour library code into it. + * + * This exception does not however invalidate any other reasons why + * the executable file might be covered by the GNU General Public License. + * + * This exception applies only to the code released by the Harbour + * Project under the name Harbour. If you copy code from other + * Harbour Project or Free Software Foundation releases into a copy of + * Harbour, as the General Public License permits, the exception does + * not apply to the code that you add in this way. To avoid misleading + * anyone as to the status of such modified files, you must delete + * this exception notice from them. + * + * If you write modifications of your own for Harbour, it is your choice + * whether to permit this exception to apply to your modifications. + * If you do not wish that, delete this exception notice. + * + */ +/*----------------------------------------------------------------------*/ + + +#include "hbclass.ch" + + +CREATE CLASS QTextEncoder + + VAR pParent + VAR pPtr + + METHOD New() + + METHOD fromUnicode( cStr ) INLINE Qt_QTextEncoder_fromUnicode( ::pPtr, cStr ) + + ENDCLASS + +/*----------------------------------------------------------------------*/ + +METHOD New( pParent ) CLASS QTextEncoder + + ::pParent := pParent + + ::pPtr := Qt_QTextEncoder( pParent ) + + RETURN Self + +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/TQTextFragment.prg b/harbour/contrib/hbqt/TQTextFragment.prg new file mode 100644 index 0000000000..b6fa8938a3 --- /dev/null +++ b/harbour/contrib/hbqt/TQTextFragment.prg @@ -0,0 +1,87 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT wrapper main header + * + * Copyright 2009 Marcos Antonio Gambeta + * Copyright 2009 Pritpal Bedi + * www - http://www.harbour-project.org + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this software; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, + * Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/). + * + * As a special exception, the Harbour Project gives permission for + * additional uses of the text contained in its release of Harbour. + * + * The exception is that, if you link the Harbour libraries with other + * files to produce an executable, this does not by itself cause the + * resulting executable to be covered by the GNU General Public License. + * Your use of that executable is in no way restricted on account of + * linking the Harbour library code into it. + * + * This exception does not however invalidate any other reasons why + * the executable file might be covered by the GNU General Public License. + * + * This exception applies only to the code released by the Harbour + * Project under the name Harbour. If you copy code from other + * Harbour Project or Free Software Foundation releases into a copy of + * Harbour, as the General Public License permits, the exception does + * not apply to the code that you add in this way. To avoid misleading + * anyone as to the status of such modified files, you must delete + * this exception notice from them. + * + * If you write modifications of your own for Harbour, it is your choice + * whether to permit this exception to apply to your modifications. + * If you do not wish that, delete this exception notice. + * + */ +/*----------------------------------------------------------------------*/ + + +#include "hbclass.ch" + + +CREATE CLASS QTextFragment + + VAR pParent + VAR pPtr + + METHOD New() + + METHOD charFormat() INLINE Qt_QTextFragment_charFormat( ::pPtr ) + METHOD charFormatIndex() INLINE Qt_QTextFragment_charFormatIndex( ::pPtr ) + METHOD contains( nPosition ) INLINE Qt_QTextFragment_contains( ::pPtr, nPosition ) + METHOD isValid() INLINE Qt_QTextFragment_isValid( ::pPtr ) + METHOD length() INLINE Qt_QTextFragment_length( ::pPtr ) + METHOD position() INLINE Qt_QTextFragment_position( ::pPtr ) + METHOD text() INLINE Qt_QTextFragment_text( ::pPtr ) + + ENDCLASS + +/*----------------------------------------------------------------------*/ + +METHOD New( pParent ) CLASS QTextFragment + + ::pParent := pParent + + ::pPtr := Qt_QTextFragment( pParent ) + + RETURN Self + +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/TQTextFrame.prg b/harbour/contrib/hbqt/TQTextFrame.prg new file mode 100644 index 0000000000..ec643d9f57 --- /dev/null +++ b/harbour/contrib/hbqt/TQTextFrame.prg @@ -0,0 +1,87 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT wrapper main header + * + * Copyright 2009 Marcos Antonio Gambeta + * Copyright 2009 Pritpal Bedi + * www - http://www.harbour-project.org + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this software; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, + * Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/). + * + * As a special exception, the Harbour Project gives permission for + * additional uses of the text contained in its release of Harbour. + * + * The exception is that, if you link the Harbour libraries with other + * files to produce an executable, this does not by itself cause the + * resulting executable to be covered by the GNU General Public License. + * Your use of that executable is in no way restricted on account of + * linking the Harbour library code into it. + * + * This exception does not however invalidate any other reasons why + * the executable file might be covered by the GNU General Public License. + * + * This exception applies only to the code released by the Harbour + * Project under the name Harbour. If you copy code from other + * Harbour Project or Free Software Foundation releases into a copy of + * Harbour, as the General Public License permits, the exception does + * not apply to the code that you add in this way. To avoid misleading + * anyone as to the status of such modified files, you must delete + * this exception notice from them. + * + * If you write modifications of your own for Harbour, it is your choice + * whether to permit this exception to apply to your modifications. + * If you do not wish that, delete this exception notice. + * + */ +/*----------------------------------------------------------------------*/ + + +#include "hbclass.ch" + + +CREATE CLASS QTextFrame INHERIT QTextObject + + VAR pParent + VAR pPtr + + METHOD New() + + METHOD firstCursorPosition() INLINE Qt_QTextFrame_firstCursorPosition( ::pPtr ) + METHOD firstPosition() INLINE Qt_QTextFrame_firstPosition( ::pPtr ) + METHOD frameFormat() INLINE Qt_QTextFrame_frameFormat( ::pPtr ) + METHOD lastCursorPosition() INLINE Qt_QTextFrame_lastCursorPosition( ::pPtr ) + METHOD lastPosition() INLINE Qt_QTextFrame_lastPosition( ::pPtr ) + METHOD parentFrame() INLINE Qt_QTextFrame_parentFrame( ::pPtr ) + METHOD setFrameFormat( pFormat ) INLINE Qt_QTextFrame_setFrameFormat( ::pPtr, pFormat ) + + ENDCLASS + +/*----------------------------------------------------------------------*/ + +METHOD New( pParent ) CLASS QTextFrame + + ::pParent := pParent + + ::pPtr := Qt_QTextFrame( pParent ) + + RETURN Self + +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/TQTextFrameFormat.prg b/harbour/contrib/hbqt/TQTextFrameFormat.prg new file mode 100644 index 0000000000..544f0cb181 --- /dev/null +++ b/harbour/contrib/hbqt/TQTextFrameFormat.prg @@ -0,0 +1,109 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT wrapper main header + * + * Copyright 2009 Marcos Antonio Gambeta + * Copyright 2009 Pritpal Bedi + * www - http://www.harbour-project.org + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this software; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, + * Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/). + * + * As a special exception, the Harbour Project gives permission for + * additional uses of the text contained in its release of Harbour. + * + * The exception is that, if you link the Harbour libraries with other + * files to produce an executable, this does not by itself cause the + * resulting executable to be covered by the GNU General Public License. + * Your use of that executable is in no way restricted on account of + * linking the Harbour library code into it. + * + * This exception does not however invalidate any other reasons why + * the executable file might be covered by the GNU General Public License. + * + * This exception applies only to the code released by the Harbour + * Project under the name Harbour. If you copy code from other + * Harbour Project or Free Software Foundation releases into a copy of + * Harbour, as the General Public License permits, the exception does + * not apply to the code that you add in this way. To avoid misleading + * anyone as to the status of such modified files, you must delete + * this exception notice from them. + * + * If you write modifications of your own for Harbour, it is your choice + * whether to permit this exception to apply to your modifications. + * If you do not wish that, delete this exception notice. + * + */ +/*----------------------------------------------------------------------*/ + + +#include "hbclass.ch" + + +CREATE CLASS QTextFrameFormat INHERIT QTextFormat + + VAR pParent + VAR pPtr + + METHOD New() + + METHOD border() INLINE Qt_QTextFrameFormat_border( ::pPtr ) + METHOD borderBrush() INLINE Qt_QTextFrameFormat_borderBrush( ::pPtr ) + METHOD borderStyle() INLINE Qt_QTextFrameFormat_borderStyle( ::pPtr ) + METHOD bottomMargin() INLINE Qt_QTextFrameFormat_bottomMargin( ::pPtr ) + METHOD height() INLINE Qt_QTextFrameFormat_height( ::pPtr ) + METHOD isValid() INLINE Qt_QTextFrameFormat_isValid( ::pPtr ) + METHOD leftMargin() INLINE Qt_QTextFrameFormat_leftMargin( ::pPtr ) + METHOD margin() INLINE Qt_QTextFrameFormat_margin( ::pPtr ) + METHOD padding() INLINE Qt_QTextFrameFormat_padding( ::pPtr ) + METHOD pageBreakPolicy() INLINE Qt_QTextFrameFormat_pageBreakPolicy( ::pPtr ) + METHOD position() INLINE Qt_QTextFrameFormat_position( ::pPtr ) + METHOD rightMargin() INLINE Qt_QTextFrameFormat_rightMargin( ::pPtr ) + METHOD setBorder( nWidth ) INLINE Qt_QTextFrameFormat_setBorder( ::pPtr, nWidth ) + METHOD setBorderBrush( pBrush ) INLINE Qt_QTextFrameFormat_setBorderBrush( ::pPtr, pBrush ) + METHOD setBorderStyle( nStyle ) INLINE Qt_QTextFrameFormat_setBorderStyle( ::pPtr, nStyle ) + METHOD setBottomMargin( nMargin ) INLINE Qt_QTextFrameFormat_setBottomMargin( ::pPtr, nMargin ) + METHOD setHeight( pHeight ) INLINE Qt_QTextFrameFormat_setHeight( ::pPtr, pHeight ) + METHOD setHeight_1( nHeight ) INLINE Qt_QTextFrameFormat_setHeight_1( ::pPtr, nHeight ) + METHOD setLeftMargin( nMargin ) INLINE Qt_QTextFrameFormat_setLeftMargin( ::pPtr, nMargin ) + METHOD setMargin( nMargin ) INLINE Qt_QTextFrameFormat_setMargin( ::pPtr, nMargin ) + METHOD setPadding( nWidth ) INLINE Qt_QTextFrameFormat_setPadding( ::pPtr, nWidth ) + METHOD setPageBreakPolicy( nPolicy ) INLINE Qt_QTextFrameFormat_setPageBreakPolicy( ::pPtr, nPolicy ) + METHOD setPosition( nPolicy ) INLINE Qt_QTextFrameFormat_setPosition( ::pPtr, nPolicy ) + METHOD setRightMargin( nMargin ) INLINE Qt_QTextFrameFormat_setRightMargin( ::pPtr, nMargin ) + METHOD setTopMargin( nMargin ) INLINE Qt_QTextFrameFormat_setTopMargin( ::pPtr, nMargin ) + METHOD setWidth( pWidth ) INLINE Qt_QTextFrameFormat_setWidth( ::pPtr, pWidth ) + METHOD setWidth_1( nWidth ) INLINE Qt_QTextFrameFormat_setWidth_1( ::pPtr, nWidth ) + METHOD topMargin() INLINE Qt_QTextFrameFormat_topMargin( ::pPtr ) + METHOD width() INLINE Qt_QTextFrameFormat_width( ::pPtr ) + + ENDCLASS + +/*----------------------------------------------------------------------*/ + +METHOD New( pParent ) CLASS QTextFrameFormat + + ::pParent := pParent + + ::pPtr := Qt_QTextFrameFormat( pParent ) + + RETURN Self + +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/TQTextImageFormat.prg b/harbour/contrib/hbqt/TQTextImageFormat.prg new file mode 100644 index 0000000000..1cec44a028 --- /dev/null +++ b/harbour/contrib/hbqt/TQTextImageFormat.prg @@ -0,0 +1,87 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT wrapper main header + * + * Copyright 2009 Marcos Antonio Gambeta + * Copyright 2009 Pritpal Bedi + * www - http://www.harbour-project.org + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this software; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, + * Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/). + * + * As a special exception, the Harbour Project gives permission for + * additional uses of the text contained in its release of Harbour. + * + * The exception is that, if you link the Harbour libraries with other + * files to produce an executable, this does not by itself cause the + * resulting executable to be covered by the GNU General Public License. + * Your use of that executable is in no way restricted on account of + * linking the Harbour library code into it. + * + * This exception does not however invalidate any other reasons why + * the executable file might be covered by the GNU General Public License. + * + * This exception applies only to the code released by the Harbour + * Project under the name Harbour. If you copy code from other + * Harbour Project or Free Software Foundation releases into a copy of + * Harbour, as the General Public License permits, the exception does + * not apply to the code that you add in this way. To avoid misleading + * anyone as to the status of such modified files, you must delete + * this exception notice from them. + * + * If you write modifications of your own for Harbour, it is your choice + * whether to permit this exception to apply to your modifications. + * If you do not wish that, delete this exception notice. + * + */ +/*----------------------------------------------------------------------*/ + + +#include "hbclass.ch" + + +CREATE CLASS QTextImageFormat INHERIT QTextCharFormat + + VAR pParent + VAR pPtr + + METHOD New() + + METHOD height() INLINE Qt_QTextImageFormat_height( ::pPtr ) + METHOD isValid() INLINE Qt_QTextImageFormat_isValid( ::pPtr ) + METHOD name() INLINE Qt_QTextImageFormat_name( ::pPtr ) + METHOD setHeight( nHeight ) INLINE Qt_QTextImageFormat_setHeight( ::pPtr, nHeight ) + METHOD setName( cName ) INLINE Qt_QTextImageFormat_setName( ::pPtr, cName ) + METHOD setWidth( nWidth ) INLINE Qt_QTextImageFormat_setWidth( ::pPtr, nWidth ) + METHOD width() INLINE Qt_QTextImageFormat_width( ::pPtr ) + + ENDCLASS + +/*----------------------------------------------------------------------*/ + +METHOD New( pParent ) CLASS QTextImageFormat + + ::pParent := pParent + + ::pPtr := Qt_QTextImageFormat( pParent ) + + RETURN Self + +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/TQTextInlineObject.prg b/harbour/contrib/hbqt/TQTextInlineObject.prg new file mode 100644 index 0000000000..7d9f49c7e1 --- /dev/null +++ b/harbour/contrib/hbqt/TQTextInlineObject.prg @@ -0,0 +1,93 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT wrapper main header + * + * Copyright 2009 Marcos Antonio Gambeta + * Copyright 2009 Pritpal Bedi + * www - http://www.harbour-project.org + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this software; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, + * Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/). + * + * As a special exception, the Harbour Project gives permission for + * additional uses of the text contained in its release of Harbour. + * + * The exception is that, if you link the Harbour libraries with other + * files to produce an executable, this does not by itself cause the + * resulting executable to be covered by the GNU General Public License. + * Your use of that executable is in no way restricted on account of + * linking the Harbour library code into it. + * + * This exception does not however invalidate any other reasons why + * the executable file might be covered by the GNU General Public License. + * + * This exception applies only to the code released by the Harbour + * Project under the name Harbour. If you copy code from other + * Harbour Project or Free Software Foundation releases into a copy of + * Harbour, as the General Public License permits, the exception does + * not apply to the code that you add in this way. To avoid misleading + * anyone as to the status of such modified files, you must delete + * this exception notice from them. + * + * If you write modifications of your own for Harbour, it is your choice + * whether to permit this exception to apply to your modifications. + * If you do not wish that, delete this exception notice. + * + */ +/*----------------------------------------------------------------------*/ + + +#include "hbclass.ch" + + +CREATE CLASS QTextInlineObject + + VAR pParent + VAR pPtr + + METHOD New() + + METHOD ascent() INLINE Qt_QTextInlineObject_ascent( ::pPtr ) + METHOD descent() INLINE Qt_QTextInlineObject_descent( ::pPtr ) + METHOD format() INLINE Qt_QTextInlineObject_format( ::pPtr ) + METHOD formatIndex() INLINE Qt_QTextInlineObject_formatIndex( ::pPtr ) + METHOD height() INLINE Qt_QTextInlineObject_height( ::pPtr ) + METHOD isValid() INLINE Qt_QTextInlineObject_isValid( ::pPtr ) + METHOD rect() INLINE Qt_QTextInlineObject_rect( ::pPtr ) + METHOD setAscent( nA ) INLINE Qt_QTextInlineObject_setAscent( ::pPtr, nA ) + METHOD setDescent( nD ) INLINE Qt_QTextInlineObject_setDescent( ::pPtr, nD ) + METHOD setWidth( nW ) INLINE Qt_QTextInlineObject_setWidth( ::pPtr, nW ) + METHOD textDirection() INLINE Qt_QTextInlineObject_textDirection( ::pPtr ) + METHOD textPosition() INLINE Qt_QTextInlineObject_textPosition( ::pPtr ) + METHOD width() INLINE Qt_QTextInlineObject_width( ::pPtr ) + + ENDCLASS + +/*----------------------------------------------------------------------*/ + +METHOD New( pParent ) CLASS QTextInlineObject + + ::pParent := pParent + + ::pPtr := Qt_QTextInlineObject( pParent ) + + RETURN Self + +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/TQTextItem.prg b/harbour/contrib/hbqt/TQTextItem.prg new file mode 100644 index 0000000000..b27f4ccfe1 --- /dev/null +++ b/harbour/contrib/hbqt/TQTextItem.prg @@ -0,0 +1,86 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT wrapper main header + * + * Copyright 2009 Marcos Antonio Gambeta + * Copyright 2009 Pritpal Bedi + * www - http://www.harbour-project.org + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this software; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, + * Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/). + * + * As a special exception, the Harbour Project gives permission for + * additional uses of the text contained in its release of Harbour. + * + * The exception is that, if you link the Harbour libraries with other + * files to produce an executable, this does not by itself cause the + * resulting executable to be covered by the GNU General Public License. + * Your use of that executable is in no way restricted on account of + * linking the Harbour library code into it. + * + * This exception does not however invalidate any other reasons why + * the executable file might be covered by the GNU General Public License. + * + * This exception applies only to the code released by the Harbour + * Project under the name Harbour. If you copy code from other + * Harbour Project or Free Software Foundation releases into a copy of + * Harbour, as the General Public License permits, the exception does + * not apply to the code that you add in this way. To avoid misleading + * anyone as to the status of such modified files, you must delete + * this exception notice from them. + * + * If you write modifications of your own for Harbour, it is your choice + * whether to permit this exception to apply to your modifications. + * If you do not wish that, delete this exception notice. + * + */ +/*----------------------------------------------------------------------*/ + + +#include "hbclass.ch" + + +CREATE CLASS QTextItem + + VAR pParent + VAR pPtr + + METHOD New() + + METHOD ascent() INLINE Qt_QTextItem_ascent( ::pPtr ) + METHOD descent() INLINE Qt_QTextItem_descent( ::pPtr ) + METHOD font() INLINE Qt_QTextItem_font( ::pPtr ) + METHOD renderFlags() INLINE Qt_QTextItem_renderFlags( ::pPtr ) + METHOD text() INLINE Qt_QTextItem_text( ::pPtr ) + METHOD width() INLINE Qt_QTextItem_width( ::pPtr ) + + ENDCLASS + +/*----------------------------------------------------------------------*/ + +METHOD New( pParent ) CLASS QTextItem + + ::pParent := pParent + + ::pPtr := Qt_QTextItem( pParent ) + + RETURN Self + +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/TQTextLayout.prg b/harbour/contrib/hbqt/TQTextLayout.prg new file mode 100644 index 0000000000..aadc9cc538 --- /dev/null +++ b/harbour/contrib/hbqt/TQTextLayout.prg @@ -0,0 +1,109 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT wrapper main header + * + * Copyright 2009 Marcos Antonio Gambeta + * Copyright 2009 Pritpal Bedi + * www - http://www.harbour-project.org + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this software; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, + * Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/). + * + * As a special exception, the Harbour Project gives permission for + * additional uses of the text contained in its release of Harbour. + * + * The exception is that, if you link the Harbour libraries with other + * files to produce an executable, this does not by itself cause the + * resulting executable to be covered by the GNU General Public License. + * Your use of that executable is in no way restricted on account of + * linking the Harbour library code into it. + * + * This exception does not however invalidate any other reasons why + * the executable file might be covered by the GNU General Public License. + * + * This exception applies only to the code released by the Harbour + * Project under the name Harbour. If you copy code from other + * Harbour Project or Free Software Foundation releases into a copy of + * Harbour, as the General Public License permits, the exception does + * not apply to the code that you add in this way. To avoid misleading + * anyone as to the status of such modified files, you must delete + * this exception notice from them. + * + * If you write modifications of your own for Harbour, it is your choice + * whether to permit this exception to apply to your modifications. + * If you do not wish that, delete this exception notice. + * + */ +/*----------------------------------------------------------------------*/ + + +#include "hbclass.ch" + + +CREATE CLASS QTextLayout + + VAR pParent + VAR pPtr + + METHOD New() + + METHOD beginLayout() INLINE Qt_QTextLayout_beginLayout( ::pPtr ) + METHOD boundingRect() INLINE Qt_QTextLayout_boundingRect( ::pPtr ) + METHOD cacheEnabled() INLINE Qt_QTextLayout_cacheEnabled( ::pPtr ) + METHOD clearAdditionalFormats() INLINE Qt_QTextLayout_clearAdditionalFormats( ::pPtr ) + METHOD clearLayout() INLINE Qt_QTextLayout_clearLayout( ::pPtr ) + METHOD createLine() INLINE Qt_QTextLayout_createLine( ::pPtr ) + METHOD drawCursor( pPainter, pPosition, nCursorPosition, nWidth ) INLINE Qt_QTextLayout_drawCursor( ::pPtr, pPainter, pPosition, nCursorPosition, nWidth ) + METHOD drawCursor_1( pPainter, pPosition, nCursorPosition ) INLINE Qt_QTextLayout_drawCursor_1( ::pPtr, pPainter, pPosition, nCursorPosition ) + METHOD endLayout() INLINE Qt_QTextLayout_endLayout( ::pPtr ) + METHOD font() INLINE Qt_QTextLayout_font( ::pPtr ) + METHOD isValidCursorPosition( nPos ) INLINE Qt_QTextLayout_isValidCursorPosition( ::pPtr, nPos ) + METHOD lineAt( nI ) INLINE Qt_QTextLayout_lineAt( ::pPtr, nI ) + METHOD lineCount() INLINE Qt_QTextLayout_lineCount( ::pPtr ) + METHOD lineForTextPosition( nPos ) INLINE Qt_QTextLayout_lineForTextPosition( ::pPtr, nPos ) + METHOD maximumWidth() INLINE Qt_QTextLayout_maximumWidth( ::pPtr ) + METHOD minimumWidth() INLINE Qt_QTextLayout_minimumWidth( ::pPtr ) + METHOD nextCursorPosition( nOldPos, nMode ) INLINE Qt_QTextLayout_nextCursorPosition( ::pPtr, nOldPos, nMode ) + METHOD position() INLINE Qt_QTextLayout_position( ::pPtr ) + METHOD preeditAreaPosition() INLINE Qt_QTextLayout_preeditAreaPosition( ::pPtr ) + METHOD preeditAreaText() INLINE Qt_QTextLayout_preeditAreaText( ::pPtr ) + METHOD previousCursorPosition( nOldPos, nMode ) INLINE Qt_QTextLayout_previousCursorPosition( ::pPtr, nOldPos, nMode ) + METHOD setCacheEnabled( lEnable ) INLINE Qt_QTextLayout_setCacheEnabled( ::pPtr, lEnable ) + METHOD setFont( pFont ) INLINE Qt_QTextLayout_setFont( ::pPtr, pFont ) + METHOD setPosition( pP ) INLINE Qt_QTextLayout_setPosition( ::pPtr, pP ) + METHOD setPreeditArea( nPosition, cText ) INLINE Qt_QTextLayout_setPreeditArea( ::pPtr, nPosition, cText ) + METHOD setText( cString ) INLINE Qt_QTextLayout_setText( ::pPtr, cString ) + METHOD setTextOption( pOption ) INLINE Qt_QTextLayout_setTextOption( ::pPtr, pOption ) + METHOD text() INLINE Qt_QTextLayout_text( ::pPtr ) + METHOD textOption() INLINE Qt_QTextLayout_textOption( ::pPtr ) + + ENDCLASS + +/*----------------------------------------------------------------------*/ + +METHOD New( pParent ) CLASS QTextLayout + + ::pParent := pParent + + ::pPtr := Qt_QTextLayout( pParent ) + + RETURN Self + +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/TQTextLength.prg b/harbour/contrib/hbqt/TQTextLength.prg new file mode 100644 index 0000000000..2b82835911 --- /dev/null +++ b/harbour/contrib/hbqt/TQTextLength.prg @@ -0,0 +1,83 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT wrapper main header + * + * Copyright 2009 Marcos Antonio Gambeta + * Copyright 2009 Pritpal Bedi + * www - http://www.harbour-project.org + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this software; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, + * Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/). + * + * As a special exception, the Harbour Project gives permission for + * additional uses of the text contained in its release of Harbour. + * + * The exception is that, if you link the Harbour libraries with other + * files to produce an executable, this does not by itself cause the + * resulting executable to be covered by the GNU General Public License. + * Your use of that executable is in no way restricted on account of + * linking the Harbour library code into it. + * + * This exception does not however invalidate any other reasons why + * the executable file might be covered by the GNU General Public License. + * + * This exception applies only to the code released by the Harbour + * Project under the name Harbour. If you copy code from other + * Harbour Project or Free Software Foundation releases into a copy of + * Harbour, as the General Public License permits, the exception does + * not apply to the code that you add in this way. To avoid misleading + * anyone as to the status of such modified files, you must delete + * this exception notice from them. + * + * If you write modifications of your own for Harbour, it is your choice + * whether to permit this exception to apply to your modifications. + * If you do not wish that, delete this exception notice. + * + */ +/*----------------------------------------------------------------------*/ + + +#include "hbclass.ch" + + +CREATE CLASS QTextLength + + VAR pParent + VAR pPtr + + METHOD New() + + METHOD rawValue() INLINE Qt_QTextLength_rawValue( ::pPtr ) + METHOD type() INLINE Qt_QTextLength_type( ::pPtr ) + METHOD value( nMaximumLength ) INLINE Qt_QTextLength_value( ::pPtr, nMaximumLength ) + + ENDCLASS + +/*----------------------------------------------------------------------*/ + +METHOD New( pParent ) CLASS QTextLength + + ::pParent := pParent + + ::pPtr := Qt_QTextLength( pParent ) + + RETURN Self + +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/TQTextLine.prg b/harbour/contrib/hbqt/TQTextLine.prg new file mode 100644 index 0000000000..8342ed48d7 --- /dev/null +++ b/harbour/contrib/hbqt/TQTextLine.prg @@ -0,0 +1,101 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT wrapper main header + * + * Copyright 2009 Marcos Antonio Gambeta + * Copyright 2009 Pritpal Bedi + * www - http://www.harbour-project.org + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this software; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, + * Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/). + * + * As a special exception, the Harbour Project gives permission for + * additional uses of the text contained in its release of Harbour. + * + * The exception is that, if you link the Harbour libraries with other + * files to produce an executable, this does not by itself cause the + * resulting executable to be covered by the GNU General Public License. + * Your use of that executable is in no way restricted on account of + * linking the Harbour library code into it. + * + * This exception does not however invalidate any other reasons why + * the executable file might be covered by the GNU General Public License. + * + * This exception applies only to the code released by the Harbour + * Project under the name Harbour. If you copy code from other + * Harbour Project or Free Software Foundation releases into a copy of + * Harbour, as the General Public License permits, the exception does + * not apply to the code that you add in this way. To avoid misleading + * anyone as to the status of such modified files, you must delete + * this exception notice from them. + * + * If you write modifications of your own for Harbour, it is your choice + * whether to permit this exception to apply to your modifications. + * If you do not wish that, delete this exception notice. + * + */ +/*----------------------------------------------------------------------*/ + + +#include "hbclass.ch" + + +CREATE CLASS QTextLine + + VAR pParent + VAR pPtr + + METHOD New() + + METHOD ascent() INLINE Qt_QTextLine_ascent( ::pPtr ) + METHOD cursorToX( nCursorPos, nEdge ) INLINE Qt_QTextLine_cursorToX( ::pPtr, nCursorPos, nEdge ) + METHOD cursorToX_1( nCursorPos, nEdge ) INLINE Qt_QTextLine_cursorToX_1( ::pPtr, nCursorPos, nEdge ) + METHOD descent() INLINE Qt_QTextLine_descent( ::pPtr ) + METHOD height() INLINE Qt_QTextLine_height( ::pPtr ) + METHOD isValid() INLINE Qt_QTextLine_isValid( ::pPtr ) + METHOD lineNumber() INLINE Qt_QTextLine_lineNumber( ::pPtr ) + METHOD naturalTextRect() INLINE Qt_QTextLine_naturalTextRect( ::pPtr ) + METHOD naturalTextWidth() INLINE Qt_QTextLine_naturalTextWidth( ::pPtr ) + METHOD position() INLINE Qt_QTextLine_position( ::pPtr ) + METHOD rect() INLINE Qt_QTextLine_rect( ::pPtr ) + METHOD setLineWidth( nWidth ) INLINE Qt_QTextLine_setLineWidth( ::pPtr, nWidth ) + METHOD setNumColumns( nNumColumns ) INLINE Qt_QTextLine_setNumColumns( ::pPtr, nNumColumns ) + METHOD setNumColumns_1( nNumColumns, nAlignmentWidth ) INLINE Qt_QTextLine_setNumColumns_1( ::pPtr, nNumColumns, nAlignmentWidth ) + METHOD setPosition( pPos ) INLINE Qt_QTextLine_setPosition( ::pPtr, pPos ) + METHOD textLength() INLINE Qt_QTextLine_textLength( ::pPtr ) + METHOD textStart() INLINE Qt_QTextLine_textStart( ::pPtr ) + METHOD width() INLINE Qt_QTextLine_width( ::pPtr ) + METHOD x() INLINE Qt_QTextLine_x( ::pPtr ) + METHOD xToCursor( nX, nCpos ) INLINE Qt_QTextLine_xToCursor( ::pPtr, nX, nCpos ) + METHOD y() INLINE Qt_QTextLine_y( ::pPtr ) + + ENDCLASS + +/*----------------------------------------------------------------------*/ + +METHOD New( pParent ) CLASS QTextLine + + ::pParent := pParent + + ::pPtr := Qt_QTextLine( pParent ) + + RETURN Self + +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/generator/hbqtgen.prg b/harbour/contrib/hbqt/generator/hbqtgen.prg index 6825c6029b..1a8d4d9d48 100644 --- a/harbour/contrib/hbqt/generator/hbqtgen.prg +++ b/harbour/contrib/hbqt/generator/hbqtgen.prg @@ -1435,6 +1435,19 @@ STATIC FUNCTION Build_HBQT_H( cPathOut ) aadd( txt_, "#define hbqt_par_QTextCursor( n ) ( ( QTextCursor* ) hb_parptr( n ) ) " ) aadd( txt_, "#define hbqt_par_QRegExp( n ) ( ( QRegExp* ) hb_parptr( n ) ) " ) aadd( txt_, "#define hbqt_par_QAbstractTextDocumentLayout( n ) ( ( QAbstractTextDocumentLayout* ) hb_parptr( n ) )" ) + aadd( txt_, "#define hbqt_par_QTextCodec( n ) ( ( QTextCodec* ) hb_parptr( n ) ) " ) + aadd( txt_, "#define hbqt_par_QTextEncoder( n ) ( ( QTextEncoder* ) hb_parptr( n ) ) " ) + aadd( txt_, "#define hbqt_par_QTextFragment( n ) ( ( QTextFragment* ) hb_parptr( n ) ) " ) + aadd( txt_, "#define hbqt_par_QTextFrame( n ) ( ( QTextFrame* ) hb_parptr( n ) ) " ) + aadd( txt_, "#define hbqt_par_QTextFrameFormat( n ) ( ( QTextFrameFormat* ) hb_parptr( n ) ) " ) + aadd( txt_, "#define hbqt_par_QTextImageFormat( n ) ( ( QTextImageFormat* ) hb_parptr( n ) ) " ) + aadd( txt_, "#define hbqt_par_QTextLength( n ) ( ( QTextLength* ) hb_parptr( n ) ) " ) + aadd( txt_, "#define hbqt_par_QTextEngine( n ) ( ( QTextEngine* ) hb_parptr( n ) ) " ) + aadd( txt_, "#define hbqt_par_QTextItem( n ) ( ( QTextItem* ) hb_parptr( n ) ) " ) + aadd( txt_, "#define hbqt_par_QTextInlineObject( n ) ( ( QTextInlineObject* ) hb_parptr( n ) ) " ) + aadd( txt_, "#define hbqt_par_QTextLayout( n ) ( ( QTextLayout* ) hb_parptr( n ) ) " ) + aadd( txt_, "#define hbqt_par_QTextLength( n ) ( ( QTextLength* ) hb_parptr( n ) ) " ) + aadd( txt_, "#define hbqt_par_QTextLine( n ) ( ( QTextLine* ) hb_parptr( n ) ) " ) aadd( txt_, " " ) aadd( txt_, "#define hbqt_par_QString( n ) ( ( QString ) hb_parc( n ) ) " ) aadd( txt_, "#define hbqt_par_QRgb( n ) ( hb_parnint( n ) ) " ) diff --git a/harbour/contrib/hbqt/generator/qt45.qtp b/harbour/contrib/hbqt/generator/qt45.qtp index c1dc44c4d6..f1333f5dc9 100644 --- a/harbour/contrib/hbqt/generator/qt45.qtp +++ b/harbour/contrib/hbqt/generator/qt45.qtp @@ -112,13 +112,25 @@ QTextBlockGroup.qth QTextBrowser.qth QTextBoundaryFinder.qth QTextCharFormat.qth +QTextCodec.qth QTextCursor.qth QTextDecoder.qth QTextDocument.qth QTextDocumentFragment.qth QTextDocumentWriter.qth QTextEdit.qth +QTextEncoder.qth QTextFormat.qth +QTextFragment.qth +QTextFrame.qth +QTextFrameFormat.qth +QTextImageFormat.qth +QTextInlineObject.qth +QTextItem.qth +QTextLayout.qth +QTextLength.qth +QTextLine.qth + QTextStream.qth QTimeEdit.qth QTimer.qth diff --git a/harbour/contrib/hbqt/hbqt.h b/harbour/contrib/hbqt/hbqt.h index 8e59cd7b51..83533b0b3c 100644 --- a/harbour/contrib/hbqt/hbqt.h +++ b/harbour/contrib/hbqt/hbqt.h @@ -255,6 +255,19 @@ #define hbqt_par_QTextCursor( n ) ( ( QTextCursor* ) hb_parptr( n ) ) #define hbqt_par_QRegExp( n ) ( ( QRegExp* ) hb_parptr( n ) ) #define hbqt_par_QAbstractTextDocumentLayout( n ) ( ( QAbstractTextDocumentLayout* ) hb_parptr( n ) ) +#define hbqt_par_QTextCodec( n ) ( ( QTextCodec* ) hb_parptr( n ) ) +#define hbqt_par_QTextEncoder( n ) ( ( QTextEncoder* ) hb_parptr( n ) ) +#define hbqt_par_QTextFragment( n ) ( ( QTextFragment* ) hb_parptr( n ) ) +#define hbqt_par_QTextFrame( n ) ( ( QTextFrame* ) hb_parptr( n ) ) +#define hbqt_par_QTextFrameFormat( n ) ( ( QTextFrameFormat* ) hb_parptr( n ) ) +#define hbqt_par_QTextImageFormat( n ) ( ( QTextImageFormat* ) hb_parptr( n ) ) +#define hbqt_par_QTextLength( n ) ( ( QTextLength* ) hb_parptr( n ) ) +#define hbqt_par_QTextEngine( n ) ( ( QTextEngine* ) hb_parptr( n ) ) +#define hbqt_par_QTextItem( n ) ( ( QTextItem* ) hb_parptr( n ) ) +#define hbqt_par_QTextInlineObject( n ) ( ( QTextInlineObject* ) hb_parptr( n ) ) +#define hbqt_par_QTextLayout( n ) ( ( QTextLayout* ) hb_parptr( n ) ) +#define hbqt_par_QTextLength( n ) ( ( QTextLength* ) hb_parptr( n ) ) +#define hbqt_par_QTextLine( n ) ( ( QTextLine* ) hb_parptr( n ) ) #define hbqt_par_QString( n ) ( ( QString ) hb_parc( n ) ) #define hbqt_par_QRgb( n ) ( hb_parnint( n ) ) diff --git a/harbour/contrib/hbqt/hbqt_qtextcodec.cpp b/harbour/contrib/hbqt/hbqt_qtextcodec.cpp new file mode 100644 index 0000000000..c3d11fb6f9 --- /dev/null +++ b/harbour/contrib/hbqt/hbqt_qtextcodec.cpp @@ -0,0 +1,160 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT wrapper main header + * + * Copyright 2009 Marcos Antonio Gambeta + * Copyright 2009 Pritpal Bedi + * www - http://www.harbour-project.org + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this software; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, + * Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/). + * + * As a special exception, the Harbour Project gives permission for + * additional uses of the text contained in its release of Harbour. + * + * The exception is that, if you link the Harbour libraries with other + * files to produce an executable, this does not by itself cause the + * resulting executable to be covered by the GNU General Public License. + * Your use of that executable is in no way restricted on account of + * linking the Harbour library code into it. + * + * This exception does not however invalidate any other reasons why + * the executable file might be covered by the GNU General Public License. + * + * This exception applies only to the code released by the Harbour + * Project under the name Harbour. If you copy code from other + * Harbour Project or Free Software Foundation releases into a copy of + * Harbour, as the General Public License permits, the exception does + * not apply to the code that you add in this way. To avoid misleading + * anyone as to the status of such modified files, you must delete + * this exception notice from them. + * + * If you write modifications of your own for Harbour, it is your choice + * whether to permit this exception to apply to your modifications. + * If you do not wish that, delete this exception notice. + * + */ +/*----------------------------------------------------------------------*/ + +#include "hbapi.h" +#include "hbqt.h" + +/*----------------------------------------------------------------------*/ +#if QT_VERSION >= 0x040500 +/*----------------------------------------------------------------------*/ + +/* + * Constructed[ 9/10 [ 90.00% ] ] + * + * *** Unconvered Prototypes *** + * ----------------------------- + * + * virtual QList aliases () const + */ + + +#include + + +/* + * + * + */ +HB_FUNC( QT_QTEXTCODEC ) +{ + //hb_retptr( ( QTextCodec* ) new QTextCodec() ); +} + +/* + * bool canEncode ( QChar ch ) const + */ +HB_FUNC( QT_QTEXTCODEC_CANENCODE ) +{ + hb_retl( hbqt_par_QTextCodec( 1 )->canEncode( hb_parni( 2 ) ) ); +} + +/* + * bool canEncode ( const QString & s ) const + */ +HB_FUNC( QT_QTEXTCODEC_CANENCODE_1 ) +{ + hb_retl( hbqt_par_QTextCodec( 1 )->canEncode( hbqt_par_QString( 2 ) ) ); +} + +/* + * QByteArray fromUnicode ( const QString & str ) const + */ +HB_FUNC( QT_QTEXTCODEC_FROMUNICODE ) +{ + hb_retptr( new QByteArray( hbqt_par_QTextCodec( 1 )->fromUnicode( hbqt_par_QString( 2 ) ) ) ); +} + +/* + * QTextDecoder * makeDecoder () const + */ +HB_FUNC( QT_QTEXTCODEC_MAKEDECODER ) +{ + hb_retptr( ( QTextDecoder* ) hbqt_par_QTextCodec( 1 )->makeDecoder() ); +} + +/* + * QTextEncoder * makeEncoder () const + */ +HB_FUNC( QT_QTEXTCODEC_MAKEENCODER ) +{ + hb_retptr( ( QTextEncoder* ) hbqt_par_QTextCodec( 1 )->makeEncoder() ); +} + +/* + * virtual int mibEnum () const = 0 + */ +HB_FUNC( QT_QTEXTCODEC_MIBENUM ) +{ + hb_retni( hbqt_par_QTextCodec( 1 )->mibEnum() ); +} + +/* + * virtual QByteArray name () const = 0 + */ +HB_FUNC( QT_QTEXTCODEC_NAME ) +{ + hb_retptr( new QByteArray( hbqt_par_QTextCodec( 1 )->name() ) ); +} + +/* + * QString toUnicode ( const QByteArray & a ) const + */ +HB_FUNC( QT_QTEXTCODEC_TOUNICODE ) +{ + hb_retc( hbqt_par_QTextCodec( 1 )->toUnicode( *hbqt_par_QByteArray( 2 ) ).toLatin1().data() ); +} + +/* + * QString toUnicode ( const char * chars ) const + */ +HB_FUNC( QT_QTEXTCODEC_TOUNICODE_1 ) +{ + hb_retc( hbqt_par_QTextCodec( 1 )->toUnicode( hbqt_par_char( 2 ) ).toLatin1().data() ); +} + + +/*----------------------------------------------------------------------*/ +#endif /* #if QT_VERSION >= 0x040500 */ +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/hbqt_qtextencoder.cpp b/harbour/contrib/hbqt/hbqt_qtextencoder.cpp new file mode 100644 index 0000000000..6829111035 --- /dev/null +++ b/harbour/contrib/hbqt/hbqt_qtextencoder.cpp @@ -0,0 +1,87 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT wrapper main header + * + * Copyright 2009 Marcos Antonio Gambeta + * Copyright 2009 Pritpal Bedi + * www - http://www.harbour-project.org + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this software; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, + * Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/). + * + * As a special exception, the Harbour Project gives permission for + * additional uses of the text contained in its release of Harbour. + * + * The exception is that, if you link the Harbour libraries with other + * files to produce an executable, this does not by itself cause the + * resulting executable to be covered by the GNU General Public License. + * Your use of that executable is in no way restricted on account of + * linking the Harbour library code into it. + * + * This exception does not however invalidate any other reasons why + * the executable file might be covered by the GNU General Public License. + * + * This exception applies only to the code released by the Harbour + * Project under the name Harbour. If you copy code from other + * Harbour Project or Free Software Foundation releases into a copy of + * Harbour, as the General Public License permits, the exception does + * not apply to the code that you add in this way. To avoid misleading + * anyone as to the status of such modified files, you must delete + * this exception notice from them. + * + * If you write modifications of your own for Harbour, it is your choice + * whether to permit this exception to apply to your modifications. + * If you do not wish that, delete this exception notice. + * + */ +/*----------------------------------------------------------------------*/ + +#include "hbapi.h" +#include "hbqt.h" + +/*----------------------------------------------------------------------*/ +#if QT_VERSION >= 0x040500 +/*----------------------------------------------------------------------*/ + + +#include + + +/* + * QTextEncoder ( const QTextCodec * codec ) + * ~QTextEncoder () + */ +HB_FUNC( QT_QTEXTENCODER ) +{ + hb_retptr( ( QTextEncoder* ) new QTextEncoder( hbqt_par_QTextCodec( 1 ) ) ); +} + +/* + * QByteArray fromUnicode ( const QString & str ) + */ +HB_FUNC( QT_QTEXTENCODER_FROMUNICODE ) +{ + hb_retptr( new QByteArray( hbqt_par_QTextEncoder( 1 )->fromUnicode( hbqt_par_QString( 2 ) ) ) ); +} + + +/*----------------------------------------------------------------------*/ +#endif /* #if QT_VERSION >= 0x040500 */ +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/hbqt_qtextfragment.cpp b/harbour/contrib/hbqt/hbqt_qtextfragment.cpp new file mode 100644 index 0000000000..f844afd569 --- /dev/null +++ b/harbour/contrib/hbqt/hbqt_qtextfragment.cpp @@ -0,0 +1,135 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT wrapper main header + * + * Copyright 2009 Marcos Antonio Gambeta + * Copyright 2009 Pritpal Bedi + * www - http://www.harbour-project.org + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this software; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, + * Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/). + * + * As a special exception, the Harbour Project gives permission for + * additional uses of the text contained in its release of Harbour. + * + * The exception is that, if you link the Harbour libraries with other + * files to produce an executable, this does not by itself cause the + * resulting executable to be covered by the GNU General Public License. + * Your use of that executable is in no way restricted on account of + * linking the Harbour library code into it. + * + * This exception does not however invalidate any other reasons why + * the executable file might be covered by the GNU General Public License. + * + * This exception applies only to the code released by the Harbour + * Project under the name Harbour. If you copy code from other + * Harbour Project or Free Software Foundation releases into a copy of + * Harbour, as the General Public License permits, the exception does + * not apply to the code that you add in this way. To avoid misleading + * anyone as to the status of such modified files, you must delete + * this exception notice from them. + * + * If you write modifications of your own for Harbour, it is your choice + * whether to permit this exception to apply to your modifications. + * If you do not wish that, delete this exception notice. + * + */ +/*----------------------------------------------------------------------*/ + +#include "hbapi.h" +#include "hbqt.h" + +/*----------------------------------------------------------------------*/ +#if QT_VERSION >= 0x040500 +/*----------------------------------------------------------------------*/ + + +#include + + +/* + * QTextFragment () + * QTextFragment ( const QTextFragment & other ) + */ +HB_FUNC( QT_QTEXTFRAGMENT ) +{ + hb_retptr( ( QTextFragment* ) new QTextFragment() ); +} + +/* + * QTextCharFormat charFormat () const + */ +HB_FUNC( QT_QTEXTFRAGMENT_CHARFORMAT ) +{ + hb_retptr( new QTextCharFormat( hbqt_par_QTextFragment( 1 )->charFormat() ) ); +} + +/* + * int charFormatIndex () const + */ +HB_FUNC( QT_QTEXTFRAGMENT_CHARFORMATINDEX ) +{ + hb_retni( hbqt_par_QTextFragment( 1 )->charFormatIndex() ); +} + +/* + * bool contains ( int position ) const + */ +HB_FUNC( QT_QTEXTFRAGMENT_CONTAINS ) +{ + hb_retl( hbqt_par_QTextFragment( 1 )->contains( hb_parni( 2 ) ) ); +} + +/* + * bool isValid () const + */ +HB_FUNC( QT_QTEXTFRAGMENT_ISVALID ) +{ + hb_retl( hbqt_par_QTextFragment( 1 )->isValid() ); +} + +/* + * int length () const + */ +HB_FUNC( QT_QTEXTFRAGMENT_LENGTH ) +{ + hb_retni( hbqt_par_QTextFragment( 1 )->length() ); +} + +/* + * int position () const + */ +HB_FUNC( QT_QTEXTFRAGMENT_POSITION ) +{ + hb_retni( hbqt_par_QTextFragment( 1 )->position() ); +} + +/* + * QString text () const + */ +HB_FUNC( QT_QTEXTFRAGMENT_TEXT ) +{ + hb_retc( hbqt_par_QTextFragment( 1 )->text().toLatin1().data() ); +} + + +/*----------------------------------------------------------------------*/ +#endif /* #if QT_VERSION >= 0x040500 */ +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/hbqt_qtextframe.cpp b/harbour/contrib/hbqt/hbqt_qtextframe.cpp new file mode 100644 index 0000000000..320e5cc704 --- /dev/null +++ b/harbour/contrib/hbqt/hbqt_qtextframe.cpp @@ -0,0 +1,144 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT wrapper main header + * + * Copyright 2009 Marcos Antonio Gambeta + * Copyright 2009 Pritpal Bedi + * www - http://www.harbour-project.org + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this software; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, + * Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/). + * + * As a special exception, the Harbour Project gives permission for + * additional uses of the text contained in its release of Harbour. + * + * The exception is that, if you link the Harbour libraries with other + * files to produce an executable, this does not by itself cause the + * resulting executable to be covered by the GNU General Public License. + * Your use of that executable is in no way restricted on account of + * linking the Harbour library code into it. + * + * This exception does not however invalidate any other reasons why + * the executable file might be covered by the GNU General Public License. + * + * This exception applies only to the code released by the Harbour + * Project under the name Harbour. If you copy code from other + * Harbour Project or Free Software Foundation releases into a copy of + * Harbour, as the General Public License permits, the exception does + * not apply to the code that you add in this way. To avoid misleading + * anyone as to the status of such modified files, you must delete + * this exception notice from them. + * + * If you write modifications of your own for Harbour, it is your choice + * whether to permit this exception to apply to your modifications. + * If you do not wish that, delete this exception notice. + * + */ +/*----------------------------------------------------------------------*/ + +#include "hbapi.h" +#include "hbqt.h" + +/*----------------------------------------------------------------------*/ +#if QT_VERSION >= 0x040500 +/*----------------------------------------------------------------------*/ + +/* + * Constructed[ 7/8 [ 87.50% ] ] + * + * *** Unconvered Prototypes *** + * ----------------------------- + * + * QList childFrames () const + */ + + +#include + + +/* + * QTextFrame ( QTextDocument * document ) + * ~QTextFrame () + */ +HB_FUNC( QT_QTEXTFRAME ) +{ + hb_retptr( ( QTextFrame* ) new QTextFrame( hbqt_par_QTextDocument( 1 ) ) ); +} + +/* + * QTextCursor firstCursorPosition () const + */ +HB_FUNC( QT_QTEXTFRAME_FIRSTCURSORPOSITION ) +{ + hb_retptr( new QTextCursor( hbqt_par_QTextFrame( 1 )->firstCursorPosition() ) ); +} + +/* + * int firstPosition () const + */ +HB_FUNC( QT_QTEXTFRAME_FIRSTPOSITION ) +{ + hb_retni( hbqt_par_QTextFrame( 1 )->firstPosition() ); +} + +/* + * QTextFrameFormat frameFormat () const + */ +HB_FUNC( QT_QTEXTFRAME_FRAMEFORMAT ) +{ + hb_retptr( new QTextFrameFormat( hbqt_par_QTextFrame( 1 )->frameFormat() ) ); +} + +/* + * QTextCursor lastCursorPosition () const + */ +HB_FUNC( QT_QTEXTFRAME_LASTCURSORPOSITION ) +{ + hb_retptr( new QTextCursor( hbqt_par_QTextFrame( 1 )->lastCursorPosition() ) ); +} + +/* + * int lastPosition () const + */ +HB_FUNC( QT_QTEXTFRAME_LASTPOSITION ) +{ + hb_retni( hbqt_par_QTextFrame( 1 )->lastPosition() ); +} + +/* + * QTextFrame * parentFrame () const + */ +HB_FUNC( QT_QTEXTFRAME_PARENTFRAME ) +{ + hb_retptr( ( QTextFrame* ) hbqt_par_QTextFrame( 1 )->parentFrame() ); +} + +/* + * void setFrameFormat ( const QTextFrameFormat & format ) + */ +HB_FUNC( QT_QTEXTFRAME_SETFRAMEFORMAT ) +{ + hbqt_par_QTextFrame( 1 )->setFrameFormat( *hbqt_par_QTextFrameFormat( 2 ) ); +} + + +/*----------------------------------------------------------------------*/ +#endif /* #if QT_VERSION >= 0x040500 */ +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/hbqt_qtextframeformat.cpp b/harbour/contrib/hbqt/hbqt_qtextframeformat.cpp new file mode 100644 index 0000000000..46554cb123 --- /dev/null +++ b/harbour/contrib/hbqt/hbqt_qtextframeformat.cpp @@ -0,0 +1,310 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT wrapper main header + * + * Copyright 2009 Marcos Antonio Gambeta + * Copyright 2009 Pritpal Bedi + * www - http://www.harbour-project.org + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this software; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, + * Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/). + * + * As a special exception, the Harbour Project gives permission for + * additional uses of the text contained in its release of Harbour. + * + * The exception is that, if you link the Harbour libraries with other + * files to produce an executable, this does not by itself cause the + * resulting executable to be covered by the GNU General Public License. + * Your use of that executable is in no way restricted on account of + * linking the Harbour library code into it. + * + * This exception does not however invalidate any other reasons why + * the executable file might be covered by the GNU General Public License. + * + * This exception applies only to the code released by the Harbour + * Project under the name Harbour. If you copy code from other + * Harbour Project or Free Software Foundation releases into a copy of + * Harbour, as the General Public License permits, the exception does + * not apply to the code that you add in this way. To avoid misleading + * anyone as to the status of such modified files, you must delete + * this exception notice from them. + * + * If you write modifications of your own for Harbour, it is your choice + * whether to permit this exception to apply to your modifications. + * If you do not wish that, delete this exception notice. + * + */ +/*----------------------------------------------------------------------*/ + +#include "hbapi.h" +#include "hbqt.h" + +/*----------------------------------------------------------------------*/ +#if QT_VERSION >= 0x040500 +/*----------------------------------------------------------------------*/ + + +#include + + +/* + * QTextFrameFormat () + */ +HB_FUNC( QT_QTEXTFRAMEFORMAT ) +{ + hb_retptr( ( QTextFrameFormat* ) new QTextFrameFormat() ); +} + +/* + * qreal border () const + */ +HB_FUNC( QT_QTEXTFRAMEFORMAT_BORDER ) +{ + hb_retnd( hbqt_par_QTextFrameFormat( 1 )->border() ); +} + +/* + * QBrush borderBrush () const + */ +HB_FUNC( QT_QTEXTFRAMEFORMAT_BORDERBRUSH ) +{ + hb_retptr( new QBrush( hbqt_par_QTextFrameFormat( 1 )->borderBrush() ) ); +} + +/* + * BorderStyle borderStyle () const + */ +HB_FUNC( QT_QTEXTFRAMEFORMAT_BORDERSTYLE ) +{ + hb_retni( ( QTextFrameFormat::BorderStyle ) hbqt_par_QTextFrameFormat( 1 )->borderStyle() ); +} + +/* + * qreal bottomMargin () const + */ +HB_FUNC( QT_QTEXTFRAMEFORMAT_BOTTOMMARGIN ) +{ + hb_retnd( hbqt_par_QTextFrameFormat( 1 )->bottomMargin() ); +} + +/* + * QTextLength height () const + */ +HB_FUNC( QT_QTEXTFRAMEFORMAT_HEIGHT ) +{ + hb_retptr( new QTextLength( hbqt_par_QTextFrameFormat( 1 )->height() ) ); +} + +/* + * bool isValid () const + */ +HB_FUNC( QT_QTEXTFRAMEFORMAT_ISVALID ) +{ + hb_retl( hbqt_par_QTextFrameFormat( 1 )->isValid() ); +} + +/* + * qreal leftMargin () const + */ +HB_FUNC( QT_QTEXTFRAMEFORMAT_LEFTMARGIN ) +{ + hb_retnd( hbqt_par_QTextFrameFormat( 1 )->leftMargin() ); +} + +/* + * qreal margin () const + */ +HB_FUNC( QT_QTEXTFRAMEFORMAT_MARGIN ) +{ + hb_retnd( hbqt_par_QTextFrameFormat( 1 )->margin() ); +} + +/* + * qreal padding () const + */ +HB_FUNC( QT_QTEXTFRAMEFORMAT_PADDING ) +{ + hb_retnd( hbqt_par_QTextFrameFormat( 1 )->padding() ); +} + +/* + * PageBreakFlags pageBreakPolicy () const + */ +HB_FUNC( QT_QTEXTFRAMEFORMAT_PAGEBREAKPOLICY ) +{ + hb_retni( ( QTextFrameFormat::PageBreakFlags ) hbqt_par_QTextFrameFormat( 1 )->pageBreakPolicy() ); +} + +/* + * Position position () const + */ +HB_FUNC( QT_QTEXTFRAMEFORMAT_POSITION ) +{ + hb_retni( ( QTextFrameFormat::Position ) hbqt_par_QTextFrameFormat( 1 )->position() ); +} + +/* + * qreal rightMargin () const + */ +HB_FUNC( QT_QTEXTFRAMEFORMAT_RIGHTMARGIN ) +{ + hb_retnd( hbqt_par_QTextFrameFormat( 1 )->rightMargin() ); +} + +/* + * void setBorder ( qreal width ) + */ +HB_FUNC( QT_QTEXTFRAMEFORMAT_SETBORDER ) +{ + hbqt_par_QTextFrameFormat( 1 )->setBorder( hb_parnd( 2 ) ); +} + +/* + * void setBorderBrush ( const QBrush & brush ) + */ +HB_FUNC( QT_QTEXTFRAMEFORMAT_SETBORDERBRUSH ) +{ + hbqt_par_QTextFrameFormat( 1 )->setBorderBrush( *hbqt_par_QBrush( 2 ) ); +} + +/* + * void setBorderStyle ( BorderStyle style ) + */ +HB_FUNC( QT_QTEXTFRAMEFORMAT_SETBORDERSTYLE ) +{ + hbqt_par_QTextFrameFormat( 1 )->setBorderStyle( ( QTextFrameFormat::BorderStyle ) hb_parni( 2 ) ); +} + +/* + * void setBottomMargin ( qreal margin ) + */ +HB_FUNC( QT_QTEXTFRAMEFORMAT_SETBOTTOMMARGIN ) +{ + hbqt_par_QTextFrameFormat( 1 )->setBottomMargin( hb_parnd( 2 ) ); +} + +/* + * void setHeight ( const QTextLength & height ) + */ +HB_FUNC( QT_QTEXTFRAMEFORMAT_SETHEIGHT ) +{ + hbqt_par_QTextFrameFormat( 1 )->setHeight( *hbqt_par_QTextLength( 2 ) ); +} + +/* + * void setHeight ( qreal height ) + */ +HB_FUNC( QT_QTEXTFRAMEFORMAT_SETHEIGHT_1 ) +{ + hbqt_par_QTextFrameFormat( 1 )->setHeight( hb_parnd( 2 ) ); +} + +/* + * void setLeftMargin ( qreal margin ) + */ +HB_FUNC( QT_QTEXTFRAMEFORMAT_SETLEFTMARGIN ) +{ + hbqt_par_QTextFrameFormat( 1 )->setLeftMargin( hb_parnd( 2 ) ); +} + +/* + * void setMargin ( qreal margin ) + */ +HB_FUNC( QT_QTEXTFRAMEFORMAT_SETMARGIN ) +{ + hbqt_par_QTextFrameFormat( 1 )->setMargin( hb_parnd( 2 ) ); +} + +/* + * void setPadding ( qreal width ) + */ +HB_FUNC( QT_QTEXTFRAMEFORMAT_SETPADDING ) +{ + hbqt_par_QTextFrameFormat( 1 )->setPadding( hb_parnd( 2 ) ); +} + +/* + * void setPageBreakPolicy ( PageBreakFlags policy ) + */ +HB_FUNC( QT_QTEXTFRAMEFORMAT_SETPAGEBREAKPOLICY ) +{ + hbqt_par_QTextFrameFormat( 1 )->setPageBreakPolicy( ( QTextFrameFormat::PageBreakFlags ) hb_parni( 2 ) ); +} + +/* + * void setPosition ( Position policy ) + */ +HB_FUNC( QT_QTEXTFRAMEFORMAT_SETPOSITION ) +{ + hbqt_par_QTextFrameFormat( 1 )->setPosition( ( QTextFrameFormat::Position ) hb_parni( 2 ) ); +} + +/* + * void setRightMargin ( qreal margin ) + */ +HB_FUNC( QT_QTEXTFRAMEFORMAT_SETRIGHTMARGIN ) +{ + hbqt_par_QTextFrameFormat( 1 )->setRightMargin( hb_parnd( 2 ) ); +} + +/* + * void setTopMargin ( qreal margin ) + */ +HB_FUNC( QT_QTEXTFRAMEFORMAT_SETTOPMARGIN ) +{ + hbqt_par_QTextFrameFormat( 1 )->setTopMargin( hb_parnd( 2 ) ); +} + +/* + * void setWidth ( const QTextLength & width ) + */ +HB_FUNC( QT_QTEXTFRAMEFORMAT_SETWIDTH ) +{ + hbqt_par_QTextFrameFormat( 1 )->setWidth( *hbqt_par_QTextLength( 2 ) ); +} + +/* + * void setWidth ( qreal width ) + */ +HB_FUNC( QT_QTEXTFRAMEFORMAT_SETWIDTH_1 ) +{ + hbqt_par_QTextFrameFormat( 1 )->setWidth( hb_parnd( 2 ) ); +} + +/* + * qreal topMargin () const + */ +HB_FUNC( QT_QTEXTFRAMEFORMAT_TOPMARGIN ) +{ + hb_retnd( hbqt_par_QTextFrameFormat( 1 )->topMargin() ); +} + +/* + * QTextLength width () const + */ +HB_FUNC( QT_QTEXTFRAMEFORMAT_WIDTH ) +{ + hb_retptr( new QTextLength( hbqt_par_QTextFrameFormat( 1 )->width() ) ); +} + + +/*----------------------------------------------------------------------*/ +#endif /* #if QT_VERSION >= 0x040500 */ +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/hbqt_qtextimageformat.cpp b/harbour/contrib/hbqt/hbqt_qtextimageformat.cpp new file mode 100644 index 0000000000..f4253321fc --- /dev/null +++ b/harbour/contrib/hbqt/hbqt_qtextimageformat.cpp @@ -0,0 +1,135 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT wrapper main header + * + * Copyright 2009 Marcos Antonio Gambeta + * Copyright 2009 Pritpal Bedi + * www - http://www.harbour-project.org + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this software; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, + * Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/). + * + * As a special exception, the Harbour Project gives permission for + * additional uses of the text contained in its release of Harbour. + * + * The exception is that, if you link the Harbour libraries with other + * files to produce an executable, this does not by itself cause the + * resulting executable to be covered by the GNU General Public License. + * Your use of that executable is in no way restricted on account of + * linking the Harbour library code into it. + * + * This exception does not however invalidate any other reasons why + * the executable file might be covered by the GNU General Public License. + * + * This exception applies only to the code released by the Harbour + * Project under the name Harbour. If you copy code from other + * Harbour Project or Free Software Foundation releases into a copy of + * Harbour, as the General Public License permits, the exception does + * not apply to the code that you add in this way. To avoid misleading + * anyone as to the status of such modified files, you must delete + * this exception notice from them. + * + * If you write modifications of your own for Harbour, it is your choice + * whether to permit this exception to apply to your modifications. + * If you do not wish that, delete this exception notice. + * + */ +/*----------------------------------------------------------------------*/ + +#include "hbapi.h" +#include "hbqt.h" + +/*----------------------------------------------------------------------*/ +#if QT_VERSION >= 0x040500 +/*----------------------------------------------------------------------*/ + + +#include + + +/* + * QTextImageFormat () + * + */ +HB_FUNC( QT_QTEXTIMAGEFORMAT ) +{ + hb_retptr( ( QTextImageFormat* ) new QTextImageFormat() ); +} + +/* + * qreal height () const + */ +HB_FUNC( QT_QTEXTIMAGEFORMAT_HEIGHT ) +{ + hb_retnd( hbqt_par_QTextImageFormat( 1 )->height() ); +} + +/* + * bool isValid () const + */ +HB_FUNC( QT_QTEXTIMAGEFORMAT_ISVALID ) +{ + hb_retl( hbqt_par_QTextImageFormat( 1 )->isValid() ); +} + +/* + * QString name () const + */ +HB_FUNC( QT_QTEXTIMAGEFORMAT_NAME ) +{ + hb_retc( hbqt_par_QTextImageFormat( 1 )->name().toLatin1().data() ); +} + +/* + * void setHeight ( qreal height ) + */ +HB_FUNC( QT_QTEXTIMAGEFORMAT_SETHEIGHT ) +{ + hbqt_par_QTextImageFormat( 1 )->setHeight( hb_parnd( 2 ) ); +} + +/* + * void setName ( const QString & name ) + */ +HB_FUNC( QT_QTEXTIMAGEFORMAT_SETNAME ) +{ + hbqt_par_QTextImageFormat( 1 )->setName( hbqt_par_QString( 2 ) ); +} + +/* + * void setWidth ( qreal width ) + */ +HB_FUNC( QT_QTEXTIMAGEFORMAT_SETWIDTH ) +{ + hbqt_par_QTextImageFormat( 1 )->setWidth( hb_parnd( 2 ) ); +} + +/* + * qreal width () const + */ +HB_FUNC( QT_QTEXTIMAGEFORMAT_WIDTH ) +{ + hb_retnd( hbqt_par_QTextImageFormat( 1 )->width() ); +} + + +/*----------------------------------------------------------------------*/ +#endif /* #if QT_VERSION >= 0x040500 */ +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/hbqt_qtextinlineobject.cpp b/harbour/contrib/hbqt/hbqt_qtextinlineobject.cpp new file mode 100644 index 0000000000..b62f73386d --- /dev/null +++ b/harbour/contrib/hbqt/hbqt_qtextinlineobject.cpp @@ -0,0 +1,183 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT wrapper main header + * + * Copyright 2009 Marcos Antonio Gambeta + * Copyright 2009 Pritpal Bedi + * www - http://www.harbour-project.org + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this software; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, + * Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/). + * + * As a special exception, the Harbour Project gives permission for + * additional uses of the text contained in its release of Harbour. + * + * The exception is that, if you link the Harbour libraries with other + * files to produce an executable, this does not by itself cause the + * resulting executable to be covered by the GNU General Public License. + * Your use of that executable is in no way restricted on account of + * linking the Harbour library code into it. + * + * This exception does not however invalidate any other reasons why + * the executable file might be covered by the GNU General Public License. + * + * This exception applies only to the code released by the Harbour + * Project under the name Harbour. If you copy code from other + * Harbour Project or Free Software Foundation releases into a copy of + * Harbour, as the General Public License permits, the exception does + * not apply to the code that you add in this way. To avoid misleading + * anyone as to the status of such modified files, you must delete + * this exception notice from them. + * + * If you write modifications of your own for Harbour, it is your choice + * whether to permit this exception to apply to your modifications. + * If you do not wish that, delete this exception notice. + * + */ +/*----------------------------------------------------------------------*/ + +#include "hbapi.h" +#include "hbqt.h" + +/*----------------------------------------------------------------------*/ +#if QT_VERSION >= 0x040500 +/*----------------------------------------------------------------------*/ + + +#include + + +/* + * QTextInlineObject ( int i, QTextEngine * e ) + * + */ +HB_FUNC( QT_Q ) +{ + hb_retptr( ( QTextInlineObject* ) new QTextInlineObject( hb_parni( 1 ), hbqt_par_QTextEngine( 2 ) ) ); +} + +/* + * qreal ascent () const + */ +HB_FUNC( QT_QTEXTINLINEOBJECT_ASCENT ) +{ + hb_retnd( hbqt_par_QTextInlineObject( 1 )->ascent() ); +} + +/* + * qreal descent () const + */ +HB_FUNC( QT_QTEXTINLINEOBJECT_DESCENT ) +{ + hb_retnd( hbqt_par_QTextInlineObject( 1 )->descent() ); +} + +/* + * QTextFormat format () const + */ +HB_FUNC( QT_QTEXTINLINEOBJECT_FORMAT ) +{ + hb_retptr( new QTextFormat( hbqt_par_QTextInlineObject( 1 )->format() ) ); +} + +/* + * int formatIndex () const + */ +HB_FUNC( QT_QTEXTINLINEOBJECT_FORMATINDEX ) +{ + hb_retni( hbqt_par_QTextInlineObject( 1 )->formatIndex() ); +} + +/* + * qreal height () const + */ +HB_FUNC( QT_QTEXTINLINEOBJECT_HEIGHT ) +{ + hb_retnd( hbqt_par_QTextInlineObject( 1 )->height() ); +} + +/* + * bool isValid () const + */ +HB_FUNC( QT_QTEXTINLINEOBJECT_ISVALID ) +{ + hb_retl( hbqt_par_QTextInlineObject( 1 )->isValid() ); +} + +/* + * QRectF rect () const + */ +HB_FUNC( QT_QTEXTINLINEOBJECT_RECT ) +{ + hb_retptr( new QRectF( hbqt_par_QTextInlineObject( 1 )->rect() ) ); +} + +/* + * void setAscent ( qreal a ) + */ +HB_FUNC( QT_QTEXTINLINEOBJECT_SETASCENT ) +{ + hbqt_par_QTextInlineObject( 1 )->setAscent( hb_parnd( 2 ) ); +} + +/* + * void setDescent ( qreal d ) + */ +HB_FUNC( QT_QTEXTINLINEOBJECT_SETDESCENT ) +{ + hbqt_par_QTextInlineObject( 1 )->setDescent( hb_parnd( 2 ) ); +} + +/* + * void setWidth ( qreal w ) + */ +HB_FUNC( QT_QTEXTINLINEOBJECT_SETWIDTH ) +{ + hbqt_par_QTextInlineObject( 1 )->setWidth( hb_parnd( 2 ) ); +} + +/* + * Qt::LayoutDirection textDirection () const + */ +HB_FUNC( QT_QTEXTINLINEOBJECT_TEXTDIRECTION ) +{ + hb_retni( ( Qt::LayoutDirection ) hbqt_par_QTextInlineObject( 1 )->textDirection() ); +} + +/* + * int textPosition () const + */ +HB_FUNC( QT_QTEXTINLINEOBJECT_TEXTPOSITION ) +{ + hb_retni( hbqt_par_QTextInlineObject( 1 )->textPosition() ); +} + +/* + * qreal width () const + */ +HB_FUNC( QT_QTEXTINLINEOBJECT_WIDTH ) +{ + hb_retnd( hbqt_par_QTextInlineObject( 1 )->width() ); +} + + +/*----------------------------------------------------------------------*/ +#endif /* #if QT_VERSION >= 0x040500 */ +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/hbqt_qtextitem.cpp b/harbour/contrib/hbqt/hbqt_qtextitem.cpp new file mode 100644 index 0000000000..8d0ea2a6d1 --- /dev/null +++ b/harbour/contrib/hbqt/hbqt_qtextitem.cpp @@ -0,0 +1,127 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT wrapper main header + * + * Copyright 2009 Marcos Antonio Gambeta + * Copyright 2009 Pritpal Bedi + * www - http://www.harbour-project.org + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this software; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, + * Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/). + * + * As a special exception, the Harbour Project gives permission for + * additional uses of the text contained in its release of Harbour. + * + * The exception is that, if you link the Harbour libraries with other + * files to produce an executable, this does not by itself cause the + * resulting executable to be covered by the GNU General Public License. + * Your use of that executable is in no way restricted on account of + * linking the Harbour library code into it. + * + * This exception does not however invalidate any other reasons why + * the executable file might be covered by the GNU General Public License. + * + * This exception applies only to the code released by the Harbour + * Project under the name Harbour. If you copy code from other + * Harbour Project or Free Software Foundation releases into a copy of + * Harbour, as the General Public License permits, the exception does + * not apply to the code that you add in this way. To avoid misleading + * anyone as to the status of such modified files, you must delete + * this exception notice from them. + * + * If you write modifications of your own for Harbour, it is your choice + * whether to permit this exception to apply to your modifications. + * If you do not wish that, delete this exception notice. + * + */ +/*----------------------------------------------------------------------*/ + +#include "hbapi.h" +#include "hbqt.h" + +/*----------------------------------------------------------------------*/ +#if QT_VERSION >= 0x040500 +/*----------------------------------------------------------------------*/ + + +#include + + +/* + * + * + */ +HB_FUNC( QT_QTEXTITEM ) +{ + hb_retptr( ( QTextItem* ) new QTextItem() ); +} + +/* + * qreal ascent () const + */ +HB_FUNC( QT_QTEXTITEM_ASCENT ) +{ + hb_retnd( hbqt_par_QTextItem( 1 )->ascent() ); +} + +/* + * qreal descent () const + */ +HB_FUNC( QT_QTEXTITEM_DESCENT ) +{ + hb_retnd( hbqt_par_QTextItem( 1 )->descent() ); +} + +/* + * QFont font () const + */ +HB_FUNC( QT_QTEXTITEM_FONT ) +{ + hb_retptr( new QFont( hbqt_par_QTextItem( 1 )->font() ) ); +} + +/* + * RenderFlags renderFlags () const + */ +HB_FUNC( QT_QTEXTITEM_RENDERFLAGS ) +{ + hb_retni( ( QTextItem::RenderFlags ) hbqt_par_QTextItem( 1 )->renderFlags() ); +} + +/* + * QString text () const + */ +HB_FUNC( QT_QTEXTITEM_TEXT ) +{ + hb_retc( hbqt_par_QTextItem( 1 )->text().toLatin1().data() ); +} + +/* + * qreal width () const + */ +HB_FUNC( QT_QTEXTITEM_WIDTH ) +{ + hb_retnd( hbqt_par_QTextItem( 1 )->width() ); +} + + +/*----------------------------------------------------------------------*/ +#endif /* #if QT_VERSION >= 0x040500 */ +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/hbqt_qtextlayout.cpp b/harbour/contrib/hbqt/hbqt_qtextlayout.cpp new file mode 100644 index 0000000000..0201b6cae6 --- /dev/null +++ b/harbour/contrib/hbqt/hbqt_qtextlayout.cpp @@ -0,0 +1,324 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT wrapper main header + * + * Copyright 2009 Marcos Antonio Gambeta + * Copyright 2009 Pritpal Bedi + * www - http://www.harbour-project.org + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this software; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, + * Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/). + * + * As a special exception, the Harbour Project gives permission for + * additional uses of the text contained in its release of Harbour. + * + * The exception is that, if you link the Harbour libraries with other + * files to produce an executable, this does not by itself cause the + * resulting executable to be covered by the GNU General Public License. + * Your use of that executable is in no way restricted on account of + * linking the Harbour library code into it. + * + * This exception does not however invalidate any other reasons why + * the executable file might be covered by the GNU General Public License. + * + * This exception applies only to the code released by the Harbour + * Project under the name Harbour. If you copy code from other + * Harbour Project or Free Software Foundation releases into a copy of + * Harbour, as the General Public License permits, the exception does + * not apply to the code that you add in this way. To avoid misleading + * anyone as to the status of such modified files, you must delete + * this exception notice from them. + * + * If you write modifications of your own for Harbour, it is your choice + * whether to permit this exception to apply to your modifications. + * If you do not wish that, delete this exception notice. + * + */ +/*----------------------------------------------------------------------*/ + +#include "hbapi.h" +#include "hbqt.h" + +/*----------------------------------------------------------------------*/ +#if QT_VERSION >= 0x040500 +/*----------------------------------------------------------------------*/ + +/* + * Constructed[ 29/32 [ 90.63% ] ] + * + * *** Unconvered Prototypes *** + * ----------------------------- + * + * QList additionalFormats () const + * void draw ( QPainter * p, const QPointF & pos, const QVector & selections = QVector (), const QRectF & clip = QRectF() ) const + * void setAdditionalFormats ( const QList & formatList ) + */ + + +#include + + +/* + * QTextLayout () + * QTextLayout ( const QString & text ) + * QTextLayout ( const QString & text, const QFont & font, QPaintDevice * paintdevice = 0 ) + * ~QTextLayout () + */ +HB_FUNC( QT_QTEXTLAYOUT ) +{ + hb_retptr( ( QTextLayout* ) new QTextLayout() ); +} + +/* + * void beginLayout () + */ +HB_FUNC( QT_QTEXTLAYOUT_BEGINLAYOUT ) +{ + hbqt_par_QTextLayout( 1 )->beginLayout(); +} + +/* + * QRectF boundingRect () const + */ +HB_FUNC( QT_QTEXTLAYOUT_BOUNDINGRECT ) +{ + hb_retptr( new QRectF( hbqt_par_QTextLayout( 1 )->boundingRect() ) ); +} + +/* + * bool cacheEnabled () const + */ +HB_FUNC( QT_QTEXTLAYOUT_CACHEENABLED ) +{ + hb_retl( hbqt_par_QTextLayout( 1 )->cacheEnabled() ); +} + +/* + * void clearAdditionalFormats () + */ +HB_FUNC( QT_QTEXTLAYOUT_CLEARADDITIONALFORMATS ) +{ + hbqt_par_QTextLayout( 1 )->clearAdditionalFormats(); +} + +/* + * void clearLayout () + */ +HB_FUNC( QT_QTEXTLAYOUT_CLEARLAYOUT ) +{ + hbqt_par_QTextLayout( 1 )->clearLayout(); +} + +/* + * QTextLine createLine () + */ +HB_FUNC( QT_QTEXTLAYOUT_CREATELINE ) +{ + hb_retptr( new QTextLine( hbqt_par_QTextLayout( 1 )->createLine() ) ); +} + +/* + * void drawCursor ( QPainter * painter, const QPointF & position, int cursorPosition, int width ) const + */ +HB_FUNC( QT_QTEXTLAYOUT_DRAWCURSOR ) +{ + hbqt_par_QTextLayout( 1 )->drawCursor( hbqt_par_QPainter( 2 ), *hbqt_par_QPointF( 3 ), hb_parni( 4 ), hb_parni( 5 ) ); +} + +/* + * void drawCursor ( QPainter * painter, const QPointF & position, int cursorPosition ) const + */ +HB_FUNC( QT_QTEXTLAYOUT_DRAWCURSOR_1 ) +{ + hbqt_par_QTextLayout( 1 )->drawCursor( hbqt_par_QPainter( 2 ), *hbqt_par_QPointF( 3 ), hb_parni( 4 ) ); +} + +/* + * void endLayout () + */ +HB_FUNC( QT_QTEXTLAYOUT_ENDLAYOUT ) +{ + hbqt_par_QTextLayout( 1 )->endLayout(); +} + +/* + * QFont font () const + */ +HB_FUNC( QT_QTEXTLAYOUT_FONT ) +{ + hb_retptr( new QFont( hbqt_par_QTextLayout( 1 )->font() ) ); +} + +/* + * bool isValidCursorPosition ( int pos ) const + */ +HB_FUNC( QT_QTEXTLAYOUT_ISVALIDCURSORPOSITION ) +{ + hb_retl( hbqt_par_QTextLayout( 1 )->isValidCursorPosition( hb_parni( 2 ) ) ); +} + +/* + * QTextLine lineAt ( int i ) const + */ +HB_FUNC( QT_QTEXTLAYOUT_LINEAT ) +{ + hb_retptr( new QTextLine( hbqt_par_QTextLayout( 1 )->lineAt( hb_parni( 2 ) ) ) ); +} + +/* + * int lineCount () const + */ +HB_FUNC( QT_QTEXTLAYOUT_LINECOUNT ) +{ + hb_retni( hbqt_par_QTextLayout( 1 )->lineCount() ); +} + +/* + * QTextLine lineForTextPosition ( int pos ) const + */ +HB_FUNC( QT_QTEXTLAYOUT_LINEFORTEXTPOSITION ) +{ + hb_retptr( new QTextLine( hbqt_par_QTextLayout( 1 )->lineForTextPosition( hb_parni( 2 ) ) ) ); +} + +/* + * qreal maximumWidth () const + */ +HB_FUNC( QT_QTEXTLAYOUT_MAXIMUMWIDTH ) +{ + hb_retnd( hbqt_par_QTextLayout( 1 )->maximumWidth() ); +} + +/* + * qreal minimumWidth () const + */ +HB_FUNC( QT_QTEXTLAYOUT_MINIMUMWIDTH ) +{ + hb_retnd( hbqt_par_QTextLayout( 1 )->minimumWidth() ); +} + +/* + * int nextCursorPosition ( int oldPos, CursorMode mode = SkipCharacters ) const + */ +HB_FUNC( QT_QTEXTLAYOUT_NEXTCURSORPOSITION ) +{ + hb_retni( hbqt_par_QTextLayout( 1 )->nextCursorPosition( hb_parni( 2 ), ( HB_ISNIL( 3 ) ? ( QTextLayout::CursorMode ) QTextLayout::SkipCharacters : ( QTextLayout::CursorMode ) hb_parni( 3 ) ) ) ); +} + +/* + * QPointF position () const + */ +HB_FUNC( QT_QTEXTLAYOUT_POSITION ) +{ + hb_retptr( new QPointF( hbqt_par_QTextLayout( 1 )->position() ) ); +} + +/* + * int preeditAreaPosition () const + */ +HB_FUNC( QT_QTEXTLAYOUT_PREEDITAREAPOSITION ) +{ + hb_retni( hbqt_par_QTextLayout( 1 )->preeditAreaPosition() ); +} + +/* + * QString preeditAreaText () const + */ +HB_FUNC( QT_QTEXTLAYOUT_PREEDITAREATEXT ) +{ + hb_retc( hbqt_par_QTextLayout( 1 )->preeditAreaText().toLatin1().data() ); +} + +/* + * int previousCursorPosition ( int oldPos, CursorMode mode = SkipCharacters ) const + */ +HB_FUNC( QT_QTEXTLAYOUT_PREVIOUSCURSORPOSITION ) +{ + hb_retni( hbqt_par_QTextLayout( 1 )->previousCursorPosition( hb_parni( 2 ), ( HB_ISNIL( 3 ) ? ( QTextLayout::CursorMode ) QTextLayout::SkipCharacters : ( QTextLayout::CursorMode ) hb_parni( 3 ) ) ) ); +} + +/* + * void setCacheEnabled ( bool enable ) + */ +HB_FUNC( QT_QTEXTLAYOUT_SETCACHEENABLED ) +{ + hbqt_par_QTextLayout( 1 )->setCacheEnabled( hb_parl( 2 ) ); +} + +/* + * void setFont ( const QFont & font ) + */ +HB_FUNC( QT_QTEXTLAYOUT_SETFONT ) +{ + hbqt_par_QTextLayout( 1 )->setFont( *hbqt_par_QFont( 2 ) ); +} + +/* + * void setPosition ( const QPointF & p ) + */ +HB_FUNC( QT_QTEXTLAYOUT_SETPOSITION ) +{ + hbqt_par_QTextLayout( 1 )->setPosition( *hbqt_par_QPointF( 2 ) ); +} + +/* + * void setPreeditArea ( int position, const QString & text ) + */ +HB_FUNC( QT_QTEXTLAYOUT_SETPREEDITAREA ) +{ + hbqt_par_QTextLayout( 1 )->setPreeditArea( hb_parni( 2 ), hbqt_par_QString( 3 ) ); +} + +/* + * void setText ( const QString & string ) + */ +HB_FUNC( QT_QTEXTLAYOUT_SETTEXT ) +{ + hbqt_par_QTextLayout( 1 )->setText( hbqt_par_QString( 2 ) ); +} + +/* + * void setTextOption ( const QTextOption & option ) + */ +HB_FUNC( QT_QTEXTLAYOUT_SETTEXTOPTION ) +{ + hbqt_par_QTextLayout( 1 )->setTextOption( *hbqt_par_QTextOption( 2 ) ); +} + +/* + * QString text () const + */ +HB_FUNC( QT_QTEXTLAYOUT_TEXT ) +{ + hb_retc( hbqt_par_QTextLayout( 1 )->text().toLatin1().data() ); +} + +/* + * QTextOption textOption () const + */ +HB_FUNC( QT_QTEXTLAYOUT_TEXTOPTION ) +{ + hb_retptr( new QTextOption( hbqt_par_QTextLayout( 1 )->textOption() ) ); +} + + +/*----------------------------------------------------------------------*/ +#endif /* #if QT_VERSION >= 0x040500 */ +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/hbqt_qtextlength.cpp b/harbour/contrib/hbqt/hbqt_qtextlength.cpp new file mode 100644 index 0000000000..fd9c61ca56 --- /dev/null +++ b/harbour/contrib/hbqt/hbqt_qtextlength.cpp @@ -0,0 +1,103 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT wrapper main header + * + * Copyright 2009 Marcos Antonio Gambeta + * Copyright 2009 Pritpal Bedi + * www - http://www.harbour-project.org + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this software; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, + * Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/). + * + * As a special exception, the Harbour Project gives permission for + * additional uses of the text contained in its release of Harbour. + * + * The exception is that, if you link the Harbour libraries with other + * files to produce an executable, this does not by itself cause the + * resulting executable to be covered by the GNU General Public License. + * Your use of that executable is in no way restricted on account of + * linking the Harbour library code into it. + * + * This exception does not however invalidate any other reasons why + * the executable file might be covered by the GNU General Public License. + * + * This exception applies only to the code released by the Harbour + * Project under the name Harbour. If you copy code from other + * Harbour Project or Free Software Foundation releases into a copy of + * Harbour, as the General Public License permits, the exception does + * not apply to the code that you add in this way. To avoid misleading + * anyone as to the status of such modified files, you must delete + * this exception notice from them. + * + * If you write modifications of your own for Harbour, it is your choice + * whether to permit this exception to apply to your modifications. + * If you do not wish that, delete this exception notice. + * + */ +/*----------------------------------------------------------------------*/ + +#include "hbapi.h" +#include "hbqt.h" + +/*----------------------------------------------------------------------*/ +#if QT_VERSION >= 0x040500 +/*----------------------------------------------------------------------*/ + + +#include + + +/* + * QTextLength () + * QTextLength ( Type type, qreal value ) + */ +HB_FUNC( QT_QTEXTLENGTH ) +{ + hb_retptr( ( QTextLength* ) new QTextLength() ); +} + +/* + * qreal rawValue () const + */ +HB_FUNC( QT_QTEXTLENGTH_RAWVALUE ) +{ + hb_retnd( hbqt_par_QTextLength( 1 )->rawValue() ); +} + +/* + * Type type () const + */ +HB_FUNC( QT_QTEXTLENGTH_TYPE ) +{ + hb_retni( ( QTextLength::Type ) hbqt_par_QTextLength( 1 )->type() ); +} + +/* + * qreal value ( qreal maximumLength ) const + */ +HB_FUNC( QT_QTEXTLENGTH_VALUE ) +{ + hb_retnd( hbqt_par_QTextLength( 1 )->value( hb_parnd( 2 ) ) ); +} + + +/*----------------------------------------------------------------------*/ +#endif /* #if QT_VERSION >= 0x040500 */ +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/hbqt_qtextline.cpp b/harbour/contrib/hbqt/hbqt_qtextline.cpp new file mode 100644 index 0000000000..e6e9207ed6 --- /dev/null +++ b/harbour/contrib/hbqt/hbqt_qtextline.cpp @@ -0,0 +1,250 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT wrapper main header + * + * Copyright 2009 Marcos Antonio Gambeta + * Copyright 2009 Pritpal Bedi + * www - http://www.harbour-project.org + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this software; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, + * Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/). + * + * As a special exception, the Harbour Project gives permission for + * additional uses of the text contained in its release of Harbour. + * + * The exception is that, if you link the Harbour libraries with other + * files to produce an executable, this does not by itself cause the + * resulting executable to be covered by the GNU General Public License. + * Your use of that executable is in no way restricted on account of + * linking the Harbour library code into it. + * + * This exception does not however invalidate any other reasons why + * the executable file might be covered by the GNU General Public License. + * + * This exception applies only to the code released by the Harbour + * Project under the name Harbour. If you copy code from other + * Harbour Project or Free Software Foundation releases into a copy of + * Harbour, as the General Public License permits, the exception does + * not apply to the code that you add in this way. To avoid misleading + * anyone as to the status of such modified files, you must delete + * this exception notice from them. + * + * If you write modifications of your own for Harbour, it is your choice + * whether to permit this exception to apply to your modifications. + * If you do not wish that, delete this exception notice. + * + */ +/*----------------------------------------------------------------------*/ + +#include "hbapi.h" +#include "hbqt.h" + +/*----------------------------------------------------------------------*/ +#if QT_VERSION >= 0x040500 +/*----------------------------------------------------------------------*/ + + +#include + + +/* + * QTextLine () + */ +HB_FUNC( QT_QTEXTLINE ) +{ + hb_retptr( ( QTextLine* ) new QTextLine() ); +} + +/* + * qreal ascent () const + */ +HB_FUNC( QT_QTEXTLINE_ASCENT ) +{ + hb_retnd( hbqt_par_QTextLine( 1 )->ascent() ); +} + +/* + * qreal cursorToX ( int * cursorPos, Edge edge = Leading ) const + */ +HB_FUNC( QT_QTEXTLINE_CURSORTOX ) +{ + int iCursorPos = 0; + + hb_retnd( hbqt_par_QTextLine( 1 )->cursorToX( &iCursorPos, ( HB_ISNIL( 3 ) ? ( QTextLine::Edge ) QTextLine::Leading : ( QTextLine::Edge ) hb_parni( 3 ) ) ) ); + + hb_storni( iCursorPos, 2 ); +} + +/* + * qreal cursorToX ( int cursorPos, Edge edge = Leading ) const + */ +HB_FUNC( QT_QTEXTLINE_CURSORTOX_1 ) +{ + hb_retnd( hbqt_par_QTextLine( 1 )->cursorToX( hb_parni( 2 ), ( HB_ISNIL( 3 ) ? ( QTextLine::Edge ) QTextLine::Leading : ( QTextLine::Edge ) hb_parni( 3 ) ) ) ); +} + +/* + * qreal descent () const + */ +HB_FUNC( QT_QTEXTLINE_DESCENT ) +{ + hb_retnd( hbqt_par_QTextLine( 1 )->descent() ); +} + +/* + * qreal height () const + */ +HB_FUNC( QT_QTEXTLINE_HEIGHT ) +{ + hb_retnd( hbqt_par_QTextLine( 1 )->height() ); +} + +/* + * bool isValid () const + */ +HB_FUNC( QT_QTEXTLINE_ISVALID ) +{ + hb_retl( hbqt_par_QTextLine( 1 )->isValid() ); +} + +/* + * int lineNumber () const + */ +HB_FUNC( QT_QTEXTLINE_LINENUMBER ) +{ + hb_retni( hbqt_par_QTextLine( 1 )->lineNumber() ); +} + +/* + * QRectF naturalTextRect () const + */ +HB_FUNC( QT_QTEXTLINE_NATURALTEXTRECT ) +{ + hb_retptr( new QRectF( hbqt_par_QTextLine( 1 )->naturalTextRect() ) ); +} + +/* + * qreal naturalTextWidth () const + */ +HB_FUNC( QT_QTEXTLINE_NATURALTEXTWIDTH ) +{ + hb_retnd( hbqt_par_QTextLine( 1 )->naturalTextWidth() ); +} + +/* + * QPointF position () const + */ +HB_FUNC( QT_QTEXTLINE_POSITION ) +{ + hb_retptr( new QPointF( hbqt_par_QTextLine( 1 )->position() ) ); +} + +/* + * QRectF rect () const + */ +HB_FUNC( QT_QTEXTLINE_RECT ) +{ + hb_retptr( new QRectF( hbqt_par_QTextLine( 1 )->rect() ) ); +} + +/* + * void setLineWidth ( qreal width ) + */ +HB_FUNC( QT_QTEXTLINE_SETLINEWIDTH ) +{ + hbqt_par_QTextLine( 1 )->setLineWidth( hb_parnd( 2 ) ); +} + +/* + * void setNumColumns ( int numColumns ) + */ +HB_FUNC( QT_QTEXTLINE_SETNUMCOLUMNS ) +{ + hbqt_par_QTextLine( 1 )->setNumColumns( hb_parni( 2 ) ); +} + +/* + * void setNumColumns ( int numColumns, qreal alignmentWidth ) + */ +HB_FUNC( QT_QTEXTLINE_SETNUMCOLUMNS_1 ) +{ + hbqt_par_QTextLine( 1 )->setNumColumns( hb_parni( 2 ), hb_parnd( 3 ) ); +} + +/* + * void setPosition ( const QPointF & pos ) + */ +HB_FUNC( QT_QTEXTLINE_SETPOSITION ) +{ + hbqt_par_QTextLine( 1 )->setPosition( *hbqt_par_QPointF( 2 ) ); +} + +/* + * int textLength () const + */ +HB_FUNC( QT_QTEXTLINE_TEXTLENGTH ) +{ + hb_retni( hbqt_par_QTextLine( 1 )->textLength() ); +} + +/* + * int textStart () const + */ +HB_FUNC( QT_QTEXTLINE_TEXTSTART ) +{ + hb_retni( hbqt_par_QTextLine( 1 )->textStart() ); +} + +/* + * qreal width () const + */ +HB_FUNC( QT_QTEXTLINE_WIDTH ) +{ + hb_retnd( hbqt_par_QTextLine( 1 )->width() ); +} + +/* + * qreal x () const + */ +HB_FUNC( QT_QTEXTLINE_X ) +{ + hb_retnd( hbqt_par_QTextLine( 1 )->x() ); +} + +/* + * int xToCursor ( qreal x, CursorPosition cpos = CursorBetweenCharacters ) const + */ +HB_FUNC( QT_QTEXTLINE_XTOCURSOR ) +{ + hb_retni( hbqt_par_QTextLine( 1 )->xToCursor( hb_parnd( 2 ), ( HB_ISNIL( 3 ) ? ( QTextLine::CursorPosition ) QTextLine::CursorBetweenCharacters : ( QTextLine::CursorPosition ) hb_parni( 3 ) ) ) ); +} + +/* + * qreal y () const + */ +HB_FUNC( QT_QTEXTLINE_Y ) +{ + hb_retnd( hbqt_par_QTextLine( 1 )->y() ); +} + + +/*----------------------------------------------------------------------*/ +#endif /* #if QT_VERSION >= 0x040500 */ +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/qth/QTextCodec.qth b/harbour/contrib/hbqt/qth/QTextCodec.qth new file mode 100644 index 0000000000..b2ba0fed55 --- /dev/null +++ b/harbour/contrib/hbqt/qth/QTextCodec.qth @@ -0,0 +1,109 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT Source Generator for Harbour + * + * Copyright 2009 Pritpal Bedi + * www - http://www.harbour-project.org + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this software; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, + * Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/). + * + * As a special exception, the Harbour Project gives permission for + * additional uses of the text contained in its release of Harbour. + * + * The exception is that, if you link the Harbour libraries with other + * files to produce an executable, this does not by itself cause the + * resulting executable to be covered by the GNU General Public License. + * Your use of that executable is in no way restricted on account of + * linking the Harbour library code into it. + * + * This exception does not however invalidate any other reasons why + * the executable file might be covered by the GNU General Public License. + * + * This exception applies only to the code released by the Harbour + * Project under the name Harbour. If you copy code from other + * Harbour Project or Free Software Foundation releases into a copy of + * Harbour, as the General Public License permits, the exception does + * not apply to the code that you add in this way. To avoid misleading + * anyone as to the status of such modified files, you must delete + * this exception notice from them. + * + * If you write modifications of your own for Harbour, it is your choice + * whether to permit this exception to apply to your modifications. + * If you do not wish that, delete this exception notice. + * + */ +/*----------------------------------------------------------------------*/ +; +; Header File to Generate QT Wrapper Sources +; + + +Inherits = +Type = Core +New = + + + +#include + + +/* + * + * + */ +HB_FUNC( QT_QTEXTCODEC ) +{ + //hb_retptr( ( QTextCodec* ) new QTextCodec() ); +} + + + +enum ConversionFlag { DefaultConversion, ConvertInvalidToNull, IgnoreHeader } +flags ConversionFlags + + + +virtual QList aliases () const +bool canEncode ( QChar ch ) const +bool canEncode ( const QString & s ) const +QByteArray fromUnicode ( const QString & str ) const +# +// QByteArray fromUnicode ( const QChar * input, int number, ConverterState * state = 0 ) const +# +QTextDecoder * makeDecoder () const +QTextEncoder * makeEncoder () const +virtual int mibEnum () const = 0 +virtual QByteArray name () const = 0 +QString toUnicode ( const QByteArray & a ) const +# +// QString toUnicode ( const char * input, int size, ConverterState * state = 0 ) const +# +QString toUnicode ( const char * chars ) const + + + + + + + + + + + diff --git a/harbour/contrib/hbqt/qth/QTextEncoder.qth b/harbour/contrib/hbqt/qth/QTextEncoder.qth new file mode 100644 index 0000000000..84678f4fae --- /dev/null +++ b/harbour/contrib/hbqt/qth/QTextEncoder.qth @@ -0,0 +1,94 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT Source Generator for Harbour + * + * Copyright 2009 Pritpal Bedi + * www - http://www.harbour-project.org + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this software; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, + * Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/). + * + * As a special exception, the Harbour Project gives permission for + * additional uses of the text contained in its release of Harbour. + * + * The exception is that, if you link the Harbour libraries with other + * files to produce an executable, this does not by itself cause the + * resulting executable to be covered by the GNU General Public License. + * Your use of that executable is in no way restricted on account of + * linking the Harbour library code into it. + * + * This exception does not however invalidate any other reasons why + * the executable file might be covered by the GNU General Public License. + * + * This exception applies only to the code released by the Harbour + * Project under the name Harbour. If you copy code from other + * Harbour Project or Free Software Foundation releases into a copy of + * Harbour, as the General Public License permits, the exception does + * not apply to the code that you add in this way. To avoid misleading + * anyone as to the status of such modified files, you must delete + * this exception notice from them. + * + * If you write modifications of your own for Harbour, it is your choice + * whether to permit this exception to apply to your modifications. + * If you do not wish that, delete this exception notice. + * + */ +/*----------------------------------------------------------------------*/ +; +; Header File to Generate QT Wrapper Sources +; + + +Inherits = +Type = Core +New = + + + +#include + + +/* + * QTextEncoder ( const QTextCodec * codec ) + * ~QTextEncoder () + */ +HB_FUNC( QT_QTEXTENCODER ) +{ + hb_retptr( ( QTextEncoder* ) new QTextEncoder( hbqt_par_QTextCodec( 1 ) ) ); +} + + + + + + +QByteArray fromUnicode ( const QString & str ) +//QByteArray fromUnicode ( const QChar * uc, int len ) +//QByteArray fromUnicode ( const QString & uc, int & lenInOut ) + + + + + + + + + + + diff --git a/harbour/contrib/hbqt/qth/QTextFragment.qth b/harbour/contrib/hbqt/qth/QTextFragment.qth new file mode 100644 index 0000000000..a98bb3d4a5 --- /dev/null +++ b/harbour/contrib/hbqt/qth/QTextFragment.qth @@ -0,0 +1,98 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT Source Generator for Harbour + * + * Copyright 2009 Pritpal Bedi + * www - http://www.harbour-project.org + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this software; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, + * Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/). + * + * As a special exception, the Harbour Project gives permission for + * additional uses of the text contained in its release of Harbour. + * + * The exception is that, if you link the Harbour libraries with other + * files to produce an executable, this does not by itself cause the + * resulting executable to be covered by the GNU General Public License. + * Your use of that executable is in no way restricted on account of + * linking the Harbour library code into it. + * + * This exception does not however invalidate any other reasons why + * the executable file might be covered by the GNU General Public License. + * + * This exception applies only to the code released by the Harbour + * Project under the name Harbour. If you copy code from other + * Harbour Project or Free Software Foundation releases into a copy of + * Harbour, as the General Public License permits, the exception does + * not apply to the code that you add in this way. To avoid misleading + * anyone as to the status of such modified files, you must delete + * this exception notice from them. + * + * If you write modifications of your own for Harbour, it is your choice + * whether to permit this exception to apply to your modifications. + * If you do not wish that, delete this exception notice. + * + */ +/*----------------------------------------------------------------------*/ +; +; Header File to Generate QT Wrapper Sources +; + + +Inherits = +Type = Core +New = + + + +#include + + +/* + * QTextFragment () + * QTextFragment ( const QTextFragment & other ) + */ +HB_FUNC( QT_QTEXTFRAGMENT ) +{ + hb_retptr( ( QTextFragment* ) new QTextFragment() ); +} + + + + + + +QTextCharFormat charFormat () const +int charFormatIndex () const +bool contains ( int position ) const +bool isValid () const +int length () const +int position () const +QString text () const + + + + + + + + + + + diff --git a/harbour/contrib/hbqt/qth/QTextFrame.qth b/harbour/contrib/hbqt/qth/QTextFrame.qth new file mode 100644 index 0000000000..48a15d621b --- /dev/null +++ b/harbour/contrib/hbqt/qth/QTextFrame.qth @@ -0,0 +1,101 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT Source Generator for Harbour + * + * Copyright 2009 Pritpal Bedi + * www - http://www.harbour-project.org + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this software; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, + * Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/). + * + * As a special exception, the Harbour Project gives permission for + * additional uses of the text contained in its release of Harbour. + * + * The exception is that, if you link the Harbour libraries with other + * files to produce an executable, this does not by itself cause the + * resulting executable to be covered by the GNU General Public License. + * Your use of that executable is in no way restricted on account of + * linking the Harbour library code into it. + * + * This exception does not however invalidate any other reasons why + * the executable file might be covered by the GNU General Public License. + * + * This exception applies only to the code released by the Harbour + * Project under the name Harbour. If you copy code from other + * Harbour Project or Free Software Foundation releases into a copy of + * Harbour, as the General Public License permits, the exception does + * not apply to the code that you add in this way. To avoid misleading + * anyone as to the status of such modified files, you must delete + * this exception notice from them. + * + * If you write modifications of your own for Harbour, it is your choice + * whether to permit this exception to apply to your modifications. + * If you do not wish that, delete this exception notice. + * + */ +/*----------------------------------------------------------------------*/ +; +; Header File to Generate QT Wrapper Sources +; + + +Inherits = QTextObject +Type = Core +New = pDocument + + + +#include + + +/* + * QTextFrame ( QTextDocument * document ) + * ~QTextFrame () + */ +HB_FUNC( QT_QTEXTFRAME ) +{ + hb_retptr( ( QTextFrame* ) new QTextFrame( hbqt_par_QTextDocument( 1 ) ) ); +} + + + + + + +//iterator begin () const +QList childFrames () const +//iterator end () const +QTextCursor firstCursorPosition () const +int firstPosition () const +QTextFrameFormat frameFormat () const +QTextCursor lastCursorPosition () const +int lastPosition () const +QTextFrame * parentFrame () const +void setFrameFormat ( const QTextFrameFormat & format ) + + + + + + + + + + + diff --git a/harbour/contrib/hbqt/qth/QTextFrameFormat.qth b/harbour/contrib/hbqt/qth/QTextFrameFormat.qth new file mode 100644 index 0000000000..305aac414d --- /dev/null +++ b/harbour/contrib/hbqt/qth/QTextFrameFormat.qth @@ -0,0 +1,127 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT Source Generator for Harbour + * + * Copyright 2009 Pritpal Bedi + * www - http://www.harbour-project.org + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this software; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, + * Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/). + * + * As a special exception, the Harbour Project gives permission for + * additional uses of the text contained in its release of Harbour. + * + * The exception is that, if you link the Harbour libraries with other + * files to produce an executable, this does not by itself cause the + * resulting executable to be covered by the GNU General Public License. + * Your use of that executable is in no way restricted on account of + * linking the Harbour library code into it. + * + * This exception does not however invalidate any other reasons why + * the executable file might be covered by the GNU General Public License. + * + * This exception applies only to the code released by the Harbour + * Project under the name Harbour. If you copy code from other + * Harbour Project or Free Software Foundation releases into a copy of + * Harbour, as the General Public License permits, the exception does + * not apply to the code that you add in this way. To avoid misleading + * anyone as to the status of such modified files, you must delete + * this exception notice from them. + * + * If you write modifications of your own for Harbour, it is your choice + * whether to permit this exception to apply to your modifications. + * If you do not wish that, delete this exception notice. + * + */ +/*----------------------------------------------------------------------*/ +; +; Header File to Generate QT Wrapper Sources +; + + +Inherits = QTextFormat +Type = Core +New = + + + +#include + + +/* + * QTextFrameFormat () + */ +HB_FUNC( QT_QTEXTFRAMEFORMAT ) +{ + hb_retptr( ( QTextFrameFormat* ) new QTextFrameFormat() ); +} + + + +flags PageBreakFlags +enum FormatType { InvalidFormat, BlockFormat, CharFormat, ListFormat, ..., UserFormat } +enum ObjectTypes { NoObject, ImageObject, TableObject, TableCellObject, UserObject } +enum PageBreakFlag { PageBreak_Auto, PageBreak_AlwaysBefore, PageBreak_AlwaysAfter } +enum Property { ObjectIndex, CssFloat, LayoutDirection, OutlinePen, ..., UserProperty } + +enum BorderStyle { BorderStyle_None, BorderStyle_Dotted, BorderStyle_Dashed, BorderStyle_Solid, ..., BorderStyle_Outset } +enum Position { InFlow, FloatLeft, FloatRight } + + + +qreal border () const +QBrush borderBrush () const +BorderStyle borderStyle () const +qreal bottomMargin () const +QTextLength height () const +bool isValid () const +qreal leftMargin () const +qreal margin () const +qreal padding () const +PageBreakFlags pageBreakPolicy () const +Position position () const +qreal rightMargin () const +void setBorder ( qreal width ) +void setBorderBrush ( const QBrush & brush ) +void setBorderStyle ( BorderStyle style ) +void setBottomMargin ( qreal margin ) +void setHeight ( const QTextLength & height ) +void setHeight ( qreal height ) +void setLeftMargin ( qreal margin ) +void setMargin ( qreal margin ) +void setPadding ( qreal width ) +void setPageBreakPolicy ( PageBreakFlags policy ) +void setPosition ( Position policy ) +void setRightMargin ( qreal margin ) +void setTopMargin ( qreal margin ) +void setWidth ( const QTextLength & width ) +void setWidth ( qreal width ) +qreal topMargin () const +QTextLength width () const + + + + + + + + + + + diff --git a/harbour/contrib/hbqt/qth/QTextImageFormat.qth b/harbour/contrib/hbqt/qth/QTextImageFormat.qth new file mode 100644 index 0000000000..42489fb4d2 --- /dev/null +++ b/harbour/contrib/hbqt/qth/QTextImageFormat.qth @@ -0,0 +1,98 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT Source Generator for Harbour + * + * Copyright 2009 Pritpal Bedi + * www - http://www.harbour-project.org + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this software; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, + * Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/). + * + * As a special exception, the Harbour Project gives permission for + * additional uses of the text contained in its release of Harbour. + * + * The exception is that, if you link the Harbour libraries with other + * files to produce an executable, this does not by itself cause the + * resulting executable to be covered by the GNU General Public License. + * Your use of that executable is in no way restricted on account of + * linking the Harbour library code into it. + * + * This exception does not however invalidate any other reasons why + * the executable file might be covered by the GNU General Public License. + * + * This exception applies only to the code released by the Harbour + * Project under the name Harbour. If you copy code from other + * Harbour Project or Free Software Foundation releases into a copy of + * Harbour, as the General Public License permits, the exception does + * not apply to the code that you add in this way. To avoid misleading + * anyone as to the status of such modified files, you must delete + * this exception notice from them. + * + * If you write modifications of your own for Harbour, it is your choice + * whether to permit this exception to apply to your modifications. + * If you do not wish that, delete this exception notice. + * + */ +/*----------------------------------------------------------------------*/ +; +; Header File to Generate QT Wrapper Sources +; + + +Inherits = QTextCharFormat +Type = Core +New = + + + +#include + + +/* + * QTextImageFormat () + * + */ +HB_FUNC( QT_QTEXTIMAGEFORMAT ) +{ + hb_retptr( ( QTextImageFormat* ) new QTextImageFormat() ); +} + + + + + + +qreal height () const +bool isValid () const +QString name () const +void setHeight ( qreal height ) +void setName ( const QString & name ) +void setWidth ( qreal width ) +qreal width () const + + + + + + + + + + + diff --git a/harbour/contrib/hbqt/qth/QTextInlineObject.qth b/harbour/contrib/hbqt/qth/QTextInlineObject.qth new file mode 100644 index 0000000000..425911b5b2 --- /dev/null +++ b/harbour/contrib/hbqt/qth/QTextInlineObject.qth @@ -0,0 +1,104 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT Source Generator for Harbour + * + * Copyright 2009 Pritpal Bedi + * www - http://www.harbour-project.org + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this software; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, + * Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/). + * + * As a special exception, the Harbour Project gives permission for + * additional uses of the text contained in its release of Harbour. + * + * The exception is that, if you link the Harbour libraries with other + * files to produce an executable, this does not by itself cause the + * resulting executable to be covered by the GNU General Public License. + * Your use of that executable is in no way restricted on account of + * linking the Harbour library code into it. + * + * This exception does not however invalidate any other reasons why + * the executable file might be covered by the GNU General Public License. + * + * This exception applies only to the code released by the Harbour + * Project under the name Harbour. If you copy code from other + * Harbour Project or Free Software Foundation releases into a copy of + * Harbour, as the General Public License permits, the exception does + * not apply to the code that you add in this way. To avoid misleading + * anyone as to the status of such modified files, you must delete + * this exception notice from them. + * + * If you write modifications of your own for Harbour, it is your choice + * whether to permit this exception to apply to your modifications. + * If you do not wish that, delete this exception notice. + * + */ +/*----------------------------------------------------------------------*/ +; +; Header File to Generate QT Wrapper Sources +; + + +Inherits = +Type = Core +New = iInt, pEngine + + + +#include + + +/* + * QTextInlineObject ( int i, QTextEngine * e ) + * + */ +HB_FUNC( QT_Q ) +{ + hb_retptr( ( QTextInlineObject* ) new QTextInlineObject( hb_parni( 1 ), hbqt_par_QTextEngine( 2 ) ) ); +} + + + + + + +qreal ascent () const +qreal descent () const +QTextFormat format () const +int formatIndex () const +qreal height () const +bool isValid () const +QRectF rect () const +void setAscent ( qreal a ) +void setDescent ( qreal d ) +void setWidth ( qreal w ) +Qt::LayoutDirection textDirection () const +int textPosition () const +qreal width () const + + + + + + + + + + + diff --git a/harbour/contrib/hbqt/qth/QTextItem.qth b/harbour/contrib/hbqt/qth/QTextItem.qth new file mode 100644 index 0000000000..c9ac73a226 --- /dev/null +++ b/harbour/contrib/hbqt/qth/QTextItem.qth @@ -0,0 +1,99 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT Source Generator for Harbour + * + * Copyright 2009 Pritpal Bedi + * www - http://www.harbour-project.org + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this software; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, + * Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/). + * + * As a special exception, the Harbour Project gives permission for + * additional uses of the text contained in its release of Harbour. + * + * The exception is that, if you link the Harbour libraries with other + * files to produce an executable, this does not by itself cause the + * resulting executable to be covered by the GNU General Public License. + * Your use of that executable is in no way restricted on account of + * linking the Harbour library code into it. + * + * This exception does not however invalidate any other reasons why + * the executable file might be covered by the GNU General Public License. + * + * This exception applies only to the code released by the Harbour + * Project under the name Harbour. If you copy code from other + * Harbour Project or Free Software Foundation releases into a copy of + * Harbour, as the General Public License permits, the exception does + * not apply to the code that you add in this way. To avoid misleading + * anyone as to the status of such modified files, you must delete + * this exception notice from them. + * + * If you write modifications of your own for Harbour, it is your choice + * whether to permit this exception to apply to your modifications. + * If you do not wish that, delete this exception notice. + * + */ +/*----------------------------------------------------------------------*/ +; +; Header File to Generate QT Wrapper Sources +; + + +Inherits = +Type = Core +New = + + + +#include + + +/* + * + * + */ +HB_FUNC( QT_QTEXTITEM ) +{ + hb_retptr( ( QTextItem* ) new QTextItem() ); +} + + + +enum RenderFlag { RightToLeft, Overline, Underline, StrikeOut } +flags RenderFlags + + + +qreal ascent () const +qreal descent () const +QFont font () const +RenderFlags renderFlags () const +QString text () const +qreal width () const + + + + + + + + + + + diff --git a/harbour/contrib/hbqt/qth/QTextLayout.qth b/harbour/contrib/hbqt/qth/QTextLayout.qth new file mode 100644 index 0000000000..db462f661c --- /dev/null +++ b/harbour/contrib/hbqt/qth/QTextLayout.qth @@ -0,0 +1,126 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT Source Generator for Harbour + * + * Copyright 2009 Pritpal Bedi + * www - http://www.harbour-project.org + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this software; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, + * Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/). + * + * As a special exception, the Harbour Project gives permission for + * additional uses of the text contained in its release of Harbour. + * + * The exception is that, if you link the Harbour libraries with other + * files to produce an executable, this does not by itself cause the + * resulting executable to be covered by the GNU General Public License. + * Your use of that executable is in no way restricted on account of + * linking the Harbour library code into it. + * + * This exception does not however invalidate any other reasons why + * the executable file might be covered by the GNU General Public License. + * + * This exception applies only to the code released by the Harbour + * Project under the name Harbour. If you copy code from other + * Harbour Project or Free Software Foundation releases into a copy of + * Harbour, as the General Public License permits, the exception does + * not apply to the code that you add in this way. To avoid misleading + * anyone as to the status of such modified files, you must delete + * this exception notice from them. + * + * If you write modifications of your own for Harbour, it is your choice + * whether to permit this exception to apply to your modifications. + * If you do not wish that, delete this exception notice. + * + */ +/*----------------------------------------------------------------------*/ +; +; Header File to Generate QT Wrapper Sources +; + + +Inherits = +Type = Core +New = + + + +#include + + +/* + * QTextLayout () + * QTextLayout ( const QString & text ) + * QTextLayout ( const QString & text, const QFont & font, QPaintDevice * paintdevice = 0 ) + * ~QTextLayout () + */ +HB_FUNC( QT_QTEXTLAYOUT ) +{ + hb_retptr( ( QTextLayout* ) new QTextLayout() ); +} + + + +enum CursorMode { SkipCharacters, SkipWords } + + + +QList additionalFormats () const +void beginLayout () +QRectF boundingRect () const +bool cacheEnabled () const +void clearAdditionalFormats () +void clearLayout () +QTextLine createLine () +void draw ( QPainter * p, const QPointF & pos, const QVector & selections = QVector (), const QRectF & clip = QRectF() ) const +void drawCursor ( QPainter * painter, const QPointF & position, int cursorPosition, int width ) const +void drawCursor ( QPainter * painter, const QPointF & position, int cursorPosition ) const +void endLayout () +QFont font () const +bool isValidCursorPosition ( int pos ) const +QTextLine lineAt ( int i ) const +int lineCount () const +QTextLine lineForTextPosition ( int pos ) const +qreal maximumWidth () const +qreal minimumWidth () const +int nextCursorPosition ( int oldPos, CursorMode mode = SkipCharacters ) const +QPointF position () const +int preeditAreaPosition () const +QString preeditAreaText () const +int previousCursorPosition ( int oldPos, CursorMode mode = SkipCharacters ) const +void setAdditionalFormats ( const QList & formatList ) +void setCacheEnabled ( bool enable ) +void setFont ( const QFont & font ) +void setPosition ( const QPointF & p ) +void setPreeditArea ( int position, const QString & text ) +void setText ( const QString & string ) +void setTextOption ( const QTextOption & option ) +QString text () const +QTextOption textOption () const + + + + + + + + + + + diff --git a/harbour/contrib/hbqt/qth/QTextLength.qth b/harbour/contrib/hbqt/qth/QTextLength.qth new file mode 100644 index 0000000000..ad055e2886 --- /dev/null +++ b/harbour/contrib/hbqt/qth/QTextLength.qth @@ -0,0 +1,95 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT Source Generator for Harbour + * + * Copyright 2009 Pritpal Bedi + * www - http://www.harbour-project.org + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this software; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, + * Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/). + * + * As a special exception, the Harbour Project gives permission for + * additional uses of the text contained in its release of Harbour. + * + * The exception is that, if you link the Harbour libraries with other + * files to produce an executable, this does not by itself cause the + * resulting executable to be covered by the GNU General Public License. + * Your use of that executable is in no way restricted on account of + * linking the Harbour library code into it. + * + * This exception does not however invalidate any other reasons why + * the executable file might be covered by the GNU General Public License. + * + * This exception applies only to the code released by the Harbour + * Project under the name Harbour. If you copy code from other + * Harbour Project or Free Software Foundation releases into a copy of + * Harbour, as the General Public License permits, the exception does + * not apply to the code that you add in this way. To avoid misleading + * anyone as to the status of such modified files, you must delete + * this exception notice from them. + * + * If you write modifications of your own for Harbour, it is your choice + * whether to permit this exception to apply to your modifications. + * If you do not wish that, delete this exception notice. + * + */ +/*----------------------------------------------------------------------*/ +; +; Header File to Generate QT Wrapper Sources +; + + +Inherits = +Type = Core +New = + + + +#include + + +/* + * QTextLength () + * QTextLength ( Type type, qreal value ) + */ +HB_FUNC( QT_QTEXTLENGTH ) +{ + hb_retptr( ( QTextLength* ) new QTextLength() ); +} + + + +enum Type { VariableLength, FixedLength, PercentageLength } + + + +qreal rawValue () const +Type type () const +qreal value ( qreal maximumLength ) const + + + + + + + + + + + diff --git a/harbour/contrib/hbqt/qth/QTextLine.qth b/harbour/contrib/hbqt/qth/QTextLine.qth new file mode 100644 index 0000000000..c78f22f121 --- /dev/null +++ b/harbour/contrib/hbqt/qth/QTextLine.qth @@ -0,0 +1,116 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT Source Generator for Harbour + * + * Copyright 2009 Pritpal Bedi + * www - http://www.harbour-project.org + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this software; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, + * Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/). + * + * As a special exception, the Harbour Project gives permission for + * additional uses of the text contained in its release of Harbour. + * + * The exception is that, if you link the Harbour libraries with other + * files to produce an executable, this does not by itself cause the + * resulting executable to be covered by the GNU General Public License. + * Your use of that executable is in no way restricted on account of + * linking the Harbour library code into it. + * + * This exception does not however invalidate any other reasons why + * the executable file might be covered by the GNU General Public License. + * + * This exception applies only to the code released by the Harbour + * Project under the name Harbour. If you copy code from other + * Harbour Project or Free Software Foundation releases into a copy of + * Harbour, as the General Public License permits, the exception does + * not apply to the code that you add in this way. To avoid misleading + * anyone as to the status of such modified files, you must delete + * this exception notice from them. + * + * If you write modifications of your own for Harbour, it is your choice + * whether to permit this exception to apply to your modifications. + * If you do not wish that, delete this exception notice. + * + */ +/*----------------------------------------------------------------------*/ +; +; Header File to Generate QT Wrapper Sources +; + + +Inherits = +Type = Core +New = + + + +#include + + +/* + * QTextLine () + */ +HB_FUNC( QT_QTEXTLINE ) +{ + hb_retptr( ( QTextLine* ) new QTextLine() ); +} + + + +enum CursorPosition { CursorBetweenCharacters, CursorOnCharacter } +enum Edge { Leading, Trailing } + + + +qreal ascent () const +qreal cursorToX ( int * cursorPos, Edge edge = Leading ) const +qreal cursorToX ( int cursorPos, Edge edge = Leading ) const +qreal descent () const +# +//void draw ( QPainter * painter, const QPointF & position, const QTextLayout::FormatRange * selection = 0 ) const +# +qreal height () const +bool isValid () const +int lineNumber () const +QRectF naturalTextRect () const +qreal naturalTextWidth () const +QPointF position () const +QRectF rect () const +void setLineWidth ( qreal width ) +void setNumColumns ( int numColumns ) +void setNumColumns ( int numColumns, qreal alignmentWidth ) +void setPosition ( const QPointF & pos ) +int textLength () const +int textStart () const +qreal width () const +qreal x () const +int xToCursor ( qreal x, CursorPosition cpos = CursorBetweenCharacters ) const +qreal y () const + + + + + + + + + + +