2009-10-31 10:23 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com)
* contrib/hbqt/generator/hbqtgen.prg
* contrib/hbqt/hbqt.h
* contrib/hbqt/hbqt_destruct.cpp
* contrib/hbqt/hbqt_slots.cpp
* contrib/hbqt/hbqt_slots.h
* contrib/hbqt/moc_slots.cpp
* contrib/hbxbp/tests/demoxbp.prg
* contrib/hbxbp/xbpbrowse.prg
* contrib/hbxbp/xbpdialog.prg
* contrib/hbxbp/xbpgeneric.prg
* contrib/hbxbp/xbpmenubar.prg
* contrib/hbxbp/xbpwindow.prg
* contrib/qtgui/QTableView.cpp
* contrib/qtgui/TQTableView.prg
! Some more debug information included.
Please note that the build may be broken, so bear with me for a
couple of days. Lorenzo, you can continue with experiments.
This commit is contained in:
@@ -17,6 +17,25 @@
|
||||
past entries belonging to author(s): Viktor Szakats.
|
||||
*/
|
||||
|
||||
2009-10-31 10:23 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com)
|
||||
* contrib/hbqt/generator/hbqtgen.prg
|
||||
* contrib/hbqt/hbqt.h
|
||||
* contrib/hbqt/hbqt_destruct.cpp
|
||||
* contrib/hbqt/hbqt_slots.cpp
|
||||
* contrib/hbqt/hbqt_slots.h
|
||||
* contrib/hbqt/moc_slots.cpp
|
||||
* contrib/hbxbp/tests/demoxbp.prg
|
||||
* contrib/hbxbp/xbpbrowse.prg
|
||||
* contrib/hbxbp/xbpdialog.prg
|
||||
* contrib/hbxbp/xbpgeneric.prg
|
||||
* contrib/hbxbp/xbpmenubar.prg
|
||||
* contrib/hbxbp/xbpwindow.prg
|
||||
* contrib/qtgui/QTableView.cpp
|
||||
* contrib/qtgui/TQTableView.prg
|
||||
! Some more debug information included.
|
||||
Please note that the build may be broken, so bear with me for a
|
||||
couple of days. Lorenzo, you can continue with experiments.
|
||||
|
||||
2009-10-31 16:42 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
|
||||
* harbour/contrib/rddads/ads1.c
|
||||
! In APPEND metohd generate RT error EG_APPENDLOCK only if ACE returns
|
||||
|
||||
@@ -469,7 +469,7 @@ STATIC FUNCTION GenSource( cProFile, cPathIn, cPathOut, cPathDoc )
|
||||
aadd( cpp_, "{ " )
|
||||
IF lDestructor
|
||||
aadd( cpp_, "#if defined(__debug__)" )
|
||||
aadd( cpp_, ' hb_snprintf( str, sizeof(str), "' + 'release_' + cWidget + '" ); OutputDebugString( str );' )
|
||||
aadd( cpp_, 'hb_snprintf( str, sizeof(str), "' + 'release_' + pad( cWidget, 27 ) + ' %i B %i KB", ( int ) hb_xquery( 1001 ), hb_getMemUsed() ); OutputDebugString( str );' )
|
||||
aadd( cpp_, "#endif" )
|
||||
aadd( cpp_, " void * ph = ( void * ) Cargo; " )
|
||||
aadd( cpp_, " if( ph ) " )
|
||||
@@ -484,7 +484,7 @@ STATIC FUNCTION GenSource( cProFile, cPathIn, cPathOut, cPathDoc )
|
||||
aadd( cpp_, " else" )
|
||||
aadd( cpp_, " {" )
|
||||
aadd( cpp_, "#if defined(__debug__)" )
|
||||
aadd( cpp_, ' hb_snprintf( str, sizeof(str), "' + ' Object Name Missing: ' + cWidget + '" ); OutputDebugString( str );' )
|
||||
aadd( cpp_, 'hb_snprintf( str, sizeof(str), "' + ' Object Name Missing: ' + cWidget + '" ); OutputDebugString( str );' )
|
||||
aadd( cpp_, "#endif" )
|
||||
aadd( cpp_, " }" )
|
||||
ELSE
|
||||
@@ -492,6 +492,12 @@ STATIC FUNCTION GenSource( cProFile, cPathIn, cPathOut, cPathDoc )
|
||||
aadd( cpp_, " ph = NULL;" )
|
||||
ENDIF
|
||||
aadd( cpp_, " }" )
|
||||
aadd( cpp_, " else" )
|
||||
aadd( cpp_, " {" )
|
||||
aadd( cpp_, "#if defined(__debug__)" )
|
||||
aadd( cpp_, 'hb_snprintf( str, sizeof(str), "' + '! ph____' + cWidget + '" ); OutputDebugString( str );' )
|
||||
aadd( cpp_, "#endif" )
|
||||
aadd( cpp_, " }" )
|
||||
ELSE
|
||||
aadd( cpp_, " HB_SYMBOL_UNUSED( Cargo );" )
|
||||
ENDIF
|
||||
@@ -520,6 +526,11 @@ STATIC FUNCTION GenSource( cProFile, cPathIn, cPathOut, cPathDoc )
|
||||
ELSE
|
||||
aadd( cpp_, " void * pObj = NULL;" )
|
||||
ENDIF
|
||||
|
||||
aadd( cpp_, "#if defined(__debug__)" )
|
||||
aadd( cpp_, 'hb_snprintf( str, sizeof(str), "' + ' ' + IF( lDestructor, 'GC', 'NON-GC' ) + ': new ' + pad( cWidget, 27 ) + ' %i B %i KB", ( int ) hb_xquery( 1001 ), hb_getMemUsed() ); OutputDebugString( str );' )
|
||||
aadd( cpp_, "#endif" )
|
||||
|
||||
aadd( cpp_, "" )
|
||||
FOR i := 3 TO len( new_ ) - 1
|
||||
IF left( ltrim( new_[ i ] ), 2 ) != "//"
|
||||
@@ -533,6 +544,11 @@ STATIC FUNCTION GenSource( cProFile, cPathIn, cPathOut, cPathDoc )
|
||||
ENDIF
|
||||
NEXT
|
||||
aadd( cpp_, "" )
|
||||
|
||||
aadd( cpp_, "#if defined(__debug__)" )
|
||||
aadd( cpp_, 'hb_snprintf( str, sizeof(str), "' + ' ' + IF( lDestructor, 'GC', 'NON-GC' ) + ': ' + pad( " ", 27 ) + ' %i B %i KB", ( int ) hb_xquery( 1001 ), hb_getMemUsed() ); OutputDebugString( str );' )
|
||||
aadd( cpp_, "#endif" )
|
||||
|
||||
//IF lObject .or. IsMemObject( cWidget )
|
||||
IF lDestructor
|
||||
aadd( cpp_, " p->ph = pObj;" )
|
||||
|
||||
@@ -64,7 +64,8 @@
|
||||
//#define __debug__
|
||||
#if defined(__debug__)
|
||||
#include <windows.h>
|
||||
static char str[ 50 ];
|
||||
static char str[ 100 ];
|
||||
int hb_getMemUsed( void );
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
|
||||
@@ -103,6 +103,11 @@ void * hbqt_ptrTOgcpointer( void * ptr, QT_G_FUNC_PTR func )
|
||||
QGC_POINTER * p = ( QGC_POINTER * ) hb_gcAllocate( sizeof( QGC_POINTER ), gcFuncs() );
|
||||
p->ph = ptr;
|
||||
p->func = func;
|
||||
|
||||
#if defined(__debug__)
|
||||
hb_snprintf( str, sizeof(str), " hbqt_ptrTOgcpointer( %p, %p ) %i %i", ptr, func, ( int ) hb_xquery( 1001 ), hb_getMemUsed() ); OutputDebugString( str );
|
||||
#endif
|
||||
|
||||
return p;
|
||||
}
|
||||
|
||||
|
||||
@@ -1897,6 +1897,13 @@ HbTableView::HbTableView( QWidget * parent ) : QTableView( parent )
|
||||
}
|
||||
HbTableView::~HbTableView()
|
||||
{
|
||||
#if defined(__debug__)
|
||||
hb_snprintf( str, sizeof( str ), "HbTableView::~HbTableView() 0 %i %i", ( int ) hb_xquery( 1001 ), hb_getMemUsed() ); OutputDebugString( str );
|
||||
#endif
|
||||
destroy();
|
||||
#if defined(__debug__)
|
||||
hb_snprintf( str, sizeof( str ), "HbTableView::~HbTableView() 1 %i %i", ( int ) hb_xquery( 1001 ), hb_getMemUsed() ); OutputDebugString( str );
|
||||
#endif
|
||||
}
|
||||
void HbTableView::keyPressEvent( QKeyEvent * event )
|
||||
{
|
||||
@@ -1928,7 +1935,7 @@ void HbTableView::resizeEvent( QResizeEvent * event )
|
||||
}
|
||||
QModelIndex HbTableView::moveCursor( HbTableView::CursorAction cursorAction, Qt::KeyboardModifiers modifiers )
|
||||
{
|
||||
// char str[ 50 ]; hb_snprintf( str, sizeof( str ), "HbTableView: action=%i %i", cursorAction, QAbstractItemView::MoveDown ); OutputDebugString( str );
|
||||
//hb_snprintf( str, sizeof( str ), "HbTableView: action=%i %i", cursorAction, QAbstractItemView::MoveDown ); OutputDebugString( str );
|
||||
|
||||
//emit sg_moveCursor( cursorAction, modifiers );
|
||||
return QTableView::moveCursor( cursorAction, modifiers );
|
||||
@@ -1943,7 +1950,7 @@ void HbTableView::scrollContentsBy( int x, int y )
|
||||
}
|
||||
void HbTableView::scrollTo( const QModelIndex & index, QAbstractItemView::ScrollHint hint )
|
||||
{
|
||||
//char str[ 50 ]; hb_snprintf( str, sizeof( str ), "HbTableView:scrollTo row = %i col = %i", index.row(),index.column() ); OutputDebugString( str );
|
||||
//hb_snprintf( str, sizeof( str ), "HbTableView:scrollTo row = %i col = %i", index.row(),index.column() ); OutputDebugString( str );
|
||||
QTableView::scrollTo( index, hint );
|
||||
}
|
||||
|
||||
@@ -2215,16 +2222,19 @@ MyMainWindow::MyMainWindow( PHB_ITEM pBlock, int iThreadID )
|
||||
|
||||
block = pBlock;
|
||||
threadID = iThreadID;
|
||||
activated = true;
|
||||
painter = new QPainter( this );
|
||||
}
|
||||
MyMainWindow::~MyMainWindow( void )
|
||||
{
|
||||
delete painter;
|
||||
#if defined(__debug__)
|
||||
hb_snprintf( str, sizeof(str), "~MyMainWindow %i %i", (int) hb_xquery( 1001 ), hb_getMemUsed() ); OutputDebugString( str );
|
||||
#endif
|
||||
hb_itemRelease( block );
|
||||
destroy();
|
||||
#if defined(__debug__)
|
||||
hb_snprintf( str, sizeof(str), "~MyMainWindow %i %i", (int) hb_xquery( 1001 ), hb_getMemUsed() ); OutputDebugString( str );
|
||||
#endif
|
||||
}
|
||||
void MyMainWindow::paintEvent( QPaintEvent * event )
|
||||
void MyMainWindow::xpaintEvent( QPaintEvent * event )
|
||||
{
|
||||
hb_threadMutexLock( s_mutex );
|
||||
|
||||
@@ -2260,10 +2270,6 @@ bool MyMainWindow::event( QEvent * event )
|
||||
{
|
||||
int type = event->type();
|
||||
//hb_snprintf( str, sizeof( str ), " event(%i) %i", threadID , type ); OutputDebugString( str );
|
||||
if( type == QEvent::WindowActivate || type == QEvent::Enter )
|
||||
{
|
||||
activated = true;
|
||||
}
|
||||
hb_threadMutexLock( s_mutex );
|
||||
#if 0
|
||||
if( hb_vmRequestReenter() )
|
||||
@@ -2292,7 +2298,6 @@ void MyMainWindow::focusInEvent( QFocusEvent *event )
|
||||
hb_itemRelease( p1 );
|
||||
hb_vmRequestRestore();
|
||||
}
|
||||
activated = true;
|
||||
QWidget::focusInEvent( event );
|
||||
hb_threadMutexUnlock( s_mutex );
|
||||
}
|
||||
@@ -2480,4 +2485,55 @@ HB_FUNC( QT_MYDRAWINGAREA )
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
#if defined(__debug__)
|
||||
|
||||
#include <Psapi.h>
|
||||
int hb_getMemUsed( void )
|
||||
{
|
||||
HANDLE hProcess;
|
||||
PROCESS_MEMORY_COUNTERS pmc;
|
||||
int size = 0;
|
||||
|
||||
hProcess = OpenProcess( PROCESS_QUERY_INFORMATION |
|
||||
PROCESS_VM_READ,
|
||||
FALSE, GetCurrentProcessId() );
|
||||
if (NULL == hProcess)
|
||||
return 0;
|
||||
|
||||
if ( GetProcessMemoryInfo( hProcess, &pmc, sizeof(pmc)) )
|
||||
{
|
||||
#if 0
|
||||
printf( "\tPageFaultCount: 0x%08X\n", pmc.PageFaultCount );
|
||||
printf( "\tPeakWorkingSetSize: 0x%08X\n",
|
||||
pmc.PeakWorkingSetSize );
|
||||
printf( "\tWorkingSetSize: 0x%08X\n", pmc.WorkingSetSize );
|
||||
printf( "\tQuotaPeakPagedPoolUsage: 0x%08X\n",
|
||||
pmc.QuotaPeakPagedPoolUsage );
|
||||
printf( "\tQuotaPagedPoolUsage: 0x%08X\n",
|
||||
pmc.QuotaPagedPoolUsage );
|
||||
printf( "\tQuotaPeakNonPagedPoolUsage: 0x%08X\n",
|
||||
pmc.QuotaPeakNonPagedPoolUsage );
|
||||
printf( "\tQuotaNonPagedPoolUsage: 0x%08X\n",
|
||||
pmc.QuotaNonPagedPoolUsage );
|
||||
printf( "\tPagefileUsage: 0x%08X\n", pmc.PagefileUsage );
|
||||
printf( "\tPeakPagefileUsage: 0x%08X\n",
|
||||
pmc.PeakPagefileUsage );
|
||||
#endif
|
||||
|
||||
size = ( int ) pmc.WorkingSetSize / 1024 ;
|
||||
}
|
||||
|
||||
CloseHandle( hProcess );
|
||||
return size;
|
||||
}
|
||||
#endif
|
||||
|
||||
HB_FUNC( HB_GETMEMUSED )
|
||||
{
|
||||
#if defined(__debug__)
|
||||
hb_retni( hb_getMemUsed() );
|
||||
#else
|
||||
hb_retni( 0 );
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -97,16 +97,12 @@ public:
|
||||
void mouseReleaseEvent( QMouseEvent * event );
|
||||
void wheelEvent( QWheelEvent * event );
|
||||
void resizeEvent( QResizeEvent * event );
|
||||
void paintEvent( QPaintEvent * event );
|
||||
void xpaintEvent( QPaintEvent * event );
|
||||
void focusInEvent( QFocusEvent * event );
|
||||
void focusOutEvent( QFocusEvent * event );
|
||||
|
||||
PHB_ITEM block;
|
||||
int threadID;
|
||||
bool activated;
|
||||
QPainter * painter;
|
||||
|
||||
char str[ 50 ];
|
||||
};
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/****************************************************************************
|
||||
** Meta object code from reading C++ file 'hbqt_slots.h'
|
||||
**
|
||||
** Created: Tue Oct 27 23:49:08 2009
|
||||
** by: The Qt Meta Object Compiler version 61 (Qt 4.5.2)
|
||||
** Created: Fri Oct 30 12:46:07 2009
|
||||
** by: The Qt Meta Object Compiler version 61 (Qt 4.5.0)
|
||||
**
|
||||
** WARNING! All changes made in this file will be lost!
|
||||
*****************************************************************************/
|
||||
@@ -11,7 +11,7 @@
|
||||
#if !defined(Q_MOC_OUTPUT_REVISION)
|
||||
#error "The header file 'hbqt_slots.h' doesn't include <QObject>."
|
||||
#elif Q_MOC_OUTPUT_REVISION != 61
|
||||
#error "This file was generated using the moc from 4.5.2. It"
|
||||
#error "This file was generated using the moc from 4.5.0. It"
|
||||
#error "cannot be used with the include files from this version of Qt."
|
||||
#error "(The moc has changed too much.)"
|
||||
#endif
|
||||
|
||||
@@ -87,10 +87,16 @@ HB_FUNC( QT_HBTABLEVIEW_NAVIGATE )
|
||||
hb_retptr( new QModelIndex( hbqt_par_HbTableView( 1 )->navigate( hb_parni( 2 ) ) ) );
|
||||
}
|
||||
|
||||
HB_FUNC( QT_HBTABLEVIEW_DESTROY )
|
||||
{
|
||||
hbqt_par_HbTableView( 1 )->~HbTableView();
|
||||
}
|
||||
|
||||
|
||||
QT_G_FUNC( release_QTableView )
|
||||
{
|
||||
#if defined(__debug__)
|
||||
hb_snprintf( str, sizeof(str), "release_QTableView" ); OutputDebugString( str );
|
||||
hb_snprintf( str, sizeof(str), "release_QTableView %i B %i KB", ( int ) hb_xquery( 1001 ), hb_getMemUsed() ); OutputDebugString( str );
|
||||
#endif
|
||||
void * ph = ( void * ) Cargo;
|
||||
if( ph )
|
||||
@@ -104,19 +110,31 @@ QT_G_FUNC( release_QTableView )
|
||||
else
|
||||
{
|
||||
#if defined(__debug__)
|
||||
hb_snprintf( str, sizeof(str), " Object Name Missing: QTableView" ); OutputDebugString( str );
|
||||
hb_snprintf( str, sizeof(str), " Object Name Missing: QTableView" ); OutputDebugString( str );
|
||||
#endif
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
#if defined(__debug__)
|
||||
hb_snprintf( str, sizeof(str), "! ph____QTableView" ); OutputDebugString( str );
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
HB_FUNC( QT_QTABLEVIEW )
|
||||
{
|
||||
QGC_POINTER * p = ( QGC_POINTER * ) hb_gcAllocate( sizeof( QGC_POINTER ), gcFuncs() );
|
||||
QPointer< QTableView > pObj = NULL;
|
||||
#if defined(__debug__)
|
||||
hb_snprintf( str, sizeof(str), " GC: new QTableView %i B %i KB", ( int ) hb_xquery( 1001 ), hb_getMemUsed() ); OutputDebugString( str );
|
||||
#endif
|
||||
|
||||
pObj = ( QTableView* ) new QTableView( hbqt_par_QWidget( 1 ) ) ;
|
||||
|
||||
#if defined(__debug__)
|
||||
hb_snprintf( str, sizeof(str), " GC: %i B %i KB", ( int ) hb_xquery( 1001 ), hb_getMemUsed() ); OutputDebugString( str );
|
||||
#endif
|
||||
p->ph = pObj;
|
||||
p->func = release_QTableView;
|
||||
|
||||
|
||||
@@ -304,6 +304,7 @@ CREATE CLASS HBTableView INHERIT QTableView
|
||||
|
||||
METHOD new( pParent )
|
||||
METHOD navigate( nCursorAction, nModifiers )
|
||||
METHOD destroy()
|
||||
|
||||
ENDCLASS
|
||||
|
||||
@@ -314,4 +315,7 @@ METHOD HBTableView:new( pParent )
|
||||
METHOD HBTableView:navigate( nCursorAction, nModifiers )
|
||||
RETURN Qt_HbTableView_navigate( ::pPtr, nCursorAction, nModifiers )
|
||||
|
||||
METHOD HBTableView:destroy()
|
||||
RETURN Qt_HbTableView_destroy( ::pPtr )
|
||||
|
||||
|
||||
|
||||
@@ -64,6 +64,7 @@ CREATE CLASS HBTableView INHERIT QTableView
|
||||
|
||||
METHOD new( pParent )
|
||||
METHOD navigate( nCursorAction, nModifiers )
|
||||
METHOD destroy()
|
||||
|
||||
ENDCLASS
|
||||
|
||||
@@ -74,6 +75,9 @@ METHOD HBTableView:new( pParent )
|
||||
METHOD HBTableView:navigate( nCursorAction, nModifiers )
|
||||
RETURN Qt_HbTableView_navigate( ::pPtr, nCursorAction, nModifiers )
|
||||
|
||||
METHOD HBTableView:destroy()
|
||||
RETURN Qt_HbTableView_destroy( ::pPtr )
|
||||
|
||||
</SUBCLASS>
|
||||
|
||||
<CODE>
|
||||
@@ -99,6 +103,12 @@ HB_FUNC( QT_HBTABLEVIEW_NAVIGATE )
|
||||
{
|
||||
hb_retptr( new QModelIndex( hbqt_par_HbTableView( 1 )->navigate( hb_parni( 2 ) ) ) );
|
||||
}
|
||||
|
||||
HB_FUNC( QT_HBTABLEVIEW_DESTROY )
|
||||
{
|
||||
hbqt_par_HbTableView( 1 )->~HbTableView();
|
||||
}
|
||||
|
||||
</CODE>
|
||||
|
||||
<PROTOS>
|
||||
|
||||
@@ -113,9 +113,11 @@ PROCEDURE BuildADialog()
|
||||
LOCAL nThread := ThreadID()
|
||||
//LOCAL oStat, aMenu, aTool, aBrow, aChek, a3Sta
|
||||
|
||||
|
||||
xbp_debug( nThread, " At Startup of Thread ", memory( 1001 ) )
|
||||
/* Create Application Window */
|
||||
oDlg := GuiStdDialog( "Harbour - Xbase++ - QT Dialog [ "+ hb_ntos( nThread )+" ]" )
|
||||
|
||||
xbp_debug( nThread, " oDlg := GuiStdDialog ", memory( 1001 ) )
|
||||
oDlg:close := {|| MsgBox( "You can also close me by pressing [ESC]" ), .T. }
|
||||
// oDlg:killDisplayFocus := {|| hb_OutDebug( "Loosing Display Focus" ) }
|
||||
SetAppWindow( oDlg )
|
||||
@@ -139,61 +141,61 @@ PROCEDURE BuildADialog()
|
||||
|
||||
/* Install menu system */
|
||||
Build_MenuBar( oDlg )
|
||||
|
||||
xbp_debug( nThread, " Build_MenuBar ", memory( 1001 ) )
|
||||
/* Install Statusbar */
|
||||
Build_StatusBar( oDa )
|
||||
|
||||
xbp_debug( nThread, " Build_StatusBar ", memory( 1001 ) )
|
||||
/* Install Toolbar */
|
||||
Build_ToolBar( oDa )
|
||||
|
||||
xbp_debug( nThread, " Build_ToolBar ", memory( 1001 ) )
|
||||
/* Install Tab Pages */
|
||||
aTabs := Build_TabPages( oDa )
|
||||
|
||||
xbp_debug( nThread, " Build_TabPages ", memory( 1001 ) )
|
||||
/* Build XBPBrowse() */
|
||||
Build_Browse( aTabs[ TAB_1 ] )
|
||||
|
||||
xbp_debug( nThread, " Build_Browse ", memory( 1001 ) )
|
||||
/* Install Multi-Line Edit */
|
||||
oMLE := Build_MLE( aTabs[ TAB_2 ] )
|
||||
|
||||
xbp_debug( nThread, " Build_MLE ", memory( 1001 ) )
|
||||
/* Install checkboxes */
|
||||
Build_CheckBox( aTabs[ TAB_3 ] )
|
||||
|
||||
xbp_debug( nThread, " Build_CheckBox ", memory( 1001 ) )
|
||||
/* Install 3state checkboxes */
|
||||
Build_3State( aTabs[ TAB_3 ] )
|
||||
|
||||
xbp_debug( nThread, " Build_3State ", memory( 1001 ) )
|
||||
/* Install Radio Buttons */
|
||||
Build_RadioButton( aTabs[ TAB_3 ] )
|
||||
|
||||
xbp_debug( nThread, " Build_RadioButton", memory( 1001 ) )
|
||||
/* Install Spin Buttons */
|
||||
Build_SpinButtons( aTabs[ TAB_3 ] )
|
||||
|
||||
xbp_debug( nThread, " Build_SpinButton ", memory( 1001 ) )
|
||||
/* Install TreeView */
|
||||
Build_TreeView( aTabs[ TAB_4 ] )
|
||||
|
||||
xbp_debug( nThread, " Build_TreeView ", memory( 1001 ) )
|
||||
/* Install ListBox */
|
||||
Build_ListBox( aTabs[ TAB_5 ] )
|
||||
|
||||
xbp_debug( nThread, " Build_ListBox ", memory( 1001 ) )
|
||||
/* Install Combo Box */
|
||||
Build_ComboBox( aTabs[ TAB_5 ] )
|
||||
|
||||
xbp_debug( nThread, " Build_ComboBox ", memory( 1001 ) )
|
||||
/* Install Push Buttons */
|
||||
Build_PushButton( aTabs[ TAB_5 ] )
|
||||
|
||||
xbp_debug( nThread, " Build_PushButton ", memory( 1001 ) )
|
||||
/* Install Single Line Edits */
|
||||
Build_SLEs( aTabs[ TAB_5 ] )
|
||||
|
||||
xbp_debug( nThread, " Build_SLEs ", memory( 1001 ) )
|
||||
/* Install ScrollBar */
|
||||
Build_ScrollBar( aTabs[ TAB_5 ] )
|
||||
|
||||
xbp_debug( nThread, " Build_ScrollBars ", memory( 1001 ) )
|
||||
/* Build RTF */
|
||||
Build_Rtf( aTabs[ TAB_6 ] )
|
||||
|
||||
xbp_debug( nThread, " Build_Rtf ", memory( 1001 ) )
|
||||
/* Build HTML Viewer */
|
||||
oHTM := Build_HTMLViewer( aTabs[ TAB_7 ] )
|
||||
|
||||
xbp_debug( nThread, " Build_HTMLViewer ", memory( 1001 ) )
|
||||
/* Build Statics */
|
||||
Build_Statics( aTabs[ TAB_8 ] )
|
||||
|
||||
xbp_debug( nThread, " Build_Statics ", memory( 1001 ), hb_getMemUsed() )
|
||||
/* Present the dialog on the screen */
|
||||
oDlg:Show()
|
||||
|
||||
@@ -218,9 +220,11 @@ xbp_debug( ".............................. WOW .................................
|
||||
|
||||
xbp_debug( "------------------------------ WOW ---------------------------------" )
|
||||
xbp_debug( ". " )
|
||||
oHTM := NIL
|
||||
oMLE := NIL
|
||||
//oDlg := NIL
|
||||
// oHTM := NIL
|
||||
// oMLE := NIL
|
||||
// oDlg := NIL
|
||||
// hb_gcAll( .t. )
|
||||
xbp_debug( nThread, " THE END ", memory( 1001 ), hb_getMemUsed() )
|
||||
RETURN
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
@@ -1610,7 +1614,7 @@ FUNCTION Build_Browse( oWnd )
|
||||
#endif
|
||||
DbGotop()
|
||||
|
||||
oXbpBrowse := XbpBrowse():new():create( oWnd, , { 10,10 }, { oWnd:currentSize()[1]-25,oWnd:currentSize()[2]-45 } )
|
||||
oXbpBrowse := XbpBrowse():new():create( oWnd, , { 10,10 }, { oWnd:currentSize()[1]-20,oWnd:currentSize()[2]-20 } )
|
||||
oXbpBrowse:setFontCompoundName( "10.Courier" )
|
||||
//oXbpBrowse:hScroll := .f. // OK
|
||||
//oXbpBrowse:vScroll := .f. // OK
|
||||
|
||||
@@ -724,20 +724,20 @@ METHOD XbpBrowse:destroy()
|
||||
::oHScrollBar:pPtr := 0
|
||||
::oVScrollBar:pPtr := 0
|
||||
|
||||
//::oLeftView:destroy()
|
||||
::oLeftView:destroy()
|
||||
::oLeftDbfModel:destroy()
|
||||
::oLeftVHeaderView:pPtr := 0
|
||||
::oLeftHeaderView:pPtr := 0
|
||||
::oLeftFooterView:pPtr := 0
|
||||
::oLeftFooterModel:destroy()
|
||||
|
||||
//::oRightView:destroy()
|
||||
::oRightView:destroy()
|
||||
::oRightHeaderView:pPtr := 0
|
||||
::oRightDbfModel:destroy()
|
||||
::oRightFooterView:pPtr := 0
|
||||
::oRightFooterModel:destroy()
|
||||
|
||||
//::oTableView:destroy()
|
||||
::oTableView:destroy()
|
||||
::oVHeaderView:pPtr := 0
|
||||
::oDbfModel:destroy()
|
||||
|
||||
|
||||
@@ -124,9 +124,13 @@ METHOD XbpDialog:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
|
||||
|
||||
::cargo := ThreadID() /* To Be Removed */
|
||||
|
||||
//::oWidget := QMainWindow():new()
|
||||
#define __xQMAINWINDOW__
|
||||
//
|
||||
#ifdef __QMAINWINDOW__
|
||||
::oWidget := QMainWindow():new()
|
||||
#else
|
||||
::oWidget := QMainWindow():configure( QT_MyMainWindow( {|n,p| ::grabEvent( n,p ) }, ThreadID() ) )
|
||||
//::oWidget:setAttribute( Qt_WA_DeleteOnClose )
|
||||
#endif
|
||||
//::oWidget:setMouseTracking( .t. )
|
||||
|
||||
IF !empty( ::title )
|
||||
@@ -162,7 +166,9 @@ METHOD XbpDialog:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
|
||||
/* Instal Event Filter */
|
||||
::oWidget:installEventFilter( SetEventFilter() )
|
||||
|
||||
#ifdef __QMAINWINDOW__
|
||||
::connectWindowEvents()
|
||||
#endif
|
||||
|
||||
::connectEvent( ::pWidget, QEvent_Close , {|o,e| ::exeBlock( QEvent_Close , e, o ) } )
|
||||
::connectEvent( ::pWidget, QEvent_WindowActivate , {|o,e| ::exeBlock( QEvent_WindowActivate , e, o ) } )
|
||||
@@ -228,6 +234,8 @@ METHOD XbpDialog:destroy()
|
||||
::oWidget := NIL
|
||||
Self := NIL
|
||||
|
||||
ClearEventBuffer()
|
||||
|
||||
RETURN nil
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
@@ -138,6 +138,17 @@ FUNCTION InitializeEventBuffer()
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
FUNCTION ClearEventBuffer()
|
||||
|
||||
IF !empty( ts_events )
|
||||
aeval( ts_events, {|e,i| e := e, ts_events[ i ] := NIL } )
|
||||
ts_events := NIL
|
||||
ENDIF
|
||||
|
||||
RETURN nil
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
FUNCTION SetEventFilter()
|
||||
|
||||
RETURN QT_QEventFilter()
|
||||
|
||||
@@ -231,9 +231,20 @@ METHOD xbpMenuBar:destroy()
|
||||
ENDIF
|
||||
NEXT
|
||||
|
||||
::sl_beginMenu := NIL
|
||||
::sl_endMenu := NIL
|
||||
::sl_itemMarked := NIL
|
||||
::sl_itemSelected := NIL
|
||||
::sl_drawItem := NIL
|
||||
::sl_measureItem := NIL
|
||||
::sl_onMenuKey := NIL
|
||||
|
||||
::aMenuItems := {}
|
||||
::aOrgItems := {}
|
||||
|
||||
::xbpWindow:destroy()
|
||||
|
||||
RETURN .T.
|
||||
RETURN NIL
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
|
||||
@@ -715,17 +715,16 @@ xbp_Debug( memory( 1001 ),"Destroy: "+pad(__ObjGetClsName( self ),12)+ IF(empty(
|
||||
::aChildren := {}
|
||||
ENDIF
|
||||
|
||||
::XbpPartHandler:destroy()
|
||||
::clearSlots()
|
||||
|
||||
IF cXbp != "XBPDIALOG"
|
||||
::oWidget:pPtr := 0
|
||||
::oWidget := NIL
|
||||
ENDIF
|
||||
::XbpPartHandler:destroy()
|
||||
::clearSlots()
|
||||
|
||||
xbp_Debug( memory( 1001 )," Destroy: "+pad(__ObjGetClsName( self ),12)+ IF(empty(::cargo),'',str(::cargo) ) )
|
||||
|
||||
// Self := NIL
|
||||
|
||||
RETURN NIL
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
Reference in New Issue
Block a user