2009-07-10 08:19 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com)
* harbour/contrib/hbqt/generator/qt45.qtp
* harbour/contrib/hbqt/hbqt.ch
* harbour/contrib/hbqt/hbqt.h
* harbour/contrib/hbqt/hbqt_slots.cpp
* harbour/contrib/hbqt/hbqt_slots.h
* harbour/contrib/hbqt/Makefile_gen
* harbour/contrib/hbqt/moc_slots.cpp
+ harbour/contrib/hbqt/QPrintEngine.cpp
+ harbour/contrib/hbqt/QPrinter.cpp
+ harbour/contrib/hbqt/TQPrintEngine.prg
+ harbour/contrib/hbqt/TQPrinter.prg
+ harbour/contrib/hbqt/qth/QPrintEngine.qth
+ harbour/contrib/hbqt/qth/QPrinter.qth
+ Added two more classes.
+ Added one more event handler.
This commit is contained in:
@@ -17,6 +17,27 @@
|
||||
past entries belonging to author(s): Viktor Szakats.
|
||||
*/
|
||||
|
||||
2009-07-10 08:19 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com)
|
||||
* harbour/contrib/hbqt/generator/qt45.qtp
|
||||
|
||||
* harbour/contrib/hbqt/hbqt.ch
|
||||
* harbour/contrib/hbqt/hbqt.h
|
||||
* harbour/contrib/hbqt/hbqt_slots.cpp
|
||||
* harbour/contrib/hbqt/hbqt_slots.h
|
||||
* harbour/contrib/hbqt/Makefile_gen
|
||||
* harbour/contrib/hbqt/moc_slots.cpp
|
||||
|
||||
+ harbour/contrib/hbqt/QPrintEngine.cpp
|
||||
+ harbour/contrib/hbqt/QPrinter.cpp
|
||||
+ harbour/contrib/hbqt/TQPrintEngine.prg
|
||||
+ harbour/contrib/hbqt/TQPrinter.prg
|
||||
|
||||
+ harbour/contrib/hbqt/qth/QPrintEngine.qth
|
||||
+ harbour/contrib/hbqt/qth/QPrinter.qth
|
||||
|
||||
+ Added two more classes.
|
||||
+ Added one more event handler.
|
||||
|
||||
2009-07-10 16:18 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
|
||||
- examples/terminal/terminal.ch
|
||||
* examples/terminal/trm_cli.hbp
|
||||
|
||||
@@ -108,6 +108,8 @@ CPP_SOURCES=\
|
||||
QPoint.cpp \
|
||||
QPointF.cpp \
|
||||
QPrintDialog.cpp \
|
||||
QPrintEngine.cpp \
|
||||
QPrinter.cpp \
|
||||
QPrintPreviewDialog.cpp \
|
||||
QProgressBar.cpp \
|
||||
QProgressDialog.cpp \
|
||||
@@ -328,6 +330,8 @@ PRG_SOURCES=\
|
||||
TQPoint.prg \
|
||||
TQPointF.prg \
|
||||
TQPrintDialog.prg \
|
||||
TQPrintEngine.prg \
|
||||
TQPrinter.prg \
|
||||
TQPrintPreviewDialog.prg \
|
||||
TQProgressBar.prg \
|
||||
TQProgressDialog.prg \
|
||||
|
||||
126
harbour/contrib/hbqt/QPrintEngine.cpp
Normal file
126
harbour/contrib/hbqt/QPrintEngine.cpp
Normal file
@@ -0,0 +1,126 @@
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
/*
|
||||
* Harbour Project source code:
|
||||
* QT wrapper main header
|
||||
*
|
||||
* Copyright 2009 Marcos Antonio Gambeta <marcosgambeta at gmail dot com>
|
||||
* 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.
|
||||
*
|
||||
*/
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
#include "hbapi.h"
|
||||
#include "hbqt.h"
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
#if QT_VERSION >= 0x040500
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
|
||||
#include <QtGui/QPrintEngine>
|
||||
|
||||
|
||||
/*
|
||||
* virtual ~QPrintEngine ()
|
||||
*/
|
||||
HB_FUNC( QT_QPRINTENGINE )
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* virtual bool abort ()
|
||||
*/
|
||||
HB_FUNC( QT_QPRINTENGINE_ABORT )
|
||||
{
|
||||
hb_retl( hbqt_par_QPrintEngine( 1 )->abort() );
|
||||
}
|
||||
|
||||
/*
|
||||
* virtual int metric ( QPaintDevice::PaintDeviceMetric id ) const
|
||||
*/
|
||||
HB_FUNC( QT_QPRINTENGINE_METRIC )
|
||||
{
|
||||
hb_retni( hbqt_par_QPrintEngine( 1 )->metric( ( QPaintDevice::PaintDeviceMetric ) hb_parni( 2 ) ) );
|
||||
}
|
||||
|
||||
/*
|
||||
* virtual bool newPage ()
|
||||
*/
|
||||
HB_FUNC( QT_QPRINTENGINE_NEWPAGE )
|
||||
{
|
||||
hb_retl( hbqt_par_QPrintEngine( 1 )->newPage() );
|
||||
}
|
||||
|
||||
/*
|
||||
* virtual QPrinter::PrinterState printerState () const
|
||||
*/
|
||||
HB_FUNC( QT_QPRINTENGINE_PRINTERSTATE )
|
||||
{
|
||||
hb_retni( ( QPrinter::PrinterState ) hbqt_par_QPrintEngine( 1 )->printerState() );
|
||||
}
|
||||
|
||||
/*
|
||||
* virtual QVariant property ( PrintEnginePropertyKey key ) const
|
||||
*/
|
||||
HB_FUNC( QT_QPRINTENGINE_PROPERTY )
|
||||
{
|
||||
hb_retptr( new QVariant( hbqt_par_QPrintEngine( 1 )->property( ( QPrintEngine::PrintEnginePropertyKey ) hb_parni( 2 ) ) ) );
|
||||
}
|
||||
|
||||
/*
|
||||
* virtual void setProperty ( PrintEnginePropertyKey key, const QVariant & value )
|
||||
*/
|
||||
HB_FUNC( QT_QPRINTENGINE_SETPROPERTY )
|
||||
{
|
||||
hbqt_par_QPrintEngine( 1 )->setProperty( ( QPrintEngine::PrintEnginePropertyKey ) hb_parni( 2 ), *hbqt_par_QVariant( 3 ) );
|
||||
}
|
||||
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
#endif /* #if QT_VERSION >= 0x040500 */
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
556
harbour/contrib/hbqt/QPrinter.cpp
Normal file
556
harbour/contrib/hbqt/QPrinter.cpp
Normal file
@@ -0,0 +1,556 @@
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
/*
|
||||
* Harbour Project source code:
|
||||
* QT wrapper main header
|
||||
*
|
||||
* Copyright 2009 Marcos Antonio Gambeta <marcosgambeta at gmail dot com>
|
||||
* 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.
|
||||
*
|
||||
*/
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
#include "hbapi.h"
|
||||
#include "hbqt.h"
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
#if QT_VERSION >= 0x040500
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
/*
|
||||
* Constructed[ 57/59 [ 96.61% ] ]
|
||||
*
|
||||
* *** Unconvered Prototypes ***
|
||||
* -----------------------------
|
||||
*
|
||||
* QList<PaperSource> supportedPaperSources () const
|
||||
* QList<int> supportedResolutions () const
|
||||
*/
|
||||
|
||||
|
||||
#include <QtGui/QPrinter>
|
||||
|
||||
|
||||
/*
|
||||
* QPrinter ( PrinterMode mode = ScreenResolution )
|
||||
* QPrinter ( const QPrinterInfo & printer, PrinterMode mode = ScreenResolution )
|
||||
* ~QPrinter ()
|
||||
*/
|
||||
HB_FUNC( QT_QPRINTER )
|
||||
{
|
||||
hb_retptr( ( QPrinter* ) new QPrinter( QPrinter::PrinterResolution ) );
|
||||
}
|
||||
|
||||
/*
|
||||
* bool abort ()
|
||||
*/
|
||||
HB_FUNC( QT_QPRINTER_ABORT )
|
||||
{
|
||||
hb_retl( hbqt_par_QPrinter( 1 )->abort() );
|
||||
}
|
||||
|
||||
/*
|
||||
* bool collateCopies () const
|
||||
*/
|
||||
HB_FUNC( QT_QPRINTER_COLLATECOPIES )
|
||||
{
|
||||
hb_retl( hbqt_par_QPrinter( 1 )->collateCopies() );
|
||||
}
|
||||
|
||||
/*
|
||||
* ColorMode colorMode () const
|
||||
*/
|
||||
HB_FUNC( QT_QPRINTER_COLORMODE )
|
||||
{
|
||||
hb_retni( ( QPrinter::ColorMode ) hbqt_par_QPrinter( 1 )->colorMode() );
|
||||
}
|
||||
|
||||
/*
|
||||
* QString creator () const
|
||||
*/
|
||||
HB_FUNC( QT_QPRINTER_CREATOR )
|
||||
{
|
||||
hb_retc( hbqt_par_QPrinter( 1 )->creator().toLatin1().data() );
|
||||
}
|
||||
|
||||
/*
|
||||
* QString docName () const
|
||||
*/
|
||||
HB_FUNC( QT_QPRINTER_DOCNAME )
|
||||
{
|
||||
hb_retc( hbqt_par_QPrinter( 1 )->docName().toLatin1().data() );
|
||||
}
|
||||
|
||||
/*
|
||||
* bool doubleSidedPrinting () const
|
||||
*/
|
||||
HB_FUNC( QT_QPRINTER_DOUBLESIDEDPRINTING )
|
||||
{
|
||||
hb_retl( hbqt_par_QPrinter( 1 )->doubleSidedPrinting() );
|
||||
}
|
||||
|
||||
/*
|
||||
* DuplexMode duplex () const
|
||||
*/
|
||||
HB_FUNC( QT_QPRINTER_DUPLEX )
|
||||
{
|
||||
hb_retni( ( QPrinter::DuplexMode ) hbqt_par_QPrinter( 1 )->duplex() );
|
||||
}
|
||||
|
||||
/*
|
||||
* bool fontEmbeddingEnabled () const
|
||||
*/
|
||||
HB_FUNC( QT_QPRINTER_FONTEMBEDDINGENABLED )
|
||||
{
|
||||
hb_retl( hbqt_par_QPrinter( 1 )->fontEmbeddingEnabled() );
|
||||
}
|
||||
|
||||
/*
|
||||
* int fromPage () const
|
||||
*/
|
||||
HB_FUNC( QT_QPRINTER_FROMPAGE )
|
||||
{
|
||||
hb_retni( hbqt_par_QPrinter( 1 )->fromPage() );
|
||||
}
|
||||
|
||||
/*
|
||||
* bool fullPage () const
|
||||
*/
|
||||
HB_FUNC( QT_QPRINTER_FULLPAGE )
|
||||
{
|
||||
hb_retl( hbqt_par_QPrinter( 1 )->fullPage() );
|
||||
}
|
||||
|
||||
/*
|
||||
* void getPageMargins ( qreal * left, qreal * top, qreal * right, qreal * bottom, Unit unit ) const
|
||||
*/
|
||||
HB_FUNC( QT_QPRINTER_GETPAGEMARGINS )
|
||||
{
|
||||
qreal qrLeft = 0;
|
||||
qreal qrTop = 0;
|
||||
qreal qrRight = 0;
|
||||
qreal qrBottom = 0;
|
||||
|
||||
hbqt_par_QPrinter( 1 )->getPageMargins( &qrLeft, &qrTop, &qrRight, &qrBottom, ( QPrinter::Unit ) hb_parni( 6 ) );
|
||||
|
||||
hb_stornd( qrLeft, 2 );
|
||||
hb_stornd( qrTop, 3 );
|
||||
hb_stornd( qrRight, 4 );
|
||||
hb_stornd( qrBottom, 5 );
|
||||
}
|
||||
|
||||
/*
|
||||
* bool isValid () const
|
||||
*/
|
||||
HB_FUNC( QT_QPRINTER_ISVALID )
|
||||
{
|
||||
hb_retl( hbqt_par_QPrinter( 1 )->isValid() );
|
||||
}
|
||||
|
||||
/*
|
||||
* bool newPage ()
|
||||
*/
|
||||
HB_FUNC( QT_QPRINTER_NEWPAGE )
|
||||
{
|
||||
hb_retl( hbqt_par_QPrinter( 1 )->newPage() );
|
||||
}
|
||||
|
||||
/*
|
||||
* int numCopies () const
|
||||
*/
|
||||
HB_FUNC( QT_QPRINTER_NUMCOPIES )
|
||||
{
|
||||
hb_retni( hbqt_par_QPrinter( 1 )->numCopies() );
|
||||
}
|
||||
|
||||
/*
|
||||
* Orientation orientation () const
|
||||
*/
|
||||
HB_FUNC( QT_QPRINTER_ORIENTATION )
|
||||
{
|
||||
hb_retni( ( QPrinter::Orientation ) hbqt_par_QPrinter( 1 )->orientation() );
|
||||
}
|
||||
|
||||
/*
|
||||
* QString outputFileName () const
|
||||
*/
|
||||
HB_FUNC( QT_QPRINTER_OUTPUTFILENAME )
|
||||
{
|
||||
hb_retc( hbqt_par_QPrinter( 1 )->outputFileName().toLatin1().data() );
|
||||
}
|
||||
|
||||
/*
|
||||
* OutputFormat outputFormat () const
|
||||
*/
|
||||
HB_FUNC( QT_QPRINTER_OUTPUTFORMAT )
|
||||
{
|
||||
hb_retni( ( QPrinter::OutputFormat ) hbqt_par_QPrinter( 1 )->outputFormat() );
|
||||
}
|
||||
|
||||
/*
|
||||
* PageOrder pageOrder () const
|
||||
*/
|
||||
HB_FUNC( QT_QPRINTER_PAGEORDER )
|
||||
{
|
||||
hb_retni( ( QPrinter::PageOrder ) hbqt_par_QPrinter( 1 )->pageOrder() );
|
||||
}
|
||||
|
||||
/*
|
||||
* QRect pageRect () const
|
||||
*/
|
||||
HB_FUNC( QT_QPRINTER_PAGERECT )
|
||||
{
|
||||
hb_retptr( new QRect( hbqt_par_QPrinter( 1 )->pageRect() ) );
|
||||
}
|
||||
|
||||
/*
|
||||
* QRectF pageRect ( Unit unit ) const
|
||||
*/
|
||||
HB_FUNC( QT_QPRINTER_PAGERECT_1 )
|
||||
{
|
||||
hb_retptr( new QRectF( hbqt_par_QPrinter( 1 )->pageRect( ( QPrinter::Unit ) hb_parni( 2 ) ) ) );
|
||||
}
|
||||
|
||||
/*
|
||||
* virtual QPaintEngine * paintEngine () const
|
||||
*/
|
||||
HB_FUNC( QT_QPRINTER_PAINTENGINE )
|
||||
{
|
||||
hb_retptr( ( QPaintEngine* ) hbqt_par_QPrinter( 1 )->paintEngine() );
|
||||
}
|
||||
|
||||
/*
|
||||
* QRect paperRect () const
|
||||
*/
|
||||
HB_FUNC( QT_QPRINTER_PAPERRECT )
|
||||
{
|
||||
hb_retptr( new QRect( hbqt_par_QPrinter( 1 )->paperRect() ) );
|
||||
}
|
||||
|
||||
/*
|
||||
* QRectF paperRect ( Unit unit ) const
|
||||
*/
|
||||
HB_FUNC( QT_QPRINTER_PAPERRECT_1 )
|
||||
{
|
||||
hb_retptr( new QRectF( hbqt_par_QPrinter( 1 )->paperRect( ( QPrinter::Unit ) hb_parni( 2 ) ) ) );
|
||||
}
|
||||
|
||||
/*
|
||||
* PaperSize paperSize () const
|
||||
*/
|
||||
HB_FUNC( QT_QPRINTER_PAPERSIZE )
|
||||
{
|
||||
hb_retni( ( QPrinter::PaperSize ) hbqt_par_QPrinter( 1 )->paperSize() );
|
||||
}
|
||||
|
||||
/*
|
||||
* QSizeF paperSize ( Unit unit ) const
|
||||
*/
|
||||
HB_FUNC( QT_QPRINTER_PAPERSIZE_1 )
|
||||
{
|
||||
hb_retptr( new QSizeF( hbqt_par_QPrinter( 1 )->paperSize( ( QPrinter::Unit ) hb_parni( 2 ) ) ) );
|
||||
}
|
||||
|
||||
/*
|
||||
* PaperSource paperSource () const
|
||||
*/
|
||||
HB_FUNC( QT_QPRINTER_PAPERSOURCE )
|
||||
{
|
||||
hb_retni( ( QPrinter::PaperSource ) hbqt_par_QPrinter( 1 )->paperSource() );
|
||||
}
|
||||
|
||||
/*
|
||||
* QPrintEngine * printEngine () const
|
||||
*/
|
||||
HB_FUNC( QT_QPRINTER_PRINTENGINE )
|
||||
{
|
||||
hb_retptr( ( QPrintEngine* ) hbqt_par_QPrinter( 1 )->printEngine() );
|
||||
}
|
||||
|
||||
/*
|
||||
* QString printProgram () const
|
||||
*/
|
||||
HB_FUNC( QT_QPRINTER_PRINTPROGRAM )
|
||||
{
|
||||
hb_retc( hbqt_par_QPrinter( 1 )->printProgram().toLatin1().data() );
|
||||
}
|
||||
|
||||
/*
|
||||
* PrintRange printRange () const
|
||||
*/
|
||||
HB_FUNC( QT_QPRINTER_PRINTRANGE )
|
||||
{
|
||||
hb_retni( ( QPrinter::PrintRange ) hbqt_par_QPrinter( 1 )->printRange() );
|
||||
}
|
||||
|
||||
/*
|
||||
* QString printerName () const
|
||||
*/
|
||||
HB_FUNC( QT_QPRINTER_PRINTERNAME )
|
||||
{
|
||||
hb_retc( hbqt_par_QPrinter( 1 )->printerName().toLatin1().data() );
|
||||
}
|
||||
|
||||
/*
|
||||
* PrinterState printerState () const
|
||||
*/
|
||||
HB_FUNC( QT_QPRINTER_PRINTERSTATE )
|
||||
{
|
||||
hb_retni( ( QPrinter::PrinterState ) hbqt_par_QPrinter( 1 )->printerState() );
|
||||
}
|
||||
|
||||
/*
|
||||
* int resolution () const
|
||||
*/
|
||||
HB_FUNC( QT_QPRINTER_RESOLUTION )
|
||||
{
|
||||
hb_retni( hbqt_par_QPrinter( 1 )->resolution() );
|
||||
}
|
||||
|
||||
/*
|
||||
* void setCollateCopies ( bool collate )
|
||||
*/
|
||||
HB_FUNC( QT_QPRINTER_SETCOLLATECOPIES )
|
||||
{
|
||||
hbqt_par_QPrinter( 1 )->setCollateCopies( hb_parl( 2 ) );
|
||||
}
|
||||
|
||||
/*
|
||||
* void setColorMode ( ColorMode newColorMode )
|
||||
*/
|
||||
HB_FUNC( QT_QPRINTER_SETCOLORMODE )
|
||||
{
|
||||
hbqt_par_QPrinter( 1 )->setColorMode( ( QPrinter::ColorMode ) hb_parni( 2 ) );
|
||||
}
|
||||
|
||||
/*
|
||||
* void setCreator ( const QString & creator )
|
||||
*/
|
||||
HB_FUNC( QT_QPRINTER_SETCREATOR )
|
||||
{
|
||||
hbqt_par_QPrinter( 1 )->setCreator( hbqt_par_QString( 2 ) );
|
||||
}
|
||||
|
||||
/*
|
||||
* void setDocName ( const QString & name )
|
||||
*/
|
||||
HB_FUNC( QT_QPRINTER_SETDOCNAME )
|
||||
{
|
||||
hbqt_par_QPrinter( 1 )->setDocName( hbqt_par_QString( 2 ) );
|
||||
}
|
||||
|
||||
/*
|
||||
* void setDoubleSidedPrinting ( bool doubleSided )
|
||||
*/
|
||||
HB_FUNC( QT_QPRINTER_SETDOUBLESIDEDPRINTING )
|
||||
{
|
||||
hbqt_par_QPrinter( 1 )->setDoubleSidedPrinting( hb_parl( 2 ) );
|
||||
}
|
||||
|
||||
/*
|
||||
* void setDuplex ( DuplexMode duplex )
|
||||
*/
|
||||
HB_FUNC( QT_QPRINTER_SETDUPLEX )
|
||||
{
|
||||
hbqt_par_QPrinter( 1 )->setDuplex( ( QPrinter::DuplexMode ) hb_parni( 2 ) );
|
||||
}
|
||||
|
||||
/*
|
||||
* void setFontEmbeddingEnabled ( bool enable )
|
||||
*/
|
||||
HB_FUNC( QT_QPRINTER_SETFONTEMBEDDINGENABLED )
|
||||
{
|
||||
hbqt_par_QPrinter( 1 )->setFontEmbeddingEnabled( hb_parl( 2 ) );
|
||||
}
|
||||
|
||||
/*
|
||||
* void setFromTo ( int from, int to )
|
||||
*/
|
||||
HB_FUNC( QT_QPRINTER_SETFROMTO )
|
||||
{
|
||||
hbqt_par_QPrinter( 1 )->setFromTo( hb_parni( 2 ), hb_parni( 3 ) );
|
||||
}
|
||||
|
||||
/*
|
||||
* void setFullPage ( bool fp )
|
||||
*/
|
||||
HB_FUNC( QT_QPRINTER_SETFULLPAGE )
|
||||
{
|
||||
hbqt_par_QPrinter( 1 )->setFullPage( hb_parl( 2 ) );
|
||||
}
|
||||
|
||||
/*
|
||||
* void setNumCopies ( int numCopies )
|
||||
*/
|
||||
HB_FUNC( QT_QPRINTER_SETNUMCOPIES )
|
||||
{
|
||||
hbqt_par_QPrinter( 1 )->setNumCopies( hb_parni( 2 ) );
|
||||
}
|
||||
|
||||
/*
|
||||
* void setOrientation ( Orientation orientation )
|
||||
*/
|
||||
HB_FUNC( QT_QPRINTER_SETORIENTATION )
|
||||
{
|
||||
hbqt_par_QPrinter( 1 )->setOrientation( ( QPrinter::Orientation ) hb_parni( 2 ) );
|
||||
}
|
||||
|
||||
/*
|
||||
* void setOutputFileName ( const QString & fileName )
|
||||
*/
|
||||
HB_FUNC( QT_QPRINTER_SETOUTPUTFILENAME )
|
||||
{
|
||||
hbqt_par_QPrinter( 1 )->setOutputFileName( hbqt_par_QString( 2 ) );
|
||||
}
|
||||
|
||||
/*
|
||||
* void setOutputFormat ( OutputFormat format )
|
||||
*/
|
||||
HB_FUNC( QT_QPRINTER_SETOUTPUTFORMAT )
|
||||
{
|
||||
hbqt_par_QPrinter( 1 )->setOutputFormat( ( QPrinter::OutputFormat ) hb_parni( 2 ) );
|
||||
}
|
||||
|
||||
/*
|
||||
* void setPageMargins ( qreal left, qreal top, qreal right, qreal bottom, Unit unit )
|
||||
*/
|
||||
HB_FUNC( QT_QPRINTER_SETPAGEMARGINS )
|
||||
{
|
||||
hbqt_par_QPrinter( 1 )->setPageMargins( hb_parnd( 2 ), hb_parnd( 3 ), hb_parnd( 4 ), hb_parnd( 5 ), ( QPrinter::Unit ) hb_parni( 6 ) );
|
||||
}
|
||||
|
||||
/*
|
||||
* void setPageOrder ( PageOrder pageOrder )
|
||||
*/
|
||||
HB_FUNC( QT_QPRINTER_SETPAGEORDER )
|
||||
{
|
||||
hbqt_par_QPrinter( 1 )->setPageOrder( ( QPrinter::PageOrder ) hb_parni( 2 ) );
|
||||
}
|
||||
|
||||
/*
|
||||
* void setPaperSize ( PaperSize newPaperSize )
|
||||
*/
|
||||
HB_FUNC( QT_QPRINTER_SETPAPERSIZE )
|
||||
{
|
||||
hbqt_par_QPrinter( 1 )->setPaperSize( ( QPrinter::PaperSize ) hb_parni( 2 ) );
|
||||
}
|
||||
|
||||
/*
|
||||
* void setPaperSize ( const QSizeF & paperSize, Unit unit )
|
||||
*/
|
||||
HB_FUNC( QT_QPRINTER_SETPAPERSIZE_1 )
|
||||
{
|
||||
hbqt_par_QPrinter( 1 )->setPaperSize( *hbqt_par_QSizeF( 2 ), ( QPrinter::Unit ) hb_parni( 3 ) );
|
||||
}
|
||||
|
||||
/*
|
||||
* void setPaperSource ( PaperSource source )
|
||||
*/
|
||||
HB_FUNC( QT_QPRINTER_SETPAPERSOURCE )
|
||||
{
|
||||
hbqt_par_QPrinter( 1 )->setPaperSource( ( QPrinter::PaperSource ) hb_parni( 2 ) );
|
||||
}
|
||||
|
||||
/*
|
||||
* void setPrintProgram ( const QString & printProg )
|
||||
*/
|
||||
HB_FUNC( QT_QPRINTER_SETPRINTPROGRAM )
|
||||
{
|
||||
hbqt_par_QPrinter( 1 )->setPrintProgram( hbqt_par_QString( 2 ) );
|
||||
}
|
||||
|
||||
/*
|
||||
* void setPrintRange ( PrintRange range )
|
||||
*/
|
||||
HB_FUNC( QT_QPRINTER_SETPRINTRANGE )
|
||||
{
|
||||
hbqt_par_QPrinter( 1 )->setPrintRange( ( QPrinter::PrintRange ) hb_parni( 2 ) );
|
||||
}
|
||||
|
||||
/*
|
||||
* void setPrinterName ( const QString & name )
|
||||
*/
|
||||
HB_FUNC( QT_QPRINTER_SETPRINTERNAME )
|
||||
{
|
||||
hbqt_par_QPrinter( 1 )->setPrinterName( hbqt_par_QString( 2 ) );
|
||||
}
|
||||
|
||||
/*
|
||||
* void setResolution ( int dpi )
|
||||
*/
|
||||
HB_FUNC( QT_QPRINTER_SETRESOLUTION )
|
||||
{
|
||||
hbqt_par_QPrinter( 1 )->setResolution( hb_parni( 2 ) );
|
||||
}
|
||||
|
||||
/*
|
||||
* void setWinPageSize ( int pageSize )
|
||||
*/
|
||||
HB_FUNC( QT_QPRINTER_SETWINPAGESIZE )
|
||||
{
|
||||
hbqt_par_QPrinter( 1 )->setWinPageSize( hb_parni( 2 ) );
|
||||
}
|
||||
|
||||
/*
|
||||
* int toPage () const
|
||||
*/
|
||||
HB_FUNC( QT_QPRINTER_TOPAGE )
|
||||
{
|
||||
hb_retni( hbqt_par_QPrinter( 1 )->toPage() );
|
||||
}
|
||||
|
||||
/*
|
||||
* int winPageSize () const
|
||||
*/
|
||||
HB_FUNC( QT_QPRINTER_WINPAGESIZE )
|
||||
{
|
||||
hb_retni( hbqt_par_QPrinter( 1 )->winPageSize() );
|
||||
}
|
||||
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
#endif /* #if QT_VERSION >= 0x040500 */
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
86
harbour/contrib/hbqt/TQPrintEngine.prg
Normal file
86
harbour/contrib/hbqt/TQPrintEngine.prg
Normal file
@@ -0,0 +1,86 @@
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
/*
|
||||
* Harbour Project source code:
|
||||
* QT wrapper main header
|
||||
*
|
||||
* Copyright 2009 Marcos Antonio Gambeta <marcosgambeta at gmail dot com>
|
||||
* 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.
|
||||
*
|
||||
*/
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
|
||||
#include "hbclass.ch"
|
||||
|
||||
|
||||
CREATE CLASS QPrintEngine
|
||||
|
||||
VAR pParent
|
||||
VAR pPtr
|
||||
|
||||
METHOD New()
|
||||
|
||||
METHOD abort() INLINE Qt_QPrintEngine_abort( ::pPtr )
|
||||
METHOD metric( nId ) INLINE Qt_QPrintEngine_metric( ::pPtr, nId )
|
||||
METHOD newPage() INLINE Qt_QPrintEngine_newPage( ::pPtr )
|
||||
METHOD printerState() INLINE Qt_QPrintEngine_printerState( ::pPtr )
|
||||
METHOD property( nKey ) INLINE Qt_QPrintEngine_property( ::pPtr, nKey )
|
||||
METHOD setProperty( nKey, pValue ) INLINE Qt_QPrintEngine_setProperty( ::pPtr, nKey, pValue )
|
||||
|
||||
ENDCLASS
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
METHOD New( pParent ) CLASS QPrintEngine
|
||||
|
||||
::pParent := pParent
|
||||
|
||||
::pPtr := Qt_QPrintEngine( pParent )
|
||||
|
||||
RETURN Self
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
137
harbour/contrib/hbqt/TQPrinter.prg
Normal file
137
harbour/contrib/hbqt/TQPrinter.prg
Normal file
@@ -0,0 +1,137 @@
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
/*
|
||||
* Harbour Project source code:
|
||||
* QT wrapper main header
|
||||
*
|
||||
* Copyright 2009 Marcos Antonio Gambeta <marcosgambeta at gmail dot com>
|
||||
* 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.
|
||||
*
|
||||
*/
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
|
||||
#include "hbclass.ch"
|
||||
|
||||
|
||||
CREATE CLASS QPrinter INHERIT QPaintDevice
|
||||
|
||||
VAR pParent
|
||||
VAR pPtr
|
||||
|
||||
METHOD New()
|
||||
|
||||
METHOD abort() INLINE Qt_QPrinter_abort( ::pPtr )
|
||||
METHOD collateCopies() INLINE Qt_QPrinter_collateCopies( ::pPtr )
|
||||
METHOD colorMode() INLINE Qt_QPrinter_colorMode( ::pPtr )
|
||||
METHOD creator() INLINE Qt_QPrinter_creator( ::pPtr )
|
||||
METHOD docName() INLINE Qt_QPrinter_docName( ::pPtr )
|
||||
METHOD doubleSidedPrinting() INLINE Qt_QPrinter_doubleSidedPrinting( ::pPtr )
|
||||
METHOD duplex() INLINE Qt_QPrinter_duplex( ::pPtr )
|
||||
METHOD fontEmbeddingEnabled() INLINE Qt_QPrinter_fontEmbeddingEnabled( ::pPtr )
|
||||
METHOD fromPage() INLINE Qt_QPrinter_fromPage( ::pPtr )
|
||||
METHOD fullPage() INLINE Qt_QPrinter_fullPage( ::pPtr )
|
||||
METHOD getPageMargins( nLeft, nTop, nRight, nBottom, nUnit ) INLINE Qt_QPrinter_getPageMargins( ::pPtr, nLeft, nTop, nRight, nBottom, nUnit )
|
||||
METHOD isValid() INLINE Qt_QPrinter_isValid( ::pPtr )
|
||||
METHOD newPage() INLINE Qt_QPrinter_newPage( ::pPtr )
|
||||
METHOD numCopies() INLINE Qt_QPrinter_numCopies( ::pPtr )
|
||||
METHOD orientation() INLINE Qt_QPrinter_orientation( ::pPtr )
|
||||
METHOD outputFileName() INLINE Qt_QPrinter_outputFileName( ::pPtr )
|
||||
METHOD outputFormat() INLINE Qt_QPrinter_outputFormat( ::pPtr )
|
||||
METHOD pageOrder() INLINE Qt_QPrinter_pageOrder( ::pPtr )
|
||||
METHOD pageRect() INLINE Qt_QPrinter_pageRect( ::pPtr )
|
||||
METHOD pageRect_1( nUnit ) INLINE Qt_QPrinter_pageRect_1( ::pPtr, nUnit )
|
||||
METHOD paintEngine() INLINE Qt_QPrinter_paintEngine( ::pPtr )
|
||||
METHOD paperRect() INLINE Qt_QPrinter_paperRect( ::pPtr )
|
||||
METHOD paperRect_1( nUnit ) INLINE Qt_QPrinter_paperRect_1( ::pPtr, nUnit )
|
||||
METHOD paperSize() INLINE Qt_QPrinter_paperSize( ::pPtr )
|
||||
METHOD paperSize_1( nUnit ) INLINE Qt_QPrinter_paperSize_1( ::pPtr, nUnit )
|
||||
METHOD paperSource() INLINE Qt_QPrinter_paperSource( ::pPtr )
|
||||
METHOD printEngine() INLINE Qt_QPrinter_printEngine( ::pPtr )
|
||||
METHOD printProgram() INLINE Qt_QPrinter_printProgram( ::pPtr )
|
||||
METHOD printRange() INLINE Qt_QPrinter_printRange( ::pPtr )
|
||||
METHOD printerName() INLINE Qt_QPrinter_printerName( ::pPtr )
|
||||
METHOD printerState() INLINE Qt_QPrinter_printerState( ::pPtr )
|
||||
METHOD resolution() INLINE Qt_QPrinter_resolution( ::pPtr )
|
||||
METHOD setCollateCopies( lCollate ) INLINE Qt_QPrinter_setCollateCopies( ::pPtr, lCollate )
|
||||
METHOD setColorMode( nNewColorMode ) INLINE Qt_QPrinter_setColorMode( ::pPtr, nNewColorMode )
|
||||
METHOD setCreator( cCreator ) INLINE Qt_QPrinter_setCreator( ::pPtr, cCreator )
|
||||
METHOD setDocName( cName ) INLINE Qt_QPrinter_setDocName( ::pPtr, cName )
|
||||
METHOD setDoubleSidedPrinting( lDoubleSided ) INLINE Qt_QPrinter_setDoubleSidedPrinting( ::pPtr, lDoubleSided )
|
||||
METHOD setDuplex( nDuplex ) INLINE Qt_QPrinter_setDuplex( ::pPtr, nDuplex )
|
||||
METHOD setFontEmbeddingEnabled( lEnable ) INLINE Qt_QPrinter_setFontEmbeddingEnabled( ::pPtr, lEnable )
|
||||
METHOD setFromTo( nFrom, nTo ) INLINE Qt_QPrinter_setFromTo( ::pPtr, nFrom, nTo )
|
||||
METHOD setFullPage( lFp ) INLINE Qt_QPrinter_setFullPage( ::pPtr, lFp )
|
||||
METHOD setNumCopies( nNumCopies ) INLINE Qt_QPrinter_setNumCopies( ::pPtr, nNumCopies )
|
||||
METHOD setOrientation( nOrientation ) INLINE Qt_QPrinter_setOrientation( ::pPtr, nOrientation )
|
||||
METHOD setOutputFileName( cFileName ) INLINE Qt_QPrinter_setOutputFileName( ::pPtr, cFileName )
|
||||
METHOD setOutputFormat( nFormat ) INLINE Qt_QPrinter_setOutputFormat( ::pPtr, nFormat )
|
||||
METHOD setPageMargins( nLeft, nTop, nRight, nBottom, nUnit ) INLINE Qt_QPrinter_setPageMargins( ::pPtr, nLeft, nTop, nRight, nBottom, nUnit )
|
||||
METHOD setPageOrder( nPageOrder ) INLINE Qt_QPrinter_setPageOrder( ::pPtr, nPageOrder )
|
||||
METHOD setPaperSize( nNewPaperSize ) INLINE Qt_QPrinter_setPaperSize( ::pPtr, nNewPaperSize )
|
||||
METHOD setPaperSize_1( pPaperSize, nUnit ) INLINE Qt_QPrinter_setPaperSize_1( ::pPtr, pPaperSize, nUnit )
|
||||
METHOD setPaperSource( nSource ) INLINE Qt_QPrinter_setPaperSource( ::pPtr, nSource )
|
||||
METHOD setPrintProgram( cPrintProg ) INLINE Qt_QPrinter_setPrintProgram( ::pPtr, cPrintProg )
|
||||
METHOD setPrintRange( nRange ) INLINE Qt_QPrinter_setPrintRange( ::pPtr, nRange )
|
||||
METHOD setPrinterName( cName ) INLINE Qt_QPrinter_setPrinterName( ::pPtr, cName )
|
||||
METHOD setResolution( nDpi ) INLINE Qt_QPrinter_setResolution( ::pPtr, nDpi )
|
||||
METHOD setWinPageSize( nPageSize ) INLINE Qt_QPrinter_setWinPageSize( ::pPtr, nPageSize )
|
||||
METHOD toPage() INLINE Qt_QPrinter_toPage( ::pPtr )
|
||||
METHOD winPageSize() INLINE Qt_QPrinter_winPageSize( ::pPtr )
|
||||
|
||||
ENDCLASS
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
METHOD New( pParent ) CLASS QPrinter
|
||||
|
||||
::pParent := pParent
|
||||
|
||||
::pPtr := Qt_QPrinter( pParent )
|
||||
|
||||
RETURN Self
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
@@ -111,6 +111,8 @@ QPixmap.qth
|
||||
QPoint.qth
|
||||
QPointF.qth
|
||||
QPrintDialog.qth
|
||||
QPrintEngine.qth
|
||||
QPrinter.qth
|
||||
QPrintPreviewDialog.qth
|
||||
QProgressBar.qth
|
||||
QProgressDialog.qth
|
||||
|
||||
@@ -1685,45 +1685,233 @@
|
||||
#define QFont_Black 87
|
||||
|
||||
|
||||
#define QFileDialog_AcceptOpen 0
|
||||
#define QFileDialog_AcceptSave 1
|
||||
#define QFileDialog_AcceptOpen 0
|
||||
#define QFileDialog_AcceptSave 1
|
||||
|
||||
// enum #define QFileDialog_DialogLabel
|
||||
//
|
||||
#define QFileDialog_LookIn 0
|
||||
#define QFileDialog_FileName 1
|
||||
#define QFileDialog_FileType 2
|
||||
#define QFileDialog_Accept 3
|
||||
#define QFileDialog_Reject 4
|
||||
#define QFileDialog_LookIn 0
|
||||
#define QFileDialog_FileName 1
|
||||
#define QFileDialog_FileType 2
|
||||
#define QFileDialog_Accept 3
|
||||
#define QFileDialog_Reject 4
|
||||
|
||||
// enum #define QFileDialog_FileMode
|
||||
// This enum is used to indicate what the user may select in the file dialog;
|
||||
// i.e. what the dialog will return if the user clicks OK.
|
||||
//
|
||||
#define QFileDialog_AnyFile 0 // The name of a file, whether it exists or not.
|
||||
#define QFileDialog_ExistingFile 1 // The name of a single existing file.
|
||||
#define QFileDialog_Directory 2 // The name of a directory. Both files and directories are displayed.
|
||||
#define QFileDialog_ExistingFiles 3 // The names of zero or more existing files.
|
||||
#define QFileDialog_AnyFile 0 // The name of a file, whether it exists or not.
|
||||
#define QFileDialog_ExistingFile 1 // The name of a single existing file.
|
||||
#define QFileDialog_Directory 2 // The name of a directory. Both files and directories are displayed.
|
||||
#define QFileDialog_ExistingFiles 3 // The names of zero or more existing files.
|
||||
|
||||
// The Options type is a typedef for QFlags<Option>. It stores an OR combination of Option values.
|
||||
//
|
||||
#define QFileDialog_ShowDirsOnly 0x00000001 // Only show directories in the file dialog. By default both files and directories are shown. (Valid only in the Directory file mode.)
|
||||
#define QFileDialog_DontResolveSymlinks 0x00000002 // Don't resolve symlinks in the file dialog. By default symlinks are resolved.
|
||||
#define QFileDialog_DontConfirmOverwrite 0x00000004 // Don't ask for confirmation if an existing file is selected. By default confirmation is requested.
|
||||
#define QFileDialog_DontUseNativeDialog 0x00000010 // Don't use the native file dialog. By default on Mac OS X and Windows, the native file dialog is used.
|
||||
#define QFileDialog_ReadOnly 0x00000020 // Indicates that the model is readonly.
|
||||
#define QFileDialog_HideNameFilterDetails 0x00000040 // Indicates if the is hidden or not.
|
||||
#define QFileDialog_ShowDirsOnly 0x00000001 // Only show directories in the file dialog. By default both files and directories are shown. (Valid only in the Directory file mode.)
|
||||
#define QFileDialog_DontResolveSymlinks 0x00000002 // Don't resolve symlinks in the file dialog. By default symlinks are resolved.
|
||||
#define QFileDialog_DontConfirmOverwrite 0x00000004 // Don't ask for confirmation if an existing file is selected. By default confirmation is requested.
|
||||
#define QFileDialog_DontUseNativeDialog 0x00000010 // Don't use the native file dialog. By default on Mac OS X and Windows, the native file dialog is used.
|
||||
#define QFileDialog_ReadOnly 0x00000020 // Indicates that the model is readonly.
|
||||
#define QFileDialog_HideNameFilterDetails 0x00000040 // Indicates if the is hidden or not.
|
||||
|
||||
//enum QFileDialog::ViewMode
|
||||
//This enum describes the view mode of the file dialog; i.e. what information about each file will be displayed.
|
||||
//
|
||||
#define QFileDialog_Detail 0 // Displays an icon, a name, and details for each item in the directory.
|
||||
#define QFileDialog_List 1 // Displays only an icon and a name for each item in the directory.
|
||||
#define QFileDialog_Detail 0 // Displays an icon, a name, and details for each item in the directory.
|
||||
#define QFileDialog_List 1 // Displays only an icon and a name for each item in the directory.
|
||||
|
||||
#define QDialog_Accepted 1
|
||||
#define QDialog_Rejected 0
|
||||
#define QDialog_Accepted 1
|
||||
#define QDialog_Rejected 0
|
||||
|
||||
|
||||
// enum QAbstractPrintDialog::PrintDialogOption
|
||||
// flags QAbstractPrintDialog::PrintDialogOptions
|
||||
// Used to specify which parts of the print dialog should be visible.
|
||||
// The PrintDialogOptions type is a typedef for QFlags<PrintDialogOption>.
|
||||
// It stores an OR combination of PrintDialogOption values.
|
||||
//
|
||||
#define QAbstractPrintDialog_None 0x0000 // None of the options are enabled.
|
||||
#define QAbstractPrintDialog_PrintToFile 0x0001 // The print to file option is enabled.
|
||||
#define QAbstractPrintDialog_PrintSelection 0x0002 // The print selection option is enabled.
|
||||
#define QAbstractPrintDialog_PrintPageRange 0x0004 // The page range selection option is enabled.
|
||||
#define QAbstractPrintDialog_PrintCollateCopies 0x0010
|
||||
|
||||
// enum QAbstractPrintDialog::PrintRange
|
||||
// Used to specify the print range selection option.
|
||||
//
|
||||
#define QAbstractPrintDialog_AllPages 0 // All pages should be printed.
|
||||
#define QAbstractPrintDialog_Selection 1 // Only the selection should be printed.
|
||||
#define QAbstractPrintDialog_PageRange 2 // The specified page range should be printed.
|
||||
|
||||
// enum QPrinter::ColorMode
|
||||
// This enum type is used to indicate whether QPrinter should print in color or not.
|
||||
//
|
||||
#define QPrinter_Color 1 // print in color if available, otherwise in grayscale.
|
||||
#define QPrinter_GrayScale 0 // print in grayscale, even on color printers.
|
||||
|
||||
// enum QPrinter::DuplexMode
|
||||
// This enum is used to indicate whether printing will occur on one or both sides of each sheet of paper (simplex or duplex printing).
|
||||
//
|
||||
#define QPrinter_DuplexNone 0 // Single sided (simplex) printing only.
|
||||
#define QPrinter_DuplexAuto 1 // The printer's default setting is used to determine whether duplex printing is used.
|
||||
#define QPrinter_DuplexLongSide 2 // Both sides of each sheet of paper are used for printing. The paper is turned over its longest edge before the second side is printed
|
||||
#define QPrinter_DuplexShortSide 3 // Both sides of each sheet of paper are used for printing. The paper is turned over its shortest edge before the second side is printed
|
||||
|
||||
// enum QPrinter::Orientation
|
||||
// This enum type (not to be confused with Orientation) is used to specify each page's orientation.
|
||||
//
|
||||
#define QPrinter_Portrait 0 // the page's height is greater than its width.
|
||||
#define QPrinter_Landscape 1 // the page's width is greater than its height.
|
||||
// This type interacts with QPrinter::PaperSize and QPrinter::setFullPage()
|
||||
// to determine the final size of the page available to the application.
|
||||
|
||||
// enum QPrinter::OutputFormat
|
||||
// The OutputFormat enum is used to describe the format QPrinter should use for printing.
|
||||
//
|
||||
#define QPrinter_NativeFormat 0 // QPrinter will print output using a method defined by the platform it is running on. This mode is the default when printing directly to a printer.
|
||||
#define QPrinter_PdfFormat 1 // QPrinter will generate its output as a searchable PDF file. This mode is the default when printing to a file.
|
||||
#define QPrinter_PostScriptFormat 2 // QPrinter will generate its output as in the PostScript format. (This feature was introduced in Qt 4.2.)
|
||||
|
||||
// enum QPrinter::PageOrder
|
||||
// This enum type is used by QPrinter to tell the application program how to print.
|
||||
//
|
||||
#define QPrinter_FirstPageFirst 0 // the lowest-numbered page should be printed first.
|
||||
#define QPrinter_LastPageFirst 1 // the highest-numbered page should be printed first.
|
||||
|
||||
// enum QPrinter::PaperSize
|
||||
// This enum type specifies what paper size QPrinter should use.
|
||||
// QPrinter does not check that the paper size is available; it just uses this information,
|
||||
// together with QPrinter::Orientation and QPrinter::setFullPage(), to determine the printable area.
|
||||
//
|
||||
// The defined sizes (with setFullPage(true)) are:
|
||||
//
|
||||
#define QPrinter_A0 5 // 841 x 1189 mm
|
||||
#define QPrinter_A1 6 // 594 x 841 mm
|
||||
#define QPrinter_A2 7 // 420 x 594 mm
|
||||
#define QPrinter_A3 8 // 297 x 420 mm
|
||||
#define QPrinter_A4 0 // 210 x 297 mm, 8.26 x 11.69 inches
|
||||
#define QPrinter_A5 9 // 148 x 210 mm
|
||||
#define QPrinter_A6 10 // 105 x 148 mm
|
||||
#define QPrinter_A7 11 // 74 x 105 mm
|
||||
#define QPrinter_A8 12 // 52 x 74 mm
|
||||
#define QPrinter_A9 13 // 37 x 52 mm
|
||||
#define QPrinter_B0 14 // 1030 x 1456 mm
|
||||
#define QPrinter_B1 15 // 728 x 1030 mm
|
||||
#define QPrinter_B2 17 // 515 x 728 mm
|
||||
#define QPrinter_B3 18 // 364 x 515 mm
|
||||
#define QPrinter_B4 19 // 257 x 364 mm
|
||||
#define QPrinter_B5 1 // 182 x 257 mm, 7.17 x 10.13 inches
|
||||
#define QPrinter_B6 20 // 128 x 182 mm
|
||||
#define QPrinter_B7 21 // 91 x 128 mm
|
||||
#define QPrinter_B8 22 // 64 x 91 mm
|
||||
#define QPrinter_B9 23 // 45 x 64 mm
|
||||
#define QPrinter_B10 16 // 32 x 45 mm
|
||||
#define QPrinter_C5E 24 // 163 x 229 mm
|
||||
#define QPrinter_Comm10E 25 // 105 x 241 mm, U.S. Common 10 Envelope
|
||||
#define QPrinter_DLE 26 // 110 x 220 mm
|
||||
#define QPrinter_Executive 4 // 191 x 254 mm, 7.5 x 10 inches
|
||||
#define QPrinter_Folio 27 // 210 x 330 mm
|
||||
#define QPrinter_Ledger 28 // 432 x 279 mm
|
||||
#define QPrinter_Legal 3 // 216 x 356 mm, 8.5 x 14 inches
|
||||
#define QPrinter_Letter 2 // 216 x 279 mm, 8.5 x 11 inches
|
||||
#define QPrinter_Tabloid 29 // 279 x 432 mm
|
||||
#define QPrinter_Custom 30 // Unknown, or a user defined size.
|
||||
// With setFullPage(false) (the default), the metrics will be a bit smaller; how much
|
||||
// depends on the printer in use.
|
||||
|
||||
|
||||
// enum QPrinter::PaperSource
|
||||
//
|
||||
// This enum type specifies what paper source QPrinter is to use. QPrinter does not check
|
||||
// that the paper source is available; it just uses this information to try and set the paper
|
||||
// source. Whether it will set the paper source depends on whether the printer has that
|
||||
// particular source.
|
||||
//
|
||||
// Warning: This is currently only implemented for Windows.
|
||||
//
|
||||
#define QPrinter_Auto 6
|
||||
#define QPrinter_Cassette 11
|
||||
#define QPrinter_Envelope 4
|
||||
#define QPrinter_EnvelopeManual 5
|
||||
#define QPrinter_FormSource 12
|
||||
#define QPrinter_LargeCapacity 10
|
||||
#define QPrinter_LargeFormat 9
|
||||
#define QPrinter_Lower 1
|
||||
#define QPrinter_MaxPageSource 13
|
||||
#define QPrinter_Middle 2
|
||||
#define QPrinter_Manual 3
|
||||
#define QPrinter_OnlyOne 0
|
||||
#define QPrinter_Tractor 7
|
||||
#define QPrinter_SmallFormat 8
|
||||
|
||||
// enum QPrinter::PrintRange
|
||||
// Used to specify the print range selection option.
|
||||
//
|
||||
#define QPrinter_AllPages 0 // All pages should be printed.
|
||||
#define QPrinter_Selection 1 // Only the selection should be printed.
|
||||
#define QPrinter_PageRange 2 // The specified page range should be printed.
|
||||
|
||||
// enum #define QPrinter_PrinterMode
|
||||
// This enum describes the mode the printer should work in. It basically presets a certain
|
||||
// resolution and working mode.
|
||||
//
|
||||
#define QPrinter_ScreenResolution 0 // Sets the resolution of the print device to the screen resolution. This has the big advantage that the results obtained when painting on the printer will match more or less exactly the visible output on the screen. It is the easiest to use, as font metrics on the screen and on the printer are the same. This is the default value. ScreenResolution will produce a lower quality output than HighResolution and should only be used for drafts.
|
||||
#define QPrinter_PrinterResolution 1 // This value is deprecated. Is is equivalent to ScreenResolution on Unix and HighResolution on Windows and Mac. Due do the difference between ScreenResolution and HighResolution, use of this value may lead to non-portable printer code.
|
||||
#define QPrinter_HighResolution 2 // On Windows, sets the printer resolution to that defined for the printer in use. For PostScript printing, sets the resolution of the PostScript driver to 1200 dpi.
|
||||
// Note: When rendering text on a QPrinter device, it is important to realize that the size of
|
||||
// text, when specified in points, is independent of the resolution specified for the device itself.
|
||||
// Therefore, it may be useful to specify the font size in pixels when combining text with
|
||||
// graphics to ensure that their relative sizes are what you expect.
|
||||
|
||||
// enum QPrinter::PrinterState
|
||||
//
|
||||
#define QPrinter_Idle 0
|
||||
#define QPrinter_Active 1
|
||||
#define QPrinter_Aborted 2
|
||||
#define QPrinter_Error 3
|
||||
|
||||
// enum QPrinter::Unit
|
||||
// This enum type is used to specify the measurement unit for page and paper sizes.
|
||||
//
|
||||
#define QPrinter_Millimeter 0
|
||||
#define QPrinter_Point 1
|
||||
#define QPrinter_Inch 2
|
||||
#define QPrinter_Pica 3
|
||||
#define QPrinter_Didot 4
|
||||
#define QPrinter_Cicero 5
|
||||
#define QPrinter_DevicePixel 6
|
||||
// Note the difference between Point and DevicePixel. The Point unit is defined
|
||||
// to be 1/72th of an inch, while the DevicePixel unit is resolution dependant and is
|
||||
// based on the actual pixels, or dots, on the printer.
|
||||
|
||||
|
||||
#define QPrintEngine_PPK_CollateCopies 0 // A boolean value indicating whether the printout should be collated or not.
|
||||
#define QPrintEngine_PPK_ColorMode 1 // Refers to QPrinter::ColorMode, either color or monochrome.
|
||||
#define QPrintEngine_PPK_Creator 2 // A string describing the document's creator.
|
||||
#define QPrintEngine_PPK_Duplex 21 // A boolean value indicating whether both sides of the printer paper should be used for the printout.
|
||||
#define QPrintEngine_PPK_DocumentName 3 // A string describing the document name in the spooler.
|
||||
#define QPrintEngine_PPK_FontEmbedding 19 // A boolean value indicating whether data for the document's fonts should be embedded in the data sent to the printer.
|
||||
#define QPrintEngine_PPK_FullPage 4 // A boolean describing if the printer should be full page or not.
|
||||
#define QPrintEngine_PPK_NumberOfCopies 5 // An integer specifying the number of copies
|
||||
#define QPrintEngine_PPK_Orientation 6 // Specifies a QPrinter::Orientation value.
|
||||
#define QPrintEngine_PPK_OutputFileName 7 // The output file name as a string. An empty file name indicates that the printer should not print to a file.
|
||||
#define QPrintEngine_PPK_PageOrder 8 // Specifies a QPrinter::PageOrder value.
|
||||
#define QPrintEngine_PPK_PageRect 9 // A QRect specifying the page rectangle
|
||||
#define QPrintEngine_PPK_PageSize 10 // Obsolete. Use PPK_PaperSize instead.
|
||||
#define QPrintEngine_PPK_PaperRect 11 // A QRect specifying the paper rectangle.
|
||||
#define QPrintEngine_PPK_PaperSource 12 // Specifies a QPrinter::PaperSource value.
|
||||
#define QPrintEngine_PPK_PaperSources 22 // Specifies more than one QPrinter::PaperSource value.
|
||||
#define QPrintEngine_PPK_PaperSize QPrintEngine_PPK_PageSize // Specifies a QPrinter::PaperSize value.
|
||||
#define QPrintEngine_PPK_PrinterName 13 // A string specifying the name of the printer.
|
||||
#define QPrintEngine_PPK_PrinterProgram 14 // A string specifying the name of the printer program used for printing,
|
||||
#define QPrintEngine_PPK_Resolution 15 // An integer describing the dots per inch for this printer.
|
||||
#define QPrintEngine_PPK_SelectionOption 16
|
||||
#define QPrintEngine_PPK_SupportedResolutions 17 // A list of integer QVariants describing the set of supported resolutions that the printer has.
|
||||
#define QPrintEngine_PPK_SuppressSystemPrintStatus 20 // Suppress the built-in dialog for showing printing progress. As of 4.1 this only has effect on Mac OS X where, by default, a status dialog is shown.
|
||||
#define QPrintEngine_PPK_WindowsPageSize 18 // An integer specifying a DM_PAPER entry on Windows.
|
||||
#define QPrintEngine_PPK_CustomPaperSize 23 // A QSizeF specifying a custom paper size in the QPrinter::Point unit.
|
||||
#define QPrintEngine_PPK_PageMargins 24 // A QList<QVariant> containing the left, top, right and bottom margin values.
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
#define _HBQT_CH
|
||||
|
||||
@@ -326,6 +326,7 @@
|
||||
#define hbqt_par_QDragLeaveEvent( n ) ( ( QDragLeaveEvent* ) hb_parptr( n ) )
|
||||
#define hbqt_par_QMouseEvent( n ) ( ( QMouseEvent* ) hb_parptr( n ) )
|
||||
#define hbqt_par_QSystemTrayIcon( n ) ( ( QSystemTrayIcon* ) hb_parptr( n ) )
|
||||
#define hbqt_par_QPrintEngine( n ) ( ( QPrintEngine* ) hb_parptr( n ) )
|
||||
|
||||
#define hbqt_par_QWebFrame( n ) ( ( QWebFrame* ) hb_parptr( n ) )
|
||||
#define hbqt_par_QWebNetworkRequest( n ) ( ( QWebNetworkRequest* ) hb_parptr( n ) )
|
||||
|
||||
@@ -848,6 +848,12 @@ void Slots::filterSelected( const QString & filter )
|
||||
QWidget *oWidget = qobject_cast<QWidget *>( sender() );
|
||||
SlotsExecString( oWidget, ( char* ) "filterSelected(QString)", filter );
|
||||
}
|
||||
/* QPrintDialog */
|
||||
void Slots::accepted( QPrinter * printer )
|
||||
{
|
||||
QWidget *oWidget = qobject_cast<QWidget *>( sender() );
|
||||
SlotsExecPointer( oWidget, ( char* ) "accepted(QPrinter)", printer );
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
@@ -1241,6 +1247,11 @@ HB_FUNC( QT_CONNECT_SIGNAL )
|
||||
ret = widget->connect( widget, SIGNAL( filterSelected( const QString & ) ),
|
||||
s_s, SLOT( filterSelected( const QString & ) ), Qt::AutoConnection );
|
||||
}
|
||||
if( signal == ( QString ) "accepted(QPrinter)" )
|
||||
{
|
||||
ret = widget->connect( widget, SIGNAL( accepted( QPrinter * ) ),
|
||||
s_s, SLOT( accepted( QPrinter * ) ), Qt::AutoConnection );
|
||||
}
|
||||
|
||||
|
||||
hb_retl( ret );
|
||||
|
||||
@@ -197,6 +197,7 @@ public slots:
|
||||
void fileSelected( const QString & file );
|
||||
void filesSelected( const QStringList & selected );
|
||||
void filterSelected( const QString & filter );
|
||||
void accepted( QPrinter * printer );
|
||||
};
|
||||
|
||||
class Events: public QObject
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/****************************************************************************
|
||||
** Meta object code from reading C++ file 'hbqt_slots.h'
|
||||
**
|
||||
** Created: Fri Jul 3 16:24:08 2009
|
||||
** Created: Thu Jul 9 23:53:51 2009
|
||||
** by: The Qt Meta Object Compiler version 61 (Qt 4.5.0)
|
||||
**
|
||||
** WARNING! All changes made in this file will be lost!
|
||||
@@ -137,7 +137,7 @@ static const uint qt_meta_data_Slots[] = {
|
||||
2, // revision
|
||||
0, // classname
|
||||
0, 0, // classinfo
|
||||
75, 12, // methods
|
||||
76, 12, // methods
|
||||
0, 0, // properties
|
||||
0, 0, // enums/sets
|
||||
0, 0, // constructors
|
||||
@@ -218,6 +218,7 @@ static const uint qt_meta_data_Slots[] = {
|
||||
2023, 2018, 6, 6, 0x0a,
|
||||
2054, 2045, 6, 6, 0x0a,
|
||||
2088, 2081, 6, 6, 0x0a,
|
||||
2120, 2112, 6, 6, 0x0a,
|
||||
|
||||
0 // eod
|
||||
};
|
||||
@@ -280,7 +281,8 @@ static const char qt_meta_stringdata_Slots[] = {
|
||||
"directoryEntered(QString)\0file\0"
|
||||
"fileSelected(QString)\0selected\0"
|
||||
"filesSelected(QStringList)\0filter\0"
|
||||
"filterSelected(QString)\0"
|
||||
"filterSelected(QString)\0printer\0"
|
||||
"accepted(QPrinter*)\0"
|
||||
};
|
||||
|
||||
const QMetaObject Slots::staticMetaObject = {
|
||||
@@ -383,9 +385,10 @@ int Slots::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
|
||||
case 72: fileSelected((*reinterpret_cast< const QString(*)>(_a[1]))); break;
|
||||
case 73: filesSelected((*reinterpret_cast< const QStringList(*)>(_a[1]))); break;
|
||||
case 74: filterSelected((*reinterpret_cast< const QString(*)>(_a[1]))); break;
|
||||
case 75: accepted((*reinterpret_cast< QPrinter*(*)>(_a[1]))); break;
|
||||
default: ;
|
||||
}
|
||||
_id -= 75;
|
||||
_id -= 76;
|
||||
}
|
||||
return _id;
|
||||
}
|
||||
|
||||
99
harbour/contrib/hbqt/qth/QPrintEngine.qth
Normal file
99
harbour/contrib/hbqt/qth/QPrintEngine.qth
Normal file
@@ -0,0 +1,99 @@
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
/*
|
||||
* Harbour Project source code:
|
||||
* QT Source Generator for Harbour
|
||||
*
|
||||
* Copyright 2009 Pritpal Bedi <pritpal@vouchcac.com>
|
||||
* www - http://www.harbour-project.org
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this software; see the file COPYING. If not, write to
|
||||
* the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
|
||||
* Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/).
|
||||
*
|
||||
* As a special exception, the Harbour Project gives permission for
|
||||
* additional uses of the text contained in its release of Harbour.
|
||||
*
|
||||
* The exception is that, if you link the Harbour libraries with other
|
||||
* files to produce an executable, this does not by itself cause the
|
||||
* resulting executable to be covered by the GNU General Public License.
|
||||
* Your use of that executable is in no way restricted on account of
|
||||
* linking the Harbour library code into it.
|
||||
*
|
||||
* This exception does not however invalidate any other reasons why
|
||||
* the executable file might be covered by the GNU General Public License.
|
||||
*
|
||||
* This exception applies only to the code released by the Harbour
|
||||
* Project under the name Harbour. If you copy code from other
|
||||
* Harbour Project or Free Software Foundation releases into a copy of
|
||||
* Harbour, as the General Public License permits, the exception does
|
||||
* not apply to the code that you add in this way. To avoid misleading
|
||||
* anyone as to the status of such modified files, you must delete
|
||||
* this exception notice from them.
|
||||
*
|
||||
* If you write modifications of your own for Harbour, it is your choice
|
||||
* whether to permit this exception to apply to your modifications.
|
||||
* If you do not wish that, delete this exception notice.
|
||||
*
|
||||
*/
|
||||
/*----------------------------------------------------------------------*/
|
||||
;
|
||||
; Header File to Generate QT Wrapper Sources
|
||||
;
|
||||
|
||||
<CLASS>
|
||||
Inherits =
|
||||
Type = Core
|
||||
New =
|
||||
</CLASS>
|
||||
|
||||
<CODE>
|
||||
#include <QtGui/QPrintEngine>
|
||||
|
||||
|
||||
/*
|
||||
* virtual ~QPrintEngine ()
|
||||
*/
|
||||
HB_FUNC( QT_QPRINTENGINE )
|
||||
{
|
||||
|
||||
}
|
||||
</CODE>
|
||||
|
||||
<ENUMS>
|
||||
enum PrintEnginePropertyKey { PPK_CollateCopies, PPK_ColorMode, PPK_Creator, PPK_Duplex, ..., PPK_CustomBase }
|
||||
</ENUMS>
|
||||
|
||||
<PROTOS>
|
||||
virtual bool abort ()
|
||||
virtual int metric ( QPaintDevice::PaintDeviceMetric id ) const
|
||||
virtual bool newPage ()
|
||||
virtual QPrinter::PrinterState printerState () const
|
||||
virtual QVariant property ( PrintEnginePropertyKey key ) const
|
||||
virtual void setProperty ( PrintEnginePropertyKey key, const QVariant & value )
|
||||
</PROTOS>
|
||||
|
||||
<SLOTS>
|
||||
</SLOTS>
|
||||
|
||||
<SIGNALS>
|
||||
</SIGNALS>
|
||||
|
||||
<VARIABLES>
|
||||
</VARIABLES>
|
||||
|
||||
|
||||
|
||||
166
harbour/contrib/hbqt/qth/QPrinter.qth
Normal file
166
harbour/contrib/hbqt/qth/QPrinter.qth
Normal file
@@ -0,0 +1,166 @@
|
||||
/*
|
||||
* $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 = QPaintDevice
|
||||
Type =
|
||||
New =
|
||||
</CLASS>
|
||||
|
||||
<CODE>
|
||||
#include <QtGui/QPrinter>
|
||||
|
||||
|
||||
/*
|
||||
* QPrinter ( PrinterMode mode = ScreenResolution )
|
||||
* QPrinter ( const QPrinterInfo & printer, PrinterMode mode = ScreenResolution )
|
||||
* ~QPrinter ()
|
||||
*/
|
||||
HB_FUNC( QT_QPRINTER )
|
||||
{
|
||||
hb_retptr( ( QPrinter* ) new QPrinter() );
|
||||
}
|
||||
</CODE>
|
||||
|
||||
<ENUMS>
|
||||
enum ColorMode { Color, GrayScale }
|
||||
enum DuplexMode { DuplexNone, DuplexAuto, DuplexLongSide, DuplexShortSide }
|
||||
enum Orientation { Portrait, Landscape }
|
||||
enum OutputFormat { NativeFormat, PdfFormat, PostScriptFormat }
|
||||
enum PageOrder { FirstPageFirst, LastPageFirst }
|
||||
enum PaperSize { A0, A1, A2, A3, ..., Custom }
|
||||
enum PaperSource { Auto, Cassette, Envelope, EnvelopeManual, ..., SmallFormat }
|
||||
enum PrintRange { AllPages, Selection, PageRange }
|
||||
enum PrinterMode { ScreenResolution, PrinterResolution, HighResolution }
|
||||
enum PrinterState { Idle, Active, Aborted, Error }
|
||||
enum Unit { Millimeter, Point, Inch, Pica, ..., DevicePixel }
|
||||
</ENUMS>
|
||||
|
||||
<PROTOS>
|
||||
bool abort ()
|
||||
bool collateCopies () const
|
||||
ColorMode colorMode () const
|
||||
QString creator () const
|
||||
QString docName () const
|
||||
bool doubleSidedPrinting () const
|
||||
DuplexMode duplex () const
|
||||
bool fontEmbeddingEnabled () const
|
||||
int fromPage () const
|
||||
bool fullPage () const
|
||||
void getPageMargins ( qreal * left, qreal * top, qreal * right, qreal * bottom, Unit unit ) const
|
||||
bool isValid () const
|
||||
bool newPage ()
|
||||
int numCopies () const
|
||||
Orientation orientation () const
|
||||
QString outputFileName () const
|
||||
OutputFormat outputFormat () const
|
||||
PageOrder pageOrder () const
|
||||
QRect pageRect () const
|
||||
QRectF pageRect ( Unit unit ) const
|
||||
virtual QPaintEngine * paintEngine () const
|
||||
QRect paperRect () const
|
||||
QRectF paperRect ( Unit unit ) const
|
||||
PaperSize paperSize () const
|
||||
QSizeF paperSize ( Unit unit ) const
|
||||
PaperSource paperSource () const
|
||||
QPrintEngine * printEngine () const
|
||||
QString printProgram () const
|
||||
PrintRange printRange () const
|
||||
QString printerName () const
|
||||
// QString printerSelectionOption () const
|
||||
PrinterState printerState () const
|
||||
int resolution () const
|
||||
void setCollateCopies ( bool collate )
|
||||
void setColorMode ( ColorMode newColorMode )
|
||||
void setCreator ( const QString & creator )
|
||||
void setDocName ( const QString & name )
|
||||
void setDoubleSidedPrinting ( bool doubleSided )
|
||||
void setDuplex ( DuplexMode duplex )
|
||||
void setFontEmbeddingEnabled ( bool enable )
|
||||
void setFromTo ( int from, int to )
|
||||
void setFullPage ( bool fp )
|
||||
void setNumCopies ( int numCopies )
|
||||
void setOrientation ( Orientation orientation )
|
||||
void setOutputFileName ( const QString & fileName )
|
||||
void setOutputFormat ( OutputFormat format )
|
||||
void setPageMargins ( qreal left, qreal top, qreal right, qreal bottom, Unit unit )
|
||||
void setPageOrder ( PageOrder pageOrder )
|
||||
void setPaperSize ( PaperSize newPaperSize )
|
||||
void setPaperSize ( const QSizeF & paperSize, Unit unit )
|
||||
void setPaperSource ( PaperSource source )
|
||||
void setPrintProgram ( const QString & printProg )
|
||||
void setPrintRange ( PrintRange range )
|
||||
void setPrinterName ( const QString & name )
|
||||
// void setPrinterSelectionOption ( const QString & option )
|
||||
void setResolution ( int dpi )
|
||||
void setWinPageSize ( int pageSize )
|
||||
QList<PaperSource> supportedPaperSources () const
|
||||
QList<int> supportedResolutions () const
|
||||
int toPage () const
|
||||
int winPageSize () const
|
||||
</PROTOS>
|
||||
|
||||
<SLOTS>
|
||||
</SLOTS>
|
||||
|
||||
<SIGNALS>
|
||||
</SIGNALS>
|
||||
|
||||
<VARIABLES>
|
||||
</VARIABLES>
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user