Files
harbour-core/harbour/contrib/hbqt/qth/QTextDocument.qth
2010-06-14 19:01:41 +00:00

172 lines
6.1 KiB
Plaintext

/*
* $Id$
*/
/*
* Harbour Project source code:
* QT Source Generator for Harbour
*
* Copyright 2009 Pritpal Bedi <pritpal@vouchcac.com>
* www - http://www.harbour-project.org
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this software; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
* Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/).
*
* As a special exception, the Harbour Project gives permission for
* additional uses of the text contained in its release of Harbour.
*
* The exception is that, if you link the Harbour libraries with other
* files to produce an executable, this does not by itself cause the
* resulting executable to be covered by the GNU General Public License.
* Your use of that executable is in no way restricted on account of
* linking the Harbour library code into it.
*
* This exception does not however invalidate any other reasons why
* the executable file might be covered by the GNU General Public License.
*
* This exception applies only to the code released by the Harbour
* Project under the name Harbour. If you copy code from other
* Harbour Project or Free Software Foundation releases into a copy of
* Harbour, as the General Public License permits, the exception does
* not apply to the code that you add in this way. To avoid misleading
* anyone as to the status of such modified files, you must delete
* this exception notice from them.
*
* If you write modifications of your own for Harbour, it is your choice
* whether to permit this exception to apply to your modifications.
* If you do not wish that, delete this exception notice.
*
*/
/*----------------------------------------------------------------------*/
;
; Header File to Generate QT Wrapper Sources
;
<CLASS>
Inherits = QObject
Type = Core
New =
</CLASS>
<CODE>
#include <QtGui/QTextDocument>
#include <QtGui/QTextBlock>
#include <QtGui/QTextCursor>
/*
* 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 ) ) );
}
</CODE>
<ENUMS>
enum FindFlag { FindBackward, FindCaseSensitively, FindWholeWords }
flags FindFlags
enum MetaInformation { DocumentTitle, DocumentUrl }
enum ResourceType { HtmlResource, ImageResource, StyleSheetResource, UserResource }
</ENUMS>
<PROTOS>
void addResource ( int type, const QUrl & name, const QVariant & resource )
void adjustSize ()
QVector<QTextFormat> 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
</PROTOS>
<SLOTS>
void redo ()
void setModified ( bool m = true )
void undo ()
</SLOTS>
<SIGNALS>
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 ()
</SIGNALS>