From 73c4dc6617c779a4f91d25022205c0b62fdbb31a Mon Sep 17 00:00:00 2001 From: Pritpal Bedi Date: Sun, 19 Apr 2009 00:59:06 +0000 Subject: [PATCH] 2009-04-18 17:48 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/hbqt_qtextblock.cpp + harbour/contrib/hbqt/hbqt_qtextblockformat.cpp + harbour/contrib/hbqt/hbqt_qtextblockgroup.cpp + harbour/contrib/hbqt/hbqt_qtextboundaryfinder.cpp + harbour/contrib/hbqt/hbqt_qtextbrowser.cpp + harbour/contrib/hbqt/hbqt_qtextcharformat.cpp + harbour/contrib/hbqt/hbqt_qtextcursor.cpp + harbour/contrib/hbqt/hbqt_qtextdecoder.cpp + harbour/contrib/hbqt/hbqt_qtextdocument.cpp + harbour/contrib/hbqt/hbqt_qtextdocumentfragment.cpp + harbour/contrib/hbqt/hbqt_qtextdocumentwriter.cpp + harbour/contrib/hbqt/hbqt_qtextformat.cpp + harbour/contrib/hbqt/hbqt_qtextstream.cpp * harbour/contrib/hbqt/Makefile_gen + harbour/contrib/hbqt/qth/QClipboard.qth + harbour/contrib/hbqt/qth/QTextBlock.qth + harbour/contrib/hbqt/qth/QTextBlockFormat.qth + harbour/contrib/hbqt/qth/QTextBlockGroup.qth + harbour/contrib/hbqt/qth/QTextBoundaryFinder.qth + harbour/contrib/hbqt/qth/QTextBrowser.qth + harbour/contrib/hbqt/qth/QTextCharFormat.qth + harbour/contrib/hbqt/qth/QTextCursor.qth + harbour/contrib/hbqt/qth/QTextDecoder.qth + harbour/contrib/hbqt/qth/QTextDocument.qth + harbour/contrib/hbqt/qth/QTextDocumentFragment.qth + harbour/contrib/hbqt/qth/QTextDocumentWriter.qth + harbour/contrib/hbqt/qth/QTextFormat.qth + harbour/contrib/hbqt/qth/QTextStream.qth + harbour/contrib/hbqt/tests/demoqt.prg + harbour/contrib/hbqt/tests/wvtext.prg + harbour/contrib/hbqt/TQTextBlock.prg + harbour/contrib/hbqt/TQTextBlockFormat.prg + harbour/contrib/hbqt/TQTextBlockGroup.prg + harbour/contrib/hbqt/TQTextBoundaryFinder.prg + harbour/contrib/hbqt/TQTextBrowser.prg + harbour/contrib/hbqt/TQTextCharFormat.prg + harbour/contrib/hbqt/TQTextCursor.prg + harbour/contrib/hbqt/TQTextDecoder.prg + harbour/contrib/hbqt/TQTextDocument.prg + harbour/contrib/hbqt/TQTextDocumentFragment.prg + harbour/contrib/hbqt/TQTextDocumentWriter.prg + harbour/contrib/hbqt/TQTextFormat.prg + harbour/contrib/hbqt/TQTextStream.prg + Added several new classes, hbqtgen.prg adjusted for new definitions, implemented more info in the sources but deferred for next commit. --- harbour/ChangeLog | 58 ++ harbour/contrib/hbqt/Makefile_gen | 26 + harbour/contrib/hbqt/TQTextBlock.prg | 107 +++ harbour/contrib/hbqt/TQTextBlockFormat.prg | 99 +++ harbour/contrib/hbqt/TQTextBlockGroup.prg | 80 +++ harbour/contrib/hbqt/TQTextBoundaryFinder.prg | 91 +++ harbour/contrib/hbqt/TQTextBrowser.prg | 100 +++ harbour/contrib/hbqt/TQTextCharFormat.prg | 127 ++++ harbour/contrib/hbqt/TQTextCursor.prg | 140 ++++ harbour/contrib/hbqt/TQTextDecoder.prg | 81 +++ harbour/contrib/hbqt/TQTextDocument.prg | 146 +++++ .../contrib/hbqt/TQTextDocumentFragment.prg | 84 +++ harbour/contrib/hbqt/TQTextDocumentWriter.prg | 90 +++ harbour/contrib/hbqt/TQTextFormat.prg | 122 ++++ harbour/contrib/hbqt/TQTextStream.prg | 116 ++++ harbour/contrib/hbqt/generator/hbqtgen.prg | 38 +- harbour/contrib/hbqt/generator/qt45.qtp | 13 + harbour/contrib/hbqt/hbqt.h | 28 +- harbour/contrib/hbqt/hbqt_qtextblock.cpp | 294 +++++++++ .../contrib/hbqt/hbqt_qtextblockformat.cpp | 241 +++++++ harbour/contrib/hbqt/hbqt_qtextblockgroup.cpp | 79 +++ .../contrib/hbqt/hbqt_qtextboundaryfinder.cpp | 170 +++++ harbour/contrib/hbqt/hbqt_qtextbrowser.cpp | 238 +++++++ harbour/contrib/hbqt/hbqt_qtextcharformat.cpp | 455 +++++++++++++ harbour/contrib/hbqt/hbqt_qtextcursor.cpp | 573 ++++++++++++++++ harbour/contrib/hbqt/hbqt_qtextdecoder.cpp | 87 +++ harbour/contrib/hbqt/hbqt_qtextdocument.cpp | 617 ++++++++++++++++++ .../hbqt/hbqt_qtextdocumentfragment.cpp | 114 ++++ .../contrib/hbqt/hbqt_qtextdocumentwriter.cpp | 161 +++++ harbour/contrib/hbqt/hbqt_qtextformat.cpp | 428 ++++++++++++ harbour/contrib/hbqt/hbqt_qtextstream.cpp | 380 +++++++++++ harbour/contrib/hbqt/qth/QClipboard.qth | 113 ++++ harbour/contrib/hbqt/qth/QTextBlock.qth | 119 ++++ harbour/contrib/hbqt/qth/QTextBlockFormat.qth | 117 ++++ harbour/contrib/hbqt/qth/QTextBlockGroup.qth | 97 +++ .../contrib/hbqt/qth/QTextBoundaryFinder.qth | 108 +++ harbour/contrib/hbqt/qth/QTextBrowser.qth | 117 ++++ harbour/contrib/hbqt/qth/QTextCharFormat.qth | 140 ++++ harbour/contrib/hbqt/qth/QTextCursor.qth | 161 +++++ harbour/contrib/hbqt/qth/QTextDecoder.qth | 96 +++ harbour/contrib/hbqt/qth/QTextDocument.qth | 175 +++++ .../hbqt/qth/QTextDocumentFragment.qth | 98 +++ .../contrib/hbqt/qth/QTextDocumentWriter.qth | 103 +++ harbour/contrib/hbqt/qth/QTextFormat.qth | 143 ++++ harbour/contrib/hbqt/qth/QTextStream.qth | 150 +++++ harbour/contrib/hbqt/tests/demoqt.prg | 2 +- harbour/contrib/hbqt/tests/wvtext.prg | 9 +- 47 files changed, 7122 insertions(+), 9 deletions(-) create mode 100644 harbour/contrib/hbqt/TQTextBlock.prg create mode 100644 harbour/contrib/hbqt/TQTextBlockFormat.prg create mode 100644 harbour/contrib/hbqt/TQTextBlockGroup.prg create mode 100644 harbour/contrib/hbqt/TQTextBoundaryFinder.prg create mode 100644 harbour/contrib/hbqt/TQTextBrowser.prg create mode 100644 harbour/contrib/hbqt/TQTextCharFormat.prg create mode 100644 harbour/contrib/hbqt/TQTextCursor.prg create mode 100644 harbour/contrib/hbqt/TQTextDecoder.prg create mode 100644 harbour/contrib/hbqt/TQTextDocument.prg create mode 100644 harbour/contrib/hbqt/TQTextDocumentFragment.prg create mode 100644 harbour/contrib/hbqt/TQTextDocumentWriter.prg create mode 100644 harbour/contrib/hbqt/TQTextFormat.prg create mode 100644 harbour/contrib/hbqt/TQTextStream.prg create mode 100644 harbour/contrib/hbqt/hbqt_qtextblock.cpp create mode 100644 harbour/contrib/hbqt/hbqt_qtextblockformat.cpp create mode 100644 harbour/contrib/hbqt/hbqt_qtextblockgroup.cpp create mode 100644 harbour/contrib/hbqt/hbqt_qtextboundaryfinder.cpp create mode 100644 harbour/contrib/hbqt/hbqt_qtextbrowser.cpp create mode 100644 harbour/contrib/hbqt/hbqt_qtextcharformat.cpp create mode 100644 harbour/contrib/hbqt/hbqt_qtextcursor.cpp create mode 100644 harbour/contrib/hbqt/hbqt_qtextdecoder.cpp create mode 100644 harbour/contrib/hbqt/hbqt_qtextdocument.cpp create mode 100644 harbour/contrib/hbqt/hbqt_qtextdocumentfragment.cpp create mode 100644 harbour/contrib/hbqt/hbqt_qtextdocumentwriter.cpp create mode 100644 harbour/contrib/hbqt/hbqt_qtextformat.cpp create mode 100644 harbour/contrib/hbqt/hbqt_qtextstream.cpp create mode 100644 harbour/contrib/hbqt/qth/QClipboard.qth create mode 100644 harbour/contrib/hbqt/qth/QTextBlock.qth create mode 100644 harbour/contrib/hbqt/qth/QTextBlockFormat.qth create mode 100644 harbour/contrib/hbqt/qth/QTextBlockGroup.qth create mode 100644 harbour/contrib/hbqt/qth/QTextBoundaryFinder.qth create mode 100644 harbour/contrib/hbqt/qth/QTextBrowser.qth create mode 100644 harbour/contrib/hbqt/qth/QTextCharFormat.qth create mode 100644 harbour/contrib/hbqt/qth/QTextCursor.qth create mode 100644 harbour/contrib/hbqt/qth/QTextDecoder.qth create mode 100644 harbour/contrib/hbqt/qth/QTextDocument.qth create mode 100644 harbour/contrib/hbqt/qth/QTextDocumentFragment.qth create mode 100644 harbour/contrib/hbqt/qth/QTextDocumentWriter.qth create mode 100644 harbour/contrib/hbqt/qth/QTextFormat.qth create mode 100644 harbour/contrib/hbqt/qth/QTextStream.qth diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 7975ee8537..ae32adf44b 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,6 +8,64 @@ 2009-12-31 13:59 UTC+0100 Foo Bar (foo.bar foobar.org) */ + +2009-04-18 17:48 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/hbqt_qtextblock.cpp + + harbour/contrib/hbqt/hbqt_qtextblockformat.cpp + + harbour/contrib/hbqt/hbqt_qtextblockgroup.cpp + + harbour/contrib/hbqt/hbqt_qtextboundaryfinder.cpp + + harbour/contrib/hbqt/hbqt_qtextbrowser.cpp + + harbour/contrib/hbqt/hbqt_qtextcharformat.cpp + + harbour/contrib/hbqt/hbqt_qtextcursor.cpp + + harbour/contrib/hbqt/hbqt_qtextdecoder.cpp + + harbour/contrib/hbqt/hbqt_qtextdocument.cpp + + harbour/contrib/hbqt/hbqt_qtextdocumentfragment.cpp + + harbour/contrib/hbqt/hbqt_qtextdocumentwriter.cpp + + harbour/contrib/hbqt/hbqt_qtextformat.cpp + + harbour/contrib/hbqt/hbqt_qtextstream.cpp + + * harbour/contrib/hbqt/Makefile_gen + + + harbour/contrib/hbqt/qth/QClipboard.qth + + harbour/contrib/hbqt/qth/QTextBlock.qth + + harbour/contrib/hbqt/qth/QTextBlockFormat.qth + + harbour/contrib/hbqt/qth/QTextBlockGroup.qth + + harbour/contrib/hbqt/qth/QTextBoundaryFinder.qth + + harbour/contrib/hbqt/qth/QTextBrowser.qth + + harbour/contrib/hbqt/qth/QTextCharFormat.qth + + harbour/contrib/hbqt/qth/QTextCursor.qth + + harbour/contrib/hbqt/qth/QTextDecoder.qth + + harbour/contrib/hbqt/qth/QTextDocument.qth + + harbour/contrib/hbqt/qth/QTextDocumentFragment.qth + + harbour/contrib/hbqt/qth/QTextDocumentWriter.qth + + harbour/contrib/hbqt/qth/QTextFormat.qth + + harbour/contrib/hbqt/qth/QTextStream.qth + + + harbour/contrib/hbqt/tests/demoqt.prg + + harbour/contrib/hbqt/tests/wvtext.prg + + harbour/contrib/hbqt/TQTextBlock.prg + + harbour/contrib/hbqt/TQTextBlockFormat.prg + + harbour/contrib/hbqt/TQTextBlockGroup.prg + + harbour/contrib/hbqt/TQTextBoundaryFinder.prg + + harbour/contrib/hbqt/TQTextBrowser.prg + + harbour/contrib/hbqt/TQTextCharFormat.prg + + harbour/contrib/hbqt/TQTextCursor.prg + + harbour/contrib/hbqt/TQTextDecoder.prg + + harbour/contrib/hbqt/TQTextDocument.prg + + harbour/contrib/hbqt/TQTextDocumentFragment.prg + + harbour/contrib/hbqt/TQTextDocumentWriter.prg + + harbour/contrib/hbqt/TQTextFormat.prg + + harbour/contrib/hbqt/TQTextStream.prg + + + Added several new classes, hbqtgen.prg adjusted for + new definitions, implemented more info in the sources + but deferred for next commit. + + 2009-04-18 17:41 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com) * harbour/contrib/gtqtc/Makefile ! Adopted along hbqt/Makefile pattern. diff --git a/harbour/contrib/hbqt/Makefile_gen b/harbour/contrib/hbqt/Makefile_gen index 7a981c5798..07ac0e7b43 100644 --- a/harbour/contrib/hbqt/Makefile_gen +++ b/harbour/contrib/hbqt/Makefile_gen @@ -99,7 +99,20 @@ CPP_SOURCES=\ hbqt_qtablewidget.cpp \ hbqt_qtablewidgetitem.cpp \ hbqt_qtabwidget.cpp \ + hbqt_qtextblock.cpp \ + hbqt_qtextblockformat.cpp \ + hbqt_qtextblockgroup.cpp \ + hbqt_qtextbrowser.cpp \ + hbqt_qtextboundaryfinder.cpp \ + hbqt_qtextcharformat.cpp \ + hbqt_qtextcursor.cpp \ + hbqt_qtextdecoder.cpp \ + hbqt_qtextdocument.cpp \ + hbqt_qtextdocumentfragment.cpp \ + hbqt_qtextdocumentwriter.cpp \ hbqt_qtextedit.cpp \ + hbqt_qtextformat.cpp \ + hbqt_qtextstream.cpp \ hbqt_qtimeedit.cpp \ hbqt_qtimer.cpp \ hbqt_qtoolbar.cpp \ @@ -223,7 +236,20 @@ PRG_SOURCES=\ TQTableWidget.prg \ TQTableWidgetItem.prg \ TQTabWidget.prg \ + TQTextBlock.prg \ + TQTextBlockFormat.prg \ + TQTextBlockGroup.prg \ + TQTextBrowser.prg \ + TQTextBoundaryFinder.prg \ + TQTextCharFormat.prg \ + TQTextCursor.prg \ + TQTextDecoder.prg \ + TQTextDocument.prg \ + TQTextDocumentFragment.prg \ + TQTextDocumentWriter.prg \ TQTextEdit.prg \ + TQTextFormat.prg \ + TQTextStream.prg \ TQTimeEdit.prg \ TQTimer.prg \ TQToolBar.prg \ diff --git a/harbour/contrib/hbqt/TQTextBlock.prg b/harbour/contrib/hbqt/TQTextBlock.prg new file mode 100644 index 0000000000..43bbf2dfc6 --- /dev/null +++ b/harbour/contrib/hbqt/TQTextBlock.prg @@ -0,0 +1,107 @@ +/* + * $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 QTextBlock + + VAR pParent + VAR pPtr + + METHOD New() + + METHOD blockFormat() INLINE Qt_QTextBlock_blockFormat( ::pPtr ) + METHOD blockFormatIndex() INLINE Qt_QTextBlock_blockFormatIndex( ::pPtr ) + METHOD blockNumber() INLINE Qt_QTextBlock_blockNumber( ::pPtr ) + METHOD charFormat() INLINE Qt_QTextBlock_charFormat( ::pPtr ) + METHOD charFormatIndex() INLINE Qt_QTextBlock_charFormatIndex( ::pPtr ) + METHOD clearLayout() INLINE Qt_QTextBlock_clearLayout( ::pPtr ) + METHOD contains( nPosition ) INLINE Qt_QTextBlock_contains( ::pPtr, nPosition ) + METHOD document() INLINE Qt_QTextBlock_document( ::pPtr ) + METHOD firstLineNumber() INLINE Qt_QTextBlock_firstLineNumber( ::pPtr ) + METHOD isValid() INLINE Qt_QTextBlock_isValid( ::pPtr ) + METHOD isVisible() INLINE Qt_QTextBlock_isVisible( ::pPtr ) + METHOD layout() INLINE Qt_QTextBlock_layout( ::pPtr ) + METHOD length() INLINE Qt_QTextBlock_length( ::pPtr ) + METHOD lineCount() INLINE Qt_QTextBlock_lineCount( ::pPtr ) + METHOD next() INLINE Qt_QTextBlock_next( ::pPtr ) + METHOD position() INLINE Qt_QTextBlock_position( ::pPtr ) + METHOD previous() INLINE Qt_QTextBlock_previous( ::pPtr ) + METHOD revision() INLINE Qt_QTextBlock_revision( ::pPtr ) + METHOD setLineCount( nCount ) INLINE Qt_QTextBlock_setLineCount( ::pPtr, nCount ) + METHOD setRevision( nRev ) INLINE Qt_QTextBlock_setRevision( ::pPtr, nRev ) + METHOD setUserData( pData ) INLINE Qt_QTextBlock_setUserData( ::pPtr, pData ) + METHOD setUserState( nState ) INLINE Qt_QTextBlock_setUserState( ::pPtr, nState ) + METHOD setVisible( lVisible ) INLINE Qt_QTextBlock_setVisible( ::pPtr, lVisible ) + METHOD text() INLINE Qt_QTextBlock_text( ::pPtr ) + METHOD textList() INLINE Qt_QTextBlock_textList( ::pPtr ) + METHOD userData() INLINE Qt_QTextBlock_userData( ::pPtr ) + METHOD userState() INLINE Qt_QTextBlock_userState( ::pPtr ) + + ENDCLASS + +/*----------------------------------------------------------------------*/ + +METHOD New( pParent ) CLASS QTextBlock + + ::pParent := pParent + + ::pPtr := Qt_QTextBlock( pParent ) + + RETURN Self + +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/TQTextBlockFormat.prg b/harbour/contrib/hbqt/TQTextBlockFormat.prg new file mode 100644 index 0000000000..e5846a85b3 --- /dev/null +++ b/harbour/contrib/hbqt/TQTextBlockFormat.prg @@ -0,0 +1,99 @@ +/* + * $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 QTextBlockFormat INHERIT QTextFormat + + VAR pParent + VAR pPtr + + METHOD New() + + METHOD alignment() INLINE Qt_QTextBlockFormat_alignment( ::pPtr ) + METHOD bottomMargin() INLINE Qt_QTextBlockFormat_bottomMargin( ::pPtr ) + METHOD indent() INLINE Qt_QTextBlockFormat_indent( ::pPtr ) + METHOD isValid() INLINE Qt_QTextBlockFormat_isValid( ::pPtr ) + METHOD leftMargin() INLINE Qt_QTextBlockFormat_leftMargin( ::pPtr ) + METHOD nonBreakableLines() INLINE Qt_QTextBlockFormat_nonBreakableLines( ::pPtr ) + METHOD pageBreakPolicy() INLINE Qt_QTextBlockFormat_pageBreakPolicy( ::pPtr ) + METHOD rightMargin() INLINE Qt_QTextBlockFormat_rightMargin( ::pPtr ) + METHOD setAlignment( nAlignment ) INLINE Qt_QTextBlockFormat_setAlignment( ::pPtr, nAlignment ) + METHOD setBottomMargin( nMargin ) INLINE Qt_QTextBlockFormat_setBottomMargin( ::pPtr, nMargin ) + METHOD setIndent( nIndentation ) INLINE Qt_QTextBlockFormat_setIndent( ::pPtr, nIndentation ) + METHOD setLeftMargin( nMargin ) INLINE Qt_QTextBlockFormat_setLeftMargin( ::pPtr, nMargin ) + METHOD setNonBreakableLines( lB ) INLINE Qt_QTextBlockFormat_setNonBreakableLines( ::pPtr, lB ) + METHOD setPageBreakPolicy( nPolicy ) INLINE Qt_QTextBlockFormat_setPageBreakPolicy( ::pPtr, nPolicy ) + METHOD setRightMargin( nMargin ) INLINE Qt_QTextBlockFormat_setRightMargin( ::pPtr, nMargin ) + METHOD setTextIndent( nIndent ) INLINE Qt_QTextBlockFormat_setTextIndent( ::pPtr, nIndent ) + METHOD setTopMargin( nMargin ) INLINE Qt_QTextBlockFormat_setTopMargin( ::pPtr, nMargin ) + METHOD textIndent() INLINE Qt_QTextBlockFormat_textIndent( ::pPtr ) + METHOD topMargin() INLINE Qt_QTextBlockFormat_topMargin( ::pPtr ) + + ENDCLASS + +/*----------------------------------------------------------------------*/ + +METHOD New( pParent ) CLASS QTextBlockFormat + + ::pParent := pParent + + ::pPtr := Qt_QTextBlockFormat( pParent ) + + RETURN Self + +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/TQTextBlockGroup.prg b/harbour/contrib/hbqt/TQTextBlockGroup.prg new file mode 100644 index 0000000000..1a34758f05 --- /dev/null +++ b/harbour/contrib/hbqt/TQTextBlockGroup.prg @@ -0,0 +1,80 @@ +/* + * $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 QTextBlockGroup INHERIT QTextObject + + VAR pParent + VAR pPtr + + METHOD New() + + + ENDCLASS + +/*----------------------------------------------------------------------*/ + +METHOD New( pParent ) CLASS QTextBlockGroup + + ::pParent := pParent + + ::pPtr := Qt_QTextBlockGroup( pParent ) + + RETURN Self + +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/TQTextBoundaryFinder.prg b/harbour/contrib/hbqt/TQTextBoundaryFinder.prg new file mode 100644 index 0000000000..785ec1dd45 --- /dev/null +++ b/harbour/contrib/hbqt/TQTextBoundaryFinder.prg @@ -0,0 +1,91 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT wrapper main header + * + * Copyright 2009 Marcos Antonio Gambeta + * Copyright 2009 Pritpal Bedi + * www - http://www.harbour-project.org + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this software; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, + * Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/). + * + * As a special exception, the Harbour Project gives permission for + * additional uses of the text contained in its release of Harbour. + * + * The exception is that, if you link the Harbour libraries with other + * files to produce an executable, this does not by itself cause the + * resulting executable to be covered by the GNU General Public License. + * Your use of that executable is in no way restricted on account of + * linking the Harbour library code into it. + * + * This exception does not however invalidate any other reasons why + * the executable file might be covered by the GNU General Public License. + * + * This exception applies only to the code released by the Harbour + * Project under the name Harbour. If you copy code from other + * Harbour Project or Free Software Foundation releases into a copy of + * Harbour, as the General Public License permits, the exception does + * not apply to the code that you add in this way. To avoid misleading + * anyone as to the status of such modified files, you must delete + * this exception notice from them. + * + * If you write modifications of your own for Harbour, it is your choice + * whether to permit this exception to apply to your modifications. + * If you do not wish that, delete this exception notice. + * + */ +/*----------------------------------------------------------------------*/ + + +#include "hbclass.ch" + + +CREATE CLASS QTextBoundaryFinder + + VAR pParent + VAR pPtr + + METHOD New() + + METHOD boundaryReasons() INLINE Qt_QTextBoundaryFinder_boundaryReasons( ::pPtr ) + METHOD isAtBoundary() INLINE Qt_QTextBoundaryFinder_isAtBoundary( ::pPtr ) + METHOD isValid() INLINE Qt_QTextBoundaryFinder_isValid( ::pPtr ) + METHOD position() INLINE Qt_QTextBoundaryFinder_position( ::pPtr ) + METHOD setPosition( nPosition ) INLINE Qt_QTextBoundaryFinder_setPosition( ::pPtr, nPosition ) + METHOD string() INLINE Qt_QTextBoundaryFinder_string( ::pPtr ) + METHOD toEnd() INLINE Qt_QTextBoundaryFinder_toEnd( ::pPtr ) + METHOD toNextBoundary() INLINE Qt_QTextBoundaryFinder_toNextBoundary( ::pPtr ) + METHOD toPreviousBoundary() INLINE Qt_QTextBoundaryFinder_toPreviousBoundary( ::pPtr ) + METHOD toStart() INLINE Qt_QTextBoundaryFinder_toStart( ::pPtr ) + METHOD type() INLINE Qt_QTextBoundaryFinder_type( ::pPtr ) + + ENDCLASS + +/*----------------------------------------------------------------------*/ + +METHOD New( pParent ) CLASS QTextBoundaryFinder + + ::pParent := pParent + + ::pPtr := Qt_QTextBoundaryFinder( pParent ) + + RETURN Self + +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/TQTextBrowser.prg b/harbour/contrib/hbqt/TQTextBrowser.prg new file mode 100644 index 0000000000..83e6e81d1a --- /dev/null +++ b/harbour/contrib/hbqt/TQTextBrowser.prg @@ -0,0 +1,100 @@ +/* + * $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 QTextBrowser INHERIT QTextEdit + + VAR pParent + VAR pPtr + + METHOD New() + + METHOD backwardHistoryCount() INLINE Qt_QTextBrowser_backwardHistoryCount( ::pPtr ) + METHOD clearHistory() INLINE Qt_QTextBrowser_clearHistory( ::pPtr ) + METHOD forwardHistoryCount() INLINE Qt_QTextBrowser_forwardHistoryCount( ::pPtr ) + METHOD historyTitle( nI ) INLINE Qt_QTextBrowser_historyTitle( ::pPtr, nI ) + METHOD historyUrl( nI ) INLINE Qt_QTextBrowser_historyUrl( ::pPtr, nI ) + METHOD isBackwardAvailable() INLINE Qt_QTextBrowser_isBackwardAvailable( ::pPtr ) + METHOD isForwardAvailable() INLINE Qt_QTextBrowser_isForwardAvailable( ::pPtr ) + METHOD loadResource( nType, pName ) INLINE Qt_QTextBrowser_loadResource( ::pPtr, nType, pName ) + METHOD openExternalLinks() INLINE Qt_QTextBrowser_openExternalLinks( ::pPtr ) + METHOD openLinks() INLINE Qt_QTextBrowser_openLinks( ::pPtr ) + METHOD searchPaths() INLINE Qt_QTextBrowser_searchPaths( ::pPtr ) + METHOD setOpenExternalLinks( lOpen ) INLINE Qt_QTextBrowser_setOpenExternalLinks( ::pPtr, lOpen ) + METHOD setOpenLinks( lOpen ) INLINE Qt_QTextBrowser_setOpenLinks( ::pPtr, lOpen ) + METHOD setSearchPaths( pPaths ) INLINE Qt_QTextBrowser_setSearchPaths( ::pPtr, pPaths ) + METHOD source() INLINE Qt_QTextBrowser_source( ::pPtr ) + METHOD backward() INLINE Qt_QTextBrowser_backward( ::pPtr ) + METHOD forward() INLINE Qt_QTextBrowser_forward( ::pPtr ) + METHOD home() INLINE Qt_QTextBrowser_home( ::pPtr ) + METHOD reload() INLINE Qt_QTextBrowser_reload( ::pPtr ) + METHOD setSource( pName ) INLINE Qt_QTextBrowser_setSource( ::pPtr, pName ) + + ENDCLASS + +/*----------------------------------------------------------------------*/ + +METHOD New( pParent ) CLASS QTextBrowser + + ::pParent := pParent + + ::pPtr := Qt_QTextBrowser( pParent ) + + RETURN Self + +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/TQTextCharFormat.prg b/harbour/contrib/hbqt/TQTextCharFormat.prg new file mode 100644 index 0000000000..45d29d2ad7 --- /dev/null +++ b/harbour/contrib/hbqt/TQTextCharFormat.prg @@ -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 "hbclass.ch" + + +CREATE CLASS QTextCharFormat INHERIT QTextFormat + + VAR pParent + VAR pPtr + + METHOD New() + + METHOD anchorHref() INLINE Qt_QTextCharFormat_anchorHref( ::pPtr ) + METHOD anchorNames() INLINE Qt_QTextCharFormat_anchorNames( ::pPtr ) + METHOD font() INLINE Qt_QTextCharFormat_font( ::pPtr ) + METHOD fontCapitalization() INLINE Qt_QTextCharFormat_fontCapitalization( ::pPtr ) + METHOD fontFamily() INLINE Qt_QTextCharFormat_fontFamily( ::pPtr ) + METHOD fontFixedPitch() INLINE Qt_QTextCharFormat_fontFixedPitch( ::pPtr ) + METHOD fontItalic() INLINE Qt_QTextCharFormat_fontItalic( ::pPtr ) + METHOD fontKerning() INLINE Qt_QTextCharFormat_fontKerning( ::pPtr ) + METHOD fontLetterSpacing() INLINE Qt_QTextCharFormat_fontLetterSpacing( ::pPtr ) + METHOD fontOverline() INLINE Qt_QTextCharFormat_fontOverline( ::pPtr ) + METHOD fontPointSize() INLINE Qt_QTextCharFormat_fontPointSize( ::pPtr ) + METHOD fontStrikeOut() INLINE Qt_QTextCharFormat_fontStrikeOut( ::pPtr ) + METHOD fontStyleHint() INLINE Qt_QTextCharFormat_fontStyleHint( ::pPtr ) + METHOD fontStyleStrategy() INLINE Qt_QTextCharFormat_fontStyleStrategy( ::pPtr ) + METHOD fontUnderline() INLINE Qt_QTextCharFormat_fontUnderline( ::pPtr ) + METHOD fontWeight() INLINE Qt_QTextCharFormat_fontWeight( ::pPtr ) + METHOD fontWordSpacing() INLINE Qt_QTextCharFormat_fontWordSpacing( ::pPtr ) + METHOD isAnchor() INLINE Qt_QTextCharFormat_isAnchor( ::pPtr ) + METHOD isValid() INLINE Qt_QTextCharFormat_isValid( ::pPtr ) + METHOD setAnchor( lAnchor ) INLINE Qt_QTextCharFormat_setAnchor( ::pPtr, lAnchor ) + METHOD setAnchorHref( cValue ) INLINE Qt_QTextCharFormat_setAnchorHref( ::pPtr, cValue ) + METHOD setAnchorNames( pNames ) INLINE Qt_QTextCharFormat_setAnchorNames( ::pPtr, pNames ) + METHOD setFont( pFont ) INLINE Qt_QTextCharFormat_setFont( ::pPtr, pFont ) + METHOD setFontCapitalization( nCapitalization ) INLINE Qt_QTextCharFormat_setFontCapitalization( ::pPtr, nCapitalization ) + METHOD setFontFamily( cFamily ) INLINE Qt_QTextCharFormat_setFontFamily( ::pPtr, cFamily ) + METHOD setFontFixedPitch( lFixedPitch ) INLINE Qt_QTextCharFormat_setFontFixedPitch( ::pPtr, lFixedPitch ) + METHOD setFontItalic( lItalic ) INLINE Qt_QTextCharFormat_setFontItalic( ::pPtr, lItalic ) + METHOD setFontKerning( lEnable ) INLINE Qt_QTextCharFormat_setFontKerning( ::pPtr, lEnable ) + METHOD setFontLetterSpacing( nSpacing ) INLINE Qt_QTextCharFormat_setFontLetterSpacing( ::pPtr, nSpacing ) + METHOD setFontOverline( lOverline ) INLINE Qt_QTextCharFormat_setFontOverline( ::pPtr, lOverline ) + METHOD setFontPointSize( nSize ) INLINE Qt_QTextCharFormat_setFontPointSize( ::pPtr, nSize ) + METHOD setFontStrikeOut( lStrikeOut ) INLINE Qt_QTextCharFormat_setFontStrikeOut( ::pPtr, lStrikeOut ) + METHOD setFontStyleHint( nHint, nStrategy ) INLINE Qt_QTextCharFormat_setFontStyleHint( ::pPtr, nHint, nStrategy ) + METHOD setFontStyleStrategy( nStrategy ) INLINE Qt_QTextCharFormat_setFontStyleStrategy( ::pPtr, nStrategy ) + METHOD setFontUnderline( lUnderline ) INLINE Qt_QTextCharFormat_setFontUnderline( ::pPtr, lUnderline ) + METHOD setFontWeight( nWeight ) INLINE Qt_QTextCharFormat_setFontWeight( ::pPtr, nWeight ) + METHOD setFontWordSpacing( nSpacing ) INLINE Qt_QTextCharFormat_setFontWordSpacing( ::pPtr, nSpacing ) + METHOD setTextOutline( pPen ) INLINE Qt_QTextCharFormat_setTextOutline( ::pPtr, pPen ) + METHOD setToolTip( cText ) INLINE Qt_QTextCharFormat_setToolTip( ::pPtr, cText ) + METHOD setUnderlineColor( pColor ) INLINE Qt_QTextCharFormat_setUnderlineColor( ::pPtr, pColor ) + METHOD setUnderlineStyle( nStyle ) INLINE Qt_QTextCharFormat_setUnderlineStyle( ::pPtr, nStyle ) + METHOD setVerticalAlignment( nAlignment ) INLINE Qt_QTextCharFormat_setVerticalAlignment( ::pPtr, nAlignment ) + METHOD textOutline() INLINE Qt_QTextCharFormat_textOutline( ::pPtr ) + METHOD toolTip() INLINE Qt_QTextCharFormat_toolTip( ::pPtr ) + METHOD underlineColor() INLINE Qt_QTextCharFormat_underlineColor( ::pPtr ) + METHOD underlineStyle() INLINE Qt_QTextCharFormat_underlineStyle( ::pPtr ) + METHOD verticalAlignment() INLINE Qt_QTextCharFormat_verticalAlignment( ::pPtr ) + + ENDCLASS + +/*----------------------------------------------------------------------*/ + +METHOD New( pParent ) CLASS QTextCharFormat + + ::pParent := pParent + + ::pPtr := Qt_QTextCharFormat( pParent ) + + RETURN Self + +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/TQTextCursor.prg b/harbour/contrib/hbqt/TQTextCursor.prg new file mode 100644 index 0000000000..123f038267 --- /dev/null +++ b/harbour/contrib/hbqt/TQTextCursor.prg @@ -0,0 +1,140 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT wrapper main header + * + * Copyright 2009 Marcos Antonio Gambeta + * Copyright 2009 Pritpal Bedi + * www - http://www.harbour-project.org + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this software; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, + * Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/). + * + * As a special exception, the Harbour Project gives permission for + * additional uses of the text contained in its release of Harbour. + * + * The exception is that, if you link the Harbour libraries with other + * files to produce an executable, this does not by itself cause the + * resulting executable to be covered by the GNU General Public License. + * Your use of that executable is in no way restricted on account of + * linking the Harbour library code into it. + * + * This exception does not however invalidate any other reasons why + * the executable file might be covered by the GNU General Public License. + * + * This exception applies only to the code released by the Harbour + * Project under the name Harbour. If you copy code from other + * Harbour Project or Free Software Foundation releases into a copy of + * Harbour, as the General Public License permits, the exception does + * not apply to the code that you add in this way. To avoid misleading + * anyone as to the status of such modified files, you must delete + * this exception notice from them. + * + * If you write modifications of your own for Harbour, it is your choice + * whether to permit this exception to apply to your modifications. + * If you do not wish that, delete this exception notice. + * + */ +/*----------------------------------------------------------------------*/ + + +#include "hbclass.ch" + + +CREATE CLASS QTextCursor + + VAR pParent + VAR pPtr + + METHOD New() + + METHOD anchor() INLINE Qt_QTextCursor_anchor( ::pPtr ) + METHOD atBlockEnd() INLINE Qt_QTextCursor_atBlockEnd( ::pPtr ) + METHOD atBlockStart() INLINE Qt_QTextCursor_atBlockStart( ::pPtr ) + METHOD atEnd() INLINE Qt_QTextCursor_atEnd( ::pPtr ) + METHOD atStart() INLINE Qt_QTextCursor_atStart( ::pPtr ) + METHOD beginEditBlock() INLINE Qt_QTextCursor_beginEditBlock( ::pPtr ) + METHOD blockCharFormat() INLINE Qt_QTextCursor_blockCharFormat( ::pPtr ) + METHOD blockFormat() INLINE Qt_QTextCursor_blockFormat( ::pPtr ) + METHOD blockNumber() INLINE Qt_QTextCursor_blockNumber( ::pPtr ) + METHOD charFormat() INLINE Qt_QTextCursor_charFormat( ::pPtr ) + METHOD clearSelection() INLINE Qt_QTextCursor_clearSelection( ::pPtr ) + METHOD columnNumber() INLINE Qt_QTextCursor_columnNumber( ::pPtr ) + METHOD createList( pFormat ) INLINE Qt_QTextCursor_createList( ::pPtr, pFormat ) + METHOD createList_1( nStyle ) INLINE Qt_QTextCursor_createList_1( ::pPtr, nStyle ) + METHOD currentFrame() INLINE Qt_QTextCursor_currentFrame( ::pPtr ) + METHOD currentList() INLINE Qt_QTextCursor_currentList( ::pPtr ) + METHOD currentTable() INLINE Qt_QTextCursor_currentTable( ::pPtr ) + METHOD deleteChar() INLINE Qt_QTextCursor_deleteChar( ::pPtr ) + METHOD deletePreviousChar() INLINE Qt_QTextCursor_deletePreviousChar( ::pPtr ) + METHOD document() INLINE Qt_QTextCursor_document( ::pPtr ) + METHOD endEditBlock() INLINE Qt_QTextCursor_endEditBlock( ::pPtr ) + METHOD hasComplexSelection() INLINE Qt_QTextCursor_hasComplexSelection( ::pPtr ) + METHOD hasSelection() INLINE Qt_QTextCursor_hasSelection( ::pPtr ) + METHOD insertBlock() INLINE Qt_QTextCursor_insertBlock( ::pPtr ) + METHOD insertBlock_1( pFormat ) INLINE Qt_QTextCursor_insertBlock_1( ::pPtr, pFormat ) + METHOD insertBlock_2( pFormat, pCharFormat ) INLINE Qt_QTextCursor_insertBlock_2( ::pPtr, pFormat, pCharFormat ) + METHOD insertFragment( pFragment ) INLINE Qt_QTextCursor_insertFragment( ::pPtr, pFragment ) + METHOD insertFrame( pFormat ) INLINE Qt_QTextCursor_insertFrame( ::pPtr, pFormat ) + METHOD insertHtml( cHtml ) INLINE Qt_QTextCursor_insertHtml( ::pPtr, cHtml ) + METHOD insertImage( pFormat ) INLINE Qt_QTextCursor_insertImage( ::pPtr, pFormat ) + METHOD insertImage_1( pFormat, nAlignment ) INLINE Qt_QTextCursor_insertImage_1( ::pPtr, pFormat, nAlignment ) + METHOD insertImage_2( cName ) INLINE Qt_QTextCursor_insertImage_2( ::pPtr, cName ) + METHOD insertImage_3( pImage, cName ) INLINE Qt_QTextCursor_insertImage_3( ::pPtr, pImage, cName ) + METHOD insertList( pFormat ) INLINE Qt_QTextCursor_insertList( ::pPtr, pFormat ) + METHOD insertList_1( nStyle ) INLINE Qt_QTextCursor_insertList_1( ::pPtr, nStyle ) + METHOD insertTable( nRows, nColumns, pFormat ) INLINE Qt_QTextCursor_insertTable( ::pPtr, nRows, nColumns, pFormat ) + METHOD insertTable_1( nRows, nColumns ) INLINE Qt_QTextCursor_insertTable_1( ::pPtr, nRows, nColumns ) + METHOD insertText( cText ) INLINE Qt_QTextCursor_insertText( ::pPtr, cText ) + METHOD insertText_1( cText, pFormat ) INLINE Qt_QTextCursor_insertText_1( ::pPtr, cText, pFormat ) + METHOD isCopyOf( pOther ) INLINE Qt_QTextCursor_isCopyOf( ::pPtr, pOther ) + METHOD isNull() INLINE Qt_QTextCursor_isNull( ::pPtr ) + METHOD joinPreviousEditBlock() INLINE Qt_QTextCursor_joinPreviousEditBlock( ::pPtr ) + METHOD mergeBlockCharFormat( pModifier ) INLINE Qt_QTextCursor_mergeBlockCharFormat( ::pPtr, pModifier ) + METHOD mergeBlockFormat( pModifier ) INLINE Qt_QTextCursor_mergeBlockFormat( ::pPtr, pModifier ) + METHOD mergeCharFormat( pModifier ) INLINE Qt_QTextCursor_mergeCharFormat( ::pPtr, pModifier ) + METHOD movePosition( nOperation, nMode, nN ) INLINE Qt_QTextCursor_movePosition( ::pPtr, nOperation, nMode, nN ) + METHOD position() INLINE Qt_QTextCursor_position( ::pPtr ) + METHOD removeSelectedText() INLINE Qt_QTextCursor_removeSelectedText( ::pPtr ) + METHOD select( nSelection ) INLINE Qt_QTextCursor_select( ::pPtr, nSelection ) + METHOD selectedTableCells( nFirstRow, nNumRows, nFirstColumn, nNumColumns ) INLINE Qt_QTextCursor_selectedTableCells( ::pPtr, nFirstRow, nNumRows, nFirstColumn, nNumColumns ) + METHOD selectedText() INLINE Qt_QTextCursor_selectedText( ::pPtr ) + METHOD selection() INLINE Qt_QTextCursor_selection( ::pPtr ) + METHOD selectionEnd() INLINE Qt_QTextCursor_selectionEnd( ::pPtr ) + METHOD selectionStart() INLINE Qt_QTextCursor_selectionStart( ::pPtr ) + METHOD setBlockCharFormat( pFormat ) INLINE Qt_QTextCursor_setBlockCharFormat( ::pPtr, pFormat ) + METHOD setBlockFormat( pFormat ) INLINE Qt_QTextCursor_setBlockFormat( ::pPtr, pFormat ) + METHOD setCharFormat( pFormat ) INLINE Qt_QTextCursor_setCharFormat( ::pPtr, pFormat ) + METHOD setPosition( nPos, nM ) INLINE Qt_QTextCursor_setPosition( ::pPtr, nPos, nM ) + METHOD setVisualNavigation( lB ) INLINE Qt_QTextCursor_setVisualNavigation( ::pPtr, lB ) + METHOD visualNavigation() INLINE Qt_QTextCursor_visualNavigation( ::pPtr ) + + ENDCLASS + +/*----------------------------------------------------------------------*/ + +METHOD New( pParent ) CLASS QTextCursor + + ::pParent := pParent + + ::pPtr := Qt_QTextCursor( pParent ) + + RETURN Self + +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/TQTextDecoder.prg b/harbour/contrib/hbqt/TQTextDecoder.prg new file mode 100644 index 0000000000..0381e9b77b --- /dev/null +++ b/harbour/contrib/hbqt/TQTextDecoder.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 QTextDecoder + + VAR pParent + VAR pPtr + + METHOD New() + + METHOD toUnicode( pChars, nLen ) INLINE Qt_QTextDecoder_toUnicode( ::pPtr, pChars, nLen ) + + ENDCLASS + +/*----------------------------------------------------------------------*/ + +METHOD New( pParent ) CLASS QTextDecoder + + ::pParent := pParent + + ::pPtr := Qt_QTextDecoder( pParent ) + + RETURN Self + +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/TQTextDocument.prg b/harbour/contrib/hbqt/TQTextDocument.prg new file mode 100644 index 0000000000..2ec74d0c8a --- /dev/null +++ b/harbour/contrib/hbqt/TQTextDocument.prg @@ -0,0 +1,146 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT wrapper main header + * + * Copyright 2009 Marcos Antonio Gambeta + * Copyright 2009 Pritpal Bedi + * www - http://www.harbour-project.org + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this software; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, + * Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/). + * + * As a special exception, the Harbour Project gives permission for + * additional uses of the text contained in its release of Harbour. + * + * The exception is that, if you link the Harbour libraries with other + * files to produce an executable, this does not by itself cause the + * resulting executable to be covered by the GNU General Public License. + * Your use of that executable is in no way restricted on account of + * linking the Harbour library code into it. + * + * This exception does not however invalidate any other reasons why + * the executable file might be covered by the GNU General Public License. + * + * This exception applies only to the code released by the Harbour + * Project under the name Harbour. If you copy code from other + * Harbour Project or Free Software Foundation releases into a copy of + * Harbour, as the General Public License permits, the exception does + * not apply to the code that you add in this way. To avoid misleading + * anyone as to the status of such modified files, you must delete + * this exception notice from them. + * + * If you write modifications of your own for Harbour, it is your choice + * whether to permit this exception to apply to your modifications. + * If you do not wish that, delete this exception notice. + * + */ +/*----------------------------------------------------------------------*/ + + +#include "hbclass.ch" + + +CREATE CLASS QTextDocument INHERIT QObject + + VAR pParent + VAR pPtr + + METHOD New() + + METHOD addResource( nType, pName, pResource ) INLINE Qt_QTextDocument_addResource( ::pPtr, nType, pName, pResource ) + METHOD adjustSize() INLINE Qt_QTextDocument_adjustSize( ::pPtr ) + METHOD begin() INLINE Qt_QTextDocument_begin( ::pPtr ) + METHOD blockCount() INLINE Qt_QTextDocument_blockCount( ::pPtr ) + METHOD characterCount() INLINE Qt_QTextDocument_characterCount( ::pPtr ) + METHOD clear() INLINE Qt_QTextDocument_clear( ::pPtr ) + METHOD clone( pParent ) INLINE Qt_QTextDocument_clone( ::pPtr, pParent ) + METHOD defaultFont() INLINE Qt_QTextDocument_defaultFont( ::pPtr ) + METHOD defaultStyleSheet() INLINE Qt_QTextDocument_defaultStyleSheet( ::pPtr ) + METHOD defaultTextOption() INLINE Qt_QTextDocument_defaultTextOption( ::pPtr ) + METHOD documentLayout() INLINE Qt_QTextDocument_documentLayout( ::pPtr ) + METHOD documentMargin() INLINE Qt_QTextDocument_documentMargin( ::pPtr ) + METHOD drawContents( pP, pRect ) INLINE Qt_QTextDocument_drawContents( ::pPtr, pP, pRect ) + METHOD end() INLINE Qt_QTextDocument_end( ::pPtr ) + METHOD find( cSubString, pCursor, nOptions ) INLINE Qt_QTextDocument_find( ::pPtr, cSubString, pCursor, nOptions ) + METHOD find_1( pExpr, pCursor, nOptions ) INLINE Qt_QTextDocument_find_1( ::pPtr, pExpr, pCursor, nOptions ) + METHOD find_2( cSubString, nPosition, nOptions ) INLINE Qt_QTextDocument_find_2( ::pPtr, cSubString, nPosition, nOptions ) + METHOD find_3( pExpr, nPosition, nOptions ) INLINE Qt_QTextDocument_find_3( ::pPtr, pExpr, nPosition, nOptions ) + METHOD findBlock( nPos ) INLINE Qt_QTextDocument_findBlock( ::pPtr, nPos ) + METHOD findBlockByLineNumber( nLineNumber ) INLINE Qt_QTextDocument_findBlockByLineNumber( ::pPtr, nLineNumber ) + METHOD findBlockByNumber( nBlockNumber ) INLINE Qt_QTextDocument_findBlockByNumber( ::pPtr, nBlockNumber ) + METHOD firstBlock() INLINE Qt_QTextDocument_firstBlock( ::pPtr ) + METHOD idealWidth() INLINE Qt_QTextDocument_idealWidth( ::pPtr ) + METHOD indentWidth() INLINE Qt_QTextDocument_indentWidth( ::pPtr ) + METHOD isEmpty() INLINE Qt_QTextDocument_isEmpty( ::pPtr ) + METHOD isModified() INLINE Qt_QTextDocument_isModified( ::pPtr ) + METHOD isRedoAvailable() INLINE Qt_QTextDocument_isRedoAvailable( ::pPtr ) + METHOD isUndoAvailable() INLINE Qt_QTextDocument_isUndoAvailable( ::pPtr ) + METHOD isUndoRedoEnabled() INLINE Qt_QTextDocument_isUndoRedoEnabled( ::pPtr ) + METHOD lastBlock() INLINE Qt_QTextDocument_lastBlock( ::pPtr ) + METHOD lineCount() INLINE Qt_QTextDocument_lineCount( ::pPtr ) + METHOD markContentsDirty( nPosition, nLength ) INLINE Qt_QTextDocument_markContentsDirty( ::pPtr, nPosition, nLength ) + METHOD maximumBlockCount() INLINE Qt_QTextDocument_maximumBlockCount( ::pPtr ) + METHOD metaInformation( nInfo ) INLINE Qt_QTextDocument_metaInformation( ::pPtr, nInfo ) + METHOD object( nObjectIndex ) INLINE Qt_QTextDocument_object( ::pPtr, nObjectIndex ) + METHOD objectForFormat( pF ) INLINE Qt_QTextDocument_objectForFormat( ::pPtr, pF ) + METHOD pageCount() INLINE Qt_QTextDocument_pageCount( ::pPtr ) + METHOD pageSize() INLINE Qt_QTextDocument_pageSize( ::pPtr ) + METHOD print( pPrinter ) INLINE Qt_QTextDocument_print( ::pPtr, pPrinter ) + METHOD redo( pCursor ) INLINE Qt_QTextDocument_redo( ::pPtr, pCursor ) + METHOD resource( nType, pName ) INLINE Qt_QTextDocument_resource( ::pPtr, nType, pName ) + METHOD revision() INLINE Qt_QTextDocument_revision( ::pPtr ) + METHOD rootFrame() INLINE Qt_QTextDocument_rootFrame( ::pPtr ) + METHOD setDefaultFont( pFont ) INLINE Qt_QTextDocument_setDefaultFont( ::pPtr, pFont ) + METHOD setDefaultStyleSheet( cSheet ) INLINE Qt_QTextDocument_setDefaultStyleSheet( ::pPtr, cSheet ) + METHOD setDefaultTextOption( pOption ) INLINE Qt_QTextDocument_setDefaultTextOption( ::pPtr, pOption ) + METHOD setDocumentLayout( pLayout ) INLINE Qt_QTextDocument_setDocumentLayout( ::pPtr, pLayout ) + METHOD setDocumentMargin( nMargin ) INLINE Qt_QTextDocument_setDocumentMargin( ::pPtr, nMargin ) + METHOD setHtml( cHtml ) INLINE Qt_QTextDocument_setHtml( ::pPtr, cHtml ) + METHOD setIndentWidth( nWidth ) INLINE Qt_QTextDocument_setIndentWidth( ::pPtr, nWidth ) + METHOD setMaximumBlockCount( nMaximum ) INLINE Qt_QTextDocument_setMaximumBlockCount( ::pPtr, nMaximum ) + METHOD setMetaInformation( nInfo, cString ) INLINE Qt_QTextDocument_setMetaInformation( ::pPtr, nInfo, cString ) + METHOD setPageSize( pSize ) INLINE Qt_QTextDocument_setPageSize( ::pPtr, pSize ) + METHOD setPlainText( cText ) INLINE Qt_QTextDocument_setPlainText( ::pPtr, cText ) + METHOD setTextWidth( nWidth ) INLINE Qt_QTextDocument_setTextWidth( ::pPtr, nWidth ) + METHOD setUndoRedoEnabled( lEnable ) INLINE Qt_QTextDocument_setUndoRedoEnabled( ::pPtr, lEnable ) + METHOD setUseDesignMetrics( lB ) INLINE Qt_QTextDocument_setUseDesignMetrics( ::pPtr, lB ) + METHOD size() INLINE Qt_QTextDocument_size( ::pPtr ) + METHOD textWidth() INLINE Qt_QTextDocument_textWidth( ::pPtr ) + METHOD toHtml( pEncoding ) INLINE Qt_QTextDocument_toHtml( ::pPtr, pEncoding ) + METHOD toPlainText() INLINE Qt_QTextDocument_toPlainText( ::pPtr ) + METHOD undo( pCursor ) INLINE Qt_QTextDocument_undo( ::pPtr, pCursor ) + METHOD useDesignMetrics() INLINE Qt_QTextDocument_useDesignMetrics( ::pPtr ) + METHOD redo_1() INLINE Qt_QTextDocument_redo_1( ::pPtr ) + METHOD setModified( lM ) INLINE Qt_QTextDocument_setModified( ::pPtr, lM ) + METHOD undo_1() INLINE Qt_QTextDocument_undo_1( ::pPtr ) + + ENDCLASS + +/*----------------------------------------------------------------------*/ + +METHOD New( pParent ) CLASS QTextDocument + + ::pParent := pParent + + ::pPtr := Qt_QTextDocument( pParent ) + + RETURN Self + +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/TQTextDocumentFragment.prg b/harbour/contrib/hbqt/TQTextDocumentFragment.prg new file mode 100644 index 0000000000..f3be64645f --- /dev/null +++ b/harbour/contrib/hbqt/TQTextDocumentFragment.prg @@ -0,0 +1,84 @@ +/* + * $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 QTextDocumentFragment + + VAR pParent + VAR pPtr + + METHOD New() + + METHOD isEmpty() INLINE Qt_QTextDocumentFragment_isEmpty( ::pPtr ) + METHOD toHtml( pEncoding ) INLINE Qt_QTextDocumentFragment_toHtml( ::pPtr, pEncoding ) + METHOD toHtml_1() INLINE Qt_QTextDocumentFragment_toHtml_1( ::pPtr ) + METHOD toPlainText() INLINE Qt_QTextDocumentFragment_toPlainText( ::pPtr ) + + ENDCLASS + +/*----------------------------------------------------------------------*/ + +METHOD New( pParent ) CLASS QTextDocumentFragment + + ::pParent := pParent + + ::pPtr := Qt_QTextDocumentFragment( pParent ) + + RETURN Self + +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/TQTextDocumentWriter.prg b/harbour/contrib/hbqt/TQTextDocumentWriter.prg new file mode 100644 index 0000000000..6ad1926124 --- /dev/null +++ b/harbour/contrib/hbqt/TQTextDocumentWriter.prg @@ -0,0 +1,90 @@ +/* + * $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 QTextDocumentWriter + + VAR pParent + VAR pPtr + + METHOD New() + + METHOD codec() INLINE Qt_QTextDocumentWriter_codec( ::pPtr ) + METHOD device() INLINE Qt_QTextDocumentWriter_device( ::pPtr ) + METHOD fileName() INLINE Qt_QTextDocumentWriter_fileName( ::pPtr ) + METHOD format() INLINE Qt_QTextDocumentWriter_format( ::pPtr ) + METHOD setCodec( pCodec ) INLINE Qt_QTextDocumentWriter_setCodec( ::pPtr, pCodec ) + METHOD setDevice( pDevice ) INLINE Qt_QTextDocumentWriter_setDevice( ::pPtr, pDevice ) + METHOD setFileName( cFileName ) INLINE Qt_QTextDocumentWriter_setFileName( ::pPtr, cFileName ) + METHOD setFormat( pFormat ) INLINE Qt_QTextDocumentWriter_setFormat( ::pPtr, pFormat ) + METHOD write( pDocument ) INLINE Qt_QTextDocumentWriter_write( ::pPtr, pDocument ) + METHOD write_1( pFragment ) INLINE Qt_QTextDocumentWriter_write_1( ::pPtr, pFragment ) + + ENDCLASS + +/*----------------------------------------------------------------------*/ + +METHOD New( pParent ) CLASS QTextDocumentWriter + + ::pParent := pParent + + ::pPtr := Qt_QTextDocumentWriter( pParent ) + + RETURN Self + +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/TQTextFormat.prg b/harbour/contrib/hbqt/TQTextFormat.prg new file mode 100644 index 0000000000..08d262c0d8 --- /dev/null +++ b/harbour/contrib/hbqt/TQTextFormat.prg @@ -0,0 +1,122 @@ +/* + * $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 QTextFormat + + VAR pParent + VAR pPtr + + METHOD New() + + METHOD background() INLINE Qt_QTextFormat_background( ::pPtr ) + METHOD boolProperty( nPropertyId ) INLINE Qt_QTextFormat_boolProperty( ::pPtr, nPropertyId ) + METHOD brushProperty( nPropertyId ) INLINE Qt_QTextFormat_brushProperty( ::pPtr, nPropertyId ) + METHOD clearBackground() INLINE Qt_QTextFormat_clearBackground( ::pPtr ) + METHOD clearForeground() INLINE Qt_QTextFormat_clearForeground( ::pPtr ) + METHOD clearProperty( nPropertyId ) INLINE Qt_QTextFormat_clearProperty( ::pPtr, nPropertyId ) + METHOD colorProperty( nPropertyId ) INLINE Qt_QTextFormat_colorProperty( ::pPtr, nPropertyId ) + METHOD doubleProperty( nPropertyId ) INLINE Qt_QTextFormat_doubleProperty( ::pPtr, nPropertyId ) + METHOD foreground() INLINE Qt_QTextFormat_foreground( ::pPtr ) + METHOD hasProperty( nPropertyId ) INLINE Qt_QTextFormat_hasProperty( ::pPtr, nPropertyId ) + METHOD intProperty( nPropertyId ) INLINE Qt_QTextFormat_intProperty( ::pPtr, nPropertyId ) + METHOD isBlockFormat() INLINE Qt_QTextFormat_isBlockFormat( ::pPtr ) + METHOD isCharFormat() INLINE Qt_QTextFormat_isCharFormat( ::pPtr ) + METHOD isFrameFormat() INLINE Qt_QTextFormat_isFrameFormat( ::pPtr ) + METHOD isImageFormat() INLINE Qt_QTextFormat_isImageFormat( ::pPtr ) + METHOD isListFormat() INLINE Qt_QTextFormat_isListFormat( ::pPtr ) + METHOD isTableCellFormat() INLINE Qt_QTextFormat_isTableCellFormat( ::pPtr ) + METHOD isTableFormat() INLINE Qt_QTextFormat_isTableFormat( ::pPtr ) + METHOD isValid() INLINE Qt_QTextFormat_isValid( ::pPtr ) + METHOD layoutDirection() INLINE Qt_QTextFormat_layoutDirection( ::pPtr ) + METHOD lengthProperty( nPropertyId ) INLINE Qt_QTextFormat_lengthProperty( ::pPtr, nPropertyId ) + METHOD merge( pOther ) INLINE Qt_QTextFormat_merge( ::pPtr, pOther ) + METHOD objectIndex() INLINE Qt_QTextFormat_objectIndex( ::pPtr ) + METHOD objectType() INLINE Qt_QTextFormat_objectType( ::pPtr ) + METHOD penProperty( nPropertyId ) INLINE Qt_QTextFormat_penProperty( ::pPtr, nPropertyId ) + METHOD property( nPropertyId ) INLINE Qt_QTextFormat_property( ::pPtr, nPropertyId ) + METHOD propertyCount() INLINE Qt_QTextFormat_propertyCount( ::pPtr ) + METHOD setBackground( pBrush ) INLINE Qt_QTextFormat_setBackground( ::pPtr, pBrush ) + METHOD setForeground( pBrush ) INLINE Qt_QTextFormat_setForeground( ::pPtr, pBrush ) + METHOD setLayoutDirection( nDirection ) INLINE Qt_QTextFormat_setLayoutDirection( ::pPtr, nDirection ) + METHOD setObjectIndex( nIndex ) INLINE Qt_QTextFormat_setObjectIndex( ::pPtr, nIndex ) + METHOD setObjectType( nType ) INLINE Qt_QTextFormat_setObjectType( ::pPtr, nType ) + METHOD setProperty( nPropertyId, pValue ) INLINE Qt_QTextFormat_setProperty( ::pPtr, nPropertyId, pValue ) + METHOD stringProperty( nPropertyId ) INLINE Qt_QTextFormat_stringProperty( ::pPtr, nPropertyId ) + METHOD toBlockFormat() INLINE Qt_QTextFormat_toBlockFormat( ::pPtr ) + METHOD toCharFormat() INLINE Qt_QTextFormat_toCharFormat( ::pPtr ) + METHOD toFrameFormat() INLINE Qt_QTextFormat_toFrameFormat( ::pPtr ) + METHOD toImageFormat() INLINE Qt_QTextFormat_toImageFormat( ::pPtr ) + METHOD toListFormat() INLINE Qt_QTextFormat_toListFormat( ::pPtr ) + METHOD toTableCellFormat() INLINE Qt_QTextFormat_toTableCellFormat( ::pPtr ) + METHOD toTableFormat() INLINE Qt_QTextFormat_toTableFormat( ::pPtr ) + METHOD type() INLINE Qt_QTextFormat_type( ::pPtr ) + + ENDCLASS + +/*----------------------------------------------------------------------*/ + +METHOD New( pParent ) CLASS QTextFormat + + ::pParent := pParent + + ::pPtr := Qt_QTextFormat( pParent ) + + RETURN Self + +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/TQTextStream.prg b/harbour/contrib/hbqt/TQTextStream.prg new file mode 100644 index 0000000000..afa25cc1d3 --- /dev/null +++ b/harbour/contrib/hbqt/TQTextStream.prg @@ -0,0 +1,116 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT wrapper main header + * + * Copyright 2009 Marcos Antonio Gambeta + * Copyright 2009 Pritpal Bedi + * www - http://www.harbour-project.org + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this software; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, + * Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/). + * + * As a special exception, the Harbour Project gives permission for + * additional uses of the text contained in its release of Harbour. + * + * The exception is that, if you link the Harbour libraries with other + * files to produce an executable, this does not by itself cause the + * resulting executable to be covered by the GNU General Public License. + * Your use of that executable is in no way restricted on account of + * linking the Harbour library code into it. + * + * This exception does not however invalidate any other reasons why + * the executable file might be covered by the GNU General Public License. + * + * This exception applies only to the code released by the Harbour + * Project under the name Harbour. If you copy code from other + * Harbour Project or Free Software Foundation releases into a copy of + * Harbour, as the General Public License permits, the exception does + * not apply to the code that you add in this way. To avoid misleading + * anyone as to the status of such modified files, you must delete + * this exception notice from them. + * + * If you write modifications of your own for Harbour, it is your choice + * whether to permit this exception to apply to your modifications. + * If you do not wish that, delete this exception notice. + * + */ +/*----------------------------------------------------------------------*/ + + +#include "hbclass.ch" + + +CREATE CLASS QTextStream + + VAR pParent + VAR pPtr + + METHOD New() + + METHOD atEnd() INLINE Qt_QTextStream_atEnd( ::pPtr ) + METHOD autoDetectUnicode() INLINE Qt_QTextStream_autoDetectUnicode( ::pPtr ) + METHOD codec() INLINE Qt_QTextStream_codec( ::pPtr ) + METHOD device() INLINE Qt_QTextStream_device( ::pPtr ) + METHOD fieldAlignment() INLINE Qt_QTextStream_fieldAlignment( ::pPtr ) + METHOD fieldWidth() INLINE Qt_QTextStream_fieldWidth( ::pPtr ) + METHOD flush() INLINE Qt_QTextStream_flush( ::pPtr ) + METHOD generateByteOrderMark() INLINE Qt_QTextStream_generateByteOrderMark( ::pPtr ) + METHOD integerBase() INLINE Qt_QTextStream_integerBase( ::pPtr ) + METHOD locale() INLINE Qt_QTextStream_locale( ::pPtr ) + METHOD numberFlags() INLINE Qt_QTextStream_numberFlags( ::pPtr ) + METHOD pos() INLINE Qt_QTextStream_pos( ::pPtr ) + METHOD read( nMaxlen ) INLINE Qt_QTextStream_read( ::pPtr, nMaxlen ) + METHOD readAll() INLINE Qt_QTextStream_readAll( ::pPtr ) + METHOD readLine( nMaxlen ) INLINE Qt_QTextStream_readLine( ::pPtr, nMaxlen ) + METHOD realNumberNotation() INLINE Qt_QTextStream_realNumberNotation( ::pPtr ) + METHOD realNumberPrecision() INLINE Qt_QTextStream_realNumberPrecision( ::pPtr ) + METHOD reset() INLINE Qt_QTextStream_reset( ::pPtr ) + METHOD resetStatus() INLINE Qt_QTextStream_resetStatus( ::pPtr ) + METHOD seek( nPos ) INLINE Qt_QTextStream_seek( ::pPtr, nPos ) + METHOD setAutoDetectUnicode( lEnabled ) INLINE Qt_QTextStream_setAutoDetectUnicode( ::pPtr, lEnabled ) + METHOD setCodec( pCodec ) INLINE Qt_QTextStream_setCodec( ::pPtr, pCodec ) + METHOD setCodec_1( pCodecName ) INLINE Qt_QTextStream_setCodec_1( ::pPtr, pCodecName ) + METHOD setDevice( pDevice ) INLINE Qt_QTextStream_setDevice( ::pPtr, pDevice ) + METHOD setFieldAlignment( nMode ) INLINE Qt_QTextStream_setFieldAlignment( ::pPtr, nMode ) + METHOD setFieldWidth( nWidth ) INLINE Qt_QTextStream_setFieldWidth( ::pPtr, nWidth ) + METHOD setGenerateByteOrderMark( lGenerate ) INLINE Qt_QTextStream_setGenerateByteOrderMark( ::pPtr, lGenerate ) + METHOD setIntegerBase( nBase ) INLINE Qt_QTextStream_setIntegerBase( ::pPtr, nBase ) + METHOD setLocale( pLocale ) INLINE Qt_QTextStream_setLocale( ::pPtr, pLocale ) + METHOD setNumberFlags( nFlags ) INLINE Qt_QTextStream_setNumberFlags( ::pPtr, nFlags ) + METHOD setPadChar( nCh ) INLINE Qt_QTextStream_setPadChar( ::pPtr, nCh ) + METHOD setRealNumberNotation( nNotation ) INLINE Qt_QTextStream_setRealNumberNotation( ::pPtr, nNotation ) + METHOD setRealNumberPrecision( nPrecision ) INLINE Qt_QTextStream_setRealNumberPrecision( ::pPtr, nPrecision ) + METHOD setStatus( nStatus ) INLINE Qt_QTextStream_setStatus( ::pPtr, nStatus ) + METHOD skipWhiteSpace() INLINE Qt_QTextStream_skipWhiteSpace( ::pPtr ) + METHOD status() INLINE Qt_QTextStream_status( ::pPtr ) + + ENDCLASS + +/*----------------------------------------------------------------------*/ + +METHOD New( pParent ) CLASS QTextStream + + ::pParent := pParent + + ::pPtr := Qt_QTextStream( pParent ) + + RETURN Self + +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/generator/hbqtgen.prg b/harbour/contrib/hbqt/generator/hbqtgen.prg index c7f116fbe8..bf39ecd4d6 100644 --- a/harbour/contrib/hbqt/generator/hbqtgen.prg +++ b/harbour/contrib/hbqt/generator/hbqtgen.prg @@ -391,6 +391,16 @@ STATIC FUNCTION GenSource( cProFile, cPathIn, cPathOut, cPathDoc ) /* Pull .cpp copyright text */ BuildHeader( @cpp_, 0 ) + /* Place ENUM definitions into the source */ + #if 0 + IF !empty( enums_ ) + aadd( cpp_, '/*' ) + aeval( enums_, {|e| IF( !empty( e ), aadd( cpp_, ' * ' + e ), NIL ) } ) + aadd( cpp_, ' */ ' ) + aadd( cpp_, '' ) + ENDIF + #endif + /* Insert information about prototypes not converted to functions */ IF !empty( dummy_ ) aadd( cpp_, '/*' ) @@ -1226,8 +1236,12 @@ STATIC FUNCTION Build_HBQT_H( cPathOut ) aadd( txt_, "#ifndef __HBQT_H " ) aadd( txt_, "#define __HBQT_H " ) aadd( txt_, " " ) - aadd( txt_, " " ) - aadd( txt_, "#include " ) + aadd( txt_, "#include " ) + aadd( txt_, "#include " ) + aadd( txt_, "#include " ) + aadd( txt_, "#include " ) + aadd( txt_, "#include " ) + aadd( txt_, "#include " ) aadd( txt_, " " ) aadd( txt_, "#if QT_VERSION >= 0x040500 " ) aadd( txt_, " " ) @@ -1403,6 +1417,24 @@ STATIC FUNCTION Build_HBQT_H( cPathOut ) aadd( txt_, "#define hbqt_par_QStyleHintReturn( n ) ( ( QStyleHintReturn* ) hb_parptr( n ) ) " ) aadd( txt_, "#define hbqt_par_QClipboard( n ) ( ( QClipboard* ) hb_parptr( n ) ) " ) aadd( txt_, "#define hbqt_par_QMimeData( n ) ( ( QMimeData* ) hb_parptr( n ) ) " ) + aadd( txt_, "#define hbqt_par_QTextBlock( n ) ( ( QTextBlock* ) hb_parptr( n ) ) " ) + aadd( txt_, "#define hbqt_par_QTextBlockUserData( n ) ( ( QTextBlockUserData* ) hb_parptr( n ) ) " ) + aadd( txt_, "#define hbqt_par_QTextBrowser( n ) ( ( QTextBrowser* ) hb_parptr( n ) ) " ) + aadd( txt_, "#define hbqt_par_QTextFormat( n ) ( ( QTextFormat* ) hb_parptr( n ) ) " ) + aadd( txt_, "#define hbqt_par_QTextBlockFormat( n ) ( ( QTextBlockFormat* ) hb_parptr( n ) ) " ) + aadd( txt_, "#define hbqt_par_QTextBlockGroup( n ) ( ( QTextBlockGroup* ) hb_parptr( n ) ) " ) + aadd( txt_, "#define hbqt_par_QTextBoundaryFinder( n ) ( ( QTextBoundaryFinder* ) hb_parptr( n ) ) " ) + aadd( txt_, "#define hbqt_par_QTextListFormat( n ) ( ( QTextListFormat* ) 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_QTextTableFormat( n ) ( ( QTextTableFormat* ) hb_parptr( n ) ) " ) + aadd( txt_, "#define hbqt_par_QTextDocumentFragment( n ) ( ( QTextDocumentFragment* ) hb_parptr( n ) ) " ) + aadd( txt_, "#define hbqt_par_QTextDecoder( n ) ( ( QTextDecoder* ) hb_parptr( n ) ) " ) + aadd( txt_, "#define hbqt_par_QTextDecument( n ) ( ( QTextDocument* ) hb_parptr( n ) ) " ) + aadd( txt_, "#define hbqt_par_QTextDocumentWriter( n ) ( ( QTextDocumentWriter* ) hb_parptr( n ) ) " ) + 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_, " " ) aadd( txt_, "#define hbqt_par_QString( n ) ( ( QString ) hb_parc( n ) ) " ) aadd( txt_, "#define hbqt_par_QRgb( n ) ( hb_parnint( n ) ) " ) @@ -1414,7 +1446,7 @@ STATIC FUNCTION Build_HBQT_H( cPathOut ) aadd( txt_, "#define hbqt_ret_QAbstractItemModel( p ) ( hb_retptr( ( QAbstractItemModel* ) p ) ) " ) aadd( txt_, "#define hbqt_ret_QPrinter( p ) ( hb_retptr( ( QPrinter* ) p ) ) " ) aadd( txt_, " " ) - aadd( txt_, "#include " ) + aadd( txt_, "#include " ) aadd( txt_, " " ) aadd( txt_, "void hbqt_ret_QRect( QRect ); " ) aadd( txt_, "void hbqt_ret_QSize( QSize ); " ) diff --git a/harbour/contrib/hbqt/generator/qt45.qtp b/harbour/contrib/hbqt/generator/qt45.qtp index b219f92bc8..c1dc44c4d6 100644 --- a/harbour/contrib/hbqt/generator/qt45.qtp +++ b/harbour/contrib/hbqt/generator/qt45.qtp @@ -106,7 +106,20 @@ QTableView.qth QTableWidget.qth QTableWidgetItem.qth QTabWidget.qth +QTextBlock.qth +QTextBlockFormat.qth +QTextBlockGroup.qth +QTextBrowser.qth +QTextBoundaryFinder.qth +QTextCharFormat.qth +QTextCursor.qth +QTextDecoder.qth +QTextDocument.qth +QTextDocumentFragment.qth +QTextDocumentWriter.qth QTextEdit.qth +QTextFormat.qth +QTextStream.qth QTimeEdit.qth QTimer.qth QToolBar.qth diff --git a/harbour/contrib/hbqt/hbqt.h b/harbour/contrib/hbqt/hbqt.h index b3191fd920..eae4faea47 100644 --- a/harbour/contrib/hbqt/hbqt.h +++ b/harbour/contrib/hbqt/hbqt.h @@ -56,8 +56,12 @@ #ifndef __HBQT_H #define __HBQT_H - -#include +#include +#include +#include +#include +#include +#include #if QT_VERSION >= 0x040500 @@ -233,6 +237,24 @@ #define hbqt_par_QStyleHintReturn( n ) ( ( QStyleHintReturn* ) hb_parptr( n ) ) #define hbqt_par_QClipboard( n ) ( ( QClipboard* ) hb_parptr( n ) ) #define hbqt_par_QMimeData( n ) ( ( QMimeData* ) hb_parptr( n ) ) +#define hbqt_par_QTextBlock( n ) ( ( QTextBlock* ) hb_parptr( n ) ) +#define hbqt_par_QTextBlockUserData( n ) ( ( QTextBlockUserData* ) hb_parptr( n ) ) +#define hbqt_par_QTextBrowser( n ) ( ( QTextBrowser* ) hb_parptr( n ) ) +#define hbqt_par_QTextFormat( n ) ( ( QTextFormat* ) hb_parptr( n ) ) +#define hbqt_par_QTextBlockFormat( n ) ( ( QTextBlockFormat* ) hb_parptr( n ) ) +#define hbqt_par_QTextBlockGroup( n ) ( ( QTextBlockGroup* ) hb_parptr( n ) ) +#define hbqt_par_QTextBoundaryFinder( n ) ( ( QTextBoundaryFinder* ) hb_parptr( n ) ) +#define hbqt_par_QTextListFormat( n ) ( ( QTextListFormat* ) hb_parptr( n ) ) +#define hbqt_par_QTextFrameFormat( n ) ( ( QTextFrameFormat* ) hb_parptr( n ) ) +#define hbqt_par_QTextImageFormat( n ) ( ( QTextImageFormat* ) hb_parptr( n ) ) +#define hbqt_par_QTextTableFormat( n ) ( ( QTextTableFormat* ) hb_parptr( n ) ) +#define hbqt_par_QTextDocumentFragment( n ) ( ( QTextDocumentFragment* ) hb_parptr( n ) ) +#define hbqt_par_QTextDecoder( n ) ( ( QTextDecoder* ) hb_parptr( n ) ) +#define hbqt_par_QTextDecument( n ) ( ( QTextDocument* ) hb_parptr( n ) ) +#define hbqt_par_QTextDocumentWriter( n ) ( ( QTextDocumentWriter* ) hb_parptr( n ) ) +#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_QString( n ) ( ( QString ) hb_parc( n ) ) #define hbqt_par_QRgb( n ) ( hb_parnint( n ) ) @@ -244,7 +266,7 @@ #define hbqt_ret_QAbstractItemModel( p ) ( hb_retptr( ( QAbstractItemModel* ) p ) ) #define hbqt_ret_QPrinter( p ) ( hb_retptr( ( QPrinter* ) p ) ) -#include +#include void hbqt_ret_QRect( QRect ); void hbqt_ret_QSize( QSize ); diff --git a/harbour/contrib/hbqt/hbqt_qtextblock.cpp b/harbour/contrib/hbqt/hbqt_qtextblock.cpp new file mode 100644 index 0000000000..45d61d6059 --- /dev/null +++ b/harbour/contrib/hbqt/hbqt_qtextblock.cpp @@ -0,0 +1,294 @@ +/* + * $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 + + +/* + * QTextBlock ( const QTextBlock & other ) + */ +HB_FUNC( QT_QTEXTBLOCK ) +{ + hb_retptr( ( QTextBlock* ) new QTextBlock( *hbqt_par_QTextBlock( 1 ) ) ); +} + +/* + * QTextBlockFormat blockFormat () const + */ +HB_FUNC( QT_QTEXTBLOCK_BLOCKFORMAT ) +{ + hb_retptr( new QTextBlockFormat( hbqt_par_QTextBlock( 1 )->blockFormat() ) ); +} + +/* + * int blockFormatIndex () const + */ +HB_FUNC( QT_QTEXTBLOCK_BLOCKFORMATINDEX ) +{ + hb_retni( hbqt_par_QTextBlock( 1 )->blockFormatIndex() ); +} + +/* + * int blockNumber () const + */ +HB_FUNC( QT_QTEXTBLOCK_BLOCKNUMBER ) +{ + hb_retni( hbqt_par_QTextBlock( 1 )->blockNumber() ); +} + +/* + * QTextCharFormat charFormat () const + */ +HB_FUNC( QT_QTEXTBLOCK_CHARFORMAT ) +{ + hb_retptr( new QTextCharFormat( hbqt_par_QTextBlock( 1 )->charFormat() ) ); +} + +/* + * int charFormatIndex () const + */ +HB_FUNC( QT_QTEXTBLOCK_CHARFORMATINDEX ) +{ + hb_retni( hbqt_par_QTextBlock( 1 )->charFormatIndex() ); +} + +/* + * void clearLayout () + */ +HB_FUNC( QT_QTEXTBLOCK_CLEARLAYOUT ) +{ + hbqt_par_QTextBlock( 1 )->clearLayout(); +} + +/* + * bool contains ( int position ) const + */ +HB_FUNC( QT_QTEXTBLOCK_CONTAINS ) +{ + hb_retl( hbqt_par_QTextBlock( 1 )->contains( hb_parni( 2 ) ) ); +} + +/* + * const QTextDocument * document () const + */ +HB_FUNC( QT_QTEXTBLOCK_DOCUMENT ) +{ + hb_retptr( ( QTextDocument* ) hbqt_par_QTextBlock( 1 )->document() ); +} + +/* + * int firstLineNumber () const + */ +HB_FUNC( QT_QTEXTBLOCK_FIRSTLINENUMBER ) +{ + hb_retni( hbqt_par_QTextBlock( 1 )->firstLineNumber() ); +} + +/* + * bool isValid () const + */ +HB_FUNC( QT_QTEXTBLOCK_ISVALID ) +{ + hb_retl( hbqt_par_QTextBlock( 1 )->isValid() ); +} + +/* + * bool isVisible () const + */ +HB_FUNC( QT_QTEXTBLOCK_ISVISIBLE ) +{ + hb_retl( hbqt_par_QTextBlock( 1 )->isVisible() ); +} + +/* + * QTextLayout * layout () const + */ +HB_FUNC( QT_QTEXTBLOCK_LAYOUT ) +{ + hb_retptr( ( QTextLayout* ) hbqt_par_QTextBlock( 1 )->layout() ); +} + +/* + * int length () const + */ +HB_FUNC( QT_QTEXTBLOCK_LENGTH ) +{ + hb_retni( hbqt_par_QTextBlock( 1 )->length() ); +} + +/* + * int lineCount () const + */ +HB_FUNC( QT_QTEXTBLOCK_LINECOUNT ) +{ + hb_retni( hbqt_par_QTextBlock( 1 )->lineCount() ); +} + +/* + * QTextBlock next () const + */ +HB_FUNC( QT_QTEXTBLOCK_NEXT ) +{ + hb_retptr( new QTextBlock( hbqt_par_QTextBlock( 1 )->next() ) ); +} + +/* + * int position () const + */ +HB_FUNC( QT_QTEXTBLOCK_POSITION ) +{ + hb_retni( hbqt_par_QTextBlock( 1 )->position() ); +} + +/* + * QTextBlock previous () const + */ +HB_FUNC( QT_QTEXTBLOCK_PREVIOUS ) +{ + hb_retptr( new QTextBlock( hbqt_par_QTextBlock( 1 )->previous() ) ); +} + +/* + * int revision () const + */ +HB_FUNC( QT_QTEXTBLOCK_REVISION ) +{ + hb_retni( hbqt_par_QTextBlock( 1 )->revision() ); +} + +/* + * void setLineCount ( int count ) + */ +HB_FUNC( QT_QTEXTBLOCK_SETLINECOUNT ) +{ + hbqt_par_QTextBlock( 1 )->setLineCount( hb_parni( 2 ) ); +} + +/* + * void setRevision ( int rev ) + */ +HB_FUNC( QT_QTEXTBLOCK_SETREVISION ) +{ + hbqt_par_QTextBlock( 1 )->setRevision( hb_parni( 2 ) ); +} + +/* + * void setUserData ( QTextBlockUserData * data ) + */ +HB_FUNC( QT_QTEXTBLOCK_SETUSERDATA ) +{ + hbqt_par_QTextBlock( 1 )->setUserData( hbqt_par_QTextBlockUserData( 2 ) ); +} + +/* + * void setUserState ( int state ) + */ +HB_FUNC( QT_QTEXTBLOCK_SETUSERSTATE ) +{ + hbqt_par_QTextBlock( 1 )->setUserState( hb_parni( 2 ) ); +} + +/* + * void setVisible ( bool visible ) + */ +HB_FUNC( QT_QTEXTBLOCK_SETVISIBLE ) +{ + hbqt_par_QTextBlock( 1 )->setVisible( hb_parl( 2 ) ); +} + +/* + * QString text () const + */ +HB_FUNC( QT_QTEXTBLOCK_TEXT ) +{ + hb_retc( hbqt_par_QTextBlock( 1 )->text().toLatin1().data() ); +} + +/* + * QTextList * textList () const + */ +HB_FUNC( QT_QTEXTBLOCK_TEXTLIST ) +{ + hb_retptr( ( QTextList* ) hbqt_par_QTextBlock( 1 )->textList() ); +} + +/* + * QTextBlockUserData * userData () const + */ +HB_FUNC( QT_QTEXTBLOCK_USERDATA ) +{ + hb_retptr( ( QTextBlockUserData* ) hbqt_par_QTextBlock( 1 )->userData() ); +} + +/* + * int userState () const + */ +HB_FUNC( QT_QTEXTBLOCK_USERSTATE ) +{ + hb_retni( hbqt_par_QTextBlock( 1 )->userState() ); +} + + +/*----------------------------------------------------------------------*/ +#endif /* #if QT_VERSION >= 0x040500 */ +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/hbqt_qtextblockformat.cpp b/harbour/contrib/hbqt/hbqt_qtextblockformat.cpp new file mode 100644 index 0000000000..02651f6bba --- /dev/null +++ b/harbour/contrib/hbqt/hbqt_qtextblockformat.cpp @@ -0,0 +1,241 @@ +/* + * $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[ 19/21 [ 90.48% ] ] + * + * *** Unconvered Prototypes *** + * ----------------------------- + * + * void setTabPositions ( const QList & tabs ) + * QList tabPositions () const + */ + + +#include + + +/* + * QTextBlockFormat () + * + */ +HB_FUNC( QT_QTEXTBLOCKFORMAT ) +{ + hb_retptr( ( QTextBlockFormat* ) new QTextBlockFormat() ); +} + +/* + * Qt::Alignment alignment () const + */ +HB_FUNC( QT_QTEXTBLOCKFORMAT_ALIGNMENT ) +{ + hb_retni( ( Qt::Alignment ) hbqt_par_QTextBlockFormat( 1 )->alignment() ); +} + +/* + * qreal bottomMargin () const + */ +HB_FUNC( QT_QTEXTBLOCKFORMAT_BOTTOMMARGIN ) +{ + hb_retnd( hbqt_par_QTextBlockFormat( 1 )->bottomMargin() ); +} + +/* + * int indent () const + */ +HB_FUNC( QT_QTEXTBLOCKFORMAT_INDENT ) +{ + hb_retni( hbqt_par_QTextBlockFormat( 1 )->indent() ); +} + +/* + * bool isValid () const + */ +HB_FUNC( QT_QTEXTBLOCKFORMAT_ISVALID ) +{ + hb_retl( hbqt_par_QTextBlockFormat( 1 )->isValid() ); +} + +/* + * qreal leftMargin () const + */ +HB_FUNC( QT_QTEXTBLOCKFORMAT_LEFTMARGIN ) +{ + hb_retnd( hbqt_par_QTextBlockFormat( 1 )->leftMargin() ); +} + +/* + * bool nonBreakableLines () const + */ +HB_FUNC( QT_QTEXTBLOCKFORMAT_NONBREAKABLELINES ) +{ + hb_retl( hbqt_par_QTextBlockFormat( 1 )->nonBreakableLines() ); +} + +/* + * PageBreakFlags pageBreakPolicy () const + */ +HB_FUNC( QT_QTEXTBLOCKFORMAT_PAGEBREAKPOLICY ) +{ + hb_retni( ( QTextBlockFormat::PageBreakFlags ) hbqt_par_QTextBlockFormat( 1 )->pageBreakPolicy() ); +} + +/* + * qreal rightMargin () const + */ +HB_FUNC( QT_QTEXTBLOCKFORMAT_RIGHTMARGIN ) +{ + hb_retnd( hbqt_par_QTextBlockFormat( 1 )->rightMargin() ); +} + +/* + * void setAlignment ( Qt::Alignment alignment ) + */ +HB_FUNC( QT_QTEXTBLOCKFORMAT_SETALIGNMENT ) +{ + hbqt_par_QTextBlockFormat( 1 )->setAlignment( ( Qt::Alignment ) hb_parni( 2 ) ); +} + +/* + * void setBottomMargin ( qreal margin ) + */ +HB_FUNC( QT_QTEXTBLOCKFORMAT_SETBOTTOMMARGIN ) +{ + hbqt_par_QTextBlockFormat( 1 )->setBottomMargin( hb_parnd( 2 ) ); +} + +/* + * void setIndent ( int indentation ) + */ +HB_FUNC( QT_QTEXTBLOCKFORMAT_SETINDENT ) +{ + hbqt_par_QTextBlockFormat( 1 )->setIndent( hb_parni( 2 ) ); +} + +/* + * void setLeftMargin ( qreal margin ) + */ +HB_FUNC( QT_QTEXTBLOCKFORMAT_SETLEFTMARGIN ) +{ + hbqt_par_QTextBlockFormat( 1 )->setLeftMargin( hb_parnd( 2 ) ); +} + +/* + * void setNonBreakableLines ( bool b ) + */ +HB_FUNC( QT_QTEXTBLOCKFORMAT_SETNONBREAKABLELINES ) +{ + hbqt_par_QTextBlockFormat( 1 )->setNonBreakableLines( hb_parl( 2 ) ); +} + +/* + * void setPageBreakPolicy ( PageBreakFlags policy ) + */ +HB_FUNC( QT_QTEXTBLOCKFORMAT_SETPAGEBREAKPOLICY ) +{ + hbqt_par_QTextBlockFormat( 1 )->setPageBreakPolicy( ( QTextBlockFormat::PageBreakFlags ) hb_parni( 2 ) ); +} + +/* + * void setRightMargin ( qreal margin ) + */ +HB_FUNC( QT_QTEXTBLOCKFORMAT_SETRIGHTMARGIN ) +{ + hbqt_par_QTextBlockFormat( 1 )->setRightMargin( hb_parnd( 2 ) ); +} + +/* + * void setTextIndent ( qreal indent ) + */ +HB_FUNC( QT_QTEXTBLOCKFORMAT_SETTEXTINDENT ) +{ + hbqt_par_QTextBlockFormat( 1 )->setTextIndent( hb_parnd( 2 ) ); +} + +/* + * void setTopMargin ( qreal margin ) + */ +HB_FUNC( QT_QTEXTBLOCKFORMAT_SETTOPMARGIN ) +{ + hbqt_par_QTextBlockFormat( 1 )->setTopMargin( hb_parnd( 2 ) ); +} + +/* + * qreal textIndent () const + */ +HB_FUNC( QT_QTEXTBLOCKFORMAT_TEXTINDENT ) +{ + hb_retnd( hbqt_par_QTextBlockFormat( 1 )->textIndent() ); +} + +/* + * qreal topMargin () const + */ +HB_FUNC( QT_QTEXTBLOCKFORMAT_TOPMARGIN ) +{ + hb_retnd( hbqt_par_QTextBlockFormat( 1 )->topMargin() ); +} + + +/*----------------------------------------------------------------------*/ +#endif /* #if QT_VERSION >= 0x040500 */ +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/hbqt_qtextblockgroup.cpp b/harbour/contrib/hbqt/hbqt_qtextblockgroup.cpp new file mode 100644 index 0000000000..78686a6eeb --- /dev/null +++ b/harbour/contrib/hbqt/hbqt_qtextblockgroup.cpp @@ -0,0 +1,79 @@ +/* + * $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 + + +/* + * QTextBlockGroup ( QTextDocument * document ) + * ~QTextBlockGroup () + */ +HB_FUNC( QT_QTEXTBLOCKGROUP ) +{ + //hb_retptr( ( QTextBlockGroup* ) new QTextBlockGroup( hbqt_par_QTextDocument( 1 ) ) ); +} + + +/*----------------------------------------------------------------------*/ +#endif /* #if QT_VERSION >= 0x040500 */ +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/hbqt_qtextboundaryfinder.cpp b/harbour/contrib/hbqt/hbqt_qtextboundaryfinder.cpp new file mode 100644 index 0000000000..5c7a1c69f0 --- /dev/null +++ b/harbour/contrib/hbqt/hbqt_qtextboundaryfinder.cpp @@ -0,0 +1,170 @@ +/* + * $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 + + +/* + * QTextBoundaryFinder () + * QTextBoundaryFinder ( const QTextBoundaryFinder & other ) + * QTextBoundaryFinder ( BoundaryType type, const QString & string ) + * QTextBoundaryFinder ( BoundaryType type, const QChar * chars, int length, unsigned char * buffer = 0, int bufferSize = 0 ) + * ~QTextBoundaryFinder () + */ +HB_FUNC( QT_QTEXTBOUNDARYFINDER ) +{ + hb_retptr( ( QTextBoundaryFinder* ) new QTextBoundaryFinder() ); +} + +/* + * BoundaryReasons boundaryReasons () const + */ +HB_FUNC( QT_QTEXTBOUNDARYFINDER_BOUNDARYREASONS ) +{ + hb_retni( ( QTextBoundaryFinder::BoundaryReasons ) hbqt_par_QTextBoundaryFinder( 1 )->boundaryReasons() ); +} + +/* + * bool isAtBoundary () const + */ +HB_FUNC( QT_QTEXTBOUNDARYFINDER_ISATBOUNDARY ) +{ + hb_retl( hbqt_par_QTextBoundaryFinder( 1 )->isAtBoundary() ); +} + +/* + * bool isValid () const + */ +HB_FUNC( QT_QTEXTBOUNDARYFINDER_ISVALID ) +{ + hb_retl( hbqt_par_QTextBoundaryFinder( 1 )->isValid() ); +} + +/* + * int position () const + */ +HB_FUNC( QT_QTEXTBOUNDARYFINDER_POSITION ) +{ + hb_retni( hbqt_par_QTextBoundaryFinder( 1 )->position() ); +} + +/* + * void setPosition ( int position ) + */ +HB_FUNC( QT_QTEXTBOUNDARYFINDER_SETPOSITION ) +{ + hbqt_par_QTextBoundaryFinder( 1 )->setPosition( hb_parni( 2 ) ); +} + +/* + * QString string () const + */ +HB_FUNC( QT_QTEXTBOUNDARYFINDER_STRING ) +{ + hb_retc( hbqt_par_QTextBoundaryFinder( 1 )->string().toLatin1().data() ); +} + +/* + * void toEnd () + */ +HB_FUNC( QT_QTEXTBOUNDARYFINDER_TOEND ) +{ + hbqt_par_QTextBoundaryFinder( 1 )->toEnd(); +} + +/* + * int toNextBoundary () + */ +HB_FUNC( QT_QTEXTBOUNDARYFINDER_TONEXTBOUNDARY ) +{ + hb_retni( hbqt_par_QTextBoundaryFinder( 1 )->toNextBoundary() ); +} + +/* + * int toPreviousBoundary () + */ +HB_FUNC( QT_QTEXTBOUNDARYFINDER_TOPREVIOUSBOUNDARY ) +{ + hb_retni( hbqt_par_QTextBoundaryFinder( 1 )->toPreviousBoundary() ); +} + +/* + * void toStart () + */ +HB_FUNC( QT_QTEXTBOUNDARYFINDER_TOSTART ) +{ + hbqt_par_QTextBoundaryFinder( 1 )->toStart(); +} + +/* + * BoundaryType type () const + */ +HB_FUNC( QT_QTEXTBOUNDARYFINDER_TYPE ) +{ + hb_retni( ( QTextBoundaryFinder::BoundaryType ) hbqt_par_QTextBoundaryFinder( 1 )->type() ); +} + + +/*----------------------------------------------------------------------*/ +#endif /* #if QT_VERSION >= 0x040500 */ +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/hbqt_qtextbrowser.cpp b/harbour/contrib/hbqt/hbqt_qtextbrowser.cpp new file mode 100644 index 0000000000..4f3bcdee97 --- /dev/null +++ b/harbour/contrib/hbqt/hbqt_qtextbrowser.cpp @@ -0,0 +1,238 @@ +/* + * $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 + + +/* + * QTextBrowser ( QWidget * parent = 0 ) + */ +HB_FUNC( QT_QTEXTBROWSER ) +{ + hb_retptr( ( QTextBrowser* ) new QTextBrowser( hbqt_par_QWidget( 1 ) ) ); +} + +/* + * int backwardHistoryCount () const + */ +HB_FUNC( QT_QTEXTBROWSER_BACKWARDHISTORYCOUNT ) +{ + hb_retni( hbqt_par_QTextBrowser( 1 )->backwardHistoryCount() ); +} + +/* + * void clearHistory () + */ +HB_FUNC( QT_QTEXTBROWSER_CLEARHISTORY ) +{ + hbqt_par_QTextBrowser( 1 )->clearHistory(); +} + +/* + * int forwardHistoryCount () const + */ +HB_FUNC( QT_QTEXTBROWSER_FORWARDHISTORYCOUNT ) +{ + hb_retni( hbqt_par_QTextBrowser( 1 )->forwardHistoryCount() ); +} + +/* + * QString historyTitle ( int i ) const + */ +HB_FUNC( QT_QTEXTBROWSER_HISTORYTITLE ) +{ + hb_retc( hbqt_par_QTextBrowser( 1 )->historyTitle( hb_parni( 2 ) ).toLatin1().data() ); +} + +/* + * QUrl historyUrl ( int i ) const + */ +HB_FUNC( QT_QTEXTBROWSER_HISTORYURL ) +{ + hb_retptr( new QUrl( hbqt_par_QTextBrowser( 1 )->historyUrl( hb_parni( 2 ) ) ) ); +} + +/* + * bool isBackwardAvailable () const + */ +HB_FUNC( QT_QTEXTBROWSER_ISBACKWARDAVAILABLE ) +{ + hb_retl( hbqt_par_QTextBrowser( 1 )->isBackwardAvailable() ); +} + +/* + * bool isForwardAvailable () const + */ +HB_FUNC( QT_QTEXTBROWSER_ISFORWARDAVAILABLE ) +{ + hb_retl( hbqt_par_QTextBrowser( 1 )->isForwardAvailable() ); +} + +/* + * virtual QVariant loadResource ( int type, const QUrl & name ) + */ +HB_FUNC( QT_QTEXTBROWSER_LOADRESOURCE ) +{ + hb_retptr( new QVariant( hbqt_par_QTextBrowser( 1 )->loadResource( hb_parni( 2 ), *hbqt_par_QUrl( 3 ) ) ) ); +} + +/* + * bool openExternalLinks () const + */ +HB_FUNC( QT_QTEXTBROWSER_OPENEXTERNALLINKS ) +{ + hb_retl( hbqt_par_QTextBrowser( 1 )->openExternalLinks() ); +} + +/* + * bool openLinks () const + */ +HB_FUNC( QT_QTEXTBROWSER_OPENLINKS ) +{ + hb_retl( hbqt_par_QTextBrowser( 1 )->openLinks() ); +} + +/* + * QStringList searchPaths () const + */ +HB_FUNC( QT_QTEXTBROWSER_SEARCHPATHS ) +{ + hb_retptr( new QStringList( hbqt_par_QTextBrowser( 1 )->searchPaths() ) ); +} + +/* + * void setOpenExternalLinks ( bool open ) + */ +HB_FUNC( QT_QTEXTBROWSER_SETOPENEXTERNALLINKS ) +{ + hbqt_par_QTextBrowser( 1 )->setOpenExternalLinks( hb_parl( 2 ) ); +} + +/* + * void setOpenLinks ( bool open ) + */ +HB_FUNC( QT_QTEXTBROWSER_SETOPENLINKS ) +{ + hbqt_par_QTextBrowser( 1 )->setOpenLinks( hb_parl( 2 ) ); +} + +/* + * void setSearchPaths ( const QStringList & paths ) + */ +HB_FUNC( QT_QTEXTBROWSER_SETSEARCHPATHS ) +{ + hbqt_par_QTextBrowser( 1 )->setSearchPaths( *hbqt_par_QStringList( 2 ) ); +} + +/* + * QUrl source () const + */ +HB_FUNC( QT_QTEXTBROWSER_SOURCE ) +{ + hb_retptr( new QUrl( hbqt_par_QTextBrowser( 1 )->source() ) ); +} + +/* + * virtual void backward () + */ +HB_FUNC( QT_QTEXTBROWSER_BACKWARD ) +{ + hbqt_par_QTextBrowser( 1 )->backward(); +} + +/* + * virtual void forward () + */ +HB_FUNC( QT_QTEXTBROWSER_FORWARD ) +{ + hbqt_par_QTextBrowser( 1 )->forward(); +} + +/* + * virtual void home () + */ +HB_FUNC( QT_QTEXTBROWSER_HOME ) +{ + hbqt_par_QTextBrowser( 1 )->home(); +} + +/* + * virtual void reload () + */ +HB_FUNC( QT_QTEXTBROWSER_RELOAD ) +{ + hbqt_par_QTextBrowser( 1 )->reload(); +} + +/* + * virtual void setSource ( const QUrl & name ) + */ +HB_FUNC( QT_QTEXTBROWSER_SETSOURCE ) +{ + hbqt_par_QTextBrowser( 1 )->setSource( *hbqt_par_QUrl( 2 ) ); +} + + +/*----------------------------------------------------------------------*/ +#endif /* #if QT_VERSION >= 0x040500 */ +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/hbqt_qtextcharformat.cpp b/harbour/contrib/hbqt/hbqt_qtextcharformat.cpp new file mode 100644 index 0000000000..7617c55bab --- /dev/null +++ b/harbour/contrib/hbqt/hbqt_qtextcharformat.cpp @@ -0,0 +1,455 @@ +/* + * $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 + + +/* + * QTextCharFormat () + * + */ +HB_FUNC( QT_QTEXTCHARFORMAT ) +{ + hb_retptr( ( QTextCharFormat* ) new QTextCharFormat() ); +} + +/* + * QString anchorHref () const + */ +HB_FUNC( QT_QTEXTCHARFORMAT_ANCHORHREF ) +{ + hb_retc( hbqt_par_QTextCharFormat( 1 )->anchorHref().toLatin1().data() ); +} + +/* + * QStringList anchorNames () const + */ +HB_FUNC( QT_QTEXTCHARFORMAT_ANCHORNAMES ) +{ + hb_retptr( new QStringList( hbqt_par_QTextCharFormat( 1 )->anchorNames() ) ); +} + +/* + * QFont font () const + */ +HB_FUNC( QT_QTEXTCHARFORMAT_FONT ) +{ + hb_retptr( new QFont( hbqt_par_QTextCharFormat( 1 )->font() ) ); +} + +/* + * QFont::Capitalization fontCapitalization () const + */ +HB_FUNC( QT_QTEXTCHARFORMAT_FONTCAPITALIZATION ) +{ + hb_retni( ( QFont::Capitalization ) hbqt_par_QTextCharFormat( 1 )->fontCapitalization() ); +} + +/* + * QString fontFamily () const + */ +HB_FUNC( QT_QTEXTCHARFORMAT_FONTFAMILY ) +{ + hb_retc( hbqt_par_QTextCharFormat( 1 )->fontFamily().toLatin1().data() ); +} + +/* + * bool fontFixedPitch () const + */ +HB_FUNC( QT_QTEXTCHARFORMAT_FONTFIXEDPITCH ) +{ + hb_retl( hbqt_par_QTextCharFormat( 1 )->fontFixedPitch() ); +} + +/* + * bool fontItalic () const + */ +HB_FUNC( QT_QTEXTCHARFORMAT_FONTITALIC ) +{ + hb_retl( hbqt_par_QTextCharFormat( 1 )->fontItalic() ); +} + +/* + * bool fontKerning () const + */ +HB_FUNC( QT_QTEXTCHARFORMAT_FONTKERNING ) +{ + hb_retl( hbqt_par_QTextCharFormat( 1 )->fontKerning() ); +} + +/* + * qreal fontLetterSpacing () const + */ +HB_FUNC( QT_QTEXTCHARFORMAT_FONTLETTERSPACING ) +{ + hb_retnd( hbqt_par_QTextCharFormat( 1 )->fontLetterSpacing() ); +} + +/* + * bool fontOverline () const + */ +HB_FUNC( QT_QTEXTCHARFORMAT_FONTOVERLINE ) +{ + hb_retl( hbqt_par_QTextCharFormat( 1 )->fontOverline() ); +} + +/* + * qreal fontPointSize () const + */ +HB_FUNC( QT_QTEXTCHARFORMAT_FONTPOINTSIZE ) +{ + hb_retnd( hbqt_par_QTextCharFormat( 1 )->fontPointSize() ); +} + +/* + * bool fontStrikeOut () const + */ +HB_FUNC( QT_QTEXTCHARFORMAT_FONTSTRIKEOUT ) +{ + hb_retl( hbqt_par_QTextCharFormat( 1 )->fontStrikeOut() ); +} + +/* + * QFont::StyleHint fontStyleHint () const + */ +HB_FUNC( QT_QTEXTCHARFORMAT_FONTSTYLEHINT ) +{ + hb_retni( ( QFont::StyleHint ) hbqt_par_QTextCharFormat( 1 )->fontStyleHint() ); +} + +/* + * QFont::StyleStrategy fontStyleStrategy () const + */ +HB_FUNC( QT_QTEXTCHARFORMAT_FONTSTYLESTRATEGY ) +{ + hb_retni( ( QFont::StyleStrategy ) hbqt_par_QTextCharFormat( 1 )->fontStyleStrategy() ); +} + +/* + * bool fontUnderline () const + */ +HB_FUNC( QT_QTEXTCHARFORMAT_FONTUNDERLINE ) +{ + hb_retl( hbqt_par_QTextCharFormat( 1 )->fontUnderline() ); +} + +/* + * int fontWeight () const + */ +HB_FUNC( QT_QTEXTCHARFORMAT_FONTWEIGHT ) +{ + hb_retni( hbqt_par_QTextCharFormat( 1 )->fontWeight() ); +} + +/* + * qreal fontWordSpacing () const + */ +HB_FUNC( QT_QTEXTCHARFORMAT_FONTWORDSPACING ) +{ + hb_retnd( hbqt_par_QTextCharFormat( 1 )->fontWordSpacing() ); +} + +/* + * bool isAnchor () const + */ +HB_FUNC( QT_QTEXTCHARFORMAT_ISANCHOR ) +{ + hb_retl( hbqt_par_QTextCharFormat( 1 )->isAnchor() ); +} + +/* + * bool isValid () const + */ +HB_FUNC( QT_QTEXTCHARFORMAT_ISVALID ) +{ + hb_retl( hbqt_par_QTextCharFormat( 1 )->isValid() ); +} + +/* + * void setAnchor ( bool anchor ) + */ +HB_FUNC( QT_QTEXTCHARFORMAT_SETANCHOR ) +{ + hbqt_par_QTextCharFormat( 1 )->setAnchor( hb_parl( 2 ) ); +} + +/* + * void setAnchorHref ( const QString & value ) + */ +HB_FUNC( QT_QTEXTCHARFORMAT_SETANCHORHREF ) +{ + hbqt_par_QTextCharFormat( 1 )->setAnchorHref( hbqt_par_QString( 2 ) ); +} + +/* + * void setAnchorNames ( const QStringList & names ) + */ +HB_FUNC( QT_QTEXTCHARFORMAT_SETANCHORNAMES ) +{ + hbqt_par_QTextCharFormat( 1 )->setAnchorNames( *hbqt_par_QStringList( 2 ) ); +} + +/* + * void setFont ( const QFont & font ) + */ +HB_FUNC( QT_QTEXTCHARFORMAT_SETFONT ) +{ + hbqt_par_QTextCharFormat( 1 )->setFont( *hbqt_par_QFont( 2 ) ); +} + +/* + * void setFontCapitalization ( QFont::Capitalization capitalization ) + */ +HB_FUNC( QT_QTEXTCHARFORMAT_SETFONTCAPITALIZATION ) +{ + hbqt_par_QTextCharFormat( 1 )->setFontCapitalization( ( QFont::Capitalization ) hb_parni( 2 ) ); +} + +/* + * void setFontFamily ( const QString & family ) + */ +HB_FUNC( QT_QTEXTCHARFORMAT_SETFONTFAMILY ) +{ + hbqt_par_QTextCharFormat( 1 )->setFontFamily( hbqt_par_QString( 2 ) ); +} + +/* + * void setFontFixedPitch ( bool fixedPitch ) + */ +HB_FUNC( QT_QTEXTCHARFORMAT_SETFONTFIXEDPITCH ) +{ + hbqt_par_QTextCharFormat( 1 )->setFontFixedPitch( hb_parl( 2 ) ); +} + +/* + * void setFontItalic ( bool italic ) + */ +HB_FUNC( QT_QTEXTCHARFORMAT_SETFONTITALIC ) +{ + hbqt_par_QTextCharFormat( 1 )->setFontItalic( hb_parl( 2 ) ); +} + +/* + * void setFontKerning ( bool enable ) + */ +HB_FUNC( QT_QTEXTCHARFORMAT_SETFONTKERNING ) +{ + hbqt_par_QTextCharFormat( 1 )->setFontKerning( hb_parl( 2 ) ); +} + +/* + * void setFontLetterSpacing ( qreal spacing ) + */ +HB_FUNC( QT_QTEXTCHARFORMAT_SETFONTLETTERSPACING ) +{ + hbqt_par_QTextCharFormat( 1 )->setFontLetterSpacing( hb_parnd( 2 ) ); +} + +/* + * void setFontOverline ( bool overline ) + */ +HB_FUNC( QT_QTEXTCHARFORMAT_SETFONTOVERLINE ) +{ + hbqt_par_QTextCharFormat( 1 )->setFontOverline( hb_parl( 2 ) ); +} + +/* + * void setFontPointSize ( qreal size ) + */ +HB_FUNC( QT_QTEXTCHARFORMAT_SETFONTPOINTSIZE ) +{ + hbqt_par_QTextCharFormat( 1 )->setFontPointSize( hb_parnd( 2 ) ); +} + +/* + * void setFontStrikeOut ( bool strikeOut ) + */ +HB_FUNC( QT_QTEXTCHARFORMAT_SETFONTSTRIKEOUT ) +{ + hbqt_par_QTextCharFormat( 1 )->setFontStrikeOut( hb_parl( 2 ) ); +} + +/* + * void setFontStyleHint ( QFont::StyleHint hint, QFont::StyleStrategy strategy = QFont::PreferDefault ) + */ +HB_FUNC( QT_QTEXTCHARFORMAT_SETFONTSTYLEHINT ) +{ + hbqt_par_QTextCharFormat( 1 )->setFontStyleHint( ( QFont::StyleHint ) hb_parni( 2 ), ( HB_ISNIL( 3 ) ? ( QFont::StyleStrategy ) QFont::PreferDefault : ( QFont::StyleStrategy ) hb_parni( 3 ) ) ); +} + +/* + * void setFontStyleStrategy ( QFont::StyleStrategy strategy ) + */ +HB_FUNC( QT_QTEXTCHARFORMAT_SETFONTSTYLESTRATEGY ) +{ + hbqt_par_QTextCharFormat( 1 )->setFontStyleStrategy( ( QFont::StyleStrategy ) hb_parni( 2 ) ); +} + +/* + * void setFontUnderline ( bool underline ) + */ +HB_FUNC( QT_QTEXTCHARFORMAT_SETFONTUNDERLINE ) +{ + hbqt_par_QTextCharFormat( 1 )->setFontUnderline( hb_parl( 2 ) ); +} + +/* + * void setFontWeight ( int weight ) + */ +HB_FUNC( QT_QTEXTCHARFORMAT_SETFONTWEIGHT ) +{ + hbqt_par_QTextCharFormat( 1 )->setFontWeight( hb_parni( 2 ) ); +} + +/* + * void setFontWordSpacing ( qreal spacing ) + */ +HB_FUNC( QT_QTEXTCHARFORMAT_SETFONTWORDSPACING ) +{ + hbqt_par_QTextCharFormat( 1 )->setFontWordSpacing( hb_parnd( 2 ) ); +} + +/* + * void setTextOutline ( const QPen & pen ) + */ +HB_FUNC( QT_QTEXTCHARFORMAT_SETTEXTOUTLINE ) +{ + hbqt_par_QTextCharFormat( 1 )->setTextOutline( *hbqt_par_QPen( 2 ) ); +} + +/* + * void setToolTip ( const QString & text ) + */ +HB_FUNC( QT_QTEXTCHARFORMAT_SETTOOLTIP ) +{ + hbqt_par_QTextCharFormat( 1 )->setToolTip( hbqt_par_QString( 2 ) ); +} + +/* + * void setUnderlineColor ( const QColor & color ) + */ +HB_FUNC( QT_QTEXTCHARFORMAT_SETUNDERLINECOLOR ) +{ + hbqt_par_QTextCharFormat( 1 )->setUnderlineColor( *hbqt_par_QColor( 2 ) ); +} + +/* + * void setUnderlineStyle ( UnderlineStyle style ) + */ +HB_FUNC( QT_QTEXTCHARFORMAT_SETUNDERLINESTYLE ) +{ + hbqt_par_QTextCharFormat( 1 )->setUnderlineStyle( ( QTextCharFormat::UnderlineStyle ) hb_parni( 2 ) ); +} + +/* + * void setVerticalAlignment ( VerticalAlignment alignment ) + */ +HB_FUNC( QT_QTEXTCHARFORMAT_SETVERTICALALIGNMENT ) +{ + hbqt_par_QTextCharFormat( 1 )->setVerticalAlignment( ( QTextCharFormat::VerticalAlignment ) hb_parni( 2 ) ); +} + +/* + * QPen textOutline () const + */ +HB_FUNC( QT_QTEXTCHARFORMAT_TEXTOUTLINE ) +{ + hb_retptr( new QPen( hbqt_par_QTextCharFormat( 1 )->textOutline() ) ); +} + +/* + * QString toolTip () const + */ +HB_FUNC( QT_QTEXTCHARFORMAT_TOOLTIP ) +{ + hb_retc( hbqt_par_QTextCharFormat( 1 )->toolTip().toLatin1().data() ); +} + +/* + * QColor underlineColor () const + */ +HB_FUNC( QT_QTEXTCHARFORMAT_UNDERLINECOLOR ) +{ + hb_retptr( new QColor( hbqt_par_QTextCharFormat( 1 )->underlineColor() ) ); +} + +/* + * UnderlineStyle underlineStyle () const + */ +HB_FUNC( QT_QTEXTCHARFORMAT_UNDERLINESTYLE ) +{ + hb_retni( ( QTextCharFormat::UnderlineStyle ) hbqt_par_QTextCharFormat( 1 )->underlineStyle() ); +} + +/* + * VerticalAlignment verticalAlignment () const + */ +HB_FUNC( QT_QTEXTCHARFORMAT_VERTICALALIGNMENT ) +{ + hb_retni( ( QTextCharFormat::VerticalAlignment ) hbqt_par_QTextCharFormat( 1 )->verticalAlignment() ); +} + + +/*----------------------------------------------------------------------*/ +#endif /* #if QT_VERSION >= 0x040500 */ +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/hbqt_qtextcursor.cpp b/harbour/contrib/hbqt/hbqt_qtextcursor.cpp new file mode 100644 index 0000000000..76e0e1617c --- /dev/null +++ b/harbour/contrib/hbqt/hbqt_qtextcursor.cpp @@ -0,0 +1,573 @@ +/* + * $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 + + +/* + * QTextCursor () + * QTextCursor ( QTextDocument * document ) + * QTextCursor ( QTextFrame * frame ) + * QTextCursor ( const QTextBlock & block ) + * QTextCursor ( const QTextCursor & cursor ) + * ~QTextCursor () + */ +HB_FUNC( QT_QTEXTCURSOR ) +{ + hb_retptr( ( QTextCursor* ) new QTextCursor() ); +} + +/* + * int anchor () const + */ +HB_FUNC( QT_QTEXTCURSOR_ANCHOR ) +{ + hb_retni( hbqt_par_QTextCursor( 1 )->anchor() ); +} + +/* + * bool atBlockEnd () const + */ +HB_FUNC( QT_QTEXTCURSOR_ATBLOCKEND ) +{ + hb_retl( hbqt_par_QTextCursor( 1 )->atBlockEnd() ); +} + +/* + * bool atBlockStart () const + */ +HB_FUNC( QT_QTEXTCURSOR_ATBLOCKSTART ) +{ + hb_retl( hbqt_par_QTextCursor( 1 )->atBlockStart() ); +} + +/* + * bool atEnd () const + */ +HB_FUNC( QT_QTEXTCURSOR_ATEND ) +{ + hb_retl( hbqt_par_QTextCursor( 1 )->atEnd() ); +} + +/* + * bool atStart () const + */ +HB_FUNC( QT_QTEXTCURSOR_ATSTART ) +{ + hb_retl( hbqt_par_QTextCursor( 1 )->atStart() ); +} + +/* + * void beginEditBlock () + */ +HB_FUNC( QT_QTEXTCURSOR_BEGINEDITBLOCK ) +{ + hbqt_par_QTextCursor( 1 )->beginEditBlock(); +} + +/* + * QTextCharFormat blockCharFormat () const + */ +HB_FUNC( QT_QTEXTCURSOR_BLOCKCHARFORMAT ) +{ + hb_retptr( new QTextCharFormat( hbqt_par_QTextCursor( 1 )->blockCharFormat() ) ); +} + +/* + * QTextBlockFormat blockFormat () const + */ +HB_FUNC( QT_QTEXTCURSOR_BLOCKFORMAT ) +{ + hb_retptr( new QTextBlockFormat( hbqt_par_QTextCursor( 1 )->blockFormat() ) ); +} + +/* + * int blockNumber () const + */ +HB_FUNC( QT_QTEXTCURSOR_BLOCKNUMBER ) +{ + hb_retni( hbqt_par_QTextCursor( 1 )->blockNumber() ); +} + +/* + * QTextCharFormat charFormat () const + */ +HB_FUNC( QT_QTEXTCURSOR_CHARFORMAT ) +{ + hb_retptr( new QTextCharFormat( hbqt_par_QTextCursor( 1 )->charFormat() ) ); +} + +/* + * void clearSelection () + */ +HB_FUNC( QT_QTEXTCURSOR_CLEARSELECTION ) +{ + hbqt_par_QTextCursor( 1 )->clearSelection(); +} + +/* + * int columnNumber () const + */ +HB_FUNC( QT_QTEXTCURSOR_COLUMNNUMBER ) +{ + hb_retni( hbqt_par_QTextCursor( 1 )->columnNumber() ); +} + +/* + * QTextList * createList ( const QTextListFormat & format ) + */ +HB_FUNC( QT_QTEXTCURSOR_CREATELIST ) +{ + hb_retptr( ( QTextList* ) hbqt_par_QTextCursor( 1 )->createList( *hbqt_par_QTextListFormat( 2 ) ) ); +} + +/* + * QTextList * createList ( QTextListFormat::Style style ) + */ +HB_FUNC( QT_QTEXTCURSOR_CREATELIST_1 ) +{ + hb_retptr( ( QTextList* ) hbqt_par_QTextCursor( 1 )->createList( ( QTextListFormat::Style ) hb_parni( 2 ) ) ); +} + +/* + * QTextFrame * currentFrame () const + */ +HB_FUNC( QT_QTEXTCURSOR_CURRENTFRAME ) +{ + hb_retptr( ( QTextFrame* ) hbqt_par_QTextCursor( 1 )->currentFrame() ); +} + +/* + * QTextList * currentList () const + */ +HB_FUNC( QT_QTEXTCURSOR_CURRENTLIST ) +{ + hb_retptr( ( QTextList* ) hbqt_par_QTextCursor( 1 )->currentList() ); +} + +/* + * QTextTable * currentTable () const + */ +HB_FUNC( QT_QTEXTCURSOR_CURRENTTABLE ) +{ + hb_retptr( ( QTextTable* ) hbqt_par_QTextCursor( 1 )->currentTable() ); +} + +/* + * void deleteChar () + */ +HB_FUNC( QT_QTEXTCURSOR_DELETECHAR ) +{ + hbqt_par_QTextCursor( 1 )->deleteChar(); +} + +/* + * void deletePreviousChar () + */ +HB_FUNC( QT_QTEXTCURSOR_DELETEPREVIOUSCHAR ) +{ + hbqt_par_QTextCursor( 1 )->deletePreviousChar(); +} + +/* + * QTextDocument * document () const + */ +HB_FUNC( QT_QTEXTCURSOR_DOCUMENT ) +{ + hb_retptr( ( QTextDocument* ) hbqt_par_QTextCursor( 1 )->document() ); +} + +/* + * void endEditBlock () + */ +HB_FUNC( QT_QTEXTCURSOR_ENDEDITBLOCK ) +{ + hbqt_par_QTextCursor( 1 )->endEditBlock(); +} + +/* + * bool hasComplexSelection () const + */ +HB_FUNC( QT_QTEXTCURSOR_HASCOMPLEXSELECTION ) +{ + hb_retl( hbqt_par_QTextCursor( 1 )->hasComplexSelection() ); +} + +/* + * bool hasSelection () const + */ +HB_FUNC( QT_QTEXTCURSOR_HASSELECTION ) +{ + hb_retl( hbqt_par_QTextCursor( 1 )->hasSelection() ); +} + +/* + * void insertBlock () + */ +HB_FUNC( QT_QTEXTCURSOR_INSERTBLOCK ) +{ + hbqt_par_QTextCursor( 1 )->insertBlock(); +} + +/* + * void insertBlock ( const QTextBlockFormat & format ) + */ +HB_FUNC( QT_QTEXTCURSOR_INSERTBLOCK_1 ) +{ + hbqt_par_QTextCursor( 1 )->insertBlock( *hbqt_par_QTextBlockFormat( 2 ) ); +} + +/* + * void insertBlock ( const QTextBlockFormat & format, const QTextCharFormat & charFormat ) + */ +HB_FUNC( QT_QTEXTCURSOR_INSERTBLOCK_2 ) +{ + hbqt_par_QTextCursor( 1 )->insertBlock( *hbqt_par_QTextBlockFormat( 2 ), *hbqt_par_QTextCharFormat( 3 ) ); +} + +/* + * void insertFragment ( const QTextDocumentFragment & fragment ) + */ +HB_FUNC( QT_QTEXTCURSOR_INSERTFRAGMENT ) +{ + hbqt_par_QTextCursor( 1 )->insertFragment( *hbqt_par_QTextDocumentFragment( 2 ) ); +} + +/* + * QTextFrame * insertFrame ( const QTextFrameFormat & format ) + */ +HB_FUNC( QT_QTEXTCURSOR_INSERTFRAME ) +{ + hb_retptr( ( QTextFrame* ) hbqt_par_QTextCursor( 1 )->insertFrame( *hbqt_par_QTextFrameFormat( 2 ) ) ); +} + +/* + * void insertHtml ( const QString & html ) + */ +HB_FUNC( QT_QTEXTCURSOR_INSERTHTML ) +{ + hbqt_par_QTextCursor( 1 )->insertHtml( hbqt_par_QString( 2 ) ); +} + +/* + * void insertImage ( const QTextImageFormat & format ) + */ +HB_FUNC( QT_QTEXTCURSOR_INSERTIMAGE ) +{ + hbqt_par_QTextCursor( 1 )->insertImage( *hbqt_par_QTextImageFormat( 2 ) ); +} + +/* + * void insertImage ( const QTextImageFormat & format, QTextFrameFormat::Position alignment ) + */ +HB_FUNC( QT_QTEXTCURSOR_INSERTIMAGE_1 ) +{ + hbqt_par_QTextCursor( 1 )->insertImage( *hbqt_par_QTextImageFormat( 2 ), ( QTextFrameFormat::Position ) hb_parni( 3 ) ); +} + +/* + * void insertImage ( const QString & name ) + */ +HB_FUNC( QT_QTEXTCURSOR_INSERTIMAGE_2 ) +{ + hbqt_par_QTextCursor( 1 )->insertImage( hbqt_par_QString( 2 ) ); +} + +/* + * void insertImage ( const QImage & image, const QString & name = QString() ) + */ +HB_FUNC( QT_QTEXTCURSOR_INSERTIMAGE_3 ) +{ + hbqt_par_QTextCursor( 1 )->insertImage( *hbqt_par_QImage( 2 ), hbqt_par_QString( 3 ) ); +} + +/* + * QTextList * insertList ( const QTextListFormat & format ) + */ +HB_FUNC( QT_QTEXTCURSOR_INSERTLIST ) +{ + hb_retptr( ( QTextList* ) hbqt_par_QTextCursor( 1 )->insertList( *hbqt_par_QTextListFormat( 2 ) ) ); +} + +/* + * QTextList * insertList ( QTextListFormat::Style style ) + */ +HB_FUNC( QT_QTEXTCURSOR_INSERTLIST_1 ) +{ + hb_retptr( ( QTextList* ) hbqt_par_QTextCursor( 1 )->insertList( ( QTextListFormat::Style ) hb_parni( 2 ) ) ); +} + +/* + * QTextTable * insertTable ( int rows, int columns, const QTextTableFormat & format ) + */ +HB_FUNC( QT_QTEXTCURSOR_INSERTTABLE ) +{ + hb_retptr( ( QTextTable* ) hbqt_par_QTextCursor( 1 )->insertTable( hb_parni( 2 ), hb_parni( 3 ), *hbqt_par_QTextTableFormat( 4 ) ) ); +} + +/* + * QTextTable * insertTable ( int rows, int columns ) + */ +HB_FUNC( QT_QTEXTCURSOR_INSERTTABLE_1 ) +{ + hb_retptr( ( QTextTable* ) hbqt_par_QTextCursor( 1 )->insertTable( hb_parni( 2 ), hb_parni( 3 ) ) ); +} + +/* + * void insertText ( const QString & text ) + */ +HB_FUNC( QT_QTEXTCURSOR_INSERTTEXT ) +{ + hbqt_par_QTextCursor( 1 )->insertText( hbqt_par_QString( 2 ) ); +} + +/* + * void insertText ( const QString & text, const QTextCharFormat & format ) + */ +HB_FUNC( QT_QTEXTCURSOR_INSERTTEXT_1 ) +{ + hbqt_par_QTextCursor( 1 )->insertText( hbqt_par_QString( 2 ), *hbqt_par_QTextCharFormat( 3 ) ); +} + +/* + * bool isCopyOf ( const QTextCursor & other ) const + */ +HB_FUNC( QT_QTEXTCURSOR_ISCOPYOF ) +{ + hb_retl( hbqt_par_QTextCursor( 1 )->isCopyOf( *hbqt_par_QTextCursor( 2 ) ) ); +} + +/* + * bool isNull () const + */ +HB_FUNC( QT_QTEXTCURSOR_ISNULL ) +{ + hb_retl( hbqt_par_QTextCursor( 1 )->isNull() ); +} + +/* + * void joinPreviousEditBlock () + */ +HB_FUNC( QT_QTEXTCURSOR_JOINPREVIOUSEDITBLOCK ) +{ + hbqt_par_QTextCursor( 1 )->joinPreviousEditBlock(); +} + +/* + * void mergeBlockCharFormat ( const QTextCharFormat & modifier ) + */ +HB_FUNC( QT_QTEXTCURSOR_MERGEBLOCKCHARFORMAT ) +{ + hbqt_par_QTextCursor( 1 )->mergeBlockCharFormat( *hbqt_par_QTextCharFormat( 2 ) ); +} + +/* + * void mergeBlockFormat ( const QTextBlockFormat & modifier ) + */ +HB_FUNC( QT_QTEXTCURSOR_MERGEBLOCKFORMAT ) +{ + hbqt_par_QTextCursor( 1 )->mergeBlockFormat( *hbqt_par_QTextBlockFormat( 2 ) ); +} + +/* + * void mergeCharFormat ( const QTextCharFormat & modifier ) + */ +HB_FUNC( QT_QTEXTCURSOR_MERGECHARFORMAT ) +{ + hbqt_par_QTextCursor( 1 )->mergeCharFormat( *hbqt_par_QTextCharFormat( 2 ) ); +} + +/* + * bool movePosition ( MoveOperation operation, MoveMode mode = MoveAnchor, int n = 1 ) + */ +HB_FUNC( QT_QTEXTCURSOR_MOVEPOSITION ) +{ + hb_retl( hbqt_par_QTextCursor( 1 )->movePosition( ( QTextCursor::MoveOperation ) hb_parni( 2 ), ( HB_ISNIL( 3 ) ? ( QTextCursor::MoveMode ) QTextCursor::MoveAnchor : ( QTextCursor::MoveMode ) hb_parni( 3 ) ), ( HB_ISNIL( 4 ) ? 1 : hb_parni( 4 ) ) ) ); +} + +/* + * int position () const + */ +HB_FUNC( QT_QTEXTCURSOR_POSITION ) +{ + hb_retni( hbqt_par_QTextCursor( 1 )->position() ); +} + +/* + * void removeSelectedText () + */ +HB_FUNC( QT_QTEXTCURSOR_REMOVESELECTEDTEXT ) +{ + hbqt_par_QTextCursor( 1 )->removeSelectedText(); +} + +/* + * void select ( SelectionType selection ) + */ +HB_FUNC( QT_QTEXTCURSOR_SELECT ) +{ + hbqt_par_QTextCursor( 1 )->select( ( QTextCursor::SelectionType ) hb_parni( 2 ) ); +} + +/* + * void selectedTableCells ( int * firstRow, int * numRows, int * firstColumn, int * numColumns ) const + */ +HB_FUNC( QT_QTEXTCURSOR_SELECTEDTABLECELLS ) +{ + int iFirstRow = 0; + int iNumRows = 0; + int iFirstColumn = 0; + int iNumColumns = 0; + + hbqt_par_QTextCursor( 1 )->selectedTableCells( &iFirstRow, &iNumRows, &iFirstColumn, &iNumColumns ); + + hb_storni( iFirstRow, 2 ); + hb_storni( iNumRows, 3 ); + hb_storni( iFirstColumn, 4 ); + hb_storni( iNumColumns, 5 ); +} + +/* + * QString selectedText () const + */ +HB_FUNC( QT_QTEXTCURSOR_SELECTEDTEXT ) +{ + hb_retc( hbqt_par_QTextCursor( 1 )->selectedText().toLatin1().data() ); +} + +/* + * QTextDocumentFragment selection () const + */ +HB_FUNC( QT_QTEXTCURSOR_SELECTION ) +{ + hb_retptr( new QTextDocumentFragment( hbqt_par_QTextCursor( 1 )->selection() ) ); +} + +/* + * int selectionEnd () const + */ +HB_FUNC( QT_QTEXTCURSOR_SELECTIONEND ) +{ + hb_retni( hbqt_par_QTextCursor( 1 )->selectionEnd() ); +} + +/* + * int selectionStart () const + */ +HB_FUNC( QT_QTEXTCURSOR_SELECTIONSTART ) +{ + hb_retni( hbqt_par_QTextCursor( 1 )->selectionStart() ); +} + +/* + * void setBlockCharFormat ( const QTextCharFormat & format ) + */ +HB_FUNC( QT_QTEXTCURSOR_SETBLOCKCHARFORMAT ) +{ + hbqt_par_QTextCursor( 1 )->setBlockCharFormat( *hbqt_par_QTextCharFormat( 2 ) ); +} + +/* + * void setBlockFormat ( const QTextBlockFormat & format ) + */ +HB_FUNC( QT_QTEXTCURSOR_SETBLOCKFORMAT ) +{ + hbqt_par_QTextCursor( 1 )->setBlockFormat( *hbqt_par_QTextBlockFormat( 2 ) ); +} + +/* + * void setCharFormat ( const QTextCharFormat & format ) + */ +HB_FUNC( QT_QTEXTCURSOR_SETCHARFORMAT ) +{ + hbqt_par_QTextCursor( 1 )->setCharFormat( *hbqt_par_QTextCharFormat( 2 ) ); +} + +/* + * void setPosition ( int pos, MoveMode m = MoveAnchor ) + */ +HB_FUNC( QT_QTEXTCURSOR_SETPOSITION ) +{ + hbqt_par_QTextCursor( 1 )->setPosition( hb_parni( 2 ), ( HB_ISNIL( 3 ) ? ( QTextCursor::MoveMode ) QTextCursor::MoveAnchor : ( QTextCursor::MoveMode ) hb_parni( 3 ) ) ); +} + +/* + * void setVisualNavigation ( bool b ) + */ +HB_FUNC( QT_QTEXTCURSOR_SETVISUALNAVIGATION ) +{ + hbqt_par_QTextCursor( 1 )->setVisualNavigation( hb_parl( 2 ) ); +} + +/* + * bool visualNavigation () const + */ +HB_FUNC( QT_QTEXTCURSOR_VISUALNAVIGATION ) +{ + hb_retl( hbqt_par_QTextCursor( 1 )->visualNavigation() ); +} + + +/*----------------------------------------------------------------------*/ +#endif /* #if QT_VERSION >= 0x040500 */ +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/hbqt_qtextdecoder.cpp b/harbour/contrib/hbqt/hbqt_qtextdecoder.cpp new file mode 100644 index 0000000000..5a17bb0ad2 --- /dev/null +++ b/harbour/contrib/hbqt/hbqt_qtextdecoder.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 + + +/* + * QTextDecoder ( const QTextCodec * codec ) + * ~QTextDecoder () + */ +HB_FUNC( QT_QTEXTDECODER ) +{ + hb_retptr( ( QTextDecoder* ) new QTextDecoder( hbqt_par_QTextCodec( 1 ) ) ); +} + +/* + * QString toUnicode ( const char * chars, int len ) + */ +HB_FUNC( QT_QTEXTDECODER_TOUNICODE ) +{ + hb_retc( hbqt_par_QTextDecoder( 1 )->toUnicode( hbqt_par_char( 2 ), hb_parni( 3 ) ).toLatin1().data() ); +} + + +/*----------------------------------------------------------------------*/ +#endif /* #if QT_VERSION >= 0x040500 */ +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/hbqt_qtextdocument.cpp b/harbour/contrib/hbqt/hbqt_qtextdocument.cpp new file mode 100644 index 0000000000..cb5858b736 --- /dev/null +++ b/harbour/contrib/hbqt/hbqt_qtextdocument.cpp @@ -0,0 +1,617 @@ +/* + * $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[ 66/67 [ 98.51% ] ] + * + * *** Unconvered Prototypes *** + * ----------------------------- + * + * QVector allFormats () const + */ + + +#include + + +/* + * QTextDocument ( QObject * parent = 0 ) + * QTextDocument ( const QString & text, QObject * parent = 0 ) + * ~QTextDocument () + */ +HB_FUNC( QT_QTEXTDOCUMENT ) +{ + hb_retptr( ( QTextDocument* ) new QTextDocument( hbqt_par_QObject( 1 ) ) ); +} + +/* + * void addResource ( int type, const QUrl & name, const QVariant & resource ) + */ +HB_FUNC( QT_QTEXTDOCUMENT_ADDRESOURCE ) +{ + hbqt_par_QTextDocument( 1 )->addResource( hb_parni( 2 ), *hbqt_par_QUrl( 3 ), *hbqt_par_QVariant( 4 ) ); +} + +/* + * void adjustSize () + */ +HB_FUNC( QT_QTEXTDOCUMENT_ADJUSTSIZE ) +{ + hbqt_par_QTextDocument( 1 )->adjustSize(); +} + +/* + * QTextBlock begin () const + */ +HB_FUNC( QT_QTEXTDOCUMENT_BEGIN ) +{ + hb_retptr( new QTextBlock( hbqt_par_QTextDocument( 1 )->begin() ) ); +} + +/* + * int blockCount () const + */ +HB_FUNC( QT_QTEXTDOCUMENT_BLOCKCOUNT ) +{ + hb_retni( hbqt_par_QTextDocument( 1 )->blockCount() ); +} + +/* + * int characterCount () const + */ +HB_FUNC( QT_QTEXTDOCUMENT_CHARACTERCOUNT ) +{ + hb_retni( hbqt_par_QTextDocument( 1 )->characterCount() ); +} + +/* + * virtual void clear () + */ +HB_FUNC( QT_QTEXTDOCUMENT_CLEAR ) +{ + hbqt_par_QTextDocument( 1 )->clear(); +} + +/* + * QTextDocument * clone ( QObject * parent = 0 ) const + */ +HB_FUNC( QT_QTEXTDOCUMENT_CLONE ) +{ + hb_retptr( ( QTextDocument* ) hbqt_par_QTextDocument( 1 )->clone( hbqt_par_QObject( 2 ) ) ); +} + +/* + * QFont defaultFont () const + */ +HB_FUNC( QT_QTEXTDOCUMENT_DEFAULTFONT ) +{ + hb_retptr( new QFont( hbqt_par_QTextDocument( 1 )->defaultFont() ) ); +} + +/* + * QString defaultStyleSheet () const + */ +HB_FUNC( QT_QTEXTDOCUMENT_DEFAULTSTYLESHEET ) +{ + hb_retc( hbqt_par_QTextDocument( 1 )->defaultStyleSheet().toLatin1().data() ); +} + +/* + * QTextOption defaultTextOption () const + */ +HB_FUNC( QT_QTEXTDOCUMENT_DEFAULTTEXTOPTION ) +{ + hb_retptr( new QTextOption( hbqt_par_QTextDocument( 1 )->defaultTextOption() ) ); +} + +/* + * QAbstractTextDocumentLayout * documentLayout () const + */ +HB_FUNC( QT_QTEXTDOCUMENT_DOCUMENTLAYOUT ) +{ + hb_retptr( ( QAbstractTextDocumentLayout* ) hbqt_par_QTextDocument( 1 )->documentLayout() ); +} + +/* + * qreal documentMargin () const + */ +HB_FUNC( QT_QTEXTDOCUMENT_DOCUMENTMARGIN ) +{ + hb_retnd( hbqt_par_QTextDocument( 1 )->documentMargin() ); +} + +/* + * void drawContents ( QPainter * p, const QRectF & rect = QRectF() ) + */ +HB_FUNC( QT_QTEXTDOCUMENT_DRAWCONTENTS ) +{ + hbqt_par_QTextDocument( 1 )->drawContents( hbqt_par_QPainter( 2 ), *hbqt_par_QRectF( 3 ) ); +} + +/* + * QTextBlock end () const + */ +HB_FUNC( QT_QTEXTDOCUMENT_END ) +{ + hb_retptr( new QTextBlock( hbqt_par_QTextDocument( 1 )->end() ) ); +} + +/* + * QTextCursor find ( const QString & subString, const QTextCursor & cursor, FindFlags options = 0 ) const + */ +HB_FUNC( QT_QTEXTDOCUMENT_FIND ) +{ + hb_retptr( new QTextCursor( hbqt_par_QTextDocument( 1 )->find( hbqt_par_QString( 2 ), *hbqt_par_QTextCursor( 3 ), ( HB_ISNIL( 4 ) ? ( QTextDocument::FindFlags ) 0 : ( QTextDocument::FindFlags ) hb_parni( 4 ) ) ) ) ); +} + +/* + * QTextCursor find ( const QRegExp & expr, const QTextCursor & cursor, FindFlags options = 0 ) const + */ +HB_FUNC( QT_QTEXTDOCUMENT_FIND_1 ) +{ + hb_retptr( new QTextCursor( hbqt_par_QTextDocument( 1 )->find( *hbqt_par_QRegExp( 2 ), *hbqt_par_QTextCursor( 3 ), ( HB_ISNIL( 4 ) ? ( QTextDocument::FindFlags ) 0 : ( QTextDocument::FindFlags ) hb_parni( 4 ) ) ) ) ); +} + +/* + * QTextCursor find ( const QString & subString, int position = 0, FindFlags options = 0 ) const + */ +HB_FUNC( QT_QTEXTDOCUMENT_FIND_2 ) +{ + hb_retptr( new QTextCursor( hbqt_par_QTextDocument( 1 )->find( hbqt_par_QString( 2 ), ( HB_ISNIL( 3 ) ? 0 : hb_parni( 3 ) ), ( HB_ISNIL( 4 ) ? ( QTextDocument::FindFlags ) 0 : ( QTextDocument::FindFlags ) hb_parni( 4 ) ) ) ) ); +} + +/* + * QTextCursor find ( const QRegExp & expr, int position = 0, FindFlags options = 0 ) const + */ +HB_FUNC( QT_QTEXTDOCUMENT_FIND_3 ) +{ + hb_retptr( new QTextCursor( hbqt_par_QTextDocument( 1 )->find( *hbqt_par_QRegExp( 2 ), ( HB_ISNIL( 3 ) ? 0 : hb_parni( 3 ) ), ( HB_ISNIL( 4 ) ? ( QTextDocument::FindFlags ) 0 : ( QTextDocument::FindFlags ) hb_parni( 4 ) ) ) ) ); +} + +/* + * QTextBlock findBlock ( int pos ) const + */ +HB_FUNC( QT_QTEXTDOCUMENT_FINDBLOCK ) +{ + hb_retptr( new QTextBlock( hbqt_par_QTextDocument( 1 )->findBlock( hb_parni( 2 ) ) ) ); +} + +/* + * QTextBlock findBlockByLineNumber ( int lineNumber ) const + */ +HB_FUNC( QT_QTEXTDOCUMENT_FINDBLOCKBYLINENUMBER ) +{ + hb_retptr( new QTextBlock( hbqt_par_QTextDocument( 1 )->findBlockByLineNumber( hb_parni( 2 ) ) ) ); +} + +/* + * QTextBlock findBlockByNumber ( int blockNumber ) const + */ +HB_FUNC( QT_QTEXTDOCUMENT_FINDBLOCKBYNUMBER ) +{ + hb_retptr( new QTextBlock( hbqt_par_QTextDocument( 1 )->findBlockByNumber( hb_parni( 2 ) ) ) ); +} + +/* + * QTextBlock firstBlock () const + */ +HB_FUNC( QT_QTEXTDOCUMENT_FIRSTBLOCK ) +{ + hb_retptr( new QTextBlock( hbqt_par_QTextDocument( 1 )->firstBlock() ) ); +} + +/* + * qreal idealWidth () const + */ +HB_FUNC( QT_QTEXTDOCUMENT_IDEALWIDTH ) +{ + hb_retnd( hbqt_par_QTextDocument( 1 )->idealWidth() ); +} + +/* + * qreal indentWidth () const + */ +HB_FUNC( QT_QTEXTDOCUMENT_INDENTWIDTH ) +{ + hb_retnd( hbqt_par_QTextDocument( 1 )->indentWidth() ); +} + +/* + * bool isEmpty () const + */ +HB_FUNC( QT_QTEXTDOCUMENT_ISEMPTY ) +{ + hb_retl( hbqt_par_QTextDocument( 1 )->isEmpty() ); +} + +/* + * bool isModified () const + */ +HB_FUNC( QT_QTEXTDOCUMENT_ISMODIFIED ) +{ + hb_retl( hbqt_par_QTextDocument( 1 )->isModified() ); +} + +/* + * bool isRedoAvailable () const + */ +HB_FUNC( QT_QTEXTDOCUMENT_ISREDOAVAILABLE ) +{ + hb_retl( hbqt_par_QTextDocument( 1 )->isRedoAvailable() ); +} + +/* + * bool isUndoAvailable () const + */ +HB_FUNC( QT_QTEXTDOCUMENT_ISUNDOAVAILABLE ) +{ + hb_retl( hbqt_par_QTextDocument( 1 )->isUndoAvailable() ); +} + +/* + * bool isUndoRedoEnabled () const + */ +HB_FUNC( QT_QTEXTDOCUMENT_ISUNDOREDOENABLED ) +{ + hb_retl( hbqt_par_QTextDocument( 1 )->isUndoRedoEnabled() ); +} + +/* + * QTextBlock lastBlock () const + */ +HB_FUNC( QT_QTEXTDOCUMENT_LASTBLOCK ) +{ + hb_retptr( new QTextBlock( hbqt_par_QTextDocument( 1 )->lastBlock() ) ); +} + +/* + * int lineCount () const + */ +HB_FUNC( QT_QTEXTDOCUMENT_LINECOUNT ) +{ + hb_retni( hbqt_par_QTextDocument( 1 )->lineCount() ); +} + +/* + * void markContentsDirty ( int position, int length ) + */ +HB_FUNC( QT_QTEXTDOCUMENT_MARKCONTENTSDIRTY ) +{ + hbqt_par_QTextDocument( 1 )->markContentsDirty( hb_parni( 2 ), hb_parni( 3 ) ); +} + +/* + * int maximumBlockCount () const + */ +HB_FUNC( QT_QTEXTDOCUMENT_MAXIMUMBLOCKCOUNT ) +{ + hb_retni( hbqt_par_QTextDocument( 1 )->maximumBlockCount() ); +} + +/* + * QString metaInformation ( MetaInformation info ) const + */ +HB_FUNC( QT_QTEXTDOCUMENT_METAINFORMATION ) +{ + hb_retc( hbqt_par_QTextDocument( 1 )->metaInformation( ( QTextDocument::MetaInformation ) hb_parni( 2 ) ).toLatin1().data() ); +} + +/* + * QTextObject * object ( int objectIndex ) const + */ +HB_FUNC( QT_QTEXTDOCUMENT_OBJECT ) +{ + hb_retptr( ( QTextObject* ) hbqt_par_QTextDocument( 1 )->object( hb_parni( 2 ) ) ); +} + +/* + * QTextObject * objectForFormat ( const QTextFormat & f ) const + */ +HB_FUNC( QT_QTEXTDOCUMENT_OBJECTFORFORMAT ) +{ + hb_retptr( ( QTextObject* ) hbqt_par_QTextDocument( 1 )->objectForFormat( *hbqt_par_QTextFormat( 2 ) ) ); +} + +/* + * int pageCount () const + */ +HB_FUNC( QT_QTEXTDOCUMENT_PAGECOUNT ) +{ + hb_retni( hbqt_par_QTextDocument( 1 )->pageCount() ); +} + +/* + * QSizeF pageSize () const + */ +HB_FUNC( QT_QTEXTDOCUMENT_PAGESIZE ) +{ + hb_retptr( new QSizeF( hbqt_par_QTextDocument( 1 )->pageSize() ) ); +} + +/* + * void print ( QPrinter * printer ) const + */ +HB_FUNC( QT_QTEXTDOCUMENT_PRINT ) +{ + hbqt_par_QTextDocument( 1 )->print( hbqt_par_QPrinter( 2 ) ); +} + +/* + * void redo ( QTextCursor * cursor ) + */ +HB_FUNC( QT_QTEXTDOCUMENT_REDO ) +{ + hbqt_par_QTextDocument( 1 )->redo( hbqt_par_QTextCursor( 2 ) ); +} + +/* + * QVariant resource ( int type, const QUrl & name ) const + */ +HB_FUNC( QT_QTEXTDOCUMENT_RESOURCE ) +{ + hb_retptr( new QVariant( hbqt_par_QTextDocument( 1 )->resource( hb_parni( 2 ), *hbqt_par_QUrl( 3 ) ) ) ); +} + +/* + * int revision () const + */ +HB_FUNC( QT_QTEXTDOCUMENT_REVISION ) +{ + hb_retni( hbqt_par_QTextDocument( 1 )->revision() ); +} + +/* + * QTextFrame * rootFrame () const + */ +HB_FUNC( QT_QTEXTDOCUMENT_ROOTFRAME ) +{ + hb_retptr( ( QTextFrame* ) hbqt_par_QTextDocument( 1 )->rootFrame() ); +} + +/* + * void setDefaultFont ( const QFont & font ) + */ +HB_FUNC( QT_QTEXTDOCUMENT_SETDEFAULTFONT ) +{ + hbqt_par_QTextDocument( 1 )->setDefaultFont( *hbqt_par_QFont( 2 ) ); +} + +/* + * void setDefaultStyleSheet ( const QString & sheet ) + */ +HB_FUNC( QT_QTEXTDOCUMENT_SETDEFAULTSTYLESHEET ) +{ + hbqt_par_QTextDocument( 1 )->setDefaultStyleSheet( hbqt_par_QString( 2 ) ); +} + +/* + * void setDefaultTextOption ( const QTextOption & option ) + */ +HB_FUNC( QT_QTEXTDOCUMENT_SETDEFAULTTEXTOPTION ) +{ + hbqt_par_QTextDocument( 1 )->setDefaultTextOption( *hbqt_par_QTextOption( 2 ) ); +} + +/* + * void setDocumentLayout ( QAbstractTextDocumentLayout * layout ) + */ +HB_FUNC( QT_QTEXTDOCUMENT_SETDOCUMENTLAYOUT ) +{ + hbqt_par_QTextDocument( 1 )->setDocumentLayout( hbqt_par_QAbstractTextDocumentLayout( 2 ) ); +} + +/* + * void setDocumentMargin ( qreal margin ) + */ +HB_FUNC( QT_QTEXTDOCUMENT_SETDOCUMENTMARGIN ) +{ + hbqt_par_QTextDocument( 1 )->setDocumentMargin( hb_parnd( 2 ) ); +} + +/* + * void setHtml ( const QString & html ) + */ +HB_FUNC( QT_QTEXTDOCUMENT_SETHTML ) +{ + hbqt_par_QTextDocument( 1 )->setHtml( hbqt_par_QString( 2 ) ); +} + +/* + * void setIndentWidth ( qreal width ) + */ +HB_FUNC( QT_QTEXTDOCUMENT_SETINDENTWIDTH ) +{ + hbqt_par_QTextDocument( 1 )->setIndentWidth( hb_parnd( 2 ) ); +} + +/* + * void setMaximumBlockCount ( int maximum ) + */ +HB_FUNC( QT_QTEXTDOCUMENT_SETMAXIMUMBLOCKCOUNT ) +{ + hbqt_par_QTextDocument( 1 )->setMaximumBlockCount( hb_parni( 2 ) ); +} + +/* + * void setMetaInformation ( MetaInformation info, const QString & string ) + */ +HB_FUNC( QT_QTEXTDOCUMENT_SETMETAINFORMATION ) +{ + hbqt_par_QTextDocument( 1 )->setMetaInformation( ( QTextDocument::MetaInformation ) hb_parni( 2 ), hbqt_par_QString( 3 ) ); +} + +/* + * void setPageSize ( const QSizeF & size ) + */ +HB_FUNC( QT_QTEXTDOCUMENT_SETPAGESIZE ) +{ + hbqt_par_QTextDocument( 1 )->setPageSize( *hbqt_par_QSizeF( 2 ) ); +} + +/* + * void setPlainText ( const QString & text ) + */ +HB_FUNC( QT_QTEXTDOCUMENT_SETPLAINTEXT ) +{ + hbqt_par_QTextDocument( 1 )->setPlainText( hbqt_par_QString( 2 ) ); +} + +/* + * void setTextWidth ( qreal width ) + */ +HB_FUNC( QT_QTEXTDOCUMENT_SETTEXTWIDTH ) +{ + hbqt_par_QTextDocument( 1 )->setTextWidth( hb_parnd( 2 ) ); +} + +/* + * void setUndoRedoEnabled ( bool enable ) + */ +HB_FUNC( QT_QTEXTDOCUMENT_SETUNDOREDOENABLED ) +{ + hbqt_par_QTextDocument( 1 )->setUndoRedoEnabled( hb_parl( 2 ) ); +} + +/* + * void setUseDesignMetrics ( bool b ) + */ +HB_FUNC( QT_QTEXTDOCUMENT_SETUSEDESIGNMETRICS ) +{ + hbqt_par_QTextDocument( 1 )->setUseDesignMetrics( hb_parl( 2 ) ); +} + +/* + * QSizeF size () const + */ +HB_FUNC( QT_QTEXTDOCUMENT_SIZE ) +{ + hb_retptr( new QSizeF( hbqt_par_QTextDocument( 1 )->size() ) ); +} + +/* + * qreal textWidth () const + */ +HB_FUNC( QT_QTEXTDOCUMENT_TEXTWIDTH ) +{ + hb_retnd( hbqt_par_QTextDocument( 1 )->textWidth() ); +} + +/* + * QString toHtml ( const QByteArray & encoding = QByteArray() ) const + */ +HB_FUNC( QT_QTEXTDOCUMENT_TOHTML ) +{ + hb_retc( hbqt_par_QTextDocument( 1 )->toHtml( *hbqt_par_QByteArray( 2 ) ).toLatin1().data() ); +} + +/* + * QString toPlainText () const + */ +HB_FUNC( QT_QTEXTDOCUMENT_TOPLAINTEXT ) +{ + hb_retc( hbqt_par_QTextDocument( 1 )->toPlainText().toLatin1().data() ); +} + +/* + * void undo ( QTextCursor * cursor ) + */ +HB_FUNC( QT_QTEXTDOCUMENT_UNDO ) +{ + hbqt_par_QTextDocument( 1 )->undo( hbqt_par_QTextCursor( 2 ) ); +} + +/* + * bool useDesignMetrics () const + */ +HB_FUNC( QT_QTEXTDOCUMENT_USEDESIGNMETRICS ) +{ + hb_retl( hbqt_par_QTextDocument( 1 )->useDesignMetrics() ); +} + +/* + * void redo () + */ +HB_FUNC( QT_QTEXTDOCUMENT_REDO_1 ) +{ + hbqt_par_QTextDocument( 1 )->redo(); +} + +/* + * void setModified ( bool m = true ) + */ +HB_FUNC( QT_QTEXTDOCUMENT_SETMODIFIED ) +{ + hbqt_par_QTextDocument( 1 )->setModified( hb_parl( 2 ) ); +} + +/* + * void undo () + */ +HB_FUNC( QT_QTEXTDOCUMENT_UNDO_1 ) +{ + hbqt_par_QTextDocument( 1 )->undo(); +} + + +/*----------------------------------------------------------------------*/ +#endif /* #if QT_VERSION >= 0x040500 */ +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/hbqt_qtextdocumentfragment.cpp b/harbour/contrib/hbqt/hbqt_qtextdocumentfragment.cpp new file mode 100644 index 0000000000..e29bb67088 --- /dev/null +++ b/harbour/contrib/hbqt/hbqt_qtextdocumentfragment.cpp @@ -0,0 +1,114 @@ +/* + * $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 + + +/* + * QTextDocumentFragment () + * QTextDocumentFragment ( const QTextDocument * document ) + * QTextDocumentFragment ( const QTextCursor & cursor ) + * QTextDocumentFragment ( const QTextDocumentFragment & other ) + * ~QTextDocumentFragment () + */ +HB_FUNC( QT_QTEXTDOCUMENTFRAGMENT ) +{ + hb_retptr( ( QTextDocumentFragment* ) new QTextDocumentFragment() ); +} + +/* + * bool isEmpty () const + */ +HB_FUNC( QT_QTEXTDOCUMENTFRAGMENT_ISEMPTY ) +{ + hb_retl( hbqt_par_QTextDocumentFragment( 1 )->isEmpty() ); +} + +/* + * QString toHtml ( const QByteArray & encoding ) const + */ +HB_FUNC( QT_QTEXTDOCUMENTFRAGMENT_TOHTML ) +{ + hb_retc( hbqt_par_QTextDocumentFragment( 1 )->toHtml( *hbqt_par_QByteArray( 2 ) ).toLatin1().data() ); +} + +/* + * QString toHtml () const + */ +HB_FUNC( QT_QTEXTDOCUMENTFRAGMENT_TOHTML_1 ) +{ + hb_retc( hbqt_par_QTextDocumentFragment( 1 )->toHtml().toLatin1().data() ); +} + +/* + * QString toPlainText () const + */ +HB_FUNC( QT_QTEXTDOCUMENTFRAGMENT_TOPLAINTEXT ) +{ + hb_retc( hbqt_par_QTextDocumentFragment( 1 )->toPlainText().toLatin1().data() ); +} + + +/*----------------------------------------------------------------------*/ +#endif /* #if QT_VERSION >= 0x040500 */ +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/hbqt_qtextdocumentwriter.cpp b/harbour/contrib/hbqt/hbqt_qtextdocumentwriter.cpp new file mode 100644 index 0000000000..d55d599154 --- /dev/null +++ b/harbour/contrib/hbqt/hbqt_qtextdocumentwriter.cpp @@ -0,0 +1,161 @@ +/* + * $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 + + +/* + * QTextDocumentWriter () + * QTextDocumentWriter ( QIODevice * device, const QByteArray & format ) + * QTextDocumentWriter ( const QString & fileName, const QByteArray & format = QByteArray() ) + * ~QTextDocumentWriter () + */ +HB_FUNC( QT_QTEXTDOCUMENTWRITER ) +{ + hb_retptr( ( QTextDocumentWriter* ) new QTextDocumentWriter() ); +} + +/* + * QTextCodec * codec () const + */ +HB_FUNC( QT_QTEXTDOCUMENTWRITER_CODEC ) +{ + hb_retptr( ( QTextCodec* ) hbqt_par_QTextDocumentWriter( 1 )->codec() ); +} + +/* + * QIODevice * device () const + */ +HB_FUNC( QT_QTEXTDOCUMENTWRITER_DEVICE ) +{ + hb_retptr( ( QIODevice* ) hbqt_par_QTextDocumentWriter( 1 )->device() ); +} + +/* + * QString fileName () const + */ +HB_FUNC( QT_QTEXTDOCUMENTWRITER_FILENAME ) +{ + hb_retc( hbqt_par_QTextDocumentWriter( 1 )->fileName().toLatin1().data() ); +} + +/* + * QByteArray format () const + */ +HB_FUNC( QT_QTEXTDOCUMENTWRITER_FORMAT ) +{ + hb_retptr( new QByteArray( hbqt_par_QTextDocumentWriter( 1 )->format() ) ); +} + +/* + * void setCodec ( QTextCodec * codec ) + */ +HB_FUNC( QT_QTEXTDOCUMENTWRITER_SETCODEC ) +{ + hbqt_par_QTextDocumentWriter( 1 )->setCodec( hbqt_par_QTextCodec( 2 ) ); +} + +/* + * void setDevice ( QIODevice * device ) + */ +HB_FUNC( QT_QTEXTDOCUMENTWRITER_SETDEVICE ) +{ + hbqt_par_QTextDocumentWriter( 1 )->setDevice( hbqt_par_QIODevice( 2 ) ); +} + +/* + * void setFileName ( const QString & fileName ) + */ +HB_FUNC( QT_QTEXTDOCUMENTWRITER_SETFILENAME ) +{ + hbqt_par_QTextDocumentWriter( 1 )->setFileName( hbqt_par_QString( 2 ) ); +} + +/* + * void setFormat ( const QByteArray & format ) + */ +HB_FUNC( QT_QTEXTDOCUMENTWRITER_SETFORMAT ) +{ + hbqt_par_QTextDocumentWriter( 1 )->setFormat( *hbqt_par_QByteArray( 2 ) ); +} + +/* + * bool write ( const QTextDocument * document ) + */ +HB_FUNC( QT_QTEXTDOCUMENTWRITER_WRITE ) +{ + hb_retl( hbqt_par_QTextDocumentWriter( 1 )->write( hbqt_par_QTextDocument( 2 ) ) ); +} + +/* + * bool write ( const QTextDocumentFragment & fragment ) + */ +HB_FUNC( QT_QTEXTDOCUMENTWRITER_WRITE_1 ) +{ + hb_retl( hbqt_par_QTextDocumentWriter( 1 )->write( *hbqt_par_QTextDocumentFragment( 2 ) ) ); +} + + +/*----------------------------------------------------------------------*/ +#endif /* #if QT_VERSION >= 0x040500 */ +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/hbqt_qtextformat.cpp b/harbour/contrib/hbqt/hbqt_qtextformat.cpp new file mode 100644 index 0000000000..a0af627be5 --- /dev/null +++ b/harbour/contrib/hbqt/hbqt_qtextformat.cpp @@ -0,0 +1,428 @@ +/* + * $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[ 42/45 [ 93.33% ] ] + * + * *** Unconvered Prototypes *** + * ----------------------------- + * + * QVector lengthVectorProperty ( int propertyId ) const + * QMap properties () const + * void setProperty ( int propertyId, const QVector & value ) + */ + + +#include + + +/* + * QTextFormat () + * QTextFormat ( int type ) + * QTextFormat ( const QTextFormat & other ) + * ~QTextFormat () + */ +HB_FUNC( QT_QTEXTFORMAT ) +{ + hb_retptr( ( QTextFormat* ) new QTextFormat() ); +} + +/* + * QBrush background () const + */ +HB_FUNC( QT_QTEXTFORMAT_BACKGROUND ) +{ + hb_retptr( new QBrush( hbqt_par_QTextFormat( 1 )->background() ) ); +} + +/* + * bool boolProperty ( int propertyId ) const + */ +HB_FUNC( QT_QTEXTFORMAT_BOOLPROPERTY ) +{ + hb_retl( hbqt_par_QTextFormat( 1 )->boolProperty( hb_parni( 2 ) ) ); +} + +/* + * QBrush brushProperty ( int propertyId ) const + */ +HB_FUNC( QT_QTEXTFORMAT_BRUSHPROPERTY ) +{ + hb_retptr( new QBrush( hbqt_par_QTextFormat( 1 )->brushProperty( hb_parni( 2 ) ) ) ); +} + +/* + * void clearBackground () + */ +HB_FUNC( QT_QTEXTFORMAT_CLEARBACKGROUND ) +{ + hbqt_par_QTextFormat( 1 )->clearBackground(); +} + +/* + * void clearForeground () + */ +HB_FUNC( QT_QTEXTFORMAT_CLEARFOREGROUND ) +{ + hbqt_par_QTextFormat( 1 )->clearForeground(); +} + +/* + * void clearProperty ( int propertyId ) + */ +HB_FUNC( QT_QTEXTFORMAT_CLEARPROPERTY ) +{ + hbqt_par_QTextFormat( 1 )->clearProperty( hb_parni( 2 ) ); +} + +/* + * QColor colorProperty ( int propertyId ) const + */ +HB_FUNC( QT_QTEXTFORMAT_COLORPROPERTY ) +{ + hb_retptr( new QColor( hbqt_par_QTextFormat( 1 )->colorProperty( hb_parni( 2 ) ) ) ); +} + +/* + * qreal doubleProperty ( int propertyId ) const + */ +HB_FUNC( QT_QTEXTFORMAT_DOUBLEPROPERTY ) +{ + hb_retnd( hbqt_par_QTextFormat( 1 )->doubleProperty( hb_parni( 2 ) ) ); +} + +/* + * QBrush foreground () const + */ +HB_FUNC( QT_QTEXTFORMAT_FOREGROUND ) +{ + hb_retptr( new QBrush( hbqt_par_QTextFormat( 1 )->foreground() ) ); +} + +/* + * bool hasProperty ( int propertyId ) const + */ +HB_FUNC( QT_QTEXTFORMAT_HASPROPERTY ) +{ + hb_retl( hbqt_par_QTextFormat( 1 )->hasProperty( hb_parni( 2 ) ) ); +} + +/* + * int intProperty ( int propertyId ) const + */ +HB_FUNC( QT_QTEXTFORMAT_INTPROPERTY ) +{ + hb_retni( hbqt_par_QTextFormat( 1 )->intProperty( hb_parni( 2 ) ) ); +} + +/* + * bool isBlockFormat () const + */ +HB_FUNC( QT_QTEXTFORMAT_ISBLOCKFORMAT ) +{ + hb_retl( hbqt_par_QTextFormat( 1 )->isBlockFormat() ); +} + +/* + * bool isCharFormat () const + */ +HB_FUNC( QT_QTEXTFORMAT_ISCHARFORMAT ) +{ + hb_retl( hbqt_par_QTextFormat( 1 )->isCharFormat() ); +} + +/* + * bool isFrameFormat () const + */ +HB_FUNC( QT_QTEXTFORMAT_ISFRAMEFORMAT ) +{ + hb_retl( hbqt_par_QTextFormat( 1 )->isFrameFormat() ); +} + +/* + * bool isImageFormat () const + */ +HB_FUNC( QT_QTEXTFORMAT_ISIMAGEFORMAT ) +{ + hb_retl( hbqt_par_QTextFormat( 1 )->isImageFormat() ); +} + +/* + * bool isListFormat () const + */ +HB_FUNC( QT_QTEXTFORMAT_ISLISTFORMAT ) +{ + hb_retl( hbqt_par_QTextFormat( 1 )->isListFormat() ); +} + +/* + * bool isTableCellFormat () const + */ +HB_FUNC( QT_QTEXTFORMAT_ISTABLECELLFORMAT ) +{ + hb_retl( hbqt_par_QTextFormat( 1 )->isTableCellFormat() ); +} + +/* + * bool isTableFormat () const + */ +HB_FUNC( QT_QTEXTFORMAT_ISTABLEFORMAT ) +{ + hb_retl( hbqt_par_QTextFormat( 1 )->isTableFormat() ); +} + +/* + * bool isValid () const + */ +HB_FUNC( QT_QTEXTFORMAT_ISVALID ) +{ + hb_retl( hbqt_par_QTextFormat( 1 )->isValid() ); +} + +/* + * Qt::LayoutDirection layoutDirection () const + */ +HB_FUNC( QT_QTEXTFORMAT_LAYOUTDIRECTION ) +{ + hb_retni( ( Qt::LayoutDirection ) hbqt_par_QTextFormat( 1 )->layoutDirection() ); +} + +/* + * QTextLength lengthProperty ( int propertyId ) const + */ +HB_FUNC( QT_QTEXTFORMAT_LENGTHPROPERTY ) +{ + hb_retptr( new QTextLength( hbqt_par_QTextFormat( 1 )->lengthProperty( hb_parni( 2 ) ) ) ); +} + +/* + * void merge ( const QTextFormat & other ) + */ +HB_FUNC( QT_QTEXTFORMAT_MERGE ) +{ + hbqt_par_QTextFormat( 1 )->merge( *hbqt_par_QTextFormat( 2 ) ); +} + +/* + * int objectIndex () const + */ +HB_FUNC( QT_QTEXTFORMAT_OBJECTINDEX ) +{ + hb_retni( hbqt_par_QTextFormat( 1 )->objectIndex() ); +} + +/* + * int objectType () const + */ +HB_FUNC( QT_QTEXTFORMAT_OBJECTTYPE ) +{ + hb_retni( hbqt_par_QTextFormat( 1 )->objectType() ); +} + +/* + * QPen penProperty ( int propertyId ) const + */ +HB_FUNC( QT_QTEXTFORMAT_PENPROPERTY ) +{ + hb_retptr( new QPen( hbqt_par_QTextFormat( 1 )->penProperty( hb_parni( 2 ) ) ) ); +} + +/* + * QVariant property ( int propertyId ) const + */ +HB_FUNC( QT_QTEXTFORMAT_PROPERTY ) +{ + hb_retptr( new QVariant( hbqt_par_QTextFormat( 1 )->property( hb_parni( 2 ) ) ) ); +} + +/* + * int propertyCount () const + */ +HB_FUNC( QT_QTEXTFORMAT_PROPERTYCOUNT ) +{ + hb_retni( hbqt_par_QTextFormat( 1 )->propertyCount() ); +} + +/* + * void setBackground ( const QBrush & brush ) + */ +HB_FUNC( QT_QTEXTFORMAT_SETBACKGROUND ) +{ + hbqt_par_QTextFormat( 1 )->setBackground( *hbqt_par_QBrush( 2 ) ); +} + +/* + * void setForeground ( const QBrush & brush ) + */ +HB_FUNC( QT_QTEXTFORMAT_SETFOREGROUND ) +{ + hbqt_par_QTextFormat( 1 )->setForeground( *hbqt_par_QBrush( 2 ) ); +} + +/* + * void setLayoutDirection ( Qt::LayoutDirection direction ) + */ +HB_FUNC( QT_QTEXTFORMAT_SETLAYOUTDIRECTION ) +{ + hbqt_par_QTextFormat( 1 )->setLayoutDirection( ( Qt::LayoutDirection ) hb_parni( 2 ) ); +} + +/* + * void setObjectIndex ( int index ) + */ +HB_FUNC( QT_QTEXTFORMAT_SETOBJECTINDEX ) +{ + hbqt_par_QTextFormat( 1 )->setObjectIndex( hb_parni( 2 ) ); +} + +/* + * void setObjectType ( int type ) + */ +HB_FUNC( QT_QTEXTFORMAT_SETOBJECTTYPE ) +{ + hbqt_par_QTextFormat( 1 )->setObjectType( hb_parni( 2 ) ); +} + +/* + * void setProperty ( int propertyId, const QVariant & value ) + */ +HB_FUNC( QT_QTEXTFORMAT_SETPROPERTY ) +{ + hbqt_par_QTextFormat( 1 )->setProperty( hb_parni( 2 ), *hbqt_par_QVariant( 3 ) ); +} + +/* + * QString stringProperty ( int propertyId ) const + */ +HB_FUNC( QT_QTEXTFORMAT_STRINGPROPERTY ) +{ + hb_retc( hbqt_par_QTextFormat( 1 )->stringProperty( hb_parni( 2 ) ).toLatin1().data() ); +} + +/* + * QTextBlockFormat toBlockFormat () const + */ +HB_FUNC( QT_QTEXTFORMAT_TOBLOCKFORMAT ) +{ + hb_retptr( new QTextBlockFormat( hbqt_par_QTextFormat( 1 )->toBlockFormat() ) ); +} + +/* + * QTextCharFormat toCharFormat () const + */ +HB_FUNC( QT_QTEXTFORMAT_TOCHARFORMAT ) +{ + hb_retptr( new QTextCharFormat( hbqt_par_QTextFormat( 1 )->toCharFormat() ) ); +} + +/* + * QTextFrameFormat toFrameFormat () const + */ +HB_FUNC( QT_QTEXTFORMAT_TOFRAMEFORMAT ) +{ + hb_retptr( new QTextFrameFormat( hbqt_par_QTextFormat( 1 )->toFrameFormat() ) ); +} + +/* + * QTextImageFormat toImageFormat () const + */ +HB_FUNC( QT_QTEXTFORMAT_TOIMAGEFORMAT ) +{ + hb_retptr( new QTextImageFormat( hbqt_par_QTextFormat( 1 )->toImageFormat() ) ); +} + +/* + * QTextListFormat toListFormat () const + */ +HB_FUNC( QT_QTEXTFORMAT_TOLISTFORMAT ) +{ + hb_retptr( new QTextListFormat( hbqt_par_QTextFormat( 1 )->toListFormat() ) ); +} + +/* + * QTextTableCellFormat toTableCellFormat () const + */ +HB_FUNC( QT_QTEXTFORMAT_TOTABLECELLFORMAT ) +{ + hb_retptr( new QTextTableCellFormat( hbqt_par_QTextFormat( 1 )->toTableCellFormat() ) ); +} + +/* + * QTextTableFormat toTableFormat () const + */ +HB_FUNC( QT_QTEXTFORMAT_TOTABLEFORMAT ) +{ + hb_retptr( new QTextTableFormat( hbqt_par_QTextFormat( 1 )->toTableFormat() ) ); +} + +/* + * int type () const + */ +HB_FUNC( QT_QTEXTFORMAT_TYPE ) +{ + hb_retni( hbqt_par_QTextFormat( 1 )->type() ); +} + + +/*----------------------------------------------------------------------*/ +#endif /* #if QT_VERSION >= 0x040500 */ +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/hbqt_qtextstream.cpp b/harbour/contrib/hbqt/hbqt_qtextstream.cpp new file mode 100644 index 0000000000..323552f5e3 --- /dev/null +++ b/harbour/contrib/hbqt/hbqt_qtextstream.cpp @@ -0,0 +1,380 @@ +/* + * $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 + + +/* + * QTextStream () + * QTextStream ( QIODevice * device ) + * QTextStream ( FILE * fileHandle, QIODevice::OpenMode openMode = QIODevice::ReadWrite ) + * QTextStream ( QString * string, QIODevice::OpenMode openMode = QIODevice::ReadWrite ) + * QTextStream ( QByteArray * array, QIODevice::OpenMode openMode = QIODevice::ReadWrite ) + * QTextStream ( const QByteArray & array, QIODevice::OpenMode openMode = QIODevice::ReadOnly ) + * virtual ~QTextStream () + */ +HB_FUNC( QT_QTEXTSTREAM ) +{ + hb_retptr( ( QTextStream* ) new QTextStream( hb_parc( 1 ), + ( QIODevice::OpenMode ) ( HB_ISNUM( 2 ) ? hb_parni( 2 ) : QIODevice::ReadWrite ) ) ); +} +/* + * QChar padChar () const + */ +HB_FUNC( QT_QTEXTSTREAM_PADCHAR ) +{ + +} + +/* + * bool atEnd () const + */ +HB_FUNC( QT_QTEXTSTREAM_ATEND ) +{ + hb_retl( hbqt_par_QTextStream( 1 )->atEnd() ); +} + +/* + * bool autoDetectUnicode () const + */ +HB_FUNC( QT_QTEXTSTREAM_AUTODETECTUNICODE ) +{ + hb_retl( hbqt_par_QTextStream( 1 )->autoDetectUnicode() ); +} + +/* + * QTextCodec * codec () const + */ +HB_FUNC( QT_QTEXTSTREAM_CODEC ) +{ + hb_retptr( ( QTextCodec* ) hbqt_par_QTextStream( 1 )->codec() ); +} + +/* + * QIODevice * device () const + */ +HB_FUNC( QT_QTEXTSTREAM_DEVICE ) +{ + hb_retptr( ( QIODevice* ) hbqt_par_QTextStream( 1 )->device() ); +} + +/* + * FieldAlignment fieldAlignment () const + */ +HB_FUNC( QT_QTEXTSTREAM_FIELDALIGNMENT ) +{ + hb_retni( ( QTextStream::FieldAlignment ) hbqt_par_QTextStream( 1 )->fieldAlignment() ); +} + +/* + * int fieldWidth () const + */ +HB_FUNC( QT_QTEXTSTREAM_FIELDWIDTH ) +{ + hb_retni( hbqt_par_QTextStream( 1 )->fieldWidth() ); +} + +/* + * void flush () + */ +HB_FUNC( QT_QTEXTSTREAM_FLUSH ) +{ + hbqt_par_QTextStream( 1 )->flush(); +} + +/* + * bool generateByteOrderMark () const + */ +HB_FUNC( QT_QTEXTSTREAM_GENERATEBYTEORDERMARK ) +{ + hb_retl( hbqt_par_QTextStream( 1 )->generateByteOrderMark() ); +} + +/* + * int integerBase () const + */ +HB_FUNC( QT_QTEXTSTREAM_INTEGERBASE ) +{ + hb_retni( hbqt_par_QTextStream( 1 )->integerBase() ); +} + +/* + * QLocale locale () const + */ +HB_FUNC( QT_QTEXTSTREAM_LOCALE ) +{ + hb_retptr( new QLocale( hbqt_par_QTextStream( 1 )->locale() ) ); +} + +/* + * NumberFlags numberFlags () const + */ +HB_FUNC( QT_QTEXTSTREAM_NUMBERFLAGS ) +{ + hb_retni( ( QTextStream::NumberFlags ) hbqt_par_QTextStream( 1 )->numberFlags() ); +} + +/* + * qint64 pos () const + */ +HB_FUNC( QT_QTEXTSTREAM_POS ) +{ + hb_retni( hbqt_par_QTextStream( 1 )->pos() ); +} + +/* + * QString read ( qint64 maxlen ) + */ +HB_FUNC( QT_QTEXTSTREAM_READ ) +{ + hb_retc( hbqt_par_QTextStream( 1 )->read( hb_parni( 2 ) ).toLatin1().data() ); +} + +/* + * QString readAll () + */ +HB_FUNC( QT_QTEXTSTREAM_READALL ) +{ + hb_retc( hbqt_par_QTextStream( 1 )->readAll().toLatin1().data() ); +} + +/* + * QString readLine ( qint64 maxlen = 0 ) + */ +HB_FUNC( QT_QTEXTSTREAM_READLINE ) +{ + hb_retc( hbqt_par_QTextStream( 1 )->readLine( ( HB_ISNIL( 2 ) ? 0 : hb_parni( 2 ) ) ).toLatin1().data() ); +} + +/* + * RealNumberNotation realNumberNotation () const + */ +HB_FUNC( QT_QTEXTSTREAM_REALNUMBERNOTATION ) +{ + hb_retni( ( QTextStream::RealNumberNotation ) hbqt_par_QTextStream( 1 )->realNumberNotation() ); +} + +/* + * int realNumberPrecision () const + */ +HB_FUNC( QT_QTEXTSTREAM_REALNUMBERPRECISION ) +{ + hb_retni( hbqt_par_QTextStream( 1 )->realNumberPrecision() ); +} + +/* + * void reset () + */ +HB_FUNC( QT_QTEXTSTREAM_RESET ) +{ + hbqt_par_QTextStream( 1 )->reset(); +} + +/* + * void resetStatus () + */ +HB_FUNC( QT_QTEXTSTREAM_RESETSTATUS ) +{ + hbqt_par_QTextStream( 1 )->resetStatus(); +} + +/* + * bool seek ( qint64 pos ) + */ +HB_FUNC( QT_QTEXTSTREAM_SEEK ) +{ + hb_retl( hbqt_par_QTextStream( 1 )->seek( hb_parni( 2 ) ) ); +} + +/* + * void setAutoDetectUnicode ( bool enabled ) + */ +HB_FUNC( QT_QTEXTSTREAM_SETAUTODETECTUNICODE ) +{ + hbqt_par_QTextStream( 1 )->setAutoDetectUnicode( hb_parl( 2 ) ); +} + +/* + * void setCodec ( QTextCodec * codec ) + */ +HB_FUNC( QT_QTEXTSTREAM_SETCODEC ) +{ + hbqt_par_QTextStream( 1 )->setCodec( hbqt_par_QTextCodec( 2 ) ); +} + +/* + * void setCodec ( const char * codecName ) + */ +HB_FUNC( QT_QTEXTSTREAM_SETCODEC_1 ) +{ + hbqt_par_QTextStream( 1 )->setCodec( hbqt_par_char( 2 ) ); +} + +/* + * void setDevice ( QIODevice * device ) + */ +HB_FUNC( QT_QTEXTSTREAM_SETDEVICE ) +{ + hbqt_par_QTextStream( 1 )->setDevice( hbqt_par_QIODevice( 2 ) ); +} + +/* + * void setFieldAlignment ( FieldAlignment mode ) + */ +HB_FUNC( QT_QTEXTSTREAM_SETFIELDALIGNMENT ) +{ + hbqt_par_QTextStream( 1 )->setFieldAlignment( ( QTextStream::FieldAlignment ) hb_parni( 2 ) ); +} + +/* + * void setFieldWidth ( int width ) + */ +HB_FUNC( QT_QTEXTSTREAM_SETFIELDWIDTH ) +{ + hbqt_par_QTextStream( 1 )->setFieldWidth( hb_parni( 2 ) ); +} + +/* + * void setGenerateByteOrderMark ( bool generate ) + */ +HB_FUNC( QT_QTEXTSTREAM_SETGENERATEBYTEORDERMARK ) +{ + hbqt_par_QTextStream( 1 )->setGenerateByteOrderMark( hb_parl( 2 ) ); +} + +/* + * void setIntegerBase ( int base ) + */ +HB_FUNC( QT_QTEXTSTREAM_SETINTEGERBASE ) +{ + hbqt_par_QTextStream( 1 )->setIntegerBase( hb_parni( 2 ) ); +} + +/* + * void setLocale ( const QLocale & locale ) + */ +HB_FUNC( QT_QTEXTSTREAM_SETLOCALE ) +{ + hbqt_par_QTextStream( 1 )->setLocale( *hbqt_par_QLocale( 2 ) ); +} + +/* + * void setNumberFlags ( NumberFlags flags ) + */ +HB_FUNC( QT_QTEXTSTREAM_SETNUMBERFLAGS ) +{ + hbqt_par_QTextStream( 1 )->setNumberFlags( ( QTextStream::NumberFlags ) hb_parni( 2 ) ); +} + +/* + * void setPadChar ( QChar ch ) + */ +HB_FUNC( QT_QTEXTSTREAM_SETPADCHAR ) +{ + hbqt_par_QTextStream( 1 )->setPadChar( hb_parni( 2 ) ); +} + +/* + * void setRealNumberNotation ( RealNumberNotation notation ) + */ +HB_FUNC( QT_QTEXTSTREAM_SETREALNUMBERNOTATION ) +{ + hbqt_par_QTextStream( 1 )->setRealNumberNotation( ( QTextStream::RealNumberNotation ) hb_parni( 2 ) ); +} + +/* + * void setRealNumberPrecision ( int precision ) + */ +HB_FUNC( QT_QTEXTSTREAM_SETREALNUMBERPRECISION ) +{ + hbqt_par_QTextStream( 1 )->setRealNumberPrecision( hb_parni( 2 ) ); +} + +/* + * void setStatus ( Status status ) + */ +HB_FUNC( QT_QTEXTSTREAM_SETSTATUS ) +{ + hbqt_par_QTextStream( 1 )->setStatus( ( QTextStream::Status ) hb_parni( 2 ) ); +} + +/* + * void skipWhiteSpace () + */ +HB_FUNC( QT_QTEXTSTREAM_SKIPWHITESPACE ) +{ + hbqt_par_QTextStream( 1 )->skipWhiteSpace(); +} + +/* + * Status status () const + */ +HB_FUNC( QT_QTEXTSTREAM_STATUS ) +{ + hb_retni( ( QTextStream::Status ) hbqt_par_QTextStream( 1 )->status() ); +} + + +/*----------------------------------------------------------------------*/ +#endif /* #if QT_VERSION >= 0x040500 */ +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/qth/QClipboard.qth b/harbour/contrib/hbqt/qth/QClipboard.qth new file mode 100644 index 0000000000..1b15192fc9 --- /dev/null +++ b/harbour/contrib/hbqt/qth/QClipboard.qth @@ -0,0 +1,113 @@ +/* + * $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 = QObject +Type = Core +New = + + + +#include +#include + +/* + * + * + */ +HB_FUNC( QT_QCLIPBOARD ) +{ + hb_retptr( ( QClipboard* ) QApplication::clipboard() ); +} + + + +enum Mode { Clipboard, Selection, FindBuffer } + + + +void clear ( Mode mode = Clipboard ) +QImage image ( Mode mode = Clipboard ) const +const QMimeData * mimeData ( Mode mode = Clipboard ) const +bool ownsClipboard () const +bool ownsFindBuffer () const +bool ownsSelection () const +QPixmap pixmap ( Mode mode = Clipboard ) const +void setImage ( const QImage & image, Mode mode = Clipboard ) +void setMimeData ( QMimeData * src, Mode mode = Clipboard ) +void setPixmap ( const QPixmap & pixmap, Mode mode = Clipboard ) +void setText ( const QString & text, Mode mode = Clipboard ) +bool supportsFindBuffer () const +bool supportsSelection () const +QString text ( Mode mode = Clipboard ) const +# +// QString text ( QString & subtype, Mode mode = Clipboard ) const +# + + + + + + +void changed ( QClipboard::Mode mode ) +void dataChanged () +void findBufferChanged () +void selectionChanged () + + + + + diff --git a/harbour/contrib/hbqt/qth/QTextBlock.qth b/harbour/contrib/hbqt/qth/QTextBlock.qth new file mode 100644 index 0000000000..56da1d0e8a --- /dev/null +++ b/harbour/contrib/hbqt/qth/QTextBlock.qth @@ -0,0 +1,119 @@ +/* + * $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 + + +/* + * QTextBlock ( const QTextBlock & other ) + */ +HB_FUNC( QT_QTEXTBLOCK ) +{ + hb_retptr( ( QTextBlock* ) new QTextBlock( *hbqt_par_QTextBlock( 1 ) ) ); +} + + + + + + +//iterator begin () const +QTextBlockFormat blockFormat () const +int blockFormatIndex () const +int blockNumber () const +QTextCharFormat charFormat () const +int charFormatIndex () const +void clearLayout () +bool contains ( int position ) const +const QTextDocument * document () const +//iterator end () const +int firstLineNumber () const +bool isValid () const +bool isVisible () const +QTextLayout * layout () const +int length () const +int lineCount () const +QTextBlock next () const +int position () const +QTextBlock previous () const +int revision () const +void setLineCount ( int count ) +void setRevision ( int rev ) +void setUserData ( QTextBlockUserData * data ) +void setUserState ( int state ) +void setVisible ( bool visible ) +QString text () const +QTextList * textList () const +QTextBlockUserData * userData () const +int userState () const + + + + + + + + + + + diff --git a/harbour/contrib/hbqt/qth/QTextBlockFormat.qth b/harbour/contrib/hbqt/qth/QTextBlockFormat.qth new file mode 100644 index 0000000000..6617cb005d --- /dev/null +++ b/harbour/contrib/hbqt/qth/QTextBlockFormat.qth @@ -0,0 +1,117 @@ +/* + * $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 + + +/* + * QTextBlockFormat () + * + */ +HB_FUNC( QT_QTEXTBLOCKFORMAT ) +{ + hb_retptr( ( QTextBlockFormat* ) new QTextBlockFormat() ); +} + + + +enum FormatType { InvalidFormat, BlockFormat, CharFormat, ListFormat, ..., UserFormat } +enum ObjectTypes { NoObject, ImageObject, TableObject, TableCellObject, UserObject } +enum PageBreakFlag { PageBreak_Auto, PageBreak_AlwaysBefore, PageBreak_AlwaysAfter } +flags PageBreakFlags +enum Property { ObjectIndex, CssFloat, LayoutDirection, OutlinePen, ..., UserProperty } + + + +Qt::Alignment alignment () const +qreal bottomMargin () const +int indent () const +bool isValid () const +qreal leftMargin () const +bool nonBreakableLines () const +PageBreakFlags pageBreakPolicy () const +qreal rightMargin () const +void setAlignment ( Qt::Alignment alignment ) +void setBottomMargin ( qreal margin ) +void setIndent ( int indentation ) +void setLeftMargin ( qreal margin ) +void setNonBreakableLines ( bool b ) +void setPageBreakPolicy ( PageBreakFlags policy ) +void setRightMargin ( qreal margin ) +void setTabPositions ( const QList & tabs ) +void setTextIndent ( qreal indent ) +void setTopMargin ( qreal margin ) +QList tabPositions () const +qreal textIndent () const +qreal topMargin () const + + + + + + + + + + + diff --git a/harbour/contrib/hbqt/qth/QTextBlockGroup.qth b/harbour/contrib/hbqt/qth/QTextBlockGroup.qth new file mode 100644 index 0000000000..11bcd422bd --- /dev/null +++ b/harbour/contrib/hbqt/qth/QTextBlockGroup.qth @@ -0,0 +1,97 @@ +/* + * $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 = + + + +#include + + +/* + * QTextBlockGroup ( QTextDocument * document ) + * ~QTextBlockGroup () + */ +HB_FUNC( QT_QTEXTBLOCKGROUP ) +{ + //hb_retptr( ( QTextBlockGroup* ) new QTextBlockGroup( hbqt_par_QTextDocument( 1 ) ) ); +} + + + + + + +//virtual void blockFormatChanged ( const QTextBlock & block ) +//virtual void blockInserted ( const QTextBlock & block ) +# +//QList blockList () const +# +//virtual void blockRemoved ( const QTextBlock & block ) + + + + + + + + + + + diff --git a/harbour/contrib/hbqt/qth/QTextBoundaryFinder.qth b/harbour/contrib/hbqt/qth/QTextBoundaryFinder.qth new file mode 100644 index 0000000000..d7cf34abe9 --- /dev/null +++ b/harbour/contrib/hbqt/qth/QTextBoundaryFinder.qth @@ -0,0 +1,108 @@ +/* + * $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 + + +/* + * QTextBoundaryFinder () + * QTextBoundaryFinder ( const QTextBoundaryFinder & other ) + * QTextBoundaryFinder ( BoundaryType type, const QString & string ) + * QTextBoundaryFinder ( BoundaryType type, const QChar * chars, int length, unsigned char * buffer = 0, int bufferSize = 0 ) + * ~QTextBoundaryFinder () + */ +HB_FUNC( QT_QTEXTBOUNDARYFINDER ) +{ + hb_retptr( ( QTextBoundaryFinder* ) new QTextBoundaryFinder() ); +} + + + +flags BoundaryReasons +enum BoundaryReason { NotAtBoundary, StartWord, EndWord } +enum BoundaryType { Grapheme, Word, Line, Sentence } + + + +BoundaryReasons boundaryReasons () const +bool isAtBoundary () const +bool isValid () const +int position () const +void setPosition ( int position ) +QString string () const +void toEnd () +int toNextBoundary () +int toPreviousBoundary () +void toStart () +BoundaryType type () const + + + + + + + + + + + diff --git a/harbour/contrib/hbqt/qth/QTextBrowser.qth b/harbour/contrib/hbqt/qth/QTextBrowser.qth new file mode 100644 index 0000000000..64280dbae3 --- /dev/null +++ b/harbour/contrib/hbqt/qth/QTextBrowser.qth @@ -0,0 +1,117 @@ +/* + * $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 = QTextEdit +Type = Core +New = pParent + + + +#include + + +/* + * QTextBrowser ( QWidget * parent = 0 ) + */ +HB_FUNC( QT_QTEXTBROWSER ) +{ + hb_retptr( ( QTextBrowser* ) new QTextBrowser( hbqt_par_QWidget( 1 ) ) ); +} + + + + + + +int backwardHistoryCount () const +void clearHistory () +int forwardHistoryCount () const +QString historyTitle ( int i ) const +QUrl historyUrl ( int i ) const +bool isBackwardAvailable () const +bool isForwardAvailable () const +virtual QVariant loadResource ( int type, const QUrl & name ) +bool openExternalLinks () const +bool openLinks () const +QStringList searchPaths () const +void setOpenExternalLinks ( bool open ) +void setOpenLinks ( bool open ) +void setSearchPaths ( const QStringList & paths ) +QUrl source () const + + + +virtual void backward () +virtual void forward () +virtual void home () +virtual void reload () +virtual void setSource ( const QUrl & name ) + + + +void anchorClicked ( const QUrl & link ) +void backwardAvailable ( bool available ) +void forwardAvailable ( bool available ) +void highlighted ( const QUrl & link ) +void highlighted ( const QString & link ) +void historyChanged () +void sourceChanged ( const QUrl & src ) + + + + + diff --git a/harbour/contrib/hbqt/qth/QTextCharFormat.qth b/harbour/contrib/hbqt/qth/QTextCharFormat.qth new file mode 100644 index 0000000000..ddead2634e --- /dev/null +++ b/harbour/contrib/hbqt/qth/QTextCharFormat.qth @@ -0,0 +1,140 @@ +/* + * $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 + + +/* + * QTextCharFormat () + * + */ +HB_FUNC( QT_QTEXTCHARFORMAT ) +{ + hb_retptr( ( QTextCharFormat* ) new QTextCharFormat() ); +} + + + +enum UnderlineStyle { NoUnderline, SingleUnderline, DashUnderline, DotLine, ..., SpellCheckUnderline } +enum VerticalAlignment { AlignNormal, AlignSuperScript, AlignSubScript, AlignMiddle, AlignBottom, AlignTop } + + + +QString anchorHref () const +QStringList anchorNames () const +QFont font () const +QFont::Capitalization fontCapitalization () const +QString fontFamily () const +bool fontFixedPitch () const +bool fontItalic () const +bool fontKerning () const +qreal fontLetterSpacing () const +bool fontOverline () const +qreal fontPointSize () const +bool fontStrikeOut () const +QFont::StyleHint fontStyleHint () const +QFont::StyleStrategy fontStyleStrategy () const +bool fontUnderline () const +int fontWeight () const +qreal fontWordSpacing () const +bool isAnchor () const +bool isValid () const +void setAnchor ( bool anchor ) +void setAnchorHref ( const QString & value ) +void setAnchorNames ( const QStringList & names ) +void setFont ( const QFont & font ) +void setFontCapitalization ( QFont::Capitalization capitalization ) +void setFontFamily ( const QString & family ) +void setFontFixedPitch ( bool fixedPitch ) +void setFontItalic ( bool italic ) +void setFontKerning ( bool enable ) +void setFontLetterSpacing ( qreal spacing ) +void setFontOverline ( bool overline ) +void setFontPointSize ( qreal size ) +void setFontStrikeOut ( bool strikeOut ) +void setFontStyleHint ( QFont::StyleHint hint, QFont::StyleStrategy strategy = QFont::PreferDefault ) +void setFontStyleStrategy ( QFont::StyleStrategy strategy ) +void setFontUnderline ( bool underline ) +void setFontWeight ( int weight ) +void setFontWordSpacing ( qreal spacing ) +void setTextOutline ( const QPen & pen ) +void setToolTip ( const QString & text ) +void setUnderlineColor ( const QColor & color ) +void setUnderlineStyle ( UnderlineStyle style ) +void setVerticalAlignment ( VerticalAlignment alignment ) +QPen textOutline () const +QString toolTip () const +QColor underlineColor () const +UnderlineStyle underlineStyle () const +VerticalAlignment verticalAlignment () const + + + + + + + + + + + diff --git a/harbour/contrib/hbqt/qth/QTextCursor.qth b/harbour/contrib/hbqt/qth/QTextCursor.qth new file mode 100644 index 0000000000..314f88dbb8 --- /dev/null +++ b/harbour/contrib/hbqt/qth/QTextCursor.qth @@ -0,0 +1,161 @@ +/* + * $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 + + +/* + * QTextCursor () + * QTextCursor ( QTextDocument * document ) + * QTextCursor ( QTextFrame * frame ) + * QTextCursor ( const QTextBlock & block ) + * QTextCursor ( const QTextCursor & cursor ) + * ~QTextCursor () + */ +HB_FUNC( QT_QTEXTCURSOR ) +{ + hb_retptr( ( QTextCursor* ) new QTextCursor() ); +} + + + +enum MoveMode { MoveAnchor, KeepAnchor } +enum MoveOperation { NoMove, Start, StartOfLine, StartOfBlock, ..., PreviousRow } +enum SelectionType { Document, BlockUnderCursor, LineUnderCursor, WordUnderCursor } + + + +int anchor () const +bool atBlockEnd () const +bool atBlockStart () const +bool atEnd () const +bool atStart () const +void beginEditBlock () +# +//QTextBlock block () const +# +QTextCharFormat blockCharFormat () const +QTextBlockFormat blockFormat () const +int blockNumber () const +QTextCharFormat charFormat () const +void clearSelection () +int columnNumber () const +QTextList * createList ( const QTextListFormat & format ) +QTextList * createList ( QTextListFormat::Style style ) +QTextFrame * currentFrame () const +QTextList * currentList () const +QTextTable * currentTable () const +void deleteChar () +void deletePreviousChar () +QTextDocument * document () const +void endEditBlock () +bool hasComplexSelection () const +bool hasSelection () const +void insertBlock () +void insertBlock ( const QTextBlockFormat & format ) +void insertBlock ( const QTextBlockFormat & format, const QTextCharFormat & charFormat ) +void insertFragment ( const QTextDocumentFragment & fragment ) +QTextFrame * insertFrame ( const QTextFrameFormat & format ) +void insertHtml ( const QString & html ) +void insertImage ( const QTextImageFormat & format ) +void insertImage ( const QTextImageFormat & format, QTextFrameFormat::Position alignment ) +void insertImage ( const QString & name ) +void insertImage ( const QImage & image, const QString & name = QString() ) +QTextList * insertList ( const QTextListFormat & format ) +QTextList * insertList ( QTextListFormat::Style style ) +QTextTable * insertTable ( int rows, int columns, const QTextTableFormat & format ) +QTextTable * insertTable ( int rows, int columns ) +void insertText ( const QString & text ) +void insertText ( const QString & text, const QTextCharFormat & format ) +bool isCopyOf ( const QTextCursor & other ) const +bool isNull () const +void joinPreviousEditBlock () +void mergeBlockCharFormat ( const QTextCharFormat & modifier ) +void mergeBlockFormat ( const QTextBlockFormat & modifier ) +void mergeCharFormat ( const QTextCharFormat & modifier ) +bool movePosition ( MoveOperation operation, MoveMode mode = MoveAnchor, int n = 1 ) +int position () const +void removeSelectedText () +void select ( SelectionType selection ) +void selectedTableCells ( int * firstRow, int * numRows, int * firstColumn, int * numColumns ) const +QString selectedText () const +QTextDocumentFragment selection () const +int selectionEnd () const +int selectionStart () const +void setBlockCharFormat ( const QTextCharFormat & format ) +void setBlockFormat ( const QTextBlockFormat & format ) +void setCharFormat ( const QTextCharFormat & format ) +void setPosition ( int pos, MoveMode m = MoveAnchor ) +void setVisualNavigation ( bool b ) +bool visualNavigation () const + + + + + + + + + + + diff --git a/harbour/contrib/hbqt/qth/QTextDecoder.qth b/harbour/contrib/hbqt/qth/QTextDecoder.qth new file mode 100644 index 0000000000..2bfcddb5ab --- /dev/null +++ b/harbour/contrib/hbqt/qth/QTextDecoder.qth @@ -0,0 +1,96 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT Source Generator for Harbour + * + * Copyright 2009 Pritpal Bedi + * www - http://www.harbour-project.org + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this software; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, + * Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/). + * + * As a special exception, the Harbour Project gives permission for + * additional uses of the text contained in its release of Harbour. + * + * The exception is that, if you link the Harbour libraries with other + * files to produce an executable, this does not by itself cause the + * resulting executable to be covered by the GNU General Public License. + * Your use of that executable is in no way restricted on account of + * linking the Harbour library code into it. + * + * This exception does not however invalidate any other reasons why + * the executable file might be covered by the GNU General Public License. + * + * This exception applies only to the code released by the Harbour + * Project under the name Harbour. If you copy code from other + * Harbour Project or Free Software Foundation releases into a copy of + * Harbour, as the General Public License permits, the exception does + * not apply to the code that you add in this way. To avoid misleading + * anyone as to the status of such modified files, you must delete + * this exception notice from them. + * + * If you write modifications of your own for Harbour, it is your choice + * whether to permit this exception to apply to your modifications. + * If you do not wish that, delete this exception notice. + * + */ +/*----------------------------------------------------------------------*/ +; +; Header File to Generate QT Wrapper Sources +; + + +Inherits = +Type = Core +New = pTextCodec + + + +#include + + +/* + * QTextDecoder ( const QTextCodec * codec ) + * ~QTextDecoder () + */ +HB_FUNC( QT_QTEXTDECODER ) +{ + hb_retptr( ( QTextDecoder* ) new QTextDecoder( hbqt_par_QTextCodec( 1 ) ) ); +} + + + + + + +QString toUnicode ( const char * chars, int len ) +//void toUnicode ( QString * target, const char * chars, int len ) +# +//QString toUnicode ( const QByteArray & ba ) +# + + + + + + + + + + + diff --git a/harbour/contrib/hbqt/qth/QTextDocument.qth b/harbour/contrib/hbqt/qth/QTextDocument.qth new file mode 100644 index 0000000000..88cdc25241 --- /dev/null +++ b/harbour/contrib/hbqt/qth/QTextDocument.qth @@ -0,0 +1,175 @@ +/* + * $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 = QObject +Type = Core +New = + + + +#include + + +/* + * QTextDocument ( QObject * parent = 0 ) + * QTextDocument ( const QString & text, QObject * parent = 0 ) + * ~QTextDocument () + */ +HB_FUNC( QT_QTEXTDOCUMENT ) +{ + hb_retptr( ( QTextDocument* ) new QTextDocument( hbqt_par_QObject( 1 ) ) ); +} + + + +enum FindFlag { FindBackward, FindCaseSensitively, FindWholeWords } +flags FindFlags +enum MetaInformation { DocumentTitle, DocumentUrl } +enum ResourceType { HtmlResource, ImageResource, StyleSheetResource, UserResource } + + + +void addResource ( int type, const QUrl & name, const QVariant & resource ) +void adjustSize () +QVector allFormats () const +QTextBlock begin () const +int blockCount () const +# +// QChar characterAt ( int pos ) const +# +int characterCount () const +virtual void clear () +QTextDocument * clone ( QObject * parent = 0 ) const +QFont defaultFont () const +QString defaultStyleSheet () const +QTextOption defaultTextOption () const +QAbstractTextDocumentLayout * documentLayout () const +qreal documentMargin () const +void drawContents ( QPainter * p, const QRectF & rect = QRectF() ) +QTextBlock end () const +QTextCursor find ( const QString & subString, const QTextCursor & cursor, FindFlags options = 0 ) const +QTextCursor find ( const QRegExp & expr, const QTextCursor & cursor, FindFlags options = 0 ) const +QTextCursor find ( const QString & subString, int position = 0, FindFlags options = 0 ) const +QTextCursor find ( const QRegExp & expr, int position = 0, FindFlags options = 0 ) const +QTextBlock findBlock ( int pos ) const +QTextBlock findBlockByLineNumber ( int lineNumber ) const +QTextBlock findBlockByNumber ( int blockNumber ) const +QTextBlock firstBlock () const +qreal idealWidth () const +qreal indentWidth () const +bool isEmpty () const +bool isModified () const +bool isRedoAvailable () const +bool isUndoAvailable () const +bool isUndoRedoEnabled () const +QTextBlock lastBlock () const +int lineCount () const +void markContentsDirty ( int position, int length ) +int maximumBlockCount () const +QString metaInformation ( MetaInformation info ) const +QTextObject * object ( int objectIndex ) const +QTextObject * objectForFormat ( const QTextFormat & f ) const +int pageCount () const +QSizeF pageSize () const +void print ( QPrinter * printer ) const +void redo ( QTextCursor * cursor ) +QVariant resource ( int type, const QUrl & name ) const +int revision () const +QTextFrame * rootFrame () const +void setDefaultFont ( const QFont & font ) +void setDefaultStyleSheet ( const QString & sheet ) +void setDefaultTextOption ( const QTextOption & option ) +void setDocumentLayout ( QAbstractTextDocumentLayout * layout ) +void setDocumentMargin ( qreal margin ) +void setHtml ( const QString & html ) +void setIndentWidth ( qreal width ) +void setMaximumBlockCount ( int maximum ) +void setMetaInformation ( MetaInformation info, const QString & string ) +void setPageSize ( const QSizeF & size ) +void setPlainText ( const QString & text ) +void setTextWidth ( qreal width ) +void setUndoRedoEnabled ( bool enable ) +void setUseDesignMetrics ( bool b ) +QSizeF size () const +qreal textWidth () const +QString toHtml ( const QByteArray & encoding = QByteArray() ) const +QString toPlainText () const +void undo ( QTextCursor * cursor ) +bool useDesignMetrics () const + + + +void redo () +void setModified ( bool m = true ) +void undo () + + + +void blockCountChanged ( int newBlockCount ) +void contentsChange ( int position, int charsRemoved, int charsAdded ) +void contentsChanged () +void cursorPositionChanged ( const QTextCursor & cursor ) +void documentLayoutChanged () +void modificationChanged ( bool changed ) +void redoAvailable ( bool available ) +void undoAvailable ( bool available ) +void undoCommandAdded () + + + + + diff --git a/harbour/contrib/hbqt/qth/QTextDocumentFragment.qth b/harbour/contrib/hbqt/qth/QTextDocumentFragment.qth new file mode 100644 index 0000000000..81611a37b4 --- /dev/null +++ b/harbour/contrib/hbqt/qth/QTextDocumentFragment.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 + + +/* + * QTextDocumentFragment () + * QTextDocumentFragment ( const QTextDocument * document ) + * QTextDocumentFragment ( const QTextCursor & cursor ) + * QTextDocumentFragment ( const QTextDocumentFragment & other ) + * ~QTextDocumentFragment () + */ +HB_FUNC( QT_QTEXTDOCUMENTFRAGMENT ) +{ + hb_retptr( ( QTextDocumentFragment* ) new QTextDocumentFragment() ); +} + + + + + + +bool isEmpty () const +QString toHtml ( const QByteArray & encoding ) const +QString toHtml () const +QString toPlainText () const + + + + + + + + + + + diff --git a/harbour/contrib/hbqt/qth/QTextDocumentWriter.qth b/harbour/contrib/hbqt/qth/QTextDocumentWriter.qth new file mode 100644 index 0000000000..256f37ea3c --- /dev/null +++ b/harbour/contrib/hbqt/qth/QTextDocumentWriter.qth @@ -0,0 +1,103 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT Source Generator for Harbour + * + * Copyright 2009 Pritpal Bedi + * www - http://www.harbour-project.org + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this software; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, + * Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/). + * + * As a special exception, the Harbour Project gives permission for + * additional uses of the text contained in its release of Harbour. + * + * The exception is that, if you link the Harbour libraries with other + * files to produce an executable, this does not by itself cause the + * resulting executable to be covered by the GNU General Public License. + * Your use of that executable is in no way restricted on account of + * linking the Harbour library code into it. + * + * This exception does not however invalidate any other reasons why + * the executable file might be covered by the GNU General Public License. + * + * This exception applies only to the code released by the Harbour + * Project under the name Harbour. If you copy code from other + * Harbour Project or Free Software Foundation releases into a copy of + * Harbour, as the General Public License permits, the exception does + * not apply to the code that you add in this way. To avoid misleading + * anyone as to the status of such modified files, you must delete + * this exception notice from them. + * + * If you write modifications of your own for Harbour, it is your choice + * whether to permit this exception to apply to your modifications. + * If you do not wish that, delete this exception notice. + * + */ +/*----------------------------------------------------------------------*/ +; +; Header File to Generate QT Wrapper Sources +; + + +Inherits = +Type = Core +New = + + + +#include + + +/* + * QTextDocumentWriter () + * QTextDocumentWriter ( QIODevice * device, const QByteArray & format ) + * QTextDocumentWriter ( const QString & fileName, const QByteArray & format = QByteArray() ) + * ~QTextDocumentWriter () + */ +HB_FUNC( QT_QTEXTDOCUMENTWRITER ) +{ + hb_retptr( ( QTextDocumentWriter* ) new QTextDocumentWriter() ); +} + + + + + + +QTextCodec * codec () const +QIODevice * device () const +QString fileName () const +QByteArray format () const +void setCodec ( QTextCodec * codec ) +void setDevice ( QIODevice * device ) +void setFileName ( const QString & fileName ) +void setFormat ( const QByteArray & format ) +bool write ( const QTextDocument * document ) +bool write ( const QTextDocumentFragment & fragment ) + + + + + + + + + + + diff --git a/harbour/contrib/hbqt/qth/QTextFormat.qth b/harbour/contrib/hbqt/qth/QTextFormat.qth new file mode 100644 index 0000000000..8d4925aa22 --- /dev/null +++ b/harbour/contrib/hbqt/qth/QTextFormat.qth @@ -0,0 +1,143 @@ +/* + * $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 = pParent + + + +#include + + +/* + * QTextFormat () + * QTextFormat ( int type ) + * QTextFormat ( const QTextFormat & other ) + * ~QTextFormat () + */ +HB_FUNC( QT_QTEXTFORMAT ) +{ + hb_retptr( ( QTextFormat* ) new QTextFormat() ); +} + + + +enum FormatType { InvalidFormat, BlockFormat, CharFormat, ListFormat, ..., UserFormat } +enum ObjectTypes { NoObject, ImageObject, TableObject, TableCellObject, UserObject } +enum PageBreakFlag { PageBreak_Auto, PageBreak_AlwaysBefore, PageBreak_AlwaysAfter } +flags PageBreakFlags +enum Property { ObjectIndex, CssFloat, LayoutDirection, OutlinePen, ..., UserProperty } + + + +QBrush background () const +bool boolProperty ( int propertyId ) const +QBrush brushProperty ( int propertyId ) const +void clearBackground () +void clearForeground () +void clearProperty ( int propertyId ) +QColor colorProperty ( int propertyId ) const +qreal doubleProperty ( int propertyId ) const +QBrush foreground () const +bool hasProperty ( int propertyId ) const +int intProperty ( int propertyId ) const +bool isBlockFormat () const +bool isCharFormat () const +bool isFrameFormat () const +bool isImageFormat () const +bool isListFormat () const +bool isTableCellFormat () const +bool isTableFormat () const +bool isValid () const +Qt::LayoutDirection layoutDirection () const +QTextLength lengthProperty ( int propertyId ) const +QVector lengthVectorProperty ( int propertyId ) const +void merge ( const QTextFormat & other ) +int objectIndex () const +int objectType () const +QPen penProperty ( int propertyId ) const +QMap properties () const +QVariant property ( int propertyId ) const +int propertyCount () const +void setBackground ( const QBrush & brush ) +void setForeground ( const QBrush & brush ) +void setLayoutDirection ( Qt::LayoutDirection direction ) +void setObjectIndex ( int index ) +void setObjectType ( int type ) +void setProperty ( int propertyId, const QVariant & value ) +void setProperty ( int propertyId, const QVector & value ) +QString stringProperty ( int propertyId ) const +QTextBlockFormat toBlockFormat () const +QTextCharFormat toCharFormat () const +QTextFrameFormat toFrameFormat () const +QTextImageFormat toImageFormat () const +QTextListFormat toListFormat () const +QTextTableCellFormat toTableCellFormat () const +QTextTableFormat toTableFormat () const +int type () const + + + + + + + + + + + diff --git a/harbour/contrib/hbqt/qth/QTextStream.qth b/harbour/contrib/hbqt/qth/QTextStream.qth new file mode 100644 index 0000000000..fede7ac98e --- /dev/null +++ b/harbour/contrib/hbqt/qth/QTextStream.qth @@ -0,0 +1,150 @@ +/* + * $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 +; + + +Type = Core +New = cText, nIOMode + + + +#include + + +/* + * QTextStream () + * QTextStream ( QIODevice * device ) + * QTextStream ( FILE * fileHandle, QIODevice::OpenMode openMode = QIODevice::ReadWrite ) + * QTextStream ( QString * string, QIODevice::OpenMode openMode = QIODevice::ReadWrite ) + * QTextStream ( QByteArray * array, QIODevice::OpenMode openMode = QIODevice::ReadWrite ) + * QTextStream ( const QByteArray & array, QIODevice::OpenMode openMode = QIODevice::ReadOnly ) + * virtual ~QTextStream () + */ +HB_FUNC( QT_QTEXTSTREAM ) +{ + hb_retptr( ( QTextStream* ) new QTextStream( hb_parc( 1 ), + ( QIODevice::OpenMode ) ( HB_ISNUM( 2 ) ? hb_parni( 2 ) : QIODevice::ReadWrite ) ) ); +} +/* + * QChar padChar () const + */ +HB_FUNC( QT_QTEXTSTREAM_PADCHAR ) +{ + +} + + + +flags NumberFlags +enum FieldAlignment { AlignLeft, AlignRight, AlignCenter, AlignAccountingStyle } +enum NumberFlag { ShowBase, ForcePoint, ForceSign, UppercaseBase, UppercaseDigits } +enum RealNumberNotation { ScientificNotation, FixedNotation, SmartNotation } +enum Status { Ok, ReadPastEnd, ReadCorruptData } + + + +bool atEnd () const +bool autoDetectUnicode () const +QTextCodec * codec () const +QIODevice * device () const +FieldAlignment fieldAlignment () const +int fieldWidth () const +void flush () +bool generateByteOrderMark () const +int integerBase () const +QLocale locale () const +NumberFlags numberFlags () const +qint64 pos () const +QString read ( qint64 maxlen ) +QString readAll () +QString readLine ( qint64 maxlen = 0 ) +RealNumberNotation realNumberNotation () const +int realNumberPrecision () const +void reset () +void resetStatus () +bool seek ( qint64 pos ) +void setAutoDetectUnicode ( bool enabled ) +void setCodec ( QTextCodec * codec ) +void setCodec ( const char * codecName ) +void setDevice ( QIODevice * device ) +void setFieldAlignment ( FieldAlignment mode ) +void setFieldWidth ( int width ) +void setGenerateByteOrderMark ( bool generate ) +void setIntegerBase ( int base ) +void setLocale ( const QLocale & locale ) +void setNumberFlags ( NumberFlags flags ) +void setPadChar ( QChar ch ) +void setRealNumberNotation ( RealNumberNotation notation ) +void setRealNumberPrecision ( int precision ) +void setStatus ( Status status ) +# +//void setString ( QString * string, QIODevice::OpenMode openMode = QIODevice::ReadWrite ) +# +void skipWhiteSpace () +Status status () const +# +//QString * string () const +# + + + + + + + + + + + diff --git a/harbour/contrib/hbqt/tests/demoqt.prg b/harbour/contrib/hbqt/tests/demoqt.prg index cf0a7edd73..18d7dfab78 100644 --- a/harbour/contrib/hbqt/tests/demoqt.prg +++ b/harbour/contrib/hbqt/tests/demoqt.prg @@ -156,7 +156,7 @@ STATIC FUNCTION Build_MenuBar( oWnd ) Qt_Connect_Signal( oMenu:addAction( "W&ebPage" ), QT_EVE_TRIGGERED_B, {|w,l| Dialogs( "WebPage" , w, l ) } ) oMenuBar:addMenu( QT_PTROF( oMenu ) ) - oMenuBar:show() + oWnd:setMenuBar( QT_PTROF( oMenuBar ) ) RETURN nil diff --git a/harbour/contrib/hbqt/tests/wvtext.prg b/harbour/contrib/hbqt/tests/wvtext.prg index 8c0d48d1c2..4ce46db297 100644 --- a/harbour/contrib/hbqt/tests/wvtext.prg +++ b/harbour/contrib/hbqt/tests/wvtext.prg @@ -14,6 +14,8 @@ //----------------------------------------------------------------------// //----------------------------------------------------------------------// +#define __GTQTC__ + #include "hbgtinfo.ch" #include "inkey.ch" #include "box.ch" @@ -43,7 +45,7 @@ STATIC nRows := 20, nCols := 60, nColorIndex := 1 #define QT_EVE_CLICKED "clicked()" /*----------------------------------------------------------------------*/ - +#if 0 INIT PROCEDURE Qt_Start() qt_qapplication() RETURN @@ -51,7 +53,7 @@ INIT PROCEDURE Qt_Start() EXIT PROCEDURE Qt_End() qt_qapplication_quit() RETURN - +#endif /*----------------------------------------------------------------------*/ FUNCTION Main() @@ -186,6 +188,9 @@ STATIC FUNCTION DispScreen() RETURN NIL //----------------------------------------------------------------------// PROCEDURE HB_GTSYS() +#ifdef __GTQTC__ + REQUEST HB_GT_QTC_DEFAULT +#endif #ifdef __GTWVG__ REQUEST HB_GT_WVG_DEFAULT #else