2010-09-14 15:15 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)

* contrib/hbqt/tests/testbrow.prg
  * contrib/hbqt/tests/testqaim.prg
  * contrib/hbqt/tests/testres.prg
    ! Adopted to new hbQT syntax.
      Q*Class():new( ... ) => Q*Class( ... )
                
      Regression is highly possible, so please verify.
This commit is contained in:
Pritpal Bedi
2010-09-14 22:18:54 +00:00
parent 718689834e
commit 5b86defbe1
4 changed files with 48 additions and 39 deletions

View File

@@ -16,6 +16,15 @@
The license applies to all entries newer than 2009-04-28.
*/
2010-09-14 15:15 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
* contrib/hbqt/tests/testbrow.prg
* contrib/hbqt/tests/testqaim.prg
* contrib/hbqt/tests/testres.prg
! Adopted to new hbQT syntax.
Q*Class():new( ... ) => Q*Class( ... )
Regression is highly possible, so please verify.
2010-09-14 15:05 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
* contrib/hbide/hbqreportsmanager.prg
* contrib/hbide/hbqtoolbar.prg

View File

@@ -33,7 +33,7 @@ STATIC oColorLN
REQUEST HB_QT
INIT PROCEDURE Qt_Start()
qApp := QApplication():new()
qApp := QApplication()
qSlots := QT_SLOTS_NEW()
RETURN
@@ -47,24 +47,24 @@ PROCEDURE Main()
SET DATE ANSI
SET CENTURY ON
oColorN := QColor():New( 100, 0,100 )
oColorD := QColor():New( 150, 100, 0 )
oColorLY:= QColor():New( 0, 150, 0 )
oColorLN:= QColor():New( 200, 0, 0 )
oColorN := QColor( 100, 0,100 )
oColorD := QColor( 150, 100, 0 )
oColorLY:= QColor( 0, 150, 0 )
oColorLN:= QColor( 200, 0, 0 )
oWnd := QMainWindow():new()
oWnd := QMainWindow()
oWnd:resize(640,460 )
oDA := QWidget():new()
oDA := QWidget()
oWnd:setCentralWidget( oDA )
lay1 := QVBoxLayout():new( oDA )
lay1 := QVBoxLayout( oDA )
DBUseArea( .T., NIL, "../../../tests/test.dbf", "T1", .F., .F. )
aStru1 := DBStruct()
nCX1 := 0
nCY1 := 0
tb1 := QTableView():new()
mo1 := HBQAbstractItemModel():New( {| t, r, x, y| my_browse( 1, aStru1, t, r, x, y ) } )
tb1 := QTableView()
mo1 := HBQAbstractItemModel( {| t, r, x, y| my_browse( 1, aStru1, t, r, x, y ) } )
tb1:setModel( mo1 )
QT_SLOTS_CONNECT( qSlots, tb1:itemDelegate(), "commitData(QWidget)", {| w | my_save( w, 1, aStru1, @nCX1, @nCY1 ) } )
@@ -76,16 +76,16 @@ PROCEDURE Main()
NEXT
QHeaderView():from( tb1:verticalHeader() ):setDefaultSectionSize( 24 )
oSize := QSize():new(50,24)
oSize := QSize(50,24)
lay1:addWidget( tb1 )
lay2 := QHBoxLayout():new()
lay2 := QHBoxLayout()
lay1:addlayout( lay2 )
( bt1 := QPushButton():new() ):SetText( "Dummy 1" )
( bt2 := QPushButton():new() ):SetText( "Dummy 2" )
( bt3 := QPushButton():new() ):SetText( "Dummy 3" )
( bt1 := QPushButton() ):SetText( "Dummy 1" )
( bt2 := QPushButton() ):SetText( "Dummy 2" )
( bt3 := QPushButton() ):SetText( "Dummy 3" )
lay2:addWidget( bt1 )
lay2:addStretch()

View File

@@ -22,7 +22,7 @@ STATIC oDA, oForeColor, oAlphaColor, oBackBrush, oSize, oPixmap, oIcon, oFont
REQUEST HB_QT
INIT PROCEDURE Qt_Start()
qApp := QApplication():new()
qApp := QApplication()
RETURN
EXIT PROCEDURE Qt_End()
@@ -32,39 +32,39 @@ EXIT PROCEDURE Qt_End()
PROCEDURE Main()
LOCAL tb1, mo1, lay1, lay2, bt1, bt2, bt3
oWnd := QMainWindow():new()
oWnd := QMainWindow()
oWnd:resize(600,400 )
oDA := QWidget():new()
oDA := QWidget()
oWnd:setCentralWidget( oDA )
lay1 := QVBoxLayout():new( oDA )
lay1 := QVBoxLayout( oDA )
/* Here we define some HBQt objects to use in the callback */
oForeColor := QColor():new( 0, 50, 100 ) // Solid blue
oAlphaColor := QColor():new( 255, 0, 0 ) // Transparent Red
oForeColor := QColor( 0, 50, 100 ) // Solid blue
oAlphaColor := QColor( 255, 0, 0 ) // Transparent Red
oAlphaColor:setAlpha( 128 )
oBackBrush := QBrush():new( QColor():new( 255, 255, 100 ), Qt_BDiagPattern ) // Yellow Diagonal lines
oSize := QSize():new( 80, 30 ) // Default header sizes
oPixmap := QPixMap():new( "harbour-icon.png" ) // Image
oIcon := QIcon():new( oPixMap ) // Icon (reusing the image)
oFont := QFont():new() // Bold Italic font
oBackBrush := QBrush( QColor( 255, 255, 100 ), Qt_BDiagPattern ) // Yellow Diagonal lines
oSize := QSize( 80, 30 ) // Default header sizes
oPixmap := QPixMap( "harbour-icon.png" ) // Image
oIcon := QIcon( oPixMap ) // Icon (reusing the image)
oFont := QFont() // Bold Italic font
oFont:setBold( .T. )
oFont:setItalic( .T. )
/* ------------------------------------------------------- */
tb1 := QTableView():new()
tb1 := QTableView()
mo1 := HBQAbstractItemModel():New( {| t, r, x, y| my_aim( t, r, x, y ) } )
mo1 := HBQAbstractItemModel( {| t, r, x, y| my_aim( t, r, x, y ) } )
tb1:setModel( mo1 )
lay1:addWidget( tb1 )
lay2 := QHBoxLayout():new()
lay2 := QHBoxLayout()
lay1:addlayout( lay2 )
( bt1 := QPushButton():new() ):SetText( "Dummy 1" )
( bt2 := QPushButton():new() ):SetText( "Dummy 2" )
( bt3 := QPushButton():new() ):SetText( "Dummy 3" )
( bt1 := QPushButton() ):SetText( "Dummy 1" )
( bt2 := QPushButton() ):SetText( "Dummy 2" )
( bt3 := QPushButton() ):SetText( "Dummy 3" )
lay2:addWidget( bt1 )
lay2:addStretch()

View File

@@ -19,8 +19,8 @@ STATIC s_qApp
STATIC s_re1
INIT PROCEDURE Qt_Start()
s_qApp := QApplication():new()
s_re1 := QResource():new()
s_qApp := QApplication()
s_re1 := QResource()
s_re1:registerResource_1( HBQTRES_TESTRES() )
RETURN
@@ -35,17 +35,17 @@ PROCEDURE Main()
LOCAL lb1
LOCAL ly1
oWnd := QMainWindow():new()
oWnd := QMainWindow()
oWnd:setWindowIcon( ":harbour-icon.png" )
oDA := QWidget():new()
oDA := QWidget()
oWnd:setCentralWidget( oDA )
lb1 := Qlabel():new()
lb1 := Qlabel()
lb1:setAlignment( hb_bitOr( Qt_AlignHCenter, Qt_AlignVCenter ) )
lb1:setPixMap( QPixMap():new( ":harbour-logo.png" ) )
lb1:setPixMap( QPixMap( ":harbour-logo.png" ) )
ly1 := QVBoxLayout():new( oDA )
ly1 := QVBoxLayout( oDA )
ly1:addWidget( lb1 )
oWnd:Show()