diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 11166a9048..521e48e55f 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,14 @@ past entries belonging to author(s): Viktor Szakats. */ +2009-06-28 19:19 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com) + * harbour/contrib/hbqt/generator/qt45.qtp + * harbour/contrib/hbqt/Makefile_gen + + harbour/contrib/hbqt/hbqt_qcursor.cpp + + harbour/contrib/hbqt/qth/QCursor.qth + + harbour/contrib/hbqt/TQCursor.prg + + Added one more class. + 2009-06-29 01:32 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * utils/hbmk2/hbmk2.prg ! Fix to prev fix. diff --git a/harbour/contrib/hbqt/Makefile_gen b/harbour/contrib/hbqt/Makefile_gen index 82533879d9..5c2f2f08c7 100644 --- a/harbour/contrib/hbqt/Makefile_gen +++ b/harbour/contrib/hbqt/Makefile_gen @@ -210,6 +210,7 @@ CPP_SOURCES=\ hbqt_qwindowsstyle.cpp \ hbqt_qwindowsxpstyle.cpp \ hbqt_qwizard.cpp \ + hbqt_qcursor.cpp \ hbqt_base.cpp \ hbqt_utils.cpp \ hbqt_slots.cpp \ @@ -426,6 +427,7 @@ PRG_SOURCES=\ TQWebView.prg \ TQWheelEvent.prg \ TQWidget.prg \ + TQCursor.prg \ TQWidgetAction.prg \ TQWidgetItem.prg \ TQWindowsStyle.prg \ diff --git a/harbour/contrib/hbqt/TQCursor.prg b/harbour/contrib/hbqt/TQCursor.prg new file mode 100644 index 0000000000..c8d0db9091 --- /dev/null +++ b/harbour/contrib/hbqt/TQCursor.prg @@ -0,0 +1,89 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT wrapper main header + * + * Copyright 2009 Marcos Antonio Gambeta + * Copyright 2009 Pritpal Bedi + * www - http://www.harbour-project.org + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this software; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, + * Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/). + * + * As a special exception, the Harbour Project gives permission for + * additional uses of the text contained in its release of Harbour. + * + * The exception is that, if you link the Harbour libraries with other + * files to produce an executable, this does not by itself cause the + * resulting executable to be covered by the GNU General Public License. + * Your use of that executable is in no way restricted on account of + * linking the Harbour library code into it. + * + * This exception does not however invalidate any other reasons why + * the executable file might be covered by the GNU General Public License. + * + * This exception applies only to the code released by the Harbour + * Project under the name Harbour. If you copy code from other + * Harbour Project or Free Software Foundation releases into a copy of + * Harbour, as the General Public License permits, the exception does + * not apply to the code that you add in this way. To avoid misleading + * anyone as to the status of such modified files, you must delete + * this exception notice from them. + * + * If you write modifications of your own for Harbour, it is your choice + * whether to permit this exception to apply to your modifications. + * If you do not wish that, delete this exception notice. + * + */ +/*----------------------------------------------------------------------*/ + + +#include "hbclass.ch" + + +CREATE CLASS QCursor + + VAR pParent + VAR pPtr + + METHOD New() + + METHOD bitmap() INLINE Qt_QCursor_bitmap( ::pPtr ) + METHOD hotSpot() INLINE Qt_QCursor_hotSpot( ::pPtr ) + METHOD mask() INLINE Qt_QCursor_mask( ::pPtr ) + METHOD pixmap() INLINE Qt_QCursor_pixmap( ::pPtr ) + METHOD setShape( nShape ) INLINE Qt_QCursor_setShape( ::pPtr, nShape ) + METHOD shape() INLINE Qt_QCursor_shape( ::pPtr ) + METHOD pos() INLINE Qt_QCursor_pos( ::pPtr ) + METHOD setPos( nX, nY ) INLINE Qt_QCursor_setPos( ::pPtr, nX, nY ) + METHOD setPos_1( pP ) INLINE Qt_QCursor_setPos_1( ::pPtr, pP ) + + ENDCLASS + +/*----------------------------------------------------------------------*/ + +METHOD New( pParent ) CLASS QCursor + + ::pParent := pParent + + ::pPtr := Qt_QCursor( pParent ) + + RETURN Self + +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/generator/qt45.qtp b/harbour/contrib/hbqt/generator/qt45.qtp index 199aa47816..7f84af6a70 100644 --- a/harbour/contrib/hbqt/generator/qt45.qtp +++ b/harbour/contrib/hbqt/generator/qt45.qtp @@ -35,6 +35,7 @@ QCommandLinkButton.qth QCommonStyle.qth QConicalGradient.qth QCoreApplication.qth +QCursor.qth QDateEdit.qth QDateTime.qth QDateTimeEdit.qth diff --git a/harbour/contrib/hbqt/hbqt_qcursor.cpp b/harbour/contrib/hbqt/hbqt_qcursor.cpp new file mode 100644 index 0000000000..e88486cc5c --- /dev/null +++ b/harbour/contrib/hbqt/hbqt_qcursor.cpp @@ -0,0 +1,157 @@ +/* + * $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 + + +/* + * QCursor () + * QCursor ( Qt::CursorShape shape ) + * QCursor ( const QBitmap & bitmap, const QBitmap & mask, int hotX = -1, int hotY = -1 ) + * QCursor ( const QPixmap & pixmap, int hotX = -1, int hotY = -1 ) + * QCursor ( const QCursor & c ) + * QCursor ( HCURSOR cursor ) + * QCursor ( Qt::HANDLE handle ) + * ~QCursor () + */ +HB_FUNC( QT_QCURSOR ) +{ + hb_retptr( ( QCursor* ) new QCursor() ); +} + +/* + * const QBitmap * bitmap () const + */ +HB_FUNC( QT_QCURSOR_BITMAP ) +{ + hb_retptr( ( QBitmap* ) hbqt_par_QCursor( 1 )->bitmap() ); +} + +/* + * QPoint hotSpot () const + */ +HB_FUNC( QT_QCURSOR_HOTSPOT ) +{ + hb_retptr( new QPoint( hbqt_par_QCursor( 1 )->hotSpot() ) ); +} + +/* + * const QBitmap * mask () const + */ +HB_FUNC( QT_QCURSOR_MASK ) +{ + hb_retptr( ( QBitmap* ) hbqt_par_QCursor( 1 )->mask() ); +} + +/* + * QPixmap pixmap () const + */ +HB_FUNC( QT_QCURSOR_PIXMAP ) +{ + hb_retptr( new QPixmap( hbqt_par_QCursor( 1 )->pixmap() ) ); +} + +/* + * void setShape ( Qt::CursorShape shape ) + */ +HB_FUNC( QT_QCURSOR_SETSHAPE ) +{ + hbqt_par_QCursor( 1 )->setShape( ( Qt::CursorShape ) hb_parni( 2 ) ); +} + +/* + * Qt::CursorShape shape () const + */ +HB_FUNC( QT_QCURSOR_SHAPE ) +{ + hb_retni( ( Qt::CursorShape ) hbqt_par_QCursor( 1 )->shape() ); +} + +/* + * QPoint pos () + */ +HB_FUNC( QT_QCURSOR_POS ) +{ + hb_retptr( new QPoint( hbqt_par_QCursor( 1 )->pos() ) ); +} + +/* + * void setPos ( int x, int y ) + */ +HB_FUNC( QT_QCURSOR_SETPOS ) +{ + hbqt_par_QCursor( 1 )->setPos( hb_parni( 2 ), hb_parni( 3 ) ); +} + +/* + * void setPos ( const QPoint & p ) + */ +HB_FUNC( QT_QCURSOR_SETPOS_1 ) +{ + hbqt_par_QCursor( 1 )->setPos( *hbqt_par_QPoint( 2 ) ); +} + + +/*----------------------------------------------------------------------*/ +#endif /* #if QT_VERSION >= 0x040500 */ +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/qth/QCursor.qth b/harbour/contrib/hbqt/qth/QCursor.qth new file mode 100644 index 0000000000..2328645a08 --- /dev/null +++ b/harbour/contrib/hbqt/qth/QCursor.qth @@ -0,0 +1,110 @@ +/* + * $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 + + +/* + * QCursor () + * QCursor ( Qt::CursorShape shape ) + * QCursor ( const QBitmap & bitmap, const QBitmap & mask, int hotX = -1, int hotY = -1 ) + * QCursor ( const QPixmap & pixmap, int hotX = -1, int hotY = -1 ) + * QCursor ( const QCursor & c ) + * QCursor ( HCURSOR cursor ) + * QCursor ( Qt::HANDLE handle ) + * ~QCursor () + */ +HB_FUNC( QT_QCURSOR ) +{ + hb_retptr( ( QCursor* ) new QCursor() ); +} + + + + + + +const QBitmap * bitmap () const +// HCURSOR_or_HANDLE handle () const +QPoint hotSpot () const +const QBitmap * mask () const +QPixmap pixmap () const +void setShape ( Qt::CursorShape shape ) +Qt::CursorShape shape () const + +QPoint pos () +void setPos ( int x, int y ) +void setPos ( const QPoint & p ) + + + + + + + + + + + + +