2009-12-10 02:08 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* contrib/hbqt/generator/hbqtgen.prg
% Changed to only save files which have indeed changed
(to avoid unnecessary rebuilds)
* contrib/hbqt/Makefile
* contrib/hbqt/hbqt.h
* contrib/hbqt/hbqt_slots.h
- contrib/hbqt/hbqt_hbqtdbfmodel.cpp
+ contrib/hbqt/hbqt_hbdbfmodel.cpp
- contrib/hbqt/hbqt_hbqtsyntaxhighlighter.cpp
+ contrib/hbqt/hbqt_hbqsyntaxhighlighter.cpp
- contrib/hbqt/hbqt_hbqtmymainwindow.cpp
+ contrib/hbqt/hbqt_hbqmainwindow.cpp
- contrib/hbqt/hbqt_hbqtmydrawingarea.cpp
+ contrib/hbqt/hbqt_hbdrawingarea.cpp
- contrib/hbqt/hbqt_hbqttableview.cpp
+ contrib/hbqt/hbqt_hbqtableview.cpp
* contrib/hbqt/qth/QAbstractItemModel.qth
* contrib/hbqt/qth/QSyntaxHighlighter.qth
* contrib/hbqt/qth/QTableView.qth
* Following class renames done:
- HbSyntaxHighlighter -> HBQSyntaxHighlighter (HBIDE)
- HbDbfModel -> HBDbfModel (HBXBP)
- MyDrawingArea -> HBDrawingArea (UNUSED)
- MyMainWindow -> HBQMainWindow
- HbTableView -> HBQTableView (HBXBP)
; TOFIX: These classes seem to be the problematic parts of HBQT.
They violate layering, there are naming inconsistencies
(standard QT .prg level class internally refers to inherited
special Harbour class, they implement HBXBP and IDE functionality
embedded in HBQT to hack around the rule to not place .c
code in HBXBP/HBIDE, they are not using GC collected pointers,
they require mutexes which initialization isn't properly
solved, one class is nowhere used. etcect)
* contrib/hbxbp/xbpbrowse.prg
* contrib/hbxbp/xbpwindow.prg
* contrib/hbxbp/xbpdialog.prg
* Renames applied to HBXBP code.
* contrib/hbqt/qtgui/TQTableView.prg
* contrib/hbqt/qtgui/QSyntaxHighlighter.cpp
* contrib/hbqt/qtgui/QTableView.cpp
* contrib/hbqt/qtcore/TQAbstractItemModel.prg
* contrib/hbqt/qtcore/QAbstractItemModel.cpp
* Regenerated after .qth changes.
This commit is contained in:
@@ -17,6 +17,55 @@
|
||||
past entries belonging to author(s): Viktor Szakats.
|
||||
*/
|
||||
|
||||
2009-12-10 02:08 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
|
||||
* contrib/hbqt/generator/hbqtgen.prg
|
||||
% Changed to only save files which have indeed changed
|
||||
(to avoid unnecessary rebuilds)
|
||||
|
||||
* contrib/hbqt/Makefile
|
||||
* contrib/hbqt/hbqt.h
|
||||
* contrib/hbqt/hbqt_slots.h
|
||||
- contrib/hbqt/hbqt_hbqtdbfmodel.cpp
|
||||
+ contrib/hbqt/hbqt_hbdbfmodel.cpp
|
||||
- contrib/hbqt/hbqt_hbqtsyntaxhighlighter.cpp
|
||||
+ contrib/hbqt/hbqt_hbqsyntaxhighlighter.cpp
|
||||
- contrib/hbqt/hbqt_hbqtmymainwindow.cpp
|
||||
+ contrib/hbqt/hbqt_hbqmainwindow.cpp
|
||||
- contrib/hbqt/hbqt_hbqtmydrawingarea.cpp
|
||||
+ contrib/hbqt/hbqt_hbdrawingarea.cpp
|
||||
- contrib/hbqt/hbqt_hbqttableview.cpp
|
||||
+ contrib/hbqt/hbqt_hbqtableview.cpp
|
||||
* contrib/hbqt/qth/QAbstractItemModel.qth
|
||||
* contrib/hbqt/qth/QSyntaxHighlighter.qth
|
||||
* contrib/hbqt/qth/QTableView.qth
|
||||
* Following class renames done:
|
||||
- HbSyntaxHighlighter -> HBQSyntaxHighlighter (HBIDE)
|
||||
- HbDbfModel -> HBDbfModel (HBXBP)
|
||||
- MyDrawingArea -> HBDrawingArea (UNUSED)
|
||||
- MyMainWindow -> HBQMainWindow
|
||||
- HbTableView -> HBQTableView (HBXBP)
|
||||
|
||||
; TOFIX: These classes seem to be the problematic parts of HBQT.
|
||||
They violate layering, there are naming inconsistencies
|
||||
(standard QT .prg level class internally refers to inherited
|
||||
special Harbour class, they implement HBXBP and IDE functionality
|
||||
embedded in HBQT to hack around the rule to not place .c
|
||||
code in HBXBP/HBIDE, they are not using GC collected pointers,
|
||||
they require mutexes which initialization isn't properly
|
||||
solved, one class is nowhere used. etcect)
|
||||
|
||||
* contrib/hbxbp/xbpbrowse.prg
|
||||
* contrib/hbxbp/xbpwindow.prg
|
||||
* contrib/hbxbp/xbpdialog.prg
|
||||
* Renames applied to HBXBP code.
|
||||
|
||||
* contrib/hbqt/qtgui/TQTableView.prg
|
||||
* contrib/hbqt/qtgui/QSyntaxHighlighter.cpp
|
||||
* contrib/hbqt/qtgui/QTableView.cpp
|
||||
* contrib/hbqt/qtcore/TQAbstractItemModel.prg
|
||||
* contrib/hbqt/qtcore/QAbstractItemModel.cpp
|
||||
* Regenerated after .qth changes.
|
||||
|
||||
2009-12-10 01:21 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
|
||||
* contrib/hbqt/hbqt.h
|
||||
% Minor cleanup after prev.
|
||||
|
||||
@@ -21,11 +21,11 @@ moc_slots.cpp : $(TOP)$(ROOT)contrib/hbqt/hbqt_slots.h
|
||||
include $(TOP)$(ROOT)contrib/hbqt/filelist.mk
|
||||
|
||||
CPP_SOURCES += \
|
||||
hbqt_hbqtdbfmodel.cpp \
|
||||
hbqt_hbqtmydrawingarea.cpp \
|
||||
hbqt_hbqtmymainwindow.cpp \
|
||||
hbqt_hbqtsyntaxhighlighter.cpp \
|
||||
hbqt_hbqttableview.cpp \
|
||||
hbqt_hbdbfmodel.cpp \
|
||||
hbqt_hbdrawingarea.cpp \
|
||||
hbqt_hbqmainwindow.cpp \
|
||||
hbqt_hbqsyntaxhighlighter.cpp \
|
||||
hbqt_hbqtableview.cpp \
|
||||
|
||||
include $(TOP)$(ROOT)config/header.mk
|
||||
include $(TOP)$(ROOT)config/lib.mk
|
||||
|
||||
@@ -1479,19 +1479,19 @@ STATIC FUNCTION HBRawVersion()
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
STATIC FUNCTION CreateTarget( cFile, txt_ )
|
||||
LOCAL hHandle := fcreate( cFile )
|
||||
LOCAL cContent := ""
|
||||
|
||||
OutStd( "Creating: " + cFile + hb_osNewLine() )
|
||||
AEval( txt_, { |e| cContent += RTrim( e ) + s_NewLine } )
|
||||
|
||||
/* Truncate entries */
|
||||
aeval( txt_, {|e,i| txt_[ i ] := trim( e ) } )
|
||||
/* Save it only if it has changed. */
|
||||
IF !( hb_MemoRead( cFile ) == cContent )
|
||||
|
||||
IF hHandle != -1
|
||||
aeval( txt_, { |e| fWrite( hHandle, e + s_NewLine ) } )
|
||||
fClose( hHandle )
|
||||
OutStd( "Creating: " + cFile + hb_osNewLine() )
|
||||
|
||||
hb_MemoWrit( cFile, cContent )
|
||||
ENDIF
|
||||
|
||||
RETURN file( cFile )
|
||||
RETURN hb_FileExists( cFile )
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
|
||||
@@ -377,9 +377,9 @@ extern int hbqt_getmemused( void );
|
||||
#define hbqt_par_QWizardPage( n ) ( ( QWizardPage * ) hbqt_gcpointer( n ) )
|
||||
#define hbqt_par_QWSEvent( n ) ( ( QWSEvent * ) hbqt_gcpointer( n ) )
|
||||
|
||||
#define hbqt_par_HbDbfModel( n ) ( ( HbDbfModel* ) hb_parptr( n ) )
|
||||
#define hbqt_par_HbTableView( n ) ( ( HbTableView* ) hb_parptr( n ) )
|
||||
#define hbqt_par_MyMainWindow( n ) ( ( MyMainWindow* ) hb_parptr( n ) )
|
||||
#define hbqt_par_HBDbfModel( n ) ( ( HBDbfModel* ) hb_parptr( n ) )
|
||||
#define hbqt_par_HBQTableView( n ) ( ( HBQTableView* ) hb_parptr( n ) )
|
||||
#define hbqt_par_HBQMainWindow( n ) ( ( HBQMainWindow* ) hb_parptr( n ) )
|
||||
|
||||
#define hbqt_par_QString( n ) ( ( QString ) hb_parcx( n ) )
|
||||
#define hbqt_par_QRgb( n ) ( hb_parnint( n ) )
|
||||
|
||||
@@ -123,14 +123,14 @@ static QVariant hbqt_fetchRole( PHB_ITEM block, int what, int par1, int par2 )
|
||||
return vv;
|
||||
}
|
||||
|
||||
HbDbfModel::HbDbfModel( PHB_ITEM pBlock ) : QAbstractItemModel()
|
||||
HBDbfModel::HBDbfModel( PHB_ITEM pBlock ) : QAbstractItemModel()
|
||||
{
|
||||
block = hb_itemNew( pBlock );
|
||||
iRows = 0;
|
||||
iCols = 0;
|
||||
}
|
||||
|
||||
HbDbfModel::~HbDbfModel( void )
|
||||
HBDbfModel::~HBDbfModel( void )
|
||||
{
|
||||
if( block )
|
||||
{
|
||||
@@ -139,7 +139,7 @@ HbDbfModel::~HbDbfModel( void )
|
||||
}
|
||||
}
|
||||
|
||||
Qt::ItemFlags HbDbfModel::flags( const QModelIndex & index ) const
|
||||
Qt::ItemFlags HBDbfModel::flags( const QModelIndex & index ) const
|
||||
{
|
||||
if( ! index.isValid() )
|
||||
return 0;
|
||||
@@ -147,9 +147,9 @@ Qt::ItemFlags HbDbfModel::flags( const QModelIndex & index ) const
|
||||
return Qt::ItemIsEnabled | Qt::ItemIsSelectable;
|
||||
}
|
||||
|
||||
QVariant HbDbfModel::data( const QModelIndex & index, int role ) const
|
||||
QVariant HBDbfModel::data( const QModelIndex & index, int role ) const
|
||||
{
|
||||
HB_TRACE( HB_TR_DEBUG, ( "HbDbfModel::data( row=%i col=%i role=%i )", index.row(), index.column(), role ) );
|
||||
HB_TRACE( HB_TR_DEBUG, ( "HBDbfModel::data( row=%i col=%i role=%i )", index.row(), index.column(), role ) );
|
||||
|
||||
if( !index.isValid() )
|
||||
return QVariant();
|
||||
@@ -197,9 +197,9 @@ QVariant HbDbfModel::data( const QModelIndex & index, int role ) const
|
||||
return QVariant();
|
||||
}
|
||||
|
||||
QVariant HbDbfModel::headerData( int section, Qt::Orientation orientation, int role ) const
|
||||
QVariant HBDbfModel::headerData( int section, Qt::Orientation orientation, int role ) const
|
||||
{
|
||||
HB_TRACE( HB_TR_DEBUG, ( "HbDbfModel::headerData( section=%i orient=%i role=%i )", section, orientation, role ) );
|
||||
HB_TRACE( HB_TR_DEBUG, ( "HBDbfModel::headerData( section=%i orient=%i role=%i )", section, orientation, role ) );
|
||||
|
||||
if( orientation == Qt::Horizontal )
|
||||
{
|
||||
@@ -248,7 +248,7 @@ QVariant HbDbfModel::headerData( int section, Qt::Orientation orientation, int r
|
||||
return QVariant();
|
||||
}
|
||||
|
||||
int HbDbfModel::rowCount( const QModelIndex & /*parent = QModelIndex()*/ ) const
|
||||
int HBDbfModel::rowCount( const QModelIndex & /*parent = QModelIndex()*/ ) const
|
||||
{
|
||||
if( hb_vmRequestReenter() )
|
||||
{
|
||||
@@ -265,7 +265,7 @@ int HbDbfModel::rowCount( const QModelIndex & /*parent = QModelIndex()*/ ) const
|
||||
return 0;
|
||||
}
|
||||
|
||||
int HbDbfModel::columnCount( const QModelIndex & /*parent = QModelIndex()*/ ) const
|
||||
int HBDbfModel::columnCount( const QModelIndex & /*parent = QModelIndex()*/ ) const
|
||||
{
|
||||
if( hb_vmRequestReenter() )
|
||||
{
|
||||
@@ -282,23 +282,23 @@ int HbDbfModel::columnCount( const QModelIndex & /*parent = QModelIndex()*/ ) co
|
||||
return 0;
|
||||
}
|
||||
|
||||
QModelIndex HbDbfModel::index( int row, int column, const QModelIndex & parent ) const
|
||||
QModelIndex HBDbfModel::index( int row, int column, const QModelIndex & parent ) const
|
||||
{
|
||||
HB_SYMBOL_UNUSED( parent );
|
||||
return createIndex( row, column, row * column );
|
||||
}
|
||||
|
||||
QModelIndex HbDbfModel::parent( const QModelIndex & /* child */ ) const
|
||||
QModelIndex HBDbfModel::parent( const QModelIndex & /* child */ ) const
|
||||
{
|
||||
return QModelIndex();
|
||||
}
|
||||
|
||||
void HbDbfModel::reset()
|
||||
void HBDbfModel::reset()
|
||||
{
|
||||
QAbstractItemModel::reset();
|
||||
}
|
||||
|
||||
void HbDbfModel::hbSetRowColumns( int rows, int cols )
|
||||
void HBDbfModel::hbSetRowColumns( int rows, int cols )
|
||||
{
|
||||
iRows = rows;
|
||||
iCols = cols;
|
||||
@@ -61,7 +61,7 @@
|
||||
|
||||
#include "hbqt_slots.h"
|
||||
|
||||
MyDrawingArea::MyDrawingArea(QWidget *parent) : QWidget(parent)
|
||||
HBDrawingArea::HBDrawingArea(QWidget *parent) : QWidget(parent)
|
||||
{
|
||||
setAttribute( Qt::WA_StaticContents );
|
||||
setAttribute( Qt::WA_PaintOnScreen );
|
||||
@@ -74,23 +74,23 @@ MyDrawingArea::MyDrawingArea(QWidget *parent) : QWidget(parent)
|
||||
setAttribute( Qt::WA_InputMethodEnabled, true );
|
||||
}
|
||||
|
||||
MyDrawingArea::~MyDrawingArea( void )
|
||||
HBDrawingArea::~HBDrawingArea( void )
|
||||
{
|
||||
}
|
||||
|
||||
void MyDrawingArea::mouseMoveEvent( QMouseEvent * event )
|
||||
void HBDrawingArea::mouseMoveEvent( QMouseEvent * event )
|
||||
{
|
||||
emit sg_mouseMoveEvent( event );
|
||||
}
|
||||
|
||||
void MyDrawingArea::keyPressEvent( QKeyEvent * event )
|
||||
void HBDrawingArea::keyPressEvent( QKeyEvent * event )
|
||||
{
|
||||
emit sg_keyPressEvent( event );
|
||||
}
|
||||
|
||||
HB_FUNC( QT_MYDRAWINGAREA )
|
||||
HB_FUNC( QT_HBDRAWINGAREA )
|
||||
{
|
||||
hb_retptr( ( MyDrawingArea * ) new MyDrawingArea() );
|
||||
hb_retptr( ( HBDrawingArea * ) new HBDrawingArea() );
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -66,7 +66,7 @@
|
||||
|
||||
static PHB_ITEM s_mutex = NULL;
|
||||
|
||||
MyMainWindow::MyMainWindow( PHB_ITEM pBlock, int iThreadID )
|
||||
HBQMainWindow::HBQMainWindow( PHB_ITEM pBlock, int iThreadID )
|
||||
{
|
||||
Qt::WindowFlags flags = Qt::WindowCloseButtonHint | Qt::WindowMaximizeButtonHint |
|
||||
Qt::WindowMinimizeButtonHint | Qt::WindowSystemMenuHint |
|
||||
@@ -83,9 +83,9 @@ MyMainWindow::MyMainWindow( PHB_ITEM pBlock, int iThreadID )
|
||||
threadID = iThreadID;
|
||||
}
|
||||
|
||||
MyMainWindow::~MyMainWindow( void )
|
||||
HBQMainWindow::~HBQMainWindow( void )
|
||||
{
|
||||
HB_TRACE( HB_TR_DEBUG, ( "MyMainWindow::~MyMainWindow: BEGIN" ) );
|
||||
HB_TRACE( HB_TR_DEBUG, ( "HBQMainWindow::~HBQMainWindow: BEGIN" ) );
|
||||
|
||||
if( block )
|
||||
{
|
||||
@@ -93,10 +93,10 @@ MyMainWindow::~MyMainWindow( void )
|
||||
block = NULL;
|
||||
}
|
||||
|
||||
HB_TRACE( HB_TR_DEBUG, ( "MyMainWindow::~MyMainWindow: END" ) );
|
||||
HB_TRACE( HB_TR_DEBUG, ( "HBQMainWindow::~HBQMainWindow: END" ) );
|
||||
}
|
||||
|
||||
void MyMainWindow::paintEvent( QPaintEvent * event )
|
||||
void HBQMainWindow::paintEvent( QPaintEvent * event )
|
||||
{
|
||||
hb_threadMutexLock( s_mutex );
|
||||
if( hb_vmRequestReenter() )
|
||||
@@ -111,7 +111,7 @@ void MyMainWindow::paintEvent( QPaintEvent * event )
|
||||
hb_threadMutexUnlock( s_mutex );
|
||||
}
|
||||
|
||||
bool MyMainWindow::event( QEvent * event )
|
||||
bool HBQMainWindow::event( QEvent * event )
|
||||
{
|
||||
hb_threadMutexLock( s_mutex );
|
||||
bool bRet = QWidget::event( event );
|
||||
@@ -119,7 +119,7 @@ bool MyMainWindow::event( QEvent * event )
|
||||
return bRet;
|
||||
}
|
||||
|
||||
void MyMainWindow::focusInEvent( QFocusEvent *event )
|
||||
void HBQMainWindow::focusInEvent( QFocusEvent *event )
|
||||
{
|
||||
hb_threadMutexLock( s_mutex );
|
||||
if( hb_vmRequestReenter() )
|
||||
@@ -135,7 +135,7 @@ void MyMainWindow::focusInEvent( QFocusEvent *event )
|
||||
hb_threadMutexUnlock( s_mutex );
|
||||
}
|
||||
|
||||
void MyMainWindow::focusOutEvent( QFocusEvent *event )
|
||||
void HBQMainWindow::focusOutEvent( QFocusEvent *event )
|
||||
{
|
||||
hb_threadMutexLock( s_mutex );
|
||||
if( hb_vmRequestReenter() )
|
||||
@@ -151,7 +151,7 @@ void MyMainWindow::focusOutEvent( QFocusEvent *event )
|
||||
hb_threadMutexUnlock( s_mutex );
|
||||
}
|
||||
|
||||
void MyMainWindow::keyPressEvent( QKeyEvent * event )
|
||||
void HBQMainWindow::keyPressEvent( QKeyEvent * event )
|
||||
{
|
||||
hb_threadMutexLock( s_mutex );
|
||||
if( hb_vmRequestReenter() )
|
||||
@@ -167,7 +167,7 @@ void MyMainWindow::keyPressEvent( QKeyEvent * event )
|
||||
hb_threadMutexUnlock( s_mutex );
|
||||
}
|
||||
|
||||
void MyMainWindow::mouseDoubleClickEvent( QMouseEvent * event )
|
||||
void HBQMainWindow::mouseDoubleClickEvent( QMouseEvent * event )
|
||||
{
|
||||
hb_threadMutexLock( s_mutex );
|
||||
if( hb_vmRequestReenter() )
|
||||
@@ -183,7 +183,7 @@ void MyMainWindow::mouseDoubleClickEvent( QMouseEvent * event )
|
||||
hb_threadMutexUnlock( s_mutex );
|
||||
}
|
||||
|
||||
void MyMainWindow::mouseMoveEvent( QMouseEvent * event )
|
||||
void HBQMainWindow::mouseMoveEvent( QMouseEvent * event )
|
||||
{
|
||||
hb_threadMutexLock( s_mutex );
|
||||
if( hb_vmRequestReenter() )
|
||||
@@ -199,7 +199,7 @@ void MyMainWindow::mouseMoveEvent( QMouseEvent * event )
|
||||
hb_threadMutexUnlock( s_mutex );
|
||||
}
|
||||
|
||||
void MyMainWindow::mousePressEvent( QMouseEvent * event )
|
||||
void HBQMainWindow::mousePressEvent( QMouseEvent * event )
|
||||
{
|
||||
hb_threadMutexLock( s_mutex );
|
||||
if( hb_vmRequestReenter() )
|
||||
@@ -215,7 +215,7 @@ void MyMainWindow::mousePressEvent( QMouseEvent * event )
|
||||
hb_threadMutexUnlock( s_mutex );
|
||||
}
|
||||
|
||||
void MyMainWindow::mouseReleaseEvent( QMouseEvent * event )
|
||||
void HBQMainWindow::mouseReleaseEvent( QMouseEvent * event )
|
||||
{
|
||||
hb_threadMutexLock( s_mutex );
|
||||
if( hb_vmRequestReenter() )
|
||||
@@ -231,7 +231,7 @@ void MyMainWindow::mouseReleaseEvent( QMouseEvent * event )
|
||||
hb_threadMutexUnlock( s_mutex );
|
||||
}
|
||||
|
||||
void MyMainWindow::wheelEvent( QWheelEvent * event )
|
||||
void HBQMainWindow::wheelEvent( QWheelEvent * event )
|
||||
{
|
||||
hb_threadMutexLock( s_mutex );
|
||||
if( hb_vmRequestReenter() )
|
||||
@@ -247,7 +247,7 @@ void MyMainWindow::wheelEvent( QWheelEvent * event )
|
||||
hb_threadMutexUnlock( s_mutex );
|
||||
}
|
||||
|
||||
void MyMainWindow::resizeEvent( QResizeEvent * event )
|
||||
void HBQMainWindow::resizeEvent( QResizeEvent * event )
|
||||
{
|
||||
hb_threadMutexLock( s_mutex );
|
||||
if( hb_vmRequestReenter() )
|
||||
@@ -263,9 +263,9 @@ void MyMainWindow::resizeEvent( QResizeEvent * event )
|
||||
hb_threadMutexUnlock( s_mutex );
|
||||
}
|
||||
|
||||
void MyMainWindow::closeEvent( QCloseEvent * event )
|
||||
void HBQMainWindow::closeEvent( QCloseEvent * event )
|
||||
{
|
||||
HB_TRACE( HB_TR_DEBUG, ( "MyMainWindow::closeEvent: ThreadID: %i", threadID ) );
|
||||
HB_TRACE( HB_TR_DEBUG, ( "HBQMainWindow::closeEvent: ThreadID: %i", threadID ) );
|
||||
|
||||
hb_threadMutexLock( s_mutex );
|
||||
if( hb_vmRequestReenter() )
|
||||
@@ -280,17 +280,17 @@ void MyMainWindow::closeEvent( QCloseEvent * event )
|
||||
hb_threadMutexUnlock( s_mutex );
|
||||
}
|
||||
|
||||
HB_FUNC( QT_MYMAINWINDOW )
|
||||
HB_FUNC( QT_HBQMAINWINDOW )
|
||||
{
|
||||
if( s_mutex == NULL )
|
||||
s_mutex = hb_threadMutexCreate();
|
||||
|
||||
hb_retptr( ( MyMainWindow * ) new MyMainWindow( hb_itemNew( hb_param( 1, HB_IT_BLOCK ) ), hb_parni( 2 ) ) );
|
||||
hb_retptr( ( HBQMainWindow * ) new HBQMainWindow( hb_itemNew( hb_param( 1, HB_IT_BLOCK ) ), hb_parni( 2 ) ) );
|
||||
}
|
||||
|
||||
HB_FUNC( QT_MYMAINWINDOW_DESTROY )
|
||||
HB_FUNC( QT_HBQMAINWINDOW_DESTROY )
|
||||
{
|
||||
hbqt_par_MyMainWindow( 1 )->~MyMainWindow();
|
||||
hbqt_par_HBQMainWindow( 1 )->~HBQMainWindow();
|
||||
}
|
||||
|
||||
HB_FUNC( QT_MUTEXCREATE )
|
||||
@@ -61,7 +61,7 @@
|
||||
|
||||
#include "hbqt_slots.h"
|
||||
|
||||
HbSyntaxHighlighter::HbSyntaxHighlighter( QTextDocument *parent )
|
||||
HBQSyntaxHighlighter::HBQSyntaxHighlighter( QTextDocument *parent )
|
||||
: QSyntaxHighlighter( parent )
|
||||
{
|
||||
HighlightingRule rule;
|
||||
@@ -113,7 +113,7 @@ HbSyntaxHighlighter::HbSyntaxHighlighter( QTextDocument *parent )
|
||||
commentEndExpression = QRegExp("\\*/");
|
||||
}
|
||||
|
||||
void HbSyntaxHighlighter::highlightBlock( const QString &text )
|
||||
void HBQSyntaxHighlighter::highlightBlock( const QString &text )
|
||||
{
|
||||
foreach ( const HighlightingRule &rule, highlightingRules ) {
|
||||
QRegExp expression( rule.pattern );
|
||||
@@ -61,75 +61,75 @@
|
||||
|
||||
#include "hbqt_slots.h"
|
||||
|
||||
HbTableView::HbTableView( QWidget * parent ) : QTableView( parent )
|
||||
HBQTableView::HBQTableView( QWidget * parent ) : QTableView( parent )
|
||||
{
|
||||
}
|
||||
|
||||
HbTableView::~HbTableView()
|
||||
HBQTableView::~HBQTableView()
|
||||
{
|
||||
HB_TRACE( HB_TR_DEBUG, ( "HbTableView::~HbTableView: BEGIN %i %i", ( int ) hb_xquery( 1001 ), hbqt_getmemused() ) );
|
||||
HB_TRACE( HB_TR_DEBUG, ( "HBQTableView::~HBQTableView: BEGIN %i %i", ( int ) hb_xquery( 1001 ), hbqt_getmemused() ) );
|
||||
|
||||
destroy();
|
||||
|
||||
HB_TRACE( HB_TR_DEBUG, ( "HbTableView::~HbTableView: END %i %i", ( int ) hb_xquery( 1001 ), hbqt_getmemused() ) );
|
||||
HB_TRACE( HB_TR_DEBUG, ( "HBQTableView::~HBQTableView: END %i %i", ( int ) hb_xquery( 1001 ), hbqt_getmemused() ) );
|
||||
}
|
||||
|
||||
void HbTableView::keyPressEvent( QKeyEvent * event )
|
||||
void HBQTableView::keyPressEvent( QKeyEvent * event )
|
||||
{
|
||||
emit sg_keyPressEvent( event );
|
||||
}
|
||||
|
||||
void HbTableView::mouseDoubleClickEvent( QMouseEvent * event )
|
||||
void HBQTableView::mouseDoubleClickEvent( QMouseEvent * event )
|
||||
{
|
||||
emit sg_mouseDoubleClickEvent( event );
|
||||
}
|
||||
|
||||
void HbTableView::mouseMoveEvent( QMouseEvent * event )
|
||||
void HBQTableView::mouseMoveEvent( QMouseEvent * event )
|
||||
{
|
||||
emit sg_mouseMoveEvent( event );
|
||||
}
|
||||
|
||||
void HbTableView::mousePressEvent( QMouseEvent * event )
|
||||
void HBQTableView::mousePressEvent( QMouseEvent * event )
|
||||
{
|
||||
emit sg_mousePressEvent( event );
|
||||
}
|
||||
|
||||
void HbTableView::mouseReleaseEvent( QMouseEvent * event )
|
||||
void HBQTableView::mouseReleaseEvent( QMouseEvent * event )
|
||||
{
|
||||
emit sg_mouseReleaseEvent( event );
|
||||
}
|
||||
|
||||
void HbTableView::wheelEvent( QWheelEvent * event )
|
||||
void HBQTableView::wheelEvent( QWheelEvent * event )
|
||||
{
|
||||
emit sg_wheelEvent( event );
|
||||
}
|
||||
|
||||
void HbTableView::resizeEvent( QResizeEvent * event )
|
||||
void HBQTableView::resizeEvent( QResizeEvent * event )
|
||||
{
|
||||
emit sg_resizeEvent( event );
|
||||
}
|
||||
|
||||
QModelIndex HbTableView::moveCursor( HbTableView::CursorAction cursorAction, Qt::KeyboardModifiers modifiers )
|
||||
QModelIndex HBQTableView::moveCursor( HBQTableView::CursorAction cursorAction, Qt::KeyboardModifiers modifiers )
|
||||
{
|
||||
// HB_TRACE( HB_TR_DEBUG, ( "HbTableView::moveCursor( action=%i %i )", cursorAction, QAbstractItemView::MoveDown ) );
|
||||
// HB_TRACE( HB_TR_DEBUG, ( "HBQTableView::moveCursor( action=%i %i )", cursorAction, QAbstractItemView::MoveDown ) );
|
||||
|
||||
//emit sg_moveCursor( cursorAction, modifiers );
|
||||
return QTableView::moveCursor( cursorAction, modifiers );
|
||||
}
|
||||
|
||||
QModelIndex HbTableView::navigate( int cursorAction )
|
||||
QModelIndex HBQTableView::navigate( int cursorAction )
|
||||
{
|
||||
return moveCursor( ( HbTableView::CursorAction ) cursorAction, ( Qt::KeyboardModifiers ) 0 );
|
||||
return moveCursor( ( HBQTableView::CursorAction ) cursorAction, ( Qt::KeyboardModifiers ) 0 );
|
||||
}
|
||||
|
||||
void HbTableView::scrollContentsBy( int x, int y )
|
||||
void HBQTableView::scrollContentsBy( int x, int y )
|
||||
{
|
||||
emit sg_scrollContentsBy( x, y );
|
||||
}
|
||||
|
||||
void HbTableView::scrollTo( const QModelIndex & index, QAbstractItemView::ScrollHint hint )
|
||||
void HBQTableView::scrollTo( const QModelIndex & index, QAbstractItemView::ScrollHint hint )
|
||||
{
|
||||
// HB_TRACE( HB_TR_DEBUG, ( "HbTableView::scrollTo( row = %i col = %i )", index.row(), index.column() ) );
|
||||
// HB_TRACE( HB_TR_DEBUG, ( "HBQTableView::scrollTo( row = %i col = %i )", index.row(), index.column() ) );
|
||||
|
||||
QTableView::scrollTo( index, hint );
|
||||
}
|
||||
@@ -82,13 +82,13 @@
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
class MyMainWindow : public QMainWindow
|
||||
class HBQMainWindow : public QMainWindow
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
MyMainWindow( PHB_ITEM pBlock, int iThreadID );
|
||||
virtual ~MyMainWindow();
|
||||
HBQMainWindow( PHB_ITEM pBlock, int iThreadID );
|
||||
virtual ~HBQMainWindow();
|
||||
|
||||
bool event( QEvent * event );
|
||||
void keyPressEvent( QKeyEvent * event );
|
||||
@@ -109,13 +109,13 @@ public:
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
class MyDrawingArea : public QWidget
|
||||
class HBDrawingArea : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
MyDrawingArea( QWidget *parent = 0 );
|
||||
virtual ~MyDrawingArea( void );
|
||||
HBDrawingArea( QWidget *parent = 0 );
|
||||
virtual ~HBDrawingArea( void );
|
||||
|
||||
void keyPressEvent( QKeyEvent * event );
|
||||
void mouseMoveEvent( QMouseEvent * event );
|
||||
@@ -127,13 +127,13 @@ signals:
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
class HbDbfModel : public QAbstractItemModel
|
||||
class HBDbfModel : public QAbstractItemModel
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
HbDbfModel( PHB_ITEM pBlock );
|
||||
virtual ~HbDbfModel( void );
|
||||
HBDbfModel( PHB_ITEM pBlock );
|
||||
virtual ~HBDbfModel( void );
|
||||
|
||||
PHB_ITEM block;
|
||||
int iRows;
|
||||
@@ -153,13 +153,13 @@ public:
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
class HbTableView : public QTableView
|
||||
class HBQTableView : public QTableView
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
HbTableView( QWidget * parent = 0 );
|
||||
virtual ~HbTableView();
|
||||
HBQTableView( QWidget * parent = 0 );
|
||||
virtual ~HBQTableView();
|
||||
|
||||
void keyPressEvent( QKeyEvent * event );
|
||||
void mouseDoubleClickEvent( QMouseEvent * event );
|
||||
@@ -173,7 +173,7 @@ public:
|
||||
|
||||
QModelIndex navigate( int cursorAction );
|
||||
|
||||
QModelIndex moveCursor( HbTableView::CursorAction cursorAction, Qt::KeyboardModifiers modifiers );
|
||||
QModelIndex moveCursor( HBQTableView::CursorAction cursorAction, Qt::KeyboardModifiers modifiers );
|
||||
|
||||
signals:
|
||||
void sg_keyPressEvent( QKeyEvent * event );
|
||||
@@ -183,7 +183,7 @@ signals:
|
||||
void sg_mouseReleaseEvent( QMouseEvent * event );
|
||||
void sg_wheelEvent( QWheelEvent * event );
|
||||
void sg_resizeEvent( QResizeEvent * event );
|
||||
void sg_moveCursor( HbTableView::CursorAction cursorAction, Qt::KeyboardModifiers modifiers );
|
||||
void sg_moveCursor( HBQTableView::CursorAction cursorAction, Qt::KeyboardModifiers modifiers );
|
||||
void sg_scrollContentsBy( int x, int y );
|
||||
};
|
||||
|
||||
@@ -363,12 +363,12 @@ protected:
|
||||
|
||||
class QTextDocument;
|
||||
|
||||
class HbSyntaxHighlighter : public QSyntaxHighlighter
|
||||
class HBQSyntaxHighlighter : public QSyntaxHighlighter
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
HbSyntaxHighlighter( QTextDocument *parent = 0 );
|
||||
HBQSyntaxHighlighter( QTextDocument *parent = 0 );
|
||||
|
||||
protected:
|
||||
void highlightBlock( const QString &text );
|
||||
|
||||
@@ -96,31 +96,31 @@
|
||||
|
||||
HB_FUNC( QT_HBDBFMODEL )
|
||||
{
|
||||
//hb_retptrGC( hbqt_ptrTOgcpointer( new HbDbfModel( ( PHB_ITEM ) hb_param( 1, HB_IT_BLOCK ) ), release_QAbstractItemModel ) );
|
||||
hb_retptr( new HbDbfModel( ( PHB_ITEM ) hb_param( 1, HB_IT_BLOCK ) ) );
|
||||
//hb_retptrGC( hbqt_ptrTOgcpointer( new HBDbfModel( ( PHB_ITEM ) hb_param( 1, HB_IT_BLOCK ) ), release_QAbstractItemModel ) );
|
||||
hb_retptr( new HBDbfModel( ( PHB_ITEM ) hb_param( 1, HB_IT_BLOCK ) ) );
|
||||
}
|
||||
|
||||
HB_FUNC( QT_HBDBFMODEL_RESET )
|
||||
{
|
||||
hbqt_par_HbDbfModel( 1 )->reset();
|
||||
hbqt_par_HBDbfModel( 1 )->reset();
|
||||
}
|
||||
|
||||
HB_FUNC( QT_HBDBFMODEL_INDEX )
|
||||
{
|
||||
// BI hb_retptrGC( hbqt_ptrTOgcpointer( new QModelIndex( hbqt_par_HbDbfModel( 1 )->index( hb_parni( 2 ), hb_parni( 3 ), QModelIndex() ) ), release_QModelIndex ) );
|
||||
hb_retptrGC( gcAllocate_QModelIndex( new QModelIndex( hbqt_par_HbDbfModel( 1 )->index( hb_parni( 2 ), hb_parni( 3 ), QModelIndex() ) ) ) );
|
||||
// BI hb_retptrGC( hbqt_ptrTOgcpointer( new QModelIndex( hbqt_par_HBDbfModel( 1 )->index( hb_parni( 2 ), hb_parni( 3 ), QModelIndex() ) ), release_QModelIndex ) );
|
||||
hb_retptrGC( gcAllocate_QModelIndex( new QModelIndex( hbqt_par_HBDbfModel( 1 )->index( hb_parni( 2 ), hb_parni( 3 ), QModelIndex() ) ) ) );
|
||||
}
|
||||
|
||||
HB_FUNC( QT_HBDBFMODEL_HBSETROWCOLUMNS )
|
||||
{
|
||||
hbqt_par_HbDbfModel( 1 )->hbSetRowColumns( hb_parni( 2 ), hb_parni( 3 ) );
|
||||
hbqt_par_HBDbfModel( 1 )->hbSetRowColumns( hb_parni( 2 ), hb_parni( 3 ) );
|
||||
}
|
||||
|
||||
HB_FUNC( QT_HBDBFMODEL_DESTROY )
|
||||
{
|
||||
// BI:TODO fix the GPF hbqt_par_HbDbfModel( 1 )->~HbDbfModel();
|
||||
// BI:TODO fix the GPF hbqt_par_HBDbfModel( 1 )->~HBDbfModel();
|
||||
// BUT WITHOUT THIS FM STATISTICS GENERATE A BIG LOG SO THIS IS NOT THE OPTION NOW
|
||||
hbqt_par_HbDbfModel( 1 )->~HbDbfModel();
|
||||
hbqt_par_HBDbfModel( 1 )->~HBDbfModel();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -250,7 +250,7 @@ METHOD QAbstractItemModel:submit()
|
||||
|
||||
|
||||
|
||||
CREATE CLASS HbDbfModel INHERIT QAbstractItemModel
|
||||
CREATE CLASS HBDbfModel INHERIT QAbstractItemModel
|
||||
|
||||
METHOD new( bBlock )
|
||||
METHOD reset()
|
||||
@@ -260,20 +260,20 @@ CREATE CLASS HbDbfModel INHERIT QAbstractItemModel
|
||||
|
||||
ENDCLASS
|
||||
|
||||
METHOD HbDbfModel:new( bBlock )
|
||||
::pPtr := Qt_HbDbfModel( bBlock )
|
||||
METHOD HBDbfModel:new( bBlock )
|
||||
::pPtr := Qt_HBDbfModel( bBlock )
|
||||
RETURN Self
|
||||
|
||||
METHOD HbDbfModel:reset()
|
||||
RETURN Qt_HbDbfModel_reset( ::pPtr )
|
||||
METHOD HBDbfModel:reset()
|
||||
RETURN Qt_HBDbfModel_reset( ::pPtr )
|
||||
|
||||
METHOD HbDbfModel:index( nRow, nCol )
|
||||
RETURN Qt_HbDbfModel_index( ::pPtr, nRow, nCol, 0 )
|
||||
METHOD HBDbfModel:index( nRow, nCol )
|
||||
RETURN Qt_HBDbfModel_index( ::pPtr, nRow, nCol, 0 )
|
||||
|
||||
METHOD HbDbfModel:hbSetRowColumns( nRows, nCols )
|
||||
RETURN Qt_HbDbfModel_hbSetRowColumns( ::pPtr, nRows, nCols )
|
||||
METHOD HBDbfModel:hbSetRowColumns( nRows, nCols )
|
||||
RETURN Qt_HBDbfModel_hbSetRowColumns( ::pPtr, nRows, nCols )
|
||||
|
||||
METHOD HbDbfModel:destroy()
|
||||
RETURN Qt_HbDbfModel_destroy( ::pPtr )
|
||||
METHOD HBDbfModel:destroy()
|
||||
RETURN Qt_HBDbfModel_destroy( ::pPtr )
|
||||
|
||||
|
||||
|
||||
@@ -140,7 +140,7 @@ HB_FUNC( QT_QSYNTAXHIGHLIGHTER )
|
||||
|
||||
if( hb_pcount() == 1 && HB_ISPOINTER( 1 ) )
|
||||
{
|
||||
pObj = new HbSyntaxHighlighter( hbqt_par_QTextDocument( 1 ) ) ;
|
||||
pObj = new HBQSyntaxHighlighter( hbqt_par_QTextDocument( 1 ) ) ;
|
||||
}
|
||||
|
||||
hb_retptrGC( gcAllocate_QSyntaxHighlighter( pObj ) );
|
||||
|
||||
@@ -77,19 +77,19 @@
|
||||
* ~QTableView ()
|
||||
*/
|
||||
|
||||
HB_FUNC( QT_HBTABLEVIEW )
|
||||
HB_FUNC( QT_HBQTABLEVIEW )
|
||||
{
|
||||
hb_retptr( new HbTableView( hbqt_par_QWidget( 1 ) ) );
|
||||
hb_retptr( new HBQTableView( hbqt_par_QWidget( 1 ) ) );
|
||||
}
|
||||
|
||||
HB_FUNC( QT_HBTABLEVIEW_NAVIGATE )
|
||||
HB_FUNC( QT_HBQTABLEVIEW_NAVIGATE )
|
||||
{
|
||||
hb_retptr( new QModelIndex( hbqt_par_HbTableView( 1 )->navigate( hb_parni( 2 ) ) ) );
|
||||
hb_retptr( new QModelIndex( hbqt_par_HBQTableView( 1 )->navigate( hb_parni( 2 ) ) ) );
|
||||
}
|
||||
|
||||
HB_FUNC( QT_HBTABLEVIEW_DESTROY )
|
||||
HB_FUNC( QT_HBQTABLEVIEW_DESTROY )
|
||||
{
|
||||
hbqt_par_HbTableView( 1 )->~HbTableView();
|
||||
hbqt_par_HBQTableView( 1 )->~HBQTableView();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -300,7 +300,7 @@ METHOD QTableView:showRow( nRow )
|
||||
|
||||
|
||||
|
||||
CREATE CLASS HBTableView INHERIT QTableView
|
||||
CREATE CLASS HBQTableView INHERIT QTableView
|
||||
|
||||
METHOD new( pParent )
|
||||
METHOD navigate( nCursorAction, nModifiers )
|
||||
@@ -308,14 +308,14 @@ CREATE CLASS HBTableView INHERIT QTableView
|
||||
|
||||
ENDCLASS
|
||||
|
||||
METHOD HBTableView:new( pParent )
|
||||
::pPtr := Qt_HbTableView( pParent )
|
||||
METHOD HBQTableView:new( pParent )
|
||||
::pPtr := Qt_HBQTableView( pParent )
|
||||
RETURN Self
|
||||
|
||||
METHOD HBTableView:navigate( nCursorAction, nModifiers )
|
||||
RETURN Qt_HbTableView_navigate( ::pPtr, nCursorAction, nModifiers )
|
||||
METHOD HBQTableView:navigate( nCursorAction, nModifiers )
|
||||
RETURN Qt_HBQTableView_navigate( ::pPtr, nCursorAction, nModifiers )
|
||||
|
||||
METHOD HBTableView:destroy()
|
||||
RETURN Qt_HbTableView_destroy( ::pPtr )
|
||||
METHOD HBQTableView:destroy()
|
||||
RETURN Qt_HBQTableView_destroy( ::pPtr )
|
||||
|
||||
|
||||
|
||||
@@ -61,31 +61,31 @@ New =
|
||||
</CLASS>
|
||||
|
||||
<SUBCLASS>
|
||||
CREATE CLASS HbDbfModel INHERIT QAbstractItemModel
|
||||
CREATE CLASS HBDbfModel INHERIT QAbstractItemModel
|
||||
|
||||
METHOD new( bBlock )
|
||||
METHOD reset()
|
||||
METHOD index( nRow, nCol )
|
||||
METHOD hbSetRowColumns( nRows, nCols )
|
||||
METHOD new( bBlock )
|
||||
METHOD reset()
|
||||
METHOD index( nRow, nCol )
|
||||
METHOD hbSetRowColumns( nRows, nCols )
|
||||
METHOD destroy()
|
||||
|
||||
ENDCLASS
|
||||
|
||||
METHOD HbDbfModel:new( bBlock )
|
||||
::pPtr := Qt_HbDbfModel( bBlock )
|
||||
METHOD HBDbfModel:new( bBlock )
|
||||
::pPtr := Qt_HBDbfModel( bBlock )
|
||||
RETURN Self
|
||||
|
||||
METHOD HbDbfModel:reset()
|
||||
RETURN Qt_HbDbfModel_reset( ::pPtr )
|
||||
METHOD HBDbfModel:reset()
|
||||
RETURN Qt_HBDbfModel_reset( ::pPtr )
|
||||
|
||||
METHOD HbDbfModel:index( nRow, nCol )
|
||||
RETURN Qt_HbDbfModel_index( ::pPtr, nRow, nCol, 0 )
|
||||
METHOD HBDbfModel:index( nRow, nCol )
|
||||
RETURN Qt_HBDbfModel_index( ::pPtr, nRow, nCol, 0 )
|
||||
|
||||
METHOD HbDbfModel:hbSetRowColumns( nRows, nCols )
|
||||
RETURN Qt_HbDbfModel_hbSetRowColumns( ::pPtr, nRows, nCols )
|
||||
METHOD HBDbfModel:hbSetRowColumns( nRows, nCols )
|
||||
RETURN Qt_HBDbfModel_hbSetRowColumns( ::pPtr, nRows, nCols )
|
||||
|
||||
METHOD HbDbfModel:destroy()
|
||||
RETURN Qt_HbDbfModel_destroy( ::pPtr )
|
||||
METHOD HBDbfModel:destroy()
|
||||
RETURN Qt_HBDbfModel_destroy( ::pPtr )
|
||||
|
||||
</SUBCLASS>
|
||||
|
||||
@@ -107,31 +107,31 @@ HB_FUNC( QT_QABSTRACTITEMMODEL )
|
||||
|
||||
HB_FUNC( QT_HBDBFMODEL )
|
||||
{
|
||||
//hb_retptrGC( hbqt_ptrTOgcpointer( new HbDbfModel( ( PHB_ITEM ) hb_param( 1, HB_IT_BLOCK ) ), release_QAbstractItemModel ) );
|
||||
hb_retptr( new HbDbfModel( ( PHB_ITEM ) hb_param( 1, HB_IT_BLOCK ) ) );
|
||||
//hb_retptrGC( hbqt_ptrTOgcpointer( new HBDbfModel( ( PHB_ITEM ) hb_param( 1, HB_IT_BLOCK ) ), release_QAbstractItemModel ) );
|
||||
hb_retptr( new HBDbfModel( ( PHB_ITEM ) hb_param( 1, HB_IT_BLOCK ) ) );
|
||||
}
|
||||
|
||||
HB_FUNC( QT_HBDBFMODEL_RESET )
|
||||
{
|
||||
hbqt_par_HbDbfModel( 1 )->reset();
|
||||
hbqt_par_HBDbfModel( 1 )->reset();
|
||||
}
|
||||
|
||||
HB_FUNC( QT_HBDBFMODEL_INDEX )
|
||||
{
|
||||
// BI hb_retptrGC( hbqt_ptrTOgcpointer( new QModelIndex( hbqt_par_HbDbfModel( 1 )->index( hb_parni( 2 ), hb_parni( 3 ), QModelIndex() ) ), release_QModelIndex ) );
|
||||
hb_retptrGC( gcAllocate_QModelIndex( new QModelIndex( hbqt_par_HbDbfModel( 1 )->index( hb_parni( 2 ), hb_parni( 3 ), QModelIndex() ) ) ) );
|
||||
// BI hb_retptrGC( hbqt_ptrTOgcpointer( new QModelIndex( hbqt_par_HBDbfModel( 1 )->index( hb_parni( 2 ), hb_parni( 3 ), QModelIndex() ) ), release_QModelIndex ) );
|
||||
hb_retptrGC( gcAllocate_QModelIndex( new QModelIndex( hbqt_par_HBDbfModel( 1 )->index( hb_parni( 2 ), hb_parni( 3 ), QModelIndex() ) ) ) );
|
||||
}
|
||||
|
||||
HB_FUNC( QT_HBDBFMODEL_HBSETROWCOLUMNS )
|
||||
{
|
||||
hbqt_par_HbDbfModel( 1 )->hbSetRowColumns( hb_parni( 2 ), hb_parni( 3 ) );
|
||||
hbqt_par_HBDbfModel( 1 )->hbSetRowColumns( hb_parni( 2 ), hb_parni( 3 ) );
|
||||
}
|
||||
|
||||
HB_FUNC( QT_HBDBFMODEL_DESTROY )
|
||||
{
|
||||
// BI:TODO fix the GPF hbqt_par_HbDbfModel( 1 )->~HbDbfModel();
|
||||
// BI:TODO fix the GPF hbqt_par_HBDbfModel( 1 )->~HBDbfModel();
|
||||
// BUT WITHOUT THIS FM STATISTICS GENERATE A BIG LOG SO THIS IS NOT THE OPTION NOW
|
||||
hbqt_par_HbDbfModel( 1 )->~HbDbfModel();
|
||||
hbqt_par_HBDbfModel( 1 )->~HBDbfModel();
|
||||
}
|
||||
|
||||
</CODE>
|
||||
|
||||
@@ -55,9 +55,9 @@
|
||||
;
|
||||
|
||||
<CLASS>
|
||||
QObject =
|
||||
QObject =
|
||||
Inherits = QObject
|
||||
Type =
|
||||
Type =
|
||||
New =
|
||||
</CLASS>
|
||||
|
||||
@@ -84,7 +84,7 @@ HB_FUNC( QT_QSYNTAXHIGHLIGHTER )
|
||||
{
|
||||
if( hb_pcount() == 1 && HB_ISPOINTER( 1 ) )
|
||||
{
|
||||
hb_retptr( new HbSyntaxHighlighter( hbqt_par_QTextDocument( 1 ) ) );
|
||||
hb_retptr( new HBQSyntaxHighlighter( hbqt_par_QTextDocument( 1 ) ) );
|
||||
}
|
||||
}
|
||||
</CODE>
|
||||
|
||||
@@ -60,23 +60,23 @@ New = pParent
|
||||
</CLASS>
|
||||
|
||||
<SUBCLASS>
|
||||
CREATE CLASS HBTableView INHERIT QTableView
|
||||
CREATE CLASS HBQTableView INHERIT QTableView
|
||||
|
||||
METHOD new( pParent )
|
||||
METHOD new( pParent )
|
||||
METHOD navigate( nCursorAction, nModifiers )
|
||||
METHOD destroy()
|
||||
|
||||
ENDCLASS
|
||||
|
||||
METHOD HBTableView:new( pParent )
|
||||
::pPtr := Qt_HbTableView( pParent )
|
||||
METHOD HBQTableView:new( pParent )
|
||||
::pPtr := Qt_HBQTableView( pParent )
|
||||
RETURN Self
|
||||
|
||||
METHOD HBTableView:navigate( nCursorAction, nModifiers )
|
||||
RETURN Qt_HbTableView_navigate( ::pPtr, nCursorAction, nModifiers )
|
||||
METHOD HBQTableView:navigate( nCursorAction, nModifiers )
|
||||
RETURN Qt_HBQTableView_navigate( ::pPtr, nCursorAction, nModifiers )
|
||||
|
||||
METHOD HBTableView:destroy()
|
||||
RETURN Qt_HbTableView_destroy( ::pPtr )
|
||||
METHOD HBQTableView:destroy()
|
||||
RETURN Qt_HBQTableView_destroy( ::pPtr )
|
||||
|
||||
</SUBCLASS>
|
||||
|
||||
@@ -94,19 +94,19 @@ HB_FUNC( QT_QTABLEVIEW )
|
||||
hb_retptr( ( QTableView* ) new QTableView( hbqt_par_QWidget( 1 ) ) );
|
||||
}
|
||||
|
||||
HB_FUNC( QT_HBTABLEVIEW )
|
||||
HB_FUNC( QT_HBQTABLEVIEW )
|
||||
{
|
||||
hb_retptr( new HbTableView( hbqt_par_QWidget( 1 ) ) );
|
||||
hb_retptr( new HBQTableView( hbqt_par_QWidget( 1 ) ) );
|
||||
}
|
||||
|
||||
HB_FUNC( QT_HBTABLEVIEW_NAVIGATE )
|
||||
HB_FUNC( QT_HBQTABLEVIEW_NAVIGATE )
|
||||
{
|
||||
hb_retptr( new QModelIndex( hbqt_par_HbTableView( 1 )->navigate( hb_parni( 2 ) ) ) );
|
||||
hb_retptr( new QModelIndex( hbqt_par_HBQTableView( 1 )->navigate( hb_parni( 2 ) ) ) );
|
||||
}
|
||||
|
||||
HB_FUNC( QT_HBTABLEVIEW_DESTROY )
|
||||
HB_FUNC( QT_HBQTABLEVIEW_DESTROY )
|
||||
{
|
||||
hbqt_par_HbTableView( 1 )->~HbTableView();
|
||||
hbqt_par_HBQTableView( 1 )->~HBQTableView();
|
||||
}
|
||||
|
||||
</CODE>
|
||||
@@ -158,5 +158,3 @@ void setShowGrid ( bool show )
|
||||
void showColumn ( int column )
|
||||
void showRow ( int row )
|
||||
</SLOTS>
|
||||
|
||||
|
||||
|
||||
@@ -476,7 +476,7 @@ METHOD new( nTop, nLeft, nBottom, nRight ) CLASS XbpBrowse
|
||||
METHOD XbpBrowse:buildLeftFreeze()
|
||||
|
||||
/* Left Freeze */
|
||||
::oLeftView := HbTableView():new()
|
||||
::oLeftView := HBQTableView():new()
|
||||
//
|
||||
::oLeftView:setHorizontalScrollBarPolicy( Qt_ScrollBarAlwaysOff )
|
||||
::oLeftView:setVerticalScrollBarPolicy( Qt_ScrollBarAlwaysOff )
|
||||
@@ -495,7 +495,7 @@ METHOD XbpBrowse:buildLeftFreeze()
|
||||
::oLeftHeaderView:configure( ::oLeftView:horizontalHeader() )
|
||||
::oLeftHeaderView:setHighlightSections( .F. )
|
||||
|
||||
::oLeftDbfModel := HbDbfModel():new( {|p1,p2,p3,p4| ::supplyInfo( 151, p1, p2, p3, p4 ) } )
|
||||
::oLeftDbfModel := HBDbfModel():new( {|p1,p2,p3,p4| ::supplyInfo( 151, p1, p2, p3, p4 ) } )
|
||||
::oLeftView:setModel( QT_PTROF( ::oLeftDbfModel ) )
|
||||
//
|
||||
//::oLeftView:hide()
|
||||
@@ -509,7 +509,7 @@ METHOD XbpBrowse:buildLeftFreeze()
|
||||
::oLeftFooterView:setResizeMode( QHeaderView_Fixed )
|
||||
::oLeftFooterView:setFocusPolicy( Qt_NoFocus )
|
||||
//
|
||||
::oLeftFooterModel := HbDbfModel():new( {|p1,p2,p3,p4| ::supplyInfo( 152, p1, p2, p3, p4 ) } )
|
||||
::oLeftFooterModel := HBDbfModel():new( {|p1,p2,p3,p4| ::supplyInfo( 152, p1, p2, p3, p4 ) } )
|
||||
::oLeftFooterView:setModel( QT_PTROF( ::oLeftFooterModel ) )
|
||||
//
|
||||
//::oLeftFooterView:hide()
|
||||
@@ -526,7 +526,7 @@ METHOD XbpBrowse:buildRightFreeze()
|
||||
LOCAL oVHdr
|
||||
|
||||
/* Left Freeze */
|
||||
::oRightView := HbTableView():new()
|
||||
::oRightView := HBQTableView():new()
|
||||
//
|
||||
::oRightView:setHorizontalScrollBarPolicy( Qt_ScrollBarAlwaysOff )
|
||||
::oRightView:setVerticalScrollBarPolicy( Qt_ScrollBarAlwaysOff )
|
||||
@@ -545,7 +545,7 @@ METHOD XbpBrowse:buildRightFreeze()
|
||||
::oRightHeaderView:configure( ::oRightView:horizontalHeader() )
|
||||
::oRightHeaderView:setHighlightSections( .F. )
|
||||
|
||||
::oRightDbfModel := HbDbfModel():new( {|p1,p2,p3,p4| ::supplyInfo( 161, p1, p2, p3, p4 ) } )
|
||||
::oRightDbfModel := HBDbfModel():new( {|p1,p2,p3,p4| ::supplyInfo( 161, p1, p2, p3, p4 ) } )
|
||||
::oRightView:setModel( QT_PTROF( ::oRightDbfModel ) )
|
||||
|
||||
/* Horizontal Footer */
|
||||
@@ -557,7 +557,7 @@ METHOD XbpBrowse:buildRightFreeze()
|
||||
::oRightFooterView:setResizeMode( QHeaderView_Fixed )
|
||||
::oRightFooterView:setFocusPolicy( Qt_NoFocus )
|
||||
//
|
||||
::oRightFooterModel := HbDbfModel():new( {|p1,p2,p3,p4| ::supplyInfo( 162, p1, p2, p3, p4 ) } )
|
||||
::oRightFooterModel := HBDbfModel():new( {|p1,p2,p3,p4| ::supplyInfo( 162, p1, p2, p3, p4 ) } )
|
||||
::oRightFooterView:setModel( QT_PTROF( ::oRightFooterModel ) )
|
||||
|
||||
::connect( QT_PTROF( ::oRightView ) , "mousePressEvent()" , {|o,p| ::exeBlock( 31, p, o ) } )
|
||||
@@ -579,7 +579,7 @@ METHOD XbpBrowse:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
|
||||
::setPosAndSize()
|
||||
|
||||
/* Subclass of QTableView */
|
||||
::oTableView := HbTableView():new()
|
||||
::oTableView := HBQTableView():new()
|
||||
|
||||
/* Some parameters */
|
||||
::oTableView:setTabKeyNavigation( .t. )
|
||||
@@ -625,7 +625,7 @@ METHOD XbpBrowse:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
|
||||
::connect( QT_PTROF( ::oHeaderView ), "sectionResized(int,int,int)", {|o,i,i1,i2| ::exeBlock( 121, i, i1, i2, o ) } )
|
||||
|
||||
/* .DBF Manipulation Model */
|
||||
::oDbfModel := HbDbfModel():new( {|p1,p2,p3,p4| ::supplyInfo( 141, p1, p2, p3, p4 ) } )
|
||||
::oDbfModel := HBDbfModel():new( {|p1,p2,p3,p4| ::supplyInfo( 141, p1, p2, p3, p4 ) } )
|
||||
/* Attach Model with the View */
|
||||
::oTableView:setModel( QT_PTROF( ::oDbfModel ) )
|
||||
|
||||
@@ -639,7 +639,7 @@ METHOD XbpBrowse:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
|
||||
::oFooterView:setResizeMode( QHeaderView_Fixed )
|
||||
::oFooterView:setFocusPolicy( Qt_NoFocus )
|
||||
//
|
||||
::oFooterModel := HbDbfModel():new( {|p1,p2,p3,p4| ::supplyInfo( 142, p1, p2, p3, p4 ) } )
|
||||
::oFooterModel := HBDbfModel():new( {|p1,p2,p3,p4| ::supplyInfo( 142, p1, p2, p3, p4 ) } )
|
||||
|
||||
::oFooterView:setModel( QT_PTROF( ::oFooterModel ) )
|
||||
::oFooterView:setFocusPolicy( Qt_NoFocus )
|
||||
|
||||
@@ -126,7 +126,7 @@ METHOD XbpDialog:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
|
||||
::oWidget := QMainWindow():new()
|
||||
//::oWidget:setMouseTracking( .t. )
|
||||
#else
|
||||
::oWidget := QMainWindow():configure( QT_MyMainWindow( {|n,p| ::grabEvent( n,p ) }, hb_threadId() ) )
|
||||
::oWidget := QMainWindow():configure( QT_HBQMainWindow( {|n,p| ::grabEvent( n,p ) }, hb_threadId() ) )
|
||||
#endif
|
||||
|
||||
IF !empty( ::title )
|
||||
|
||||
@@ -767,7 +767,7 @@ METHOD XbpWindow:destroy()
|
||||
hbxbp_ClearEventBuffer()
|
||||
Qt_Slots_Destroy()
|
||||
Qt_Events_Destroy()
|
||||
Qt_MyMainWindow_Destroy( QT_PTROF( ::oWidget ) )
|
||||
Qt_HBQMainWindow_Destroy( QT_PTROF( ::oWidget ) )
|
||||
ELSE
|
||||
::oWidget:pPtr := 0
|
||||
::oWidget := NIL
|
||||
|
||||
Reference in New Issue
Block a user