2010-06-22 08:54 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
* contrib/hbqt/generator/qt45.qtp
* contrib/hbqt/hbqt.h
* contrib/hbqt/hbqt_garbage.h
* contrib/hbqt/qtgui/filelist.mk
+ contrib/hbqt/qtgui/QItemDelegate.cpp
+ contrib/hbqt/qtgui/QItemEditorCreator.cpp
+ contrib/hbqt/qtgui/QItemEditorCreatorBase.cpp
+ contrib/hbqt/qtgui/QItemEditorFactory.cpp
+ contrib/hbqt/qtgui/TQItemDelegate.prg
+ contrib/hbqt/qtgui/TQItemEditorCreator.prg
+ contrib/hbqt/qtgui/TQItemEditorCreatorBase.prg
+ contrib/hbqt/qtgui/TQItemEditorFactory.prg
+ contrib/hbqt/qth/QItemDelegate.qth
+ contrib/hbqt/qth/QItemEditorCreator.qth
+ contrib/hbqt/qth/QItemEditorCreatorBase.qth
+ contrib/hbqt/qth/QItemEditorFactory.qth
+ Added: more classes to implement GET validation - in progress.
This commit is contained in:
@@ -16,6 +16,27 @@
|
||||
The license applies to all entries newer than 2009-04-28.
|
||||
*/
|
||||
|
||||
2010-06-22 08:54 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
|
||||
* contrib/hbqt/generator/qt45.qtp
|
||||
* contrib/hbqt/hbqt.h
|
||||
* contrib/hbqt/hbqt_garbage.h
|
||||
* contrib/hbqt/qtgui/filelist.mk
|
||||
|
||||
+ contrib/hbqt/qtgui/QItemDelegate.cpp
|
||||
+ contrib/hbqt/qtgui/QItemEditorCreator.cpp
|
||||
+ contrib/hbqt/qtgui/QItemEditorCreatorBase.cpp
|
||||
+ contrib/hbqt/qtgui/QItemEditorFactory.cpp
|
||||
+ contrib/hbqt/qtgui/TQItemDelegate.prg
|
||||
+ contrib/hbqt/qtgui/TQItemEditorCreator.prg
|
||||
+ contrib/hbqt/qtgui/TQItemEditorCreatorBase.prg
|
||||
+ contrib/hbqt/qtgui/TQItemEditorFactory.prg
|
||||
+ contrib/hbqt/qth/QItemDelegate.qth
|
||||
+ contrib/hbqt/qth/QItemEditorCreator.qth
|
||||
+ contrib/hbqt/qth/QItemEditorCreatorBase.qth
|
||||
+ contrib/hbqt/qth/QItemEditorFactory.qth
|
||||
|
||||
+ Added: more classes to implement GET validation - in progress.
|
||||
|
||||
2010-06-22 17:59 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
|
||||
* src/rtl/hbsha2.c
|
||||
* src/rtl/hbsha2hm.c
|
||||
|
||||
@@ -115,6 +115,10 @@ QImageWriter.qth
|
||||
QInputDialog.qth
|
||||
QInputEvent.qth
|
||||
QIODevice.qth
|
||||
QItemDelegate.qth
|
||||
; QItemEditorCreator.qth
|
||||
QItemEditorCreatorBase.qth
|
||||
QItemEditorFactory.qth
|
||||
QItemSelection.qth
|
||||
QItemSelectionModel.qth
|
||||
QKeyEvent.qth
|
||||
|
||||
@@ -193,6 +193,9 @@ extern void * hbqt_pPtrFromItem( PHB_ITEM pObj );
|
||||
#define hbqt_par_QInputEvent( n ) ( ( QInputEvent * ) hbqt_gcpointer( n ) )
|
||||
#define hbqt_par_QInputMethodEvent( n ) ( ( QInputMethodEvent * ) hbqt_gcpointer( n ) )
|
||||
#define hbqt_par_QIODevice( n ) ( ( QIODevice * ) hbqt_gcpointer( n ) )
|
||||
#define hbqt_par_QItemDelegate( n ) ( ( QItemDelegate * ) hbqt_gcpointer( n ) )
|
||||
#define hbqt_par_QItemEditorCreator( n ) ( ( QItemEditorCreator * ) hbqt_gcpointer( n ) )
|
||||
#define hbqt_par_QItemEditorCreatorBase( n ) ( ( QItemEditorCreatorBase * ) hbqt_gcpointer( n ) )
|
||||
#define hbqt_par_QItemEditorFactory( n ) ( ( QItemEditorFactory * ) hbqt_gcpointer( n ) )
|
||||
#define hbqt_par_QItemSelection( n ) ( ( QItemSelection * ) hbqt_gcpointer( n ) )
|
||||
#define hbqt_par_QItemSelectionModel( n ) ( ( QItemSelectionModel * ) hbqt_gcpointer( n ) )
|
||||
|
||||
@@ -107,6 +107,9 @@ extern QT_G_FUNC( hbqt_gcRelease_QImageWriter );
|
||||
extern QT_G_FUNC( hbqt_gcRelease_QInputDialog );
|
||||
extern QT_G_FUNC( hbqt_gcRelease_QInputEvent );
|
||||
extern QT_G_FUNC( hbqt_gcRelease_QIODevice );
|
||||
extern QT_G_FUNC( hbqt_gcRelease_QItemDelegate );
|
||||
extern QT_G_FUNC( hbqt_gcRelease_QItemEditorCreatorBase );
|
||||
extern QT_G_FUNC( hbqt_gcRelease_QItemEditorFactory );
|
||||
extern QT_G_FUNC( hbqt_gcRelease_QItemSelection );
|
||||
extern QT_G_FUNC( hbqt_gcRelease_QItemSelectionModel );
|
||||
extern QT_G_FUNC( hbqt_gcRelease_QKeyEvent );
|
||||
@@ -396,6 +399,9 @@ extern void * hbqt_gcAllocate_QImageWriter( void * pObj, bool bNew );
|
||||
extern void * hbqt_gcAllocate_QInputDialog( void * pObj, bool bNew );
|
||||
extern void * hbqt_gcAllocate_QInputEvent( void * pObj, bool bNew );
|
||||
extern void * hbqt_gcAllocate_QIODevice( void * pObj, bool bNew );
|
||||
extern void * hbqt_gcAllocate_QItemDelegate( void * pObj, bool bNew );
|
||||
extern void * hbqt_gcAllocate_QItemEditorCreatorBase( void * pObj, bool bNew );
|
||||
extern void * hbqt_gcAllocate_QItemEditorFactory( void * pObj, bool bNew );
|
||||
extern void * hbqt_gcAllocate_QItemSelection( void * pObj, bool bNew );
|
||||
extern void * hbqt_gcAllocate_QItemSelectionModel( void * pObj, bool bNew );
|
||||
extern void * hbqt_gcAllocate_QKeyEvent( void * pObj, bool bNew );
|
||||
|
||||
304
harbour/contrib/hbqt/qtgui/QItemDelegate.cpp
Normal file
304
harbour/contrib/hbqt/qtgui/QItemDelegate.cpp
Normal file
@@ -0,0 +1,304 @@
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
/* -------------------------------------------------------------------- */
|
||||
/* WARNING: Automatically generated source file. DO NOT EDIT! */
|
||||
/* Instead, edit corresponding .qth file, */
|
||||
/* or the generator tool itself, and run regenarate. */
|
||||
/* -------------------------------------------------------------------- */
|
||||
|
||||
/*
|
||||
* Harbour Project source code:
|
||||
* QT wrapper main header
|
||||
*
|
||||
* Copyright 2009-2010 Pritpal Bedi <pritpal@vouchcac.com>
|
||||
*
|
||||
* Copyright 2009 Marcos Antonio Gambeta <marcosgambeta at gmail dot com>
|
||||
* www - http://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 "../hbqt.h"
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
#if QT_VERSION >= 0x040500
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
/*
|
||||
* enum EndEditHint { NoHint, EditNextItem, EditPreviousItem, SubmitModelCache, RevertModelCache }
|
||||
*/
|
||||
|
||||
#include <QtCore/QPointer>
|
||||
|
||||
#include <QtGui/QItemDelegate>
|
||||
|
||||
|
||||
/* QItemDelegate ( QObject * parent = 0 )
|
||||
* ~QItemDelegate ()
|
||||
*
|
||||
*/
|
||||
|
||||
typedef struct
|
||||
{
|
||||
QPointer< QItemDelegate > ph;
|
||||
bool bNew;
|
||||
QT_G_FUNC_PTR func;
|
||||
} QGC_POINTER_QItemDelegate;
|
||||
|
||||
QT_G_FUNC( hbqt_gcRelease_QItemDelegate )
|
||||
{
|
||||
QItemDelegate * ph = NULL ;
|
||||
QGC_POINTER_QItemDelegate * p = ( QGC_POINTER_QItemDelegate * ) Cargo;
|
||||
|
||||
if( p && p->bNew && p->ph )
|
||||
{
|
||||
ph = p->ph;
|
||||
if( ph )
|
||||
{
|
||||
const QMetaObject * m = ( ph )->metaObject();
|
||||
if( ( QString ) m->className() != ( QString ) "QObject" )
|
||||
{
|
||||
HB_TRACE( HB_TR_DEBUG, ( "ph=%p %p YES_rel_QItemDelegate /.\\ ", (void*) ph, (void*) p->ph ) );
|
||||
delete ( p->ph );
|
||||
HB_TRACE( HB_TR_DEBUG, ( "ph=%p %p YES_rel_QItemDelegate \\./ ", (void*) ph, (void*) p->ph ) );
|
||||
p->ph = NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
HB_TRACE( HB_TR_DEBUG, ( "ph=%p NO__rel_QItemDelegate ", ph ) );
|
||||
p->ph = NULL;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
HB_TRACE( HB_TR_DEBUG, ( "ph=%p DEL_rel_QItemDelegate : Object already deleted!", ph ) );
|
||||
p->ph = NULL;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
HB_TRACE( HB_TR_DEBUG, ( "ph=%p PTR_rel_QItemDelegate : Object not created with new=true", ph ) );
|
||||
p->ph = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
void * hbqt_gcAllocate_QItemDelegate( void * pObj, bool bNew )
|
||||
{
|
||||
QGC_POINTER_QItemDelegate * p = ( QGC_POINTER_QItemDelegate * ) hb_gcAllocate( sizeof( QGC_POINTER_QItemDelegate ), hbqt_gcFuncs() );
|
||||
|
||||
new( & p->ph ) QPointer< QItemDelegate >( ( QItemDelegate * ) pObj );
|
||||
p->bNew = bNew;
|
||||
p->func = hbqt_gcRelease_QItemDelegate;
|
||||
|
||||
if( bNew )
|
||||
{
|
||||
HB_TRACE( HB_TR_DEBUG, ( "ph=%p _new_QItemDelegate under p->pq", pObj ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
HB_TRACE( HB_TR_DEBUG, ( "ph=%p NOT_new_QItemDelegate", pObj ) );
|
||||
}
|
||||
return p;
|
||||
}
|
||||
|
||||
HB_FUNC( QT_QITEMDELEGATE )
|
||||
{
|
||||
QItemDelegate * pObj = NULL;
|
||||
|
||||
if( HB_ISPOINTER( 1 ) )
|
||||
{
|
||||
pObj = new QItemDelegate( hbqt_par_QObject( 1 ) ) ;
|
||||
}
|
||||
else
|
||||
{
|
||||
pObj = new QItemDelegate() ;
|
||||
}
|
||||
|
||||
hb_retptrGC( hbqt_gcAllocate_QItemDelegate( ( void * ) pObj, true ) );
|
||||
}
|
||||
|
||||
/*
|
||||
* bool hasClipping () const
|
||||
*/
|
||||
HB_FUNC( QT_QITEMDELEGATE_HASCLIPPING )
|
||||
{
|
||||
QItemDelegate * p = hbqt_par_QItemDelegate( 1 );
|
||||
if( p )
|
||||
hb_retl( ( p )->hasClipping() );
|
||||
else
|
||||
{
|
||||
HB_TRACE( HB_TR_DEBUG, ( "............................... F=QT_QITEMDELEGATE_HASCLIPPING FP=hb_retl( ( p )->hasClipping() ); p is NULL" ) );
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* QItemEditorFactory * itemEditorFactory () const
|
||||
*/
|
||||
HB_FUNC( QT_QITEMDELEGATE_ITEMEDITORFACTORY )
|
||||
{
|
||||
QItemDelegate * p = hbqt_par_QItemDelegate( 1 );
|
||||
if( p )
|
||||
hb_retptrGC( hbqt_gcAllocate_QItemEditorFactory( ( p )->itemEditorFactory(), false ) );
|
||||
else
|
||||
{
|
||||
HB_TRACE( HB_TR_DEBUG, ( "............................... F=QT_QITEMDELEGATE_ITEMEDITORFACTORY FP=hb_retptrGC( hbqt_gcAllocate_QItemEditorFactory( ( p )->itemEditorFactory(), false ) ); p is NULL" ) );
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* void setClipping ( bool clip )
|
||||
*/
|
||||
HB_FUNC( QT_QITEMDELEGATE_SETCLIPPING )
|
||||
{
|
||||
QItemDelegate * p = hbqt_par_QItemDelegate( 1 );
|
||||
if( p )
|
||||
( p )->setClipping( hb_parl( 2 ) );
|
||||
else
|
||||
{
|
||||
HB_TRACE( HB_TR_DEBUG, ( "............................... F=QT_QITEMDELEGATE_SETCLIPPING FP=( p )->setClipping( hb_parl( 2 ) ); p is NULL" ) );
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* void setItemEditorFactory ( QItemEditorFactory * factory )
|
||||
*/
|
||||
HB_FUNC( QT_QITEMDELEGATE_SETITEMEDITORFACTORY )
|
||||
{
|
||||
QItemDelegate * p = hbqt_par_QItemDelegate( 1 );
|
||||
if( p )
|
||||
( p )->setItemEditorFactory( hbqt_par_QItemEditorFactory( 2 ) );
|
||||
else
|
||||
{
|
||||
HB_TRACE( HB_TR_DEBUG, ( "............................... F=QT_QITEMDELEGATE_SETITEMEDITORFACTORY FP=( p )->setItemEditorFactory( hbqt_par_QItemEditorFactory( 2 ) ); p is NULL" ) );
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* virtual QWidget * createEditor ( QWidget * parent, const QStyleOptionViewItem & option, const QModelIndex & index ) const
|
||||
*/
|
||||
HB_FUNC( QT_QITEMDELEGATE_CREATEEDITOR )
|
||||
{
|
||||
QItemDelegate * p = hbqt_par_QItemDelegate( 1 );
|
||||
if( p )
|
||||
hb_retptrGC( hbqt_gcAllocate_QWidget( ( p )->createEditor( hbqt_par_QWidget( 2 ), *hbqt_par_QStyleOptionViewItem( 3 ), *hbqt_par_QModelIndex( 4 ) ), false ) );
|
||||
else
|
||||
{
|
||||
HB_TRACE( HB_TR_DEBUG, ( "............................... F=QT_QITEMDELEGATE_CREATEEDITOR FP=hb_retptrGC( hbqt_gcAllocate_QWidget( ( p )->createEditor( hbqt_par_QWidget( 2 ), *hbqt_par_QStyleOptionViewItem( 3 ), *hbqt_par_QModelIndex( 4 ) ), false ) ); p is NULL" ) );
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* virtual void paint ( QPainter * painter, const QStyleOptionViewItem & option, const QModelIndex & index ) const
|
||||
*/
|
||||
HB_FUNC( QT_QITEMDELEGATE_PAINT )
|
||||
{
|
||||
QItemDelegate * p = hbqt_par_QItemDelegate( 1 );
|
||||
if( p )
|
||||
( p )->paint( hbqt_par_QPainter( 2 ), *hbqt_par_QStyleOptionViewItem( 3 ), *hbqt_par_QModelIndex( 4 ) );
|
||||
else
|
||||
{
|
||||
HB_TRACE( HB_TR_DEBUG, ( "............................... F=QT_QITEMDELEGATE_PAINT FP=( p )->paint( hbqt_par_QPainter( 2 ), *hbqt_par_QStyleOptionViewItem( 3 ), *hbqt_par_QModelIndex( 4 ) ); p is NULL" ) );
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* virtual void setEditorData ( QWidget * editor, const QModelIndex & index ) const
|
||||
*/
|
||||
HB_FUNC( QT_QITEMDELEGATE_SETEDITORDATA )
|
||||
{
|
||||
QItemDelegate * p = hbqt_par_QItemDelegate( 1 );
|
||||
if( p )
|
||||
( p )->setEditorData( hbqt_par_QWidget( 2 ), *hbqt_par_QModelIndex( 3 ) );
|
||||
else
|
||||
{
|
||||
HB_TRACE( HB_TR_DEBUG, ( "............................... F=QT_QITEMDELEGATE_SETEDITORDATA FP=( p )->setEditorData( hbqt_par_QWidget( 2 ), *hbqt_par_QModelIndex( 3 ) ); p is NULL" ) );
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* virtual void setModelData ( QWidget * editor, QAbstractItemModel * model, const QModelIndex & index ) const
|
||||
*/
|
||||
HB_FUNC( QT_QITEMDELEGATE_SETMODELDATA )
|
||||
{
|
||||
QItemDelegate * p = hbqt_par_QItemDelegate( 1 );
|
||||
if( p )
|
||||
( p )->setModelData( hbqt_par_QWidget( 2 ), hbqt_par_QAbstractItemModel( 3 ), *hbqt_par_QModelIndex( 4 ) );
|
||||
else
|
||||
{
|
||||
HB_TRACE( HB_TR_DEBUG, ( "............................... F=QT_QITEMDELEGATE_SETMODELDATA FP=( p )->setModelData( hbqt_par_QWidget( 2 ), hbqt_par_QAbstractItemModel( 3 ), *hbqt_par_QModelIndex( 4 ) ); p is NULL" ) );
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* virtual QSize sizeHint ( const QStyleOptionViewItem & option, const QModelIndex & index ) const
|
||||
*/
|
||||
HB_FUNC( QT_QITEMDELEGATE_SIZEHINT )
|
||||
{
|
||||
QItemDelegate * p = hbqt_par_QItemDelegate( 1 );
|
||||
if( p )
|
||||
hb_retptrGC( hbqt_gcAllocate_QSize( new QSize( ( p )->sizeHint( *hbqt_par_QStyleOptionViewItem( 2 ), *hbqt_par_QModelIndex( 3 ) ) ), true ) );
|
||||
else
|
||||
{
|
||||
HB_TRACE( HB_TR_DEBUG, ( "............................... F=QT_QITEMDELEGATE_SIZEHINT FP=hb_retptrGC( hbqt_gcAllocate_QSize( new QSize( ( p )->sizeHint( *hbqt_par_QStyleOptionViewItem( 2 ), *hbqt_par_QModelIndex( 3 ) ) ), true ) ); p is NULL" ) );
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* virtual void updateEditorGeometry ( QWidget * editor, const QStyleOptionViewItem & option, const QModelIndex & index ) const
|
||||
*/
|
||||
HB_FUNC( QT_QITEMDELEGATE_UPDATEEDITORGEOMETRY )
|
||||
{
|
||||
QItemDelegate * p = hbqt_par_QItemDelegate( 1 );
|
||||
if( p )
|
||||
( p )->updateEditorGeometry( hbqt_par_QWidget( 2 ), *hbqt_par_QStyleOptionViewItem( 3 ), *hbqt_par_QModelIndex( 4 ) );
|
||||
else
|
||||
{
|
||||
HB_TRACE( HB_TR_DEBUG, ( "............................... F=QT_QITEMDELEGATE_UPDATEEDITORGEOMETRY FP=( p )->updateEditorGeometry( hbqt_par_QWidget( 2 ), *hbqt_par_QStyleOptionViewItem( 3 ), *hbqt_par_QModelIndex( 4 ) ); p is NULL" ) );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
#endif /* #if QT_VERSION >= 0x040500 */
|
||||
/*----------------------------------------------------------------------*/
|
||||
151
harbour/contrib/hbqt/qtgui/QItemEditorCreator.cpp
Normal file
151
harbour/contrib/hbqt/qtgui/QItemEditorCreator.cpp
Normal file
@@ -0,0 +1,151 @@
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
/* -------------------------------------------------------------------- */
|
||||
/* WARNING: Automatically generated source file. DO NOT EDIT! */
|
||||
/* Instead, edit corresponding .qth file, */
|
||||
/* or the generator tool itself, and run regenarate. */
|
||||
/* -------------------------------------------------------------------- */
|
||||
|
||||
/*
|
||||
* Harbour Project source code:
|
||||
* QT wrapper main header
|
||||
*
|
||||
* Copyright 2009-2010 Pritpal Bedi <pritpal@vouchcac.com>
|
||||
*
|
||||
* Copyright 2009 Marcos Antonio Gambeta <marcosgambeta at gmail dot com>
|
||||
* www - http://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 "../hbqt.h"
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
#if QT_VERSION >= 0x040500
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
#include <QtCore/QPointer>
|
||||
|
||||
#include <QtGui/QItemEditorCreator>
|
||||
|
||||
|
||||
/*
|
||||
* QItemEditorCreator ( const QByteArray & valuePropertyName )
|
||||
*
|
||||
*/
|
||||
|
||||
typedef struct
|
||||
{
|
||||
QPointer< QItemEditorCreator > ph;
|
||||
bool bNew;
|
||||
QT_G_FUNC_PTR func;
|
||||
} QGC_POINTER_QItemEditorCreator;
|
||||
|
||||
QT_G_FUNC( hbqt_gcRelease_QItemEditorCreator )
|
||||
{
|
||||
HB_SYMBOL_UNUSED( Cargo );
|
||||
QGC_POINTER * p = ( QGC_POINTER * ) Cargo;
|
||||
|
||||
if( p && p->bNew )
|
||||
{
|
||||
p->ph = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
void * hbqt_gcAllocate_QItemEditorCreator( void * pObj, bool bNew )
|
||||
{
|
||||
QGC_POINTER_QItemEditorCreator * p = ( QGC_POINTER_QItemEditorCreator * ) hb_gcAllocate( sizeof( QGC_POINTER_QItemEditorCreator ), hbqt_gcFuncs() );
|
||||
|
||||
new( & p->ph ) QPointer< QItemEditorCreator >( ( QItemEditorCreator * ) pObj );
|
||||
p->bNew = bNew;
|
||||
p->func = hbqt_gcRelease_QItemEditorCreator;
|
||||
|
||||
if( bNew )
|
||||
{
|
||||
HB_TRACE( HB_TR_DEBUG, ( "ph=%p _new_QItemEditorCreator under p->pq", pObj ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
HB_TRACE( HB_TR_DEBUG, ( "ph=%p NOT_new_QItemEditorCreator", pObj ) );
|
||||
}
|
||||
return p;
|
||||
}
|
||||
|
||||
HB_FUNC( QT_QITEMEDITORCREATOR )
|
||||
{
|
||||
// hb_retptr( new QItemEditorCreator( hbqt_par_QByteArray( 1 ) ) );
|
||||
}
|
||||
|
||||
/*
|
||||
* virtual QWidget * createWidget ( QWidget * parent ) const
|
||||
*/
|
||||
HB_FUNC( QT_QITEMEDITORCREATOR_CREATEWIDGET )
|
||||
{
|
||||
QItemEditorCreator * p = hbqt_par_QItemEditorCreator( 1 );
|
||||
if( p )
|
||||
hb_retptrGC( hbqt_gcAllocate_QWidget( ( p )->createWidget( hbqt_par_QWidget( 2 ) ), false ) );
|
||||
else
|
||||
{
|
||||
HB_TRACE( HB_TR_DEBUG, ( "............................... F=QT_QITEMEDITORCREATOR_CREATEWIDGET FP=hb_retptrGC( hbqt_gcAllocate_QWidget( ( p )->createWidget( hbqt_par_QWidget( 2 ) ), false ) ); p is NULL" ) );
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* virtual QByteArray valuePropertyName () const
|
||||
*/
|
||||
HB_FUNC( QT_QITEMEDITORCREATOR_VALUEPROPERTYNAME )
|
||||
{
|
||||
QItemEditorCreator * p = hbqt_par_QItemEditorCreator( 1 );
|
||||
if( p )
|
||||
hb_retptrGC( hbqt_gcAllocate_QByteArray( new QByteArray( ( p )->valuePropertyName() ), true ) );
|
||||
else
|
||||
{
|
||||
HB_TRACE( HB_TR_DEBUG, ( "............................... F=QT_QITEMEDITORCREATOR_VALUEPROPERTYNAME FP=hb_retptrGC( hbqt_gcAllocate_QByteArray( new QByteArray( ( p )->valuePropertyName() ), true ) ); p is NULL" ) );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
#endif /* #if QT_VERSION >= 0x040500 */
|
||||
/*----------------------------------------------------------------------*/
|
||||
151
harbour/contrib/hbqt/qtgui/QItemEditorCreatorBase.cpp
Normal file
151
harbour/contrib/hbqt/qtgui/QItemEditorCreatorBase.cpp
Normal file
@@ -0,0 +1,151 @@
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
/* -------------------------------------------------------------------- */
|
||||
/* WARNING: Automatically generated source file. DO NOT EDIT! */
|
||||
/* Instead, edit corresponding .qth file, */
|
||||
/* or the generator tool itself, and run regenarate. */
|
||||
/* -------------------------------------------------------------------- */
|
||||
|
||||
/*
|
||||
* Harbour Project source code:
|
||||
* QT wrapper main header
|
||||
*
|
||||
* Copyright 2009-2010 Pritpal Bedi <pritpal@vouchcac.com>
|
||||
*
|
||||
* Copyright 2009 Marcos Antonio Gambeta <marcosgambeta at gmail dot com>
|
||||
* www - http://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 "../hbqt.h"
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
#if QT_VERSION >= 0x040500
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
#include <QtCore/QPointer>
|
||||
|
||||
#include <QtGui/QItemEditorCreatorBase>
|
||||
|
||||
|
||||
/*
|
||||
* virtual ~QItemEditorCreatorBase ()
|
||||
*
|
||||
*/
|
||||
|
||||
typedef struct
|
||||
{
|
||||
QItemEditorCreatorBase * ph;
|
||||
bool bNew;
|
||||
QT_G_FUNC_PTR func;
|
||||
} QGC_POINTER_QItemEditorCreatorBase;
|
||||
|
||||
QT_G_FUNC( hbqt_gcRelease_QItemEditorCreatorBase )
|
||||
{
|
||||
HB_SYMBOL_UNUSED( Cargo );
|
||||
QGC_POINTER * p = ( QGC_POINTER * ) Cargo;
|
||||
|
||||
if( p && p->bNew )
|
||||
{
|
||||
p->ph = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
void * hbqt_gcAllocate_QItemEditorCreatorBase( void * pObj, bool bNew )
|
||||
{
|
||||
QGC_POINTER * p = ( QGC_POINTER * ) hb_gcAllocate( sizeof( QGC_POINTER ), hbqt_gcFuncs() );
|
||||
|
||||
p->ph = ( QItemEditorCreatorBase * ) pObj;
|
||||
p->bNew = bNew;
|
||||
p->func = hbqt_gcRelease_QItemEditorCreatorBase;
|
||||
|
||||
if( bNew )
|
||||
{
|
||||
HB_TRACE( HB_TR_DEBUG, ( "ph=%p _new_QItemEditorCreatorBase", pObj ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
HB_TRACE( HB_TR_DEBUG, ( "ph=%p NOT_new_QItemEditorCreatorBase", pObj ) );
|
||||
}
|
||||
return p;
|
||||
}
|
||||
|
||||
HB_FUNC( QT_QITEMEDITORCREATORBASE )
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* virtual QWidget * createWidget ( QWidget * parent ) const = 0
|
||||
*/
|
||||
HB_FUNC( QT_QITEMEDITORCREATORBASE_CREATEWIDGET )
|
||||
{
|
||||
QItemEditorCreatorBase * p = hbqt_par_QItemEditorCreatorBase( 1 );
|
||||
if( p )
|
||||
hb_retptrGC( hbqt_gcAllocate_QWidget( ( p )->createWidget( hbqt_par_QWidget( 2 ) ), false ) );
|
||||
else
|
||||
{
|
||||
HB_TRACE( HB_TR_DEBUG, ( "............................... F=QT_QITEMEDITORCREATORBASE_CREATEWIDGET FP=hb_retptrGC( hbqt_gcAllocate_QWidget( ( p )->createWidget( hbqt_par_QWidget( 2 ) ), false ) ); p is NULL" ) );
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* virtual QByteArray valuePropertyName () const = 0
|
||||
*/
|
||||
HB_FUNC( QT_QITEMEDITORCREATORBASE_VALUEPROPERTYNAME )
|
||||
{
|
||||
QItemEditorCreatorBase * p = hbqt_par_QItemEditorCreatorBase( 1 );
|
||||
if( p )
|
||||
hb_retptrGC( hbqt_gcAllocate_QByteArray( new QByteArray( ( p )->valuePropertyName() ), true ) );
|
||||
else
|
||||
{
|
||||
HB_TRACE( HB_TR_DEBUG, ( "............................... F=QT_QITEMEDITORCREATORBASE_VALUEPROPERTYNAME FP=hb_retptrGC( hbqt_gcAllocate_QByteArray( new QByteArray( ( p )->valuePropertyName() ), true ) ); p is NULL" ) );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
#endif /* #if QT_VERSION >= 0x040500 */
|
||||
/*----------------------------------------------------------------------*/
|
||||
206
harbour/contrib/hbqt/qtgui/QItemEditorFactory.cpp
Normal file
206
harbour/contrib/hbqt/qtgui/QItemEditorFactory.cpp
Normal file
@@ -0,0 +1,206 @@
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
/* -------------------------------------------------------------------- */
|
||||
/* WARNING: Automatically generated source file. DO NOT EDIT! */
|
||||
/* Instead, edit corresponding .qth file, */
|
||||
/* or the generator tool itself, and run regenarate. */
|
||||
/* -------------------------------------------------------------------- */
|
||||
|
||||
/*
|
||||
* Harbour Project source code:
|
||||
* QT wrapper main header
|
||||
*
|
||||
* Copyright 2009-2010 Pritpal Bedi <pritpal@vouchcac.com>
|
||||
*
|
||||
* Copyright 2009 Marcos Antonio Gambeta <marcosgambeta at gmail dot com>
|
||||
* www - http://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 "../hbqt.h"
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
#if QT_VERSION >= 0x040500
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
#include <QtCore/QPointer>
|
||||
|
||||
#include <QtGui/QItemEditorFactory>
|
||||
|
||||
|
||||
/*
|
||||
* QItemEditorFactory ()
|
||||
* virtual ~QItemEditorFactory ()
|
||||
*
|
||||
*/
|
||||
|
||||
typedef struct
|
||||
{
|
||||
QItemEditorFactory * ph;
|
||||
bool bNew;
|
||||
QT_G_FUNC_PTR func;
|
||||
} QGC_POINTER_QItemEditorFactory;
|
||||
|
||||
QT_G_FUNC( hbqt_gcRelease_QItemEditorFactory )
|
||||
{
|
||||
QGC_POINTER * p = ( QGC_POINTER * ) Cargo;
|
||||
|
||||
if( p && p->bNew )
|
||||
{
|
||||
if( p->ph )
|
||||
{
|
||||
HB_TRACE( HB_TR_DEBUG, ( "ph=%p _rel_QItemEditorFactory /.\\", p->ph ) );
|
||||
delete ( ( QItemEditorFactory * ) p->ph );
|
||||
HB_TRACE( HB_TR_DEBUG, ( "ph=%p YES_rel_QItemEditorFactory \\./", p->ph ) );
|
||||
p->ph = NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
HB_TRACE( HB_TR_DEBUG, ( "ph=%p DEL_rel_QItemEditorFactory : Object already deleted!", p->ph ) );
|
||||
p->ph = NULL;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
HB_TRACE( HB_TR_DEBUG, ( "ph=%p PTR_rel_QItemEditorFactory : Object not created with new=true", p->ph ) );
|
||||
p->ph = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
void * hbqt_gcAllocate_QItemEditorFactory( void * pObj, bool bNew )
|
||||
{
|
||||
QGC_POINTER * p = ( QGC_POINTER * ) hb_gcAllocate( sizeof( QGC_POINTER ), hbqt_gcFuncs() );
|
||||
|
||||
p->ph = ( QItemEditorFactory * ) pObj;
|
||||
p->bNew = bNew;
|
||||
p->func = hbqt_gcRelease_QItemEditorFactory;
|
||||
|
||||
if( bNew )
|
||||
{
|
||||
HB_TRACE( HB_TR_DEBUG, ( "ph=%p _new_QItemEditorFactory", pObj ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
HB_TRACE( HB_TR_DEBUG, ( "ph=%p NOT_new_QItemEditorFactory", pObj ) );
|
||||
}
|
||||
return p;
|
||||
}
|
||||
|
||||
HB_FUNC( QT_QITEMEDITORFACTORY )
|
||||
{
|
||||
QItemEditorFactory * pObj = NULL;
|
||||
|
||||
if( HB_ISPOINTER( 1 ) )
|
||||
{
|
||||
pObj = new QItemEditorFactory() ;
|
||||
}
|
||||
else
|
||||
{
|
||||
pObj = new QItemEditorFactory( *hbqt_par_QItemEditorFactory( 1 ) ) ;
|
||||
}
|
||||
|
||||
hb_retptrGC( hbqt_gcAllocate_QItemEditorFactory( ( void * ) pObj, true ) );
|
||||
}
|
||||
|
||||
/*
|
||||
* virtual QWidget * createEditor ( QVariant::Type type, QWidget * parent ) const
|
||||
*/
|
||||
HB_FUNC( QT_QITEMEDITORFACTORY_CREATEEDITOR )
|
||||
{
|
||||
QItemEditorFactory * p = hbqt_par_QItemEditorFactory( 1 );
|
||||
if( p )
|
||||
hb_retptrGC( hbqt_gcAllocate_QWidget( ( p )->createEditor( ( QVariant::Type ) hb_parni( 2 ), hbqt_par_QWidget( 3 ) ), false ) );
|
||||
else
|
||||
{
|
||||
HB_TRACE( HB_TR_DEBUG, ( "............................... F=QT_QITEMEDITORFACTORY_CREATEEDITOR FP=hb_retptrGC( hbqt_gcAllocate_QWidget( ( p )->createEditor( ( QVariant::Type ) hb_parni( 2 ), hbqt_par_QWidget( 3 ) ), false ) ); p is NULL" ) );
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* void registerEditor ( QVariant::Type type, QItemEditorCreatorBase * creator )
|
||||
*/
|
||||
HB_FUNC( QT_QITEMEDITORFACTORY_REGISTEREDITOR )
|
||||
{
|
||||
QItemEditorFactory * p = hbqt_par_QItemEditorFactory( 1 );
|
||||
if( p )
|
||||
( p )->registerEditor( ( QVariant::Type ) hb_parni( 2 ), hbqt_par_QItemEditorCreatorBase( 3 ) );
|
||||
else
|
||||
{
|
||||
HB_TRACE( HB_TR_DEBUG, ( "............................... F=QT_QITEMEDITORFACTORY_REGISTEREDITOR FP=( p )->registerEditor( ( QVariant::Type ) hb_parni( 2 ), hbqt_par_QItemEditorCreatorBase( 3 ) ); p is NULL" ) );
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* virtual QByteArray valuePropertyName ( QVariant::Type type ) const
|
||||
*/
|
||||
HB_FUNC( QT_QITEMEDITORFACTORY_VALUEPROPERTYNAME )
|
||||
{
|
||||
QItemEditorFactory * p = hbqt_par_QItemEditorFactory( 1 );
|
||||
if( p )
|
||||
hb_retptrGC( hbqt_gcAllocate_QByteArray( new QByteArray( ( p )->valuePropertyName( ( QVariant::Type ) hb_parni( 2 ) ) ), true ) );
|
||||
else
|
||||
{
|
||||
HB_TRACE( HB_TR_DEBUG, ( "............................... F=QT_QITEMEDITORFACTORY_VALUEPROPERTYNAME FP=hb_retptrGC( hbqt_gcAllocate_QByteArray( new QByteArray( ( p )->valuePropertyName( ( QVariant::Type ) hb_parni( 2 ) ) ), true ) ); p is NULL" ) );
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* void setDefaultFactory ( QItemEditorFactory * factory )
|
||||
*/
|
||||
HB_FUNC( QT_QITEMEDITORFACTORY_SETDEFAULTFACTORY )
|
||||
{
|
||||
QItemEditorFactory * p = hbqt_par_QItemEditorFactory( 1 );
|
||||
if( p )
|
||||
( p )->setDefaultFactory( hbqt_par_QItemEditorFactory( 2 ) );
|
||||
else
|
||||
{
|
||||
HB_TRACE( HB_TR_DEBUG, ( "............................... F=QT_QITEMEDITORFACTORY_SETDEFAULTFACTORY FP=( p )->setDefaultFactory( hbqt_par_QItemEditorFactory( 2 ) ); p is NULL" ) );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
#endif /* #if QT_VERSION >= 0x040500 */
|
||||
/*----------------------------------------------------------------------*/
|
||||
131
harbour/contrib/hbqt/qtgui/TQItemDelegate.prg
Normal file
131
harbour/contrib/hbqt/qtgui/TQItemDelegate.prg
Normal file
@@ -0,0 +1,131 @@
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
/* -------------------------------------------------------------------- */
|
||||
/* WARNING: Automatically generated source file. DO NOT EDIT! */
|
||||
/* Instead, edit corresponding .qth file, */
|
||||
/* or the generator tool itself, and run regenarate. */
|
||||
/* -------------------------------------------------------------------- */
|
||||
|
||||
/*
|
||||
* Harbour Project source code:
|
||||
* QT wrapper main header
|
||||
*
|
||||
* Copyright 2009-2010 Pritpal Bedi <pritpal@vouchcac.com>
|
||||
*
|
||||
* Copyright 2009 Marcos Antonio Gambeta <marcosgambeta at gmail dot com>
|
||||
* www - http://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 QItemDelegate INHERIT HbQtObjectHandler, QAbstractItemDelegate
|
||||
|
||||
METHOD new( ... )
|
||||
|
||||
METHOD hasClipping()
|
||||
METHOD itemEditorFactory()
|
||||
METHOD setClipping( lClip )
|
||||
METHOD setItemEditorFactory( pFactory )
|
||||
METHOD createEditor( pParent, pOption, pIndex )
|
||||
METHOD paint( pPainter, pOption, pIndex )
|
||||
METHOD setEditorData( pEditor, pIndex )
|
||||
METHOD setModelData( pEditor, pModel, pIndex )
|
||||
METHOD sizeHint( pOption, pIndex )
|
||||
METHOD updateEditorGeometry( pEditor, pOption, pIndex )
|
||||
|
||||
ENDCLASS
|
||||
|
||||
|
||||
METHOD QItemDelegate:new( ... )
|
||||
LOCAL p
|
||||
FOR EACH p IN { ... }
|
||||
hb_pvalue( p:__enumIndex(), hbqt_ptr( p ) )
|
||||
NEXT
|
||||
::pPtr := Qt_QItemDelegate( ... )
|
||||
RETURN Self
|
||||
|
||||
|
||||
METHOD QItemDelegate:hasClipping()
|
||||
RETURN Qt_QItemDelegate_hasClipping( ::pPtr )
|
||||
|
||||
|
||||
METHOD QItemDelegate:itemEditorFactory()
|
||||
RETURN Qt_QItemDelegate_itemEditorFactory( ::pPtr )
|
||||
|
||||
|
||||
METHOD QItemDelegate:setClipping( lClip )
|
||||
RETURN Qt_QItemDelegate_setClipping( ::pPtr, lClip )
|
||||
|
||||
|
||||
METHOD QItemDelegate:setItemEditorFactory( pFactory )
|
||||
RETURN Qt_QItemDelegate_setItemEditorFactory( ::pPtr, hbqt_ptr( pFactory ) )
|
||||
|
||||
|
||||
METHOD QItemDelegate:createEditor( pParent, pOption, pIndex )
|
||||
RETURN Qt_QItemDelegate_createEditor( ::pPtr, hbqt_ptr( pParent ), hbqt_ptr( pOption ), hbqt_ptr( pIndex ) )
|
||||
|
||||
|
||||
METHOD QItemDelegate:paint( pPainter, pOption, pIndex )
|
||||
RETURN Qt_QItemDelegate_paint( ::pPtr, hbqt_ptr( pPainter ), hbqt_ptr( pOption ), hbqt_ptr( pIndex ) )
|
||||
|
||||
|
||||
METHOD QItemDelegate:setEditorData( pEditor, pIndex )
|
||||
RETURN Qt_QItemDelegate_setEditorData( ::pPtr, hbqt_ptr( pEditor ), hbqt_ptr( pIndex ) )
|
||||
|
||||
|
||||
METHOD QItemDelegate:setModelData( pEditor, pModel, pIndex )
|
||||
RETURN Qt_QItemDelegate_setModelData( ::pPtr, hbqt_ptr( pEditor ), hbqt_ptr( pModel ), hbqt_ptr( pIndex ) )
|
||||
|
||||
|
||||
METHOD QItemDelegate:sizeHint( pOption, pIndex )
|
||||
RETURN Qt_QItemDelegate_sizeHint( ::pPtr, hbqt_ptr( pOption ), hbqt_ptr( pIndex ) )
|
||||
|
||||
|
||||
METHOD QItemDelegate:updateEditorGeometry( pEditor, pOption, pIndex )
|
||||
RETURN Qt_QItemDelegate_updateEditorGeometry( ::pPtr, hbqt_ptr( pEditor ), hbqt_ptr( pOption ), hbqt_ptr( pIndex ) )
|
||||
|
||||
91
harbour/contrib/hbqt/qtgui/TQItemEditorCreator.prg
Normal file
91
harbour/contrib/hbqt/qtgui/TQItemEditorCreator.prg
Normal file
@@ -0,0 +1,91 @@
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
/* -------------------------------------------------------------------- */
|
||||
/* WARNING: Automatically generated source file. DO NOT EDIT! */
|
||||
/* Instead, edit corresponding .qth file, */
|
||||
/* or the generator tool itself, and run regenarate. */
|
||||
/* -------------------------------------------------------------------- */
|
||||
|
||||
/*
|
||||
* Harbour Project source code:
|
||||
* QT wrapper main header
|
||||
*
|
||||
* Copyright 2009-2010 Pritpal Bedi <pritpal@vouchcac.com>
|
||||
*
|
||||
* Copyright 2009 Marcos Antonio Gambeta <marcosgambeta at gmail dot com>
|
||||
* www - http://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 QItemEditorCreator INHERIT HbQtObjectHandler, QItemEditorCreatorBase
|
||||
|
||||
METHOD new( ... )
|
||||
|
||||
METHOD createWidget( pParent )
|
||||
METHOD valuePropertyName()
|
||||
|
||||
ENDCLASS
|
||||
|
||||
|
||||
METHOD QItemEditorCreator:new( ... )
|
||||
LOCAL p
|
||||
FOR EACH p IN { ... }
|
||||
hb_pvalue( p:__enumIndex(), hbqt_ptr( p ) )
|
||||
NEXT
|
||||
::pPtr := Qt_QItemEditorCreator( ... )
|
||||
RETURN Self
|
||||
|
||||
|
||||
METHOD QItemEditorCreator:createWidget( pParent )
|
||||
RETURN Qt_QItemEditorCreator_createWidget( ::pPtr, hbqt_ptr( pParent ) )
|
||||
|
||||
|
||||
METHOD QItemEditorCreator:valuePropertyName()
|
||||
RETURN Qt_QItemEditorCreator_valuePropertyName( ::pPtr )
|
||||
|
||||
91
harbour/contrib/hbqt/qtgui/TQItemEditorCreatorBase.prg
Normal file
91
harbour/contrib/hbqt/qtgui/TQItemEditorCreatorBase.prg
Normal file
@@ -0,0 +1,91 @@
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
/* -------------------------------------------------------------------- */
|
||||
/* WARNING: Automatically generated source file. DO NOT EDIT! */
|
||||
/* Instead, edit corresponding .qth file, */
|
||||
/* or the generator tool itself, and run regenarate. */
|
||||
/* -------------------------------------------------------------------- */
|
||||
|
||||
/*
|
||||
* Harbour Project source code:
|
||||
* QT wrapper main header
|
||||
*
|
||||
* Copyright 2009-2010 Pritpal Bedi <pritpal@vouchcac.com>
|
||||
*
|
||||
* Copyright 2009 Marcos Antonio Gambeta <marcosgambeta at gmail dot com>
|
||||
* www - http://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 QItemEditorCreatorBase INHERIT HbQtObjectHandler
|
||||
|
||||
METHOD new( ... )
|
||||
|
||||
METHOD createWidget( pParent )
|
||||
METHOD valuePropertyName()
|
||||
|
||||
ENDCLASS
|
||||
|
||||
|
||||
METHOD QItemEditorCreatorBase:new( ... )
|
||||
LOCAL p
|
||||
FOR EACH p IN { ... }
|
||||
hb_pvalue( p:__enumIndex(), hbqt_ptr( p ) )
|
||||
NEXT
|
||||
::pPtr := Qt_QItemEditorCreatorBase( ... )
|
||||
RETURN Self
|
||||
|
||||
|
||||
METHOD QItemEditorCreatorBase:createWidget( pParent )
|
||||
RETURN Qt_QItemEditorCreatorBase_createWidget( ::pPtr, hbqt_ptr( pParent ) )
|
||||
|
||||
|
||||
METHOD QItemEditorCreatorBase:valuePropertyName()
|
||||
RETURN Qt_QItemEditorCreatorBase_valuePropertyName( ::pPtr )
|
||||
|
||||
101
harbour/contrib/hbqt/qtgui/TQItemEditorFactory.prg
Normal file
101
harbour/contrib/hbqt/qtgui/TQItemEditorFactory.prg
Normal file
@@ -0,0 +1,101 @@
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
/* -------------------------------------------------------------------- */
|
||||
/* WARNING: Automatically generated source file. DO NOT EDIT! */
|
||||
/* Instead, edit corresponding .qth file, */
|
||||
/* or the generator tool itself, and run regenarate. */
|
||||
/* -------------------------------------------------------------------- */
|
||||
|
||||
/*
|
||||
* Harbour Project source code:
|
||||
* QT wrapper main header
|
||||
*
|
||||
* Copyright 2009-2010 Pritpal Bedi <pritpal@vouchcac.com>
|
||||
*
|
||||
* Copyright 2009 Marcos Antonio Gambeta <marcosgambeta at gmail dot com>
|
||||
* www - http://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 QItemEditorFactory INHERIT HbQtObjectHandler
|
||||
|
||||
METHOD new( ... )
|
||||
|
||||
METHOD createEditor( nType, pParent )
|
||||
METHOD registerEditor( nType, pCreator )
|
||||
METHOD valuePropertyName( nType )
|
||||
METHOD setDefaultFactory( pFactory )
|
||||
|
||||
ENDCLASS
|
||||
|
||||
|
||||
METHOD QItemEditorFactory:new( ... )
|
||||
LOCAL p
|
||||
FOR EACH p IN { ... }
|
||||
hb_pvalue( p:__enumIndex(), hbqt_ptr( p ) )
|
||||
NEXT
|
||||
::pPtr := Qt_QItemEditorFactory( ... )
|
||||
RETURN Self
|
||||
|
||||
|
||||
METHOD QItemEditorFactory:createEditor( nType, pParent )
|
||||
RETURN Qt_QItemEditorFactory_createEditor( ::pPtr, nType, hbqt_ptr( pParent ) )
|
||||
|
||||
|
||||
METHOD QItemEditorFactory:registerEditor( nType, pCreator )
|
||||
RETURN Qt_QItemEditorFactory_registerEditor( ::pPtr, nType, hbqt_ptr( pCreator ) )
|
||||
|
||||
|
||||
METHOD QItemEditorFactory:valuePropertyName( nType )
|
||||
RETURN Qt_QItemEditorFactory_valuePropertyName( ::pPtr, nType )
|
||||
|
||||
|
||||
METHOD QItemEditorFactory:setDefaultFactory( pFactory )
|
||||
RETURN Qt_QItemEditorFactory_setDefaultFactory( ::pPtr, hbqt_ptr( pFactory ) )
|
||||
|
||||
@@ -83,6 +83,9 @@ CPP_SOURCES := \
|
||||
QImageWriter.cpp \
|
||||
QInputDialog.cpp \
|
||||
QInputEvent.cpp \
|
||||
QItemDelegate.cpp \
|
||||
QItemEditorCreatorBase.cpp \
|
||||
QItemEditorFactory.cpp \
|
||||
QItemSelection.cpp \
|
||||
QItemSelectionModel.cpp \
|
||||
QKeyEvent.cpp \
|
||||
@@ -306,6 +309,9 @@ PRG_SOURCES := \
|
||||
TQImageWriter.prg \
|
||||
TQInputDialog.prg \
|
||||
TQInputEvent.prg \
|
||||
TQItemDelegate.prg \
|
||||
TQItemEditorCreatorBase.prg \
|
||||
TQItemEditorFactory.prg \
|
||||
TQItemSelection.prg \
|
||||
TQItemSelectionModel.prg \
|
||||
TQKeyEvent.prg \
|
||||
|
||||
116
harbour/contrib/hbqt/qth/QItemDelegate.qth
Normal file
116
harbour/contrib/hbqt/qth/QItemDelegate.qth
Normal file
@@ -0,0 +1,116 @@
|
||||
/*
|
||||
* $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>
|
||||
QObject =
|
||||
Inherits = QAbstractItemDelegate
|
||||
Type =
|
||||
New =
|
||||
</CLASS>
|
||||
|
||||
<SUBCLASS>
|
||||
</SUBCLASS>
|
||||
|
||||
<DOC>
|
||||
</DOC>
|
||||
|
||||
<CODE>
|
||||
#include <QtGui/QItemDelegate>
|
||||
|
||||
|
||||
/* QItemDelegate ( QObject * parent = 0 )
|
||||
* ~QItemDelegate ()
|
||||
*
|
||||
*/
|
||||
HB_FUNC( QT_QITEMDELEGATE )
|
||||
{
|
||||
if( HB_ISPOINTER( 1 ) )
|
||||
{
|
||||
hb_retptr( new QItemDelegate( hbqt_par_QObject( 1 ) ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
hb_retptr( new QItemDelegate() );
|
||||
}
|
||||
}
|
||||
</CODE>
|
||||
|
||||
<ENUMS>
|
||||
enum EndEditHint { NoHint, EditNextItem, EditPreviousItem, SubmitModelCache, RevertModelCache }
|
||||
</ENUMS>
|
||||
|
||||
<PROTOS>
|
||||
bool hasClipping () const
|
||||
QItemEditorFactory * itemEditorFactory () const
|
||||
void setClipping ( bool clip )
|
||||
void setItemEditorFactory ( QItemEditorFactory * factory )
|
||||
|
||||
virtual QWidget * createEditor ( QWidget * parent, const QStyleOptionViewItem & option, const QModelIndex & index ) const
|
||||
virtual void paint ( QPainter * painter, const QStyleOptionViewItem & option, const QModelIndex & index ) const
|
||||
virtual void setEditorData ( QWidget * editor, const QModelIndex & index ) const
|
||||
virtual void setModelData ( QWidget * editor, QAbstractItemModel * model, const QModelIndex & index ) const
|
||||
virtual QSize sizeHint ( const QStyleOptionViewItem & option, const QModelIndex & index ) const
|
||||
virtual void updateEditorGeometry ( QWidget * editor, const QStyleOptionViewItem & option, const QModelIndex & index ) const
|
||||
</PROTOS>
|
||||
|
||||
<SLOTS>
|
||||
</SLOTS>
|
||||
|
||||
<SIGNALS>
|
||||
void closeEditor ( QWidget * editor, QAbstractItemDelegate::EndEditHint hint = NoHint )
|
||||
void commitData ( QWidget * editor )
|
||||
void sizeHintChanged ( const QModelIndex & index )
|
||||
</SIGNALS>
|
||||
96
harbour/contrib/hbqt/qth/QItemEditorCreator.qth
Normal file
96
harbour/contrib/hbqt/qth/QItemEditorCreator.qth
Normal file
@@ -0,0 +1,96 @@
|
||||
/*
|
||||
* $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>
|
||||
QObject =
|
||||
Inherits = QItemEditorCreatorBase
|
||||
Type =
|
||||
New =
|
||||
</CLASS>
|
||||
|
||||
<SUBCLASS>
|
||||
</SUBCLASS>
|
||||
|
||||
<DOC>
|
||||
</DOC>
|
||||
|
||||
<CODE>
|
||||
#include <QtGui/QItemEditorCreator>
|
||||
|
||||
|
||||
/*
|
||||
* QItemEditorCreator ( const QByteArray & valuePropertyName )
|
||||
*
|
||||
*/
|
||||
HB_FUNC( QT_QITEMEDITORCREATOR )
|
||||
{
|
||||
// hb_retptr( new QItemEditorCreator( hbqt_par_QByteArray( 1 ) ) );
|
||||
}
|
||||
</CODE>
|
||||
|
||||
<ENUMS>
|
||||
</ENUMS>
|
||||
|
||||
<PROTOS>
|
||||
virtual QWidget * createWidget ( QWidget * parent ) const
|
||||
virtual QByteArray valuePropertyName () const
|
||||
</PROTOS>
|
||||
|
||||
<SLOTS>
|
||||
</SLOTS>
|
||||
|
||||
<SIGNALS>
|
||||
</SIGNALS>
|
||||
96
harbour/contrib/hbqt/qth/QItemEditorCreatorBase.qth
Normal file
96
harbour/contrib/hbqt/qth/QItemEditorCreatorBase.qth
Normal file
@@ -0,0 +1,96 @@
|
||||
/*
|
||||
* $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>
|
||||
QObject = no
|
||||
Inherits =
|
||||
Type =
|
||||
New =
|
||||
</CLASS>
|
||||
|
||||
<SUBCLASS>
|
||||
</SUBCLASS>
|
||||
|
||||
<DOC>
|
||||
</DOC>
|
||||
|
||||
<CODE>
|
||||
#include <QtGui/QItemEditorCreatorBase>
|
||||
|
||||
|
||||
/*
|
||||
* virtual ~QItemEditorCreatorBase ()
|
||||
*
|
||||
*/
|
||||
HB_FUNC( QT_QITEMEDITORCREATORBASE )
|
||||
{
|
||||
|
||||
}
|
||||
</CODE>
|
||||
|
||||
<ENUMS>
|
||||
</ENUMS>
|
||||
|
||||
<PROTOS>
|
||||
virtual QWidget * createWidget ( QWidget * parent ) const = 0
|
||||
virtual QByteArray valuePropertyName () const = 0
|
||||
</PROTOS>
|
||||
|
||||
<SLOTS>
|
||||
</SLOTS>
|
||||
|
||||
<SIGNALS>
|
||||
</SIGNALS>
|
||||
108
harbour/contrib/hbqt/qth/QItemEditorFactory.qth
Normal file
108
harbour/contrib/hbqt/qth/QItemEditorFactory.qth
Normal file
@@ -0,0 +1,108 @@
|
||||
/*
|
||||
* $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>
|
||||
QObject = no
|
||||
Inherits =
|
||||
Type =
|
||||
New =
|
||||
</CLASS>
|
||||
|
||||
<SUBCLASS>
|
||||
</SUBCLASS>
|
||||
|
||||
<DOC>
|
||||
</DOC>
|
||||
|
||||
<CODE>
|
||||
#include <QtGui/QItemEditorFactory>
|
||||
|
||||
|
||||
/*
|
||||
* QItemEditorFactory ()
|
||||
* virtual ~QItemEditorFactory ()
|
||||
*
|
||||
*/
|
||||
HB_FUNC( QT_QITEMEDITORFACTORY )
|
||||
{
|
||||
if( HB_ISPOINTER( 1 ) )
|
||||
{
|
||||
hb_retptr( new QItemEditorFactory() );
|
||||
}
|
||||
else
|
||||
{
|
||||
hb_retptr( new QItemEditorFactory( *hbqt_par_QItemEditorFactory( 1 ) ) );
|
||||
}
|
||||
}
|
||||
</CODE>
|
||||
|
||||
<ENUMS>
|
||||
</ENUMS>
|
||||
|
||||
<PROTOS>
|
||||
virtual QWidget * createEditor ( QVariant::Type type, QWidget * parent ) const
|
||||
void registerEditor ( QVariant::Type type, QItemEditorCreatorBase * creator )
|
||||
virtual QByteArray valuePropertyName ( QVariant::Type type ) const
|
||||
|
||||
//const QItemEditorFactory * defaultFactory ()
|
||||
void setDefaultFactory ( QItemEditorFactory * factory )
|
||||
</PROTOS>
|
||||
|
||||
<SLOTS>
|
||||
</SLOTS>
|
||||
|
||||
<SIGNALS>
|
||||
</SIGNALS>
|
||||
Reference in New Issue
Block a user