2011-03-18 12:28 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)

* contrib/hbqt/qtcore/hbqt_init.cpp
  * contrib/hbqt/qtcore/qth/filelist.hbm
  + contrib/hbqt/qtcore/qth/QChildEvent.qth
  * contrib/hbqt/qtgui/hbqt_init.cpp
  * contrib/hbqt/qtgui/hbqtgui.hbx
  * contrib/hbqt/qtgui/qth/filelist.hbm
  + contrib/hbqt/qtgui/qth/QActionEvent.qth
  + contrib/hbqt/qtgui/qth/QFileOpenEvent.qth
  + contrib/hbqt/qtgui/qth/QHoverEvent.qth
  * contrib/hbqt/qtgui/qth/QMoveEvent.qth
  * contrib/hbqt/qtgui/qth/QPaintEvent.qth
  + contrib/hbqt/qtgui/qth/QShortcutEvent.qth
    + Added: more events specific classes.

  * contrib/hbqt/hbmk2_qt.hbs
    ! Rationalized code fragments.
    - Deleted: meta object checking as it is now handelled by the generator.

  * contrib/hbqt/qtcore/hbqt_hbqevents.cpp
    ! Rationalized: catching the event.
      NOTE: hb_itemNew() should not be called here. The function 
            returns a hb_stackReturnItem(). Object is already contained 
            in .prg variable in user application and will be auto 
            destructed when out of scope.
This commit is contained in:
Pritpal Bedi
2011-03-18 19:40:16 +00:00
parent 294ca7ef4a
commit 9444ab8a3a
15 changed files with 625 additions and 56 deletions

View File

@@ -16,6 +16,32 @@
The license applies to all entries newer than 2009-04-28.
*/
2011-03-18 12:28 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
* contrib/hbqt/qtcore/hbqt_init.cpp
* contrib/hbqt/qtcore/qth/filelist.hbm
+ contrib/hbqt/qtcore/qth/QChildEvent.qth
* contrib/hbqt/qtgui/hbqt_init.cpp
* contrib/hbqt/qtgui/hbqtgui.hbx
* contrib/hbqt/qtgui/qth/filelist.hbm
+ contrib/hbqt/qtgui/qth/QActionEvent.qth
+ contrib/hbqt/qtgui/qth/QFileOpenEvent.qth
+ contrib/hbqt/qtgui/qth/QHoverEvent.qth
* contrib/hbqt/qtgui/qth/QMoveEvent.qth
* contrib/hbqt/qtgui/qth/QPaintEvent.qth
+ contrib/hbqt/qtgui/qth/QShortcutEvent.qth
+ Added: more events specific classes.
* contrib/hbqt/hbmk2_qt.hbs
! Rationalized code fragments.
- Deleted: meta object checking as it is now handelled by the generator.
* contrib/hbqt/qtcore/hbqt_hbqevents.cpp
! Rationalized: catching the event.
NOTE: hb_itemNew() should not be called here. The function
returns a hb_stackReturnItem(). Object is already contained
in .prg variable in user application and will be auto
destructed when out of scope.
2011-03-18 13:37 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* contrib/hbqt/qtgui/qth/QDesktopServices.qth
* Patch [Francesco Perillo]

View File

@@ -1451,37 +1451,40 @@ METHOD HbQtSource:build()
aadd( aLine, " " )
aadd( aLine, " if( p )" )
aadd( aLine, " {" )
aadd( aLine, " if( p->bNew && p->ph )" )
aadd( aLine, " if( p->bNew )" )
aadd( aLine, " {" )
aadd( aLine, " " + ::cQtObject + " " + iif( ::isList, "< void * >", "" ) + "* ph = p->ph;" )
aadd( aLine, " const QMetaObject * m = ( ph )->metaObject();" )
aadd( aLine, ' if( ( QString ) m->className() != ( QString ) "QObject" )' )
#ifdef _GEN_TRACE_
aadd( aLine, " if( p->ph )" )
aadd( aLine, " {" )
#ifdef _GEN_TRACE_
aadd( aLine, ' HB_TRACE( ' + ::cTrMode + ', ( "ph=%p %p YES_rel_' + ::cQtObject + ' /.\\ ", ( void * ) p, ( void * ) p->ph ) );' )
#endif
aadd( aLine, " delete ( p->ph ); " )
aadd( aLine, " delete ( " + ::cQtObject + " * )( p->ph ); " )
#ifdef _GEN_TRACE_
aadd( aLine, ' HB_TRACE( ' + ::cTrMode + ', ( "ph=%p %p YES_rel_' + ::cQtObject + ' \\./ ", ( void * ) p, ( void * ) p->ph ) );' )
#endif
aadd( aLine, " }" )
#ifdef _GEN_TRACE_
aadd( aLine, " else" )
aadd( aLine, " {" )
aadd( aLine, ' HB_TRACE( ' + ::cTrMode + ', ( "ph=%p NO__rel_' + ::cQtObject + ' ", ( void * ) p->ph ) );')
aadd( aLine, ' HB_TRACE( ' + ::cTrMode + ', ( "ph=%p DEL_rel_' + ::cQtObject + ' : Object already deleted!", ( void * ) p->ph ) );' )
aadd( aLine, " }" )
#endif
aadd( aLine, " }" )
#ifdef _GEN_TRACE_
aadd( aLine, " else" )
aadd( aLine, " {" )
aadd( aLine, ' HB_TRACE( ' + ::cTrMode + ', ( "ph=%p DEL_rel_' + ::cQtObject + ' : Object already deleted!", ( void * ) p->ph ) );' )
aadd( aLine, ' HB_TRACE( ' + ::cTrMode + ', ( "ph=%p PTR_rel_' + ::cQtObject + ' : Object not created with new=true", ( void * ) p->ph ) );' )
aadd( aLine, " }" )
#endif
aadd( aLine, " p->ph = NULL;" )
aadd( aLine, " p = NULL;" )
aadd( aLine, " }" )
#ifdef _GEN_TRACE_
aadd( aLine, " else" )
aadd( aLine, " {" )
aadd( aLine, ' HB_TRACE( ' + ::cTrMode + ', ( "ph=%p PTR_rel_' + ::cQtObject + ' : Object not created with new=true", ( void * ) p->ph ) );' )
aadd( aLine, ' HB_TRACE( ' + ::cTrMode + ', ( "DEL_rel_' + ::cQtObject + ' : not valid" ) );' )
aadd( aLine, " }" )
#endif
ELSE
@@ -1724,7 +1727,8 @@ METHOD HbQtSource:getMethodBody( oMtd, cMtdName, aMethods, nClsType )
aadd( txt_, "HB_FUNC_STATIC( " + upper( oMtd:cHBFunc ) + " )" )
aadd( txt_, "{" )
aadd( txt_, ' HB_TRACE( HB_TR_DEBUG, ( "' + ::cQtObject+":"+oMtd:cHBFunc + '" ));' )
// aadd( txt_, ' HB_TRACE( ' + ::cTrMode + ', ( "' + ::cQtObject + ":" + oMtd:cHBFunc + '" ) );' )
aadd( txt_, ' HB_TRACE( HB_TR_DEBUG, ( "' + ::cQtObject + ":" + oMtd:cHBFunc + '" ) );' )
IF !empty( oMtd:fBody_ )
aeval( oMtd:fBody_, {|e| aadd( txt_, e ) } )
@@ -1756,6 +1760,9 @@ METHOD HbQtSource:getMethodBody( oMtd, cMtdName, aMethods, nClsType )
aadd( txt_, " if( " + v + " )" )
aadd( txt_, " {" )
aadd( txt_, " " + FP + ";" )
IF oMtd:oRet:cCast == "void"
aadd( txt_, " hb_itemReturn( hb_stackSelfItem() );" )
ENDIF
aadd( txt_, " }" )
ENDIF
ELSE
@@ -1773,6 +1780,9 @@ METHOD HbQtSource:getMethodBody( oMtd, cMtdName, aMethods, nClsType )
aadd( txt_, " " + iif( i > 1 , "else if", "if" ) + "( pcount == 0 )" )
aadd( txt_, " {" )
aadd( txt_, " " + FP + ";" )
IF oMtd:oRet:cCast == "void"
aadd( txt_, " hb_itemReturn( hb_stackSelfItem() );" )
ENDIF
aadd( txt_, " }" )
OTHERWISE
@@ -1829,6 +1839,10 @@ METHOD HbQtSource:getMethodBody( oMtd, cMtdName, aMethods, nClsType )
NEXT
ENDIF
IF oMtd:oRet:cCast == "void"
aadd( txt_, " hb_itemReturn( hb_stackSelfItem() );" )
ENDIF
aadd( txt_, " }" )
ENDCASE
NEXT

View File

@@ -194,40 +194,42 @@ bool HBQEvents::hbClear()
return true;
}
/* DONOT Reformat */
bool HBQEvents::eventFilter( QObject * object, QEvent * event )
{
QEvent::Type eventtype = event->type();
if( ( int ) eventtype == 0 )
return false;
char prop[ 20 ];
hb_snprintf( prop, sizeof( prop ), "%s%i%s", "P", eventtype, "P" );
int found = object->property( prop ).toInt();
if( found == 0 )
return false;
bool ret = true;
if( found <= listBlock.size() )
bool ret = false;
if( object )
{
int eventId = s_lstEvent.indexOf( eventtype );
if( eventId > -1 && hb_vmRequestReenter() )
QEvent::Type eventtype = event->type();
if( ( int ) eventtype > 0 )
{
PHBQT_EVENT_FUNC pCallback = s_pEventAllocateCallback.at( eventId );
if( pCallback )
char prop[ 20 ];
hb_snprintf( prop, sizeof( prop ), "%s%i%s", "P", eventtype, "P" );
int found = object->property( prop ).toInt();
if( found > 0 )
{
PHB_ITEM pEvent = hb_itemNew( hbqt_create_objectGC( ( * pCallback )( event, false ), s_lstCreateObj.at( eventId ) ) );
ret = hb_itemGetL( hb_vmEvalBlockV( ( PHB_ITEM ) listBlock.at( found - 1 ), 1, pEvent ) );
hb_itemRelease( pEvent );
if( found <= listBlock.size() && listBlock.at( found - 1 ) != NULL )
{
int eventId = s_lstEvent.indexOf( eventtype );
if( eventId > -1 )
{
PHBQT_EVENT_FUNC pCallback = s_pEventAllocateCallback.at( eventId );
if( pCallback )
{
if( hb_vmRequestReenter() )
{
ret = hb_itemGetL( hb_vmEvalBlockV( ( PHB_ITEM ) listBlock.at( found - 1 ), 1, hbqt_create_objectGC( ( * pCallback )( event, false ), s_lstCreateObj.at( eventId ) ) ) );
hb_vmRequestRestore();
}
}
if( eventtype == QEvent::Close )
{
event->ignore();
}
}
}
}
hb_vmRequestRestore();
if( eventtype == QEvent::Close )
event->ignore();
}
}
return ret;

View File

@@ -365,12 +365,10 @@ static void hbqt_SlotsExecQObject( PHB_ITEM * codeBlock, void ** arguments, QStr
/*----------------------------------------------------------------------*/
HB_FUNC_EXTERN( HB_QEVENT );
// HB_FUNC_EXTERN( QMODELINDEX );
void _hbqtcore_force_link_for_event( void )
{
HB_FUNC_EXEC( HB_QEVENT );
// HB_FUNC_EXEC( QMODELINDEX );
}
static void hbqt_registerCallbacks( void )

View File

@@ -0,0 +1,100 @@
/*
* $Id$
*/
/*
* Harbour Project source code:
* QT Source Generator for Harbour
*
* Copyright 2009-2011 Pritpal Bedi <bedipritpal@hotmail.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>
QObject = no
Inherit = QEvent
Type =
New =
</CLASS>
<CODE>
#include <QtCore/QChildEvent>
/*
* QChildEvent ( Type type, QObject * child )
*/
HB_FUNC( QT_QCHILDEVENT )
{
if( hb_pcount() == 2 && HB_ISNUM( 1 ) && HB_ISOBJECT( 2 ) )
{
__HB_RETPTRGC__( new QChildEvent( ( QEvent::Type ) hb_parni( 1 ), hbqt_par_QObject( 2 ) ) );
}
}
</CODE>
<ENUMS>
</ENUMS>
<PROTOS>
bool added () const
QObject * child () const
bool polished () const
bool removed () const
</PROTOS>
<SLOTS>
</SLOTS>
<SIGNALS>
</SIGNALS>
<VARIABLES>
</VARIABLES>

View File

@@ -18,6 +18,7 @@ QBitArray.qth
QBuffer.qth
QByteArray.qth
QChar.qth
QChildEvent.qth
QCoreApplication.qth
QDataStream.qth
QDate.qth

View File

@@ -100,6 +100,7 @@ extern void * hbqt_gcAllocate_QTreeWidgetItem( void * pObj, bool bNew );
extern void * hbqt_gcAllocate_QTableWidgetItem( void * pObj, bool bNew );
extern void * hbqt_gcAllocate_QWidget( void * pObj, bool bNew );
extern void * hbqt_gcAllocate_QActionEvent( void * pObj, bool bNew );
extern void * hbqt_gcAllocate_QContextMenuEvent( void * pObj, bool bNew );
extern void * hbqt_gcAllocate_QDragEnterEvent( void * pObj, bool bNew );
extern void * hbqt_gcAllocate_QDragLeaveEvent( void * pObj, bool bNew );
@@ -115,12 +116,14 @@ extern void * hbqt_gcAllocate_QGraphicsSceneResizeEvent( void * pObj, bool bNew
extern void * hbqt_gcAllocate_QGraphicsSceneWheelEvent( void * pObj, bool bNew );
extern void * hbqt_gcAllocate_QHelpEvent( void * pObj, bool bNew );
extern void * hbqt_gcAllocate_QHideEvent( void * pObj, bool bNew );
extern void * hbqt_gcAllocate_QHoverEvent( void * pObj, bool bNew );
extern void * hbqt_gcAllocate_QInputMethodEvent( void * pObj, bool bNew );
extern void * hbqt_gcAllocate_QKeyEvent( void * pObj, bool bNew );
extern void * hbqt_gcAllocate_QMouseEvent( void * pObj, bool bNew );
extern void * hbqt_gcAllocate_QMoveEvent( void * pObj, bool bNew );
extern void * hbqt_gcAllocate_QPaintEvent( void * pObj, bool bNew );
extern void * hbqt_gcAllocate_QResizeEvent( void * pObj, bool bNew );
extern void * hbqt_gcAllocate_QShortcutEvent( void * pObj, bool bNew );
extern void * hbqt_gcAllocate_QShowEvent( void * pObj, bool bNew );
extern void * hbqt_gcAllocate_QWheelEvent( void * pObj, bool bNew );
extern void * hbqt_gcAllocate_QWindowStateChangeEvent( void * pObj, bool bNew );
@@ -359,6 +362,7 @@ HB_FUNC_EXTERN( HB_QTREEWIDGETITEM );
/*----------------------------------------------------------------------*/
HB_FUNC_EXTERN( HB_QACTIONEVENT );
HB_FUNC_EXTERN( HB_QCONTEXTMENUEVENT );
HB_FUNC_EXTERN( HB_QDRAGENTEREVENT );
HB_FUNC_EXTERN( HB_QDRAGLEAVEEVENT );
@@ -376,18 +380,21 @@ HB_FUNC_EXTERN( HB_QGRAPHICSSCENERESIZEEVENT );
HB_FUNC_EXTERN( HB_QGRAPHICSSCENEWHEELEVENT );
HB_FUNC_EXTERN( HB_QHELPEVENT );
HB_FUNC_EXTERN( HB_QHIDEEVENT );
HB_FUNC_EXTERN( HB_QHOVEREVENT );
HB_FUNC_EXTERN( HB_QINPUTMETHODEVENT );
HB_FUNC_EXTERN( HB_QKEYEVENT );
HB_FUNC_EXTERN( HB_QMOUSEEVENT );
HB_FUNC_EXTERN( HB_QMOVEEVENT );
HB_FUNC_EXTERN( HB_QPAINTEVENT );
HB_FUNC_EXTERN( HB_QRESIZEEVENT );
HB_FUNC_EXTERN( HB_QSHORTCUTEVENT );
HB_FUNC_EXTERN( HB_QSHOWEVENT );
HB_FUNC_EXTERN( HB_QWHEELEVENT );
HB_FUNC_EXTERN( HB_QWINDOWSTATECHANGEEVENT );
void _hbqtgui_force_link_for_event( void )
{
HB_FUNC_EXEC( HB_QACTIONEVENT );
HB_FUNC_EXEC( HB_QCONTEXTMENUEVENT );
HB_FUNC_EXEC( HB_QDRAGENTEREVENT );
HB_FUNC_EXEC( HB_QDRAGLEAVEEVENT );
@@ -405,6 +412,7 @@ void _hbqtgui_force_link_for_event( void )
HB_FUNC_EXEC( HB_QGRAPHICSSCENEWHEELEVENT );
HB_FUNC_EXEC( HB_QHELPEVENT );
HB_FUNC_EXEC( HB_QHIDEEVENT );
HB_FUNC_EXEC( HB_QHOVEREVENT );
HB_FUNC_EXEC( HB_QINPUTMETHODEVENT );
HB_FUNC_EXEC( HB_QKEYEVENT );
HB_FUNC_EXEC( HB_QMOUSEEVENT );
@@ -412,6 +420,7 @@ void _hbqtgui_force_link_for_event( void )
HB_FUNC_EXEC( HB_QPAINTEVENT );
HB_FUNC_EXEC( HB_QRESIZEEVENT );
HB_FUNC_EXEC( HB_QSHOWEVENT );
HB_FUNC_EXEC( HB_QSHORTCUTEVENT );
HB_FUNC_EXEC( HB_QWHEELEVENT );
HB_FUNC_EXEC( HB_QWINDOWSTATECHANGEEVENT );
@@ -520,11 +529,11 @@ static void hbqt_registerCallbacks( void )
hbqt_events_register_createobj( QEvent::ToolTip , "hb_QHelpEvent" , hbqt_gcAllocate_QHelpEvent );
hbqt_events_register_createobj( QEvent::WhatsThis , "hb_QHelpEvent" , hbqt_gcAllocate_QHelpEvent );
hbqt_events_register_createobj( QEvent::StatusTip , "hb_QEvent" , hbqt_gcAllocate_QEvent );
hbqt_events_register_createobj( QEvent::ActionChanged , "hb_QEvent" , hbqt_gcAllocate_QEvent );
hbqt_events_register_createobj( QEvent::ActionAdded , "hb_QEvent" , hbqt_gcAllocate_QEvent );
hbqt_events_register_createobj( QEvent::ActionRemoved , "hb_QEvent" , hbqt_gcAllocate_QEvent );
hbqt_events_register_createobj( QEvent::ActionChanged , "hb_QActionEvent" , hbqt_gcAllocate_QActionEvent );
hbqt_events_register_createobj( QEvent::ActionAdded , "hb_QActionEvent" , hbqt_gcAllocate_QActionEvent );
hbqt_events_register_createobj( QEvent::ActionRemoved , "hb_QActionEvent" , hbqt_gcAllocate_QActionEvent );
hbqt_events_register_createobj( QEvent::FileOpen , "hb_QEvent" , hbqt_gcAllocate_QEvent );
hbqt_events_register_createobj( QEvent::Shortcut , "hb_QEvent" , hbqt_gcAllocate_QEvent );
hbqt_events_register_createobj( QEvent::Shortcut , "hb_QShortcutEvent" , hbqt_gcAllocate_QShortcutEvent );
hbqt_events_register_createobj( QEvent::WhatsThisClicked , "hb_QEvent" , hbqt_gcAllocate_QEvent );
hbqt_events_register_createobj( QEvent::AccessibilityHelp , "hb_QEvent" , hbqt_gcAllocate_QEvent );
hbqt_events_register_createobj( QEvent::ToolBarChange , "hb_QEvent" , hbqt_gcAllocate_QEvent );
@@ -535,9 +544,9 @@ static void hbqt_registerCallbacks( void )
hbqt_events_register_createobj( QEvent::EnterWhatsThisMode , "hb_QEvent" , hbqt_gcAllocate_QEvent );
hbqt_events_register_createobj( QEvent::LeaveWhatsThisMode , "hb_QEvent" , hbqt_gcAllocate_QEvent );
hbqt_events_register_createobj( QEvent::ZOrderChange , "hb_QEvent" , hbqt_gcAllocate_QEvent );
hbqt_events_register_createobj( QEvent::HoverEnter , "hb_QEvent" , hbqt_gcAllocate_QEvent );
hbqt_events_register_createobj( QEvent::HoverLeave , "hb_QEvent" , hbqt_gcAllocate_QEvent );
hbqt_events_register_createobj( QEvent::HoverMove , "hb_QEvent" , hbqt_gcAllocate_QEvent );
hbqt_events_register_createobj( QEvent::HoverEnter , "hb_QHoverEvent" , hbqt_gcAllocate_QHoverEvent );
hbqt_events_register_createobj( QEvent::HoverLeave , "hb_QHoverEvent" , hbqt_gcAllocate_QHoverEvent );
hbqt_events_register_createobj( QEvent::HoverMove , "hb_QHoverEvent" , hbqt_gcAllocate_QHoverEvent );
hbqt_events_register_createobj( QEvent::AccessibilityDescription , "hb_QEvent" , hbqt_gcAllocate_QEvent );
hbqt_events_register_createobj( QEvent::ParentAboutToChange , "hb_QEvent" , hbqt_gcAllocate_QEvent );
hbqt_events_register_createobj( QEvent::WinEventAct , "hb_QEvent" , hbqt_gcAllocate_QEvent );
@@ -584,8 +593,8 @@ static void hbqt_registerCallbacks( void )
static QApplication * s_app = NULL;
static int s_argc;
static char ** s_argv;
//static int s_argc;
//static char ** s_argv;
HB_FUNC_EXTERN( __HBQTCORE );
@@ -605,6 +614,9 @@ QApplication * __hbqtgui_app( void )
static void hbqt_lib_init( void * cargo )
{
static int s_argc;
static char ** s_argv;
HB_SYMBOL_UNUSED( cargo );
s_argc = hb_cmdargARGC();
@@ -616,6 +628,7 @@ static void hbqt_lib_init( void * cargo )
hb_errInternal( 11001, "hbqt_lib_init(): HBQTGUI Initilization Error.", NULL, NULL );
hb_cmdargInit( s_argc, s_argv );
HB_TRACE( HB_TR_ALWAYS, ( "hbqt_lib_init %p", s_app ) );
hbqt_registerCallbacks();
}
@@ -623,6 +636,11 @@ static void hbqt_lib_init( void * cargo )
static void hbqt_lib_exit( void * cargo )
{
HB_SYMBOL_UNUSED( cargo );
HB_TRACE( HB_TR_ALWAYS, ( "hbqt_lib_exit 0" ) );
s_app->exit( 0 );
HB_TRACE( HB_TR_ALWAYS, ( "hbqt_lib_exit 1" ) );
delete s_app;
HB_TRACE( HB_TR_ALWAYS, ( "hbqt_lib_exit 2" ) );
}

View File

@@ -54,6 +54,7 @@ DYNAMIC HB_QABSTRACTSLIDER
DYNAMIC HB_QABSTRACTSPINBOX
DYNAMIC HB_QABSTRACTTEXTDOCUMENTLAYOUT
DYNAMIC HB_QACTION
DYNAMIC HB_QACTIONEVENT
DYNAMIC HB_QACTIONGROUP
DYNAMIC HB_QAPPLICATION
DYNAMIC HB_QBITMAP
@@ -91,6 +92,7 @@ DYNAMIC HB_QDROPEVENT
DYNAMIC HB_QERRORMESSAGE
DYNAMIC HB_QFILEDIALOG
DYNAMIC HB_QFILEICONPROVIDER
DYNAMIC HB_QFILEOPENEVENT
DYNAMIC HB_QFILESYSTEMMODEL
DYNAMIC HB_QFOCUSEVENT
DYNAMIC HB_QFOCUSFRAME
@@ -138,6 +140,7 @@ DYNAMIC HB_QHBOXLAYOUT
DYNAMIC HB_QHEADERVIEW
DYNAMIC HB_QHELPEVENT
DYNAMIC HB_QHIDEEVENT
DYNAMIC HB_QHOVEREVENT
DYNAMIC HB_QICON
DYNAMIC HB_QIMAGE
DYNAMIC HB_QIMAGEREADER
@@ -202,6 +205,7 @@ DYNAMIC HB_QRESIZEEVENT
DYNAMIC HB_QSCROLLAREA
DYNAMIC HB_QSCROLLBAR
DYNAMIC HB_QSESSIONMANAGER
DYNAMIC HB_QSHORTCUTEVENT
DYNAMIC HB_QSHOWEVENT
DYNAMIC HB_QSIZEGRIP
DYNAMIC HB_QSIZEPOLICY
@@ -309,6 +313,7 @@ DYNAMIC QABSTRACTSLIDER
DYNAMIC QABSTRACTSPINBOX
DYNAMIC QABSTRACTTEXTDOCUMENTLAYOUT
DYNAMIC QACTION
DYNAMIC QACTIONEVENT
DYNAMIC QACTIONGROUP
DYNAMIC QAPPLICATION
DYNAMIC QBITMAP
@@ -346,6 +351,7 @@ DYNAMIC QDROPEVENT
DYNAMIC QERRORMESSAGE
DYNAMIC QFILEDIALOG
DYNAMIC QFILEICONPROVIDER
DYNAMIC QFILEOPENEVENT
DYNAMIC QFILESYSTEMMODEL
DYNAMIC QFOCUSEVENT
DYNAMIC QFOCUSFRAME
@@ -393,6 +399,7 @@ DYNAMIC QHBOXLAYOUT
DYNAMIC QHEADERVIEW
DYNAMIC QHELPEVENT
DYNAMIC QHIDEEVENT
DYNAMIC QHOVEREVENT
DYNAMIC QICON
DYNAMIC QIMAGE
DYNAMIC QIMAGEREADER
@@ -457,6 +464,7 @@ DYNAMIC QRESIZEEVENT
DYNAMIC QSCROLLAREA
DYNAMIC QSCROLLBAR
DYNAMIC QSESSIONMANAGER
DYNAMIC QSHORTCUTEVENT
DYNAMIC QSHOWEVENT
DYNAMIC QSIZEGRIP
DYNAMIC QSIZEPOLICY

View File

@@ -0,0 +1,98 @@
/*
* $Id: QAction.qth 10801 2009-04-07 06:51:37Z vouchcac $
*/
/*
* Harbour Project source code:
* QT Source Generator for Harbour
*
* Copyright 2009-2011 Pritpal Bedi <bedipritpal@hotmail.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>
QObject = no
Inherit = QEvent
Type =
New =
</CLASS>
<CODE>
#include <QtGui/QActionEvent>
/*
* QActionEvent ( int type, QAction * action, QAction * before = 0 )
*/
HB_FUNC( QT_QACTIONEVENT )
{
if( hb_pcount() <= 3 && HB_ISNUM( 1 ) && HB_ISOBJECT( 2 ) && ( hb_pcount() == 3 ? HB_ISOBJECT( 3 ) : false ) )
{
__HB_RETPTRGC__( new QActionEvent( hb_parni( 1 ), hbqt_par_QAction( 2 ), ( HB_ISOBJECT( 3 ) ? hbqt_par_QAction( 3 ) : 0 ) ) );
}
}
</CODE>
<ENUMS>
</ENUMS>
<PROTOS>
QAction * action () const
QAction * before () const
</PROTOS>
<SLOTS>
</SLOTS>
<SIGNALS>
</SIGNALS>
<VARIABLES>
</VARIABLES>

View File

@@ -0,0 +1,104 @@
/*
* $Id$
*/
/*
* Harbour Project source code:
* QT Source Generator for Harbour
*
* Copyright 2009-2011 Pritpal Bedi <bedipritpal@hotmail.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>
QObject = no
Inherit = QEvent
Type =
New =
</CLASS>
<CODE>
#include <QtGui/QFileOpenEvent>
/*
*
*/
HB_FUNC( QT_QFILEOPENEVENT )
{
if( hb_pcount() == 1 && ( HB_ISCHAR( 1 ) || HB_ISOBJECT( 1 ) ) )
{
if( HB_ISCHAR( 1 ) )
{
__HB_RETPTRGC__( new QFileOpenEvent( hbqt_par_QString( 1 ) ) );
}
else if( HB_ISOBJECT( 1 ) )
{
__HB_RETPTRGC__( new QFileOpenEvent( *hbqt_par_QFileOpenEvent( 1 ) ) );
}
}
}
</CODE>
<ENUMS>
</ENUMS>
<PROTOS>
QString file () const
</PROTOS>
<SLOTS>
</SLOTS>
<SIGNALS>
</SIGNALS>
<VARIABLES>
</VARIABLES>

View File

@@ -0,0 +1,98 @@
/*
* $Id$
*/
/*
* Harbour Project source code:
* QT Source Generator for Harbour
*
* Copyright 2009-2011 Pritpal Bedi <bedipritpal@hotmail.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>
QObject = no
Inherit = QEvent
Type =
New =
</CLASS>
<CODE>
#include <QtGui/QHoverEvent>
/*
* QHoverEvent ( Type type, const QPoint & pos, const QPoint & oldPos )
*/
HB_FUNC( QT_QHOVEREVENT )
{
if( hb_pcount() == 3 && HB_ISNUM( 1 ) && HB_ISOBJECT( 2 ) && HB_ISOBJECT( 3 ) )
{
__HB_RETPTRGC__( new QHoverEvent( ( QEvent::Type ) hb_parni( 1 ), *hbqt_par_QPoint( 2 ), *hbqt_par_QPoint( 3 ) ) );
}
}
</CODE>
<ENUMS>
</ENUMS>
<PROTOS>
const QPoint & oldPos () const
const QPoint & pos () const
</PROTOS>
<SLOTS>
</SLOTS>
<SIGNALS>
</SIGNALS>
<VARIABLES>
</VARIABLES>

View File

@@ -14,9 +14,9 @@
<CLASS>
QObject = no
Inherits = QEvent
Type = Core
Type =
New =
Constructor = no
Constructor =
</CLASS>
<CODE>

View File

@@ -14,7 +14,7 @@
<CLASS>
QObject = no
Inherits = QEvent
Type = Core
Type =
New =
</CLASS>
@@ -30,13 +30,11 @@ HB_FUNC( QT_QPAINTEVENT )
{
if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) )
{
QString objName = ( QString ) hbqt_par_QString( 1 );
if( objName == ( QString ) "QRect" )
if( hbqt_isObjectType( 1, HBQT_TYPE_QRegion ) )
{
__HB_RETPTRGC__( new QPaintEvent( *hbqt_par_QRegion( 1 ) ) );
}
else if( objName == ( QString ) "QRegion" )
else if( hbqt_isObjectType( 1, HBQT_TYPE_QRect ) )
{
__HB_RETPTRGC__( new QPaintEvent( *hbqt_par_QRect( 1 ) ) );
}

View File

@@ -0,0 +1,100 @@
/*
* $Id$
*/
/*
* Harbour Project source code:
* QT Source Generator for Harbour
*
* Copyright 2009-2011 Pritpal Bedi <bedipritpal@hotmail.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>
QObject = no
Inherit = QEvent
Type =
New =
</CLASS>
<CODE>
#include <QtGui/QShortcutEvent>
/*
* QShortcutEvent ( const QKeySequence & key, int id, bool ambiguous = false )
* ~QShortcutEvent ()
*/
HB_FUNC( QT_QSHORTCUTEVENT )
{
if( hb_pcount() >= 2 && HB_ISOBJECT( 1 ) && HB_ISNUM( 2 ) )
{
__HB_RETPTRGC__( new QShortcutEvent( *hbqt_par_QKeySequence( 1 ), hb_parni( 2 ), ( HB_ISLOG( 3 ) ? hb_parl( 3 ) : false ) ) );
}
}
</CODE>
<ENUMS>
</ENUMS>
<PROTOS>
bool isAmbiguous () const
const QKeySequence & key () const
int shortcutId () const
</PROTOS>
<SLOTS>
</SLOTS>
<SIGNALS>
</SIGNALS>
<VARIABLES>
</VARIABLES>

View File

@@ -25,6 +25,7 @@ QAbstractSlider.qth
QAbstractSpinBox.qth
QAbstractTextDocumentLayout.qth
QAction.qth
QActionEvent.qth
QActionGroup.qth
QApplication.qth
QBitmap.qth
@@ -62,6 +63,7 @@ QDropEvent.qth
QErrorMessage.qth
QFileDialog.qth
QFileIconProvider.qth
QFileOpenEvent.qth
QFileSystemModel.qth
QFocusEvent.qth
QFocusFrame.qth
@@ -109,6 +111,7 @@ QHBoxLayout.qth
QHeaderView.qth
QHelpEvent.qth
QHideEvent.qth
QHoverEvent.qth
QIcon.qth
QImage.qth
QImageReader.qth
@@ -175,6 +178,7 @@ QResizeEvent.qth
QScrollArea.qth
QScrollBar.qth
QSessionManager.qth
QShortcutEvent.qth
QShowEvent.qth
QSizeGrip.qth
QSizePolicy.qth