2011-03-03 11:31 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)

* contrib/hbxbp/xbpsle.prg
  * contrib/hbxbp/xbplistbox.prg
  * contrib/hbxbp/xbpcheckbox.prg
  * contrib/hbxbp/xbpmenubar.prg
  * contrib/hbxbp/xbpradiobutton.prg
  * contrib/hbxbp/xbprtf.prg
  * contrib/hbxbp/xbptabpage.prg
  * contrib/hbxbp/xbpwindow.prg
  * contrib/hbxbp/xbpstatusbar.prg
  * contrib/hbxbp/xbpcombobox.prg
  * contrib/hbxbp/xbppushbutton.prg
  * contrib/hbxbp/xbpscrollbar.prg
  * contrib/hbxbp/xbpstatic.prg
  * contrib/hbxbp/xbptreeview.prg
  * contrib/hbxbp/xbpdialog.prg
  * contrib/hbxbp/xbptoolbar.prg
  * contrib/hbxbp/xbp3state.prg
  * contrib/hbxbp/xbpspinbutton.prg
  * contrib/hbxbp/xbpmle.prg
    ! Deleted FromQtPtr() methods. They are relying on FromPointer() 
      HBQT functionality, which will be deleted soon.

  - examples/hbqt_tut
    - Deleted this local copy of the tutorial.
      You can find it here:
          http://www.gruppoeratostene.com/harbour/tutorial-qt.zip
      Please add test.dbf, test.jpg, hbmk.hbm, prova.ui to above 
      .zip package. They are available from the nightly Harbour source .zip.
This commit is contained in:
Viktor Szakats
2011-03-03 10:33:26 +00:00
parent 6a504fb76b
commit f8a93a95e2
48 changed files with 35 additions and 1345 deletions

View File

@@ -16,6 +16,36 @@
The license applies to all entries newer than 2009-04-28.
*/
2011-03-03 11:31 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* contrib/hbxbp/xbpsle.prg
* contrib/hbxbp/xbplistbox.prg
* contrib/hbxbp/xbpcheckbox.prg
* contrib/hbxbp/xbpmenubar.prg
* contrib/hbxbp/xbpradiobutton.prg
* contrib/hbxbp/xbprtf.prg
* contrib/hbxbp/xbptabpage.prg
* contrib/hbxbp/xbpwindow.prg
* contrib/hbxbp/xbpstatusbar.prg
* contrib/hbxbp/xbpcombobox.prg
* contrib/hbxbp/xbppushbutton.prg
* contrib/hbxbp/xbpscrollbar.prg
* contrib/hbxbp/xbpstatic.prg
* contrib/hbxbp/xbptreeview.prg
* contrib/hbxbp/xbpdialog.prg
* contrib/hbxbp/xbptoolbar.prg
* contrib/hbxbp/xbp3state.prg
* contrib/hbxbp/xbpspinbutton.prg
* contrib/hbxbp/xbpmle.prg
! Deleted FromQtPtr() methods. They are relying on FromPointer()
HBQT functionality, which will be deleted soon.
- examples/hbqt_tut
- Deleted this local copy of the tutorial.
You can find it here:
http://www.gruppoeratostene.com/harbour/tutorial-qt.zip
Please add test.dbf, test.jpg, hbmk.hbm, prova.ui to above
.zip package. They are available from the nightly Harbour source .zip.
2011-03-02 21:43 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
* contrib/hbqt/qtgui/qth/QGraphicsSceneEvent.qth
! Fixed: compilable with Qt 4.6 and above.
@@ -23,7 +53,7 @@
2011-03-02 17:15 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
* contrib/hbqt/qtcore/qth/QCoreApplication.qth
! Reversed previous commit.
* contrib/hbqt/qtgui/hbqt_init.cpp
- Deleted: hbqtgui_eventpush() function, not needed anymore.
@@ -53,14 +83,14 @@
* contrib/hbqt/qtgui/qth/QShowEvent.qth
* contrib/hbqt/qtgui/qth/QWheelEvent.qth
+ Added: constructors for all events with due parameters.
I do not know why it elluded me so far. And I cannot
recollect what wrong I was doing. May be due to some
problems at initial stages kept unattended with
I do not know why it elluded me so far. And I cannot
recollect what wrong I was doing. May be due to some
problems at initial stages kept unattended with
ongoing development.
2011-03-02 15:29 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
* contrib/hbqt/qtcore/qth/QCoreApplication.qth
! Commented out: sendEvent() and postEvent() methods until
! Commented out: sendEvent() and postEvent() methods until
issue with Q*Event() class constructors is resolved.
+ contrib/hbqt/tests/browqt.prg
! Copied testbrows.prg to suit embedded dialog.

View File

@@ -82,7 +82,6 @@ CLASS Xbp3State INHERIT XbpWindow, DataRef
METHOD init( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
METHOD create( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
METHOD hbCreateFromQtPtr( oParent, oOwner, aPos, aSize, aPresParams, lVisible, pQtObject )
METHOD configure( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
METHOD destroy()
METHOD connect()
@@ -130,18 +129,6 @@ METHOD Xbp3State:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
/*----------------------------------------------------------------------*/
METHOD Xbp3State:hbCreateFromQtPtr( oParent, oOwner, aPos, aSize, aPresParams, lVisible, pQtObject )
::xbpWindow:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
IF hb_isPointer( pQtObject )
::oWidget := QCheckBoxFromPointer( pQtObject )
ENDIF
RETURN Self
/*----------------------------------------------------------------------*/
METHOD Xbp3State:execSlot( cSlot, p )
SWITCH cSlot
@@ -215,4 +202,3 @@ METHOD Xbp3State:selected( ... )
RETURN Self
/*----------------------------------------------------------------------*/

View File

@@ -82,7 +82,6 @@ CLASS XbpCheckBox INHERIT XbpWindow, DataRef
METHOD init( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
METHOD create( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
METHOD hbCreateFromQtPtr( oParent, oOwner, aPos, aSize, aPresParams, lVisible, pQtObject )
METHOD configure( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
METHOD destroy()
METHOD handleEvent( nEvent, mp1, mp2 )
@@ -129,18 +128,6 @@ METHOD XbpCheckBox:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
/*----------------------------------------------------------------------*/
METHOD XbpCheckBox:hbCreateFromQtPtr( oParent, oOwner, aPos, aSize, aPresParams, lVisible, pQtObject )
::xbpWindow:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
IF hb_isPointer( pQtObject )
::oWidget := QCheckBoxFromPointer( pQtObject )
ENDIF
RETURN Self
/*----------------------------------------------------------------------*/
METHOD XbpCheckBox:execSlot( cSlot, p )
SWITCH cSlot

View File

@@ -80,7 +80,6 @@ CLASS XbpComboBox INHERIT XbpWindow
METHOD init( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
METHOD create( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
METHOD hbCreateFromQtPtr( oParent, oOwner, aPos, aSize, aPresParams, lVisible, pQtObject )
METHOD configure( oParent, oOwner, aPos, aSize, aPresParams, lVisible ) VIRTUAL
METHOD destroy()
METHOD handleEvent( nEvent, mp1, mp2 ) VIRTUAL
@@ -158,34 +157,6 @@ METHOD XbpComboBox:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
/*----------------------------------------------------------------------*/
METHOD XbpComboBox:hbCreateFromQtPtr( oParent, oOwner, aPos, aSize, aPresParams, lVisible, pQtObject )
::xbpWindow:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
IF hb_isPointer( pQtObject )
::oWidget := QComboBoxFromPointer( pQtObject )
ELSE
::oSLE := XbpSLE():new():create( ::oParent, ::oOwner, ::aPos, ::aSize, ::aPresParams, ::lVisible )
::oLB := XbpListBox():new():create( ::oParent, ::oOwner, ::aPos, ::aSize, ::aPresParams, ::lVisible )
::oWidget := QComboBox( ::pParent )
::oWidget:setModel(::xbpListBox:model() )
::oWidget:setView( ::xbpListBox:oWidget )
::oWidget:setLineEdit( ::xbpSLE:oWidget )
::oWidget:setEditable( ::xbpSLE:editable )
::oWidget:setFrame( ::xbpSLE:border )
::setPosAndSize()
IF ::visible
::show()
ENDIF
::connect()
ENDIF
::AddAsChild( SELF )
RETURN Self
/*----------------------------------------------------------------------*/
METHOD XbpComboBox:connect()
::oWidget:connect( "highlighted(int)" , {|i| ::execSlot( "highlighted(int)" , i ) } )
::oWidget:connect( "activated(int)" , {|i| ::execSlot( "activated(int)" , i ) } )

View File

@@ -95,7 +95,6 @@ CLASS XbpDialog FROM XbpWindow
METHOD init( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
METHOD create( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
METHOD hbCreateFromQtPtr( oParent, oOwner, aPos, aSize, aPresParams, lVisible, pQtObject )
METHOD configure( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
METHOD handleEvent( nEvent, mp1, mp2 ) VIRTUAL
METHOD execEvent( nEvent, pEvent )
@@ -221,16 +220,6 @@ METHOD XbpDialog:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
/*----------------------------------------------------------------------*/
METHOD XbpDialog:hbCreateFromQtPtr( oParent, oOwner, aPos, aSize, aPresParams, lVisible, pQtObject )
::qtObjects := pQtObject
::create( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
RETURN Self
/*----------------------------------------------------------------------*/
METHOD XbpDialog:destroy()
LOCAL qtObj

View File

@@ -90,7 +90,6 @@ CLASS XbpListBox INHERIT XbpWindow, DataRef
METHOD init( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
METHOD create( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
METHOD hbCreateFromQtPtr( oParent, oOwner, aPos, aSize, aPresParams, lVisible, pQtObject )
METHOD configure( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
METHOD destroy()
METHOD handleEvent( nEvent, mp1, mp2 )
@@ -233,18 +232,6 @@ METHOD XbpListBox:disConnect()
/*----------------------------------------------------------------------*/
METHOD XbpListBox:hbCreateFromQtPtr( oParent, oOwner, aPos, aSize, aPresParams, lVisible, pQtObject )
::xbpWindow:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
IF hb_isPointer( pQtObject )
::oWidget := pQtObject
ENDIF
RETURN Self
/*----------------------------------------------------------------------*/
METHOD XbpListBox:toggleSelected( nIndex )
LOCAL n

View File

@@ -118,7 +118,6 @@ CLASS xbpMenuBar INHERIT xbpWindow
METHOD init( oParent, aPresParams, lVisible )
METHOD create( oParent, aPresParams, lVisible )
METHOD hbCreateFromQtPtr( oParent, aPresParams, lVisible, pQtObject )
METHOD configure( oParent, aPresParams, lVisible )
METHOD destroy()
METHOD execSlot( cSlot, p )
@@ -179,18 +178,6 @@ METHOD xbpMenuBar:create( oParent, aPresParams, lVisible )
/*----------------------------------------------------------------------*/
METHOD xbpMenuBar:hbCreateFromQtPtr( oParent, aPresParams, lVisible, pQtObject )
::xbpWindow:create( oParent, , , , aPresParams, lVisible )
IF hb_isPointer( pQtObject )
::oWidget := QMenuBarFromPointer( pQtObject )
ENDIF
RETURN Self
/*----------------------------------------------------------------------*/
METHOD xbpMenuBar:configure( oParent, aPresParams, lVisible )
DEFAULT oParent TO ::oParent

View File

@@ -86,7 +86,6 @@ CLASS XbpMLE INHERIT XbpWindow, DataRef
METHOD init( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
METHOD create( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
METHOD hbCreateFromQtPtr( oParent, oOwner, aPos, aSize, aPresParams, lVisible, pQtObject )
METHOD configure( oParent, oOwner, aPos, aSize, aPresParams, lVisible ) VIRTUAL
METHOD destroy()
METHOD handleEvent( nEvent, mp1, mp2 )
@@ -186,18 +185,6 @@ METHOD XbpMLE:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
/*----------------------------------------------------------------------*/
METHOD XbpMLE:hbCreateFromQtPtr( oParent, oOwner, aPos, aSize, aPresParams, lVisible, pQtObject )
::xbpWindow:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
IF hb_isPointer( pQtObject )
::oWidget := QPlainTextEditFromPointer( pQtObject )
ENDIF
RETURN Self
/*----------------------------------------------------------------------*/
METHOD XbpMLE:execSlot( cSlot, p )
HB_SYMBOL_UNUSED( cSlot )

View File

@@ -90,7 +90,6 @@ CLASS XbpPushButton INHERIT XbpWindow
METHOD init( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
METHOD create( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
METHOD hbCreateFromQtPtr( oParent, oOwner, aPos, aSize, aPresParams, lVisible, pQtObject )
METHOD configure( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
METHOD destroy()
METHOD connect()
@@ -141,36 +140,6 @@ METHOD XbpPushButton:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible
/*----------------------------------------------------------------------*/
METHOD XbpPushButton:hbCreateFromQtPtr( oParent, oOwner, aPos, aSize, aPresParams, lVisible, pQtObject )
::xbpWindow:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
IF hb_isPointer( pQtObject )
::oWidget := QPushButtonFromPointer( pQtObject )
ELSE
::oWidget := QPushButton( ::oParent:oWidget )
::setPosAndSize()
IF ::visible
::oWidget:show()
ENDIF
::setCaption( ::caption )
IF ::default
::oWidget:setDefault( .t. )
ENDIF
ENDIF
::connect()
::addAsChild()
::postCreate()
RETURN Self
/*----------------------------------------------------------------------*/
METHOD XbpPushButton:execSlot( cSlot, p )
DO CASE

View File

@@ -82,7 +82,6 @@ CLASS XbpRadioButton INHERIT XbpWindow, DataRef
METHOD init( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
METHOD create( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
METHOD hbCreateFromQtPtr( oParent, oOwner, aPos, aSize, aPresParams, lVisible, pQtObject )
METHOD configure( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
METHOD destroy()
METHOD connect()
@@ -128,18 +127,6 @@ METHOD XbpRadioButton:create( oParent, oOwner, aPos, aSize, aPresParams, lVisibl
/*----------------------------------------------------------------------*/
METHOD XbpRadioButton:hbCreateFromQtPtr( oParent, oOwner, aPos, aSize, aPresParams, lVisible, pQtObject )
::xbpWindow:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
IF hb_isPointer( pQtObject )
::oWidget := QRadioButtonFromPointer( pQtObject )
ENDIF
RETURN Self
/*----------------------------------------------------------------------*/
METHOD XbpRadioButton:execSlot( cSlot, p )
HB_SYMBOL_UNUSED( p )

View File

@@ -78,7 +78,6 @@ CLASS XbpRtf INHERIT XbpWindow
METHOD init( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
METHOD create( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
METHOD hbCreateFromQtPtr( oParent, oOwner, aPos, aSize, aPresParams, lVisible, pQtObject )
METHOD configure()
METHOD destroy()
METHOD connect()
@@ -189,21 +188,6 @@ METHOD XbpRtf:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
/*----------------------------------------------------------------------*/
METHOD XbpRtf:hbCreateFromQtPtr( oParent, oOwner, aPos, aSize, aPresParams, lVisible, pQtObject )
::xbpWindow:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
IF hb_isPointer( pQtObject )
::oWidget := QTextEdit()
::oWidget := pQtObject
ENDIF
::connect()
RETURN Self
/*----------------------------------------------------------------------*/
METHOD XbpRtf:execSlot( cSlot, p )
HB_SYMBOL_UNUSED( p )

View File

@@ -85,7 +85,6 @@ CLASS XbpScrollBar INHERIT XbpWindow, DataRef
METHOD init( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
METHOD create( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
METHOD hbCreateFromQtPtr( oParent, oOwner, aPos, aSize, aPresParams, lVisible, pQtObject )
METHOD configure( oParent, oOwner, aPos, aSize, aPresParams, lVisible ) VIRTUAL
METHOD destroy()
METHOD connect()
@@ -133,18 +132,6 @@ METHOD XbpScrollBar:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible
/*----------------------------------------------------------------------*/
METHOD XbpScrollBar:hbCreateFromQtPtr( oParent, oOwner, aPos, aSize, aPresParams, lVisible, pQtObject )
::xbpWindow:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
IF hb_isPointer( pQtObject )
::oWidget := QScrollBarFromPointer( pQtObject )
ENDIF
RETURN Self
/*----------------------------------------------------------------------*/
METHOD XbpScrollBar:execSlot( cSlot, p )
LOCAL nCommand

View File

@@ -88,7 +88,6 @@ CLASS XbpSLE INHERIT XbpWindow, DataRef
METHOD init( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
METHOD create( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
METHOD hbCreateFromQtPtr( oParent, oOwner, aPos, aSize, aPresParams, lVisible, pQtObject )
METHOD configure( oParent, oOwner, aPos, aSize, aPresParams, lVisible ) VIRTUAL
METHOD destroy()
METHOD handleEvent( nEvent, mp1, mp2 )
@@ -165,18 +164,6 @@ METHOD XbpSLE:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
/*----------------------------------------------------------------------*/
METHOD XbpSLE:hbCreateFromQtPtr( oParent, oOwner, aPos, aSize, aPresParams, lVisible, pQtObject )
::xbpWindow:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
IF hb_isPointer( pQtObject )
::oWidget := QLineEditFromPointer( pQtObject )
ENDIF
RETURN Self
/*----------------------------------------------------------------------*/
METHOD XbpSLE:connect()
#if 0
::oWidget:connect( QEvent_FocusIn , {|e| ::execSlot( "QEvent_FocusIn" , e ) } )

View File

@@ -92,7 +92,6 @@ CLASS XbpSpinButton INHERIT XbpWindow, DataRef
METHOD init( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
METHOD create( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
METHOD hbCreateFromQtPtr( oParent, oOwner, aPos, aSize, aPresParams, lVisible, pQtObject )
METHOD configure( oParent, oOwner, aPos, aSize, aPresParams, lVisible ) VIRTUAL
METHOD destroy()
METHOD connect()
@@ -163,18 +162,6 @@ METHOD XbpSpinButton:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible
/*----------------------------------------------------------------------*/
METHOD XbpSpinButton:hbCreateFromQtPtr( oParent, oOwner, aPos, aSize, aPresParams, lVisible, pQtObject )
::xbpWindow:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
IF hb_isPointer( pQtObject )
::oWidget := QSpinBoxFromPointer( pQtObject )
ENDIF
RETURN Self
/*----------------------------------------------------------------------*/
METHOD XbpSpinButton:execSlot( cSlot, p )
HB_SYMBOL_UNUSED( p )
@@ -283,4 +270,3 @@ METHOD XbpSpinButton:endSpin( ... )
RETURN Self
/*----------------------------------------------------------------------*/

View File

@@ -86,7 +86,6 @@ CLASS XbpStatic INHERIT XbpWindow
METHOD init( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
METHOD create( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
METHOD hbCreateFromQtPtr( oParent, oOwner, aPos, aSize, aPresParams, lVisible, pQtObject )
METHOD configure( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
METHOD destroy()
METHOD handleEvent( nEvent, mp1, mp2 )
@@ -248,18 +247,6 @@ METHOD XbpStatic:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
/*----------------------------------------------------------------------*/
METHOD XbpStatic:hbCreateFromQtPtr( oParent, oOwner, aPos, aSize, aPresParams, lVisible, pQtObject )
::xbpWindow:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
IF hb_isObject( pQtObject )
::oWidget := pQtObject:oWidget
ENDIF
RETURN Self
/*----------------------------------------------------------------------*/
METHOD XbpStatic:handleEvent( nEvent, mp1, mp2 )
HB_SYMBOL_UNUSED( nEvent )

View File

@@ -82,7 +82,6 @@ CLASS XbpStatusBar INHERIT XbpWindow
METHOD init( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
METHOD create( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
METHOD hbCreateFromQtPtr( oParent, oOwner, aPos, aSize, aPresParams, lVisible, pQtObject )
METHOD configure( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
METHOD destroy()
METHOD handleEvent( nEvent, mp1, mp2 )
@@ -139,18 +138,6 @@ METHOD XbpStatusBar:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible
/*----------------------------------------------------------------------*/
METHOD XbpStatusBar:hbCreateFromQtPtr( oParent, oOwner, aPos, aSize, aPresParams, lVisible, pQtObject )
::xbpWindow:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
IF hb_isObject( pQtObject )
::oWidget := pQtObject:oWidget
ENDIF
RETURN Self
/*----------------------------------------------------------------------*/
METHOD XbpStatusBar:execSlot( cSlot, p )
HB_SYMBOL_UNUSED( cSlot )

View File

@@ -86,7 +86,6 @@ CLASS XbpTabPage INHERIT XbpWindow
METHOD init( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
METHOD create( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
METHOD hbCreateFromQtPtr( oParent, oOwner, aPos, aSize, aPresParams, lVisible, pQtObject )
METHOD configure( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
METHOD destroy()
METHOD handleEvent( nEvent, mp1, mp2 )
@@ -153,19 +152,6 @@ METHOD XbpTabPage:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
/*----------------------------------------------------------------------*/
METHOD XbpTabPage:hbCreateFromQtPtr( oParent, oOwner, aPos, aSize, aPresParams, lVisible, pQtObject )
::xbpWindow:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
IF hb_isPointer( pQtObject )
::oWidget := QWidgetFromPointer( pQtObject )
ENDIF
RETURN Self
/*----------------------------------------------------------------------*/
METHOD XbpTabPage:configure( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
::Initialize( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
RETURN Self
@@ -260,7 +246,6 @@ CLASS XbpTabWidget INHERIT XbpWindow
METHOD init( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
METHOD create( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
METHOD hbCreateFromQtPtr( oParent, oOwner, aPos, aSize, aPresParams, lVisible, pQtObject ) VIRTUAL
METHOD configure( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
METHOD destroy()
METHOD execSlot( cSlot, p )

View File

@@ -103,7 +103,6 @@ CLASS XbpToolBar INHERIT XbpWindow
METHOD init( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
METHOD create( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
METHOD hbCreateFromQtPtr( oParent, oOwner, aPos, aSize, aPresParams, lVisible, pQtObject )
METHOD configure( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
METHOD destroy()
METHOD execSlot( cSlot, p )
@@ -194,18 +193,6 @@ METHOD XbpToolbar:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
/*----------------------------------------------------------------------*/
METHOD XbpToolbar:hbCreateFromQtPtr( oParent, oOwner, aPos, aSize, aPresParams, lVisible, pQtObject )
::xbpWindow:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
IF hb_isPointer( pQtObject )
::oWidget := QToolBarFromPointer( pQtObject )
ENDIF
RETURN Self
/*----------------------------------------------------------------------*/
METHOD XbpToolbar:destroy()
LOCAL aItem, oBtn
@@ -469,4 +456,3 @@ METHOD XbpToolbarButton:init( cCaption, nStyle, cKey )
RETURN Self
/*----------------------------------------------------------------------*/

View File

@@ -85,7 +85,6 @@ CLASS XbpTreeView INHERIT XbpWindow, DataRef
METHOD init( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
METHOD create( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
METHOD hbCreateFromQtPtr( oParent, oOwner, aPos, aSize, aPresParams, lVisible, pQtObject )
METHOD configure( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
METHOD destroy()
METHOD handleEvent( nEvent, mp1, mp2 )
@@ -172,18 +171,6 @@ METHOD XbpTreeView:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
/*----------------------------------------------------------------------*/
METHOD XbpTreeView:hbCreateFromQtPtr( oParent, oOwner, aPos, aSize, aPresParams, lVisible, pQtObject )
::xbpWindow:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
IF hb_isPointer( pQtObject )
::oWidget := pQtObject
ENDIF
RETURN Self
/*----------------------------------------------------------------------*/
METHOD XbpTreeView:execSlot( cSlot, p )
LOCAL n, qPt, qItem, oItem, qPos

View File

@@ -229,7 +229,6 @@ CLASS XbpWindow INHERIT XbpPartHandler
METHOD Initialize( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
METHOD isEnabled() INLINE ::is_enabled
METHOD isVisible() INLINE !( ::is_hidden )
METHOD hbCreateFromQtPtr() VIRTUAL
METHOD destroy()
METHOD disable()
METHOD enable()
@@ -1904,4 +1903,3 @@ METHOD HbXbpAppDesktop:virtualHeight()
/*----------------------------------------------------------------------*/
/*----------------------------------------------------------------------*/
/*----------------------------------------------------------------------*/

View File

@@ -1,7 +0,0 @@
#
# $Id$
#
hbqt.hbc
-w3 -es2

View File

@@ -1,209 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>MainWindow</class>
<widget class="QMainWindow" name="MainWindow">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>657</width>
<height>400</height>
</rect>
</property>
<property name="windowTitle">
<string>MainWindow</string>
</property>
<widget class="QWidget" name="centralwidget">
<widget class="QPushButton" name="pushButton">
<property name="geometry">
<rect>
<x>10</x>
<y>20</y>
<width>87</width>
<height>27</height>
</rect>
</property>
<property name="text">
<string>PushButton</string>
</property>
</widget>
<widget class="QRadioButton" name="radioButton">
<property name="geometry">
<rect>
<x>10</x>
<y>70</y>
<width>103</width>
<height>20</height>
</rect>
</property>
<property name="text">
<string>RadioButton</string>
</property>
</widget>
<widget class="QRadioButton" name="radioButton_2">
<property name="geometry">
<rect>
<x>10</x>
<y>100</y>
<width>103</width>
<height>20</height>
</rect>
</property>
<property name="text">
<string>RadioButton</string>
</property>
</widget>
<widget class="QCheckBox" name="checkBox">
<property name="geometry">
<rect>
<x>10</x>
<y>130</y>
<width>87</width>
<height>20</height>
</rect>
</property>
<property name="text">
<string>CheckBox</string>
</property>
</widget>
<widget class="QCalendarWidget" name="calendarWidget">
<property name="geometry">
<rect>
<x>330</x>
<y>0</y>
<width>272</width>
<height>165</height>
</rect>
</property>
</widget>
<widget class="QDial" name="dial">
<property name="geometry">
<rect>
<x>500</x>
<y>200</y>
<width>111</width>
<height>111</height>
</rect>
</property>
</widget>
<widget class="QToolButton" name="toolButton">
<property name="geometry">
<rect>
<x>120</x>
<y>20</y>
<width>22</width>
<height>23</height>
</rect>
</property>
<property name="text">
<string>...</string>
</property>
</widget>
<widget class="QFontComboBox" name="fontComboBox">
<property name="geometry">
<rect>
<x>120</x>
<y>130</y>
<width>177</width>
<height>25</height>
</rect>
</property>
</widget>
<widget class="QLCDNumber" name="lcdNumber">
<property name="geometry">
<rect>
<x>20</x>
<y>210</y>
<width>261</width>
<height>61</height>
</rect>
</property>
</widget>
<widget class="QDateEdit" name="dateEdit">
<property name="geometry">
<rect>
<x>20</x>
<y>280</y>
<width>110</width>
<height>25</height>
</rect>
</property>
</widget>
<widget class="QProgressBar" name="progressBar">
<property name="geometry">
<rect>
<x>20</x>
<y>320</y>
<width>118</width>
<height>23</height>
</rect>
</property>
<property name="value">
<number>24</number>
</property>
</widget>
<widget class="QScrollBar" name="horizontalScrollBar">
<property name="geometry">
<rect>
<x>340</x>
<y>320</y>
<width>251</width>
<height>16</height>
</rect>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
<widget class="QDateEdit" name="dateEdit_2">
<property name="geometry">
<rect>
<x>340</x>
<y>180</y>
<width>110</width>
<height>25</height>
</rect>
</property>
</widget>
<widget class="QTimeEdit" name="timeEdit">
<property name="geometry">
<rect>
<x>340</x>
<y>220</y>
<width>118</width>
<height>25</height>
</rect>
</property>
</widget>
<widget class="QLineEdit" name="lineEdit">
<property name="geometry">
<rect>
<x>20</x>
<y>180</y>
<width>261</width>
<height>25</height>
</rect>
</property>
</widget>
</widget>
<widget class="QMenuBar" name="menubar">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>657</width>
<height>23</height>
</rect>
</property>
<widget class="QMenu" name="menuFile">
<property name="title">
<string>File</string>
</property>
</widget>
<addaction name="menuFile"/>
</widget>
<widget class="QStatusBar" name="statusbar"/>
</widget>
<resources/>
<connections/>
</ui>

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.9 KiB

View File

@@ -1,14 +0,0 @@
#include "hbqtgui.ch"
PROCEDURE Main()
LOCAL oWnd
oWnd := QMainWindow()
oWnd:setWindowTitle( "Finestra di Giovanni" )
oWnd:resize( 300, 200 )
oWnd:show()
QApplication():exec()
RETURN

View File

@@ -1,21 +0,0 @@
#include "hbqtgui.ch"
PROCEDURE Main()
LOCAL oWnd
LOCAL calendario
oWnd := QMainWindow()
oWnd:setWindowTitle( "Finestra di Giovanni" )
oWnd:resize( 400, 300 )
calendario := QCalendarWidget( oWnd )
calendario:resize( 250, 200 )
calendario:move( 50, 50 )
calendario:setFirstDayOfWeek( 1 )
calendario:setGridVisible( .T. )
oWnd:show()
QApplication():exec()
RETURN

View File

@@ -1,19 +0,0 @@
#include "hbqtgui.ch"
PROCEDURE Main()
LOCAL oWnd
LOCAL testo
oWnd := QMainWindow()
oWnd:setWindowTitle( "Finestra di Giovanni" )
oWnd:resize( 300, 200 )
testo := Qlabel( oWnd )
testo:setText( "Hello World" )
testo:move( 100, 100 )
oWnd:show()
QApplication():exec()
RETURN

View File

@@ -1,32 +0,0 @@
#include "hbqtgui.ch"
PROCEDURE Main()
LOCAL oWnd
LOCAL pulsante1
oWnd := QMainWindow()
oWnd:setWindowTitle( "Finestra di Giovanni" )
oWnd:resize( 400, 300 )
Pulsante1 := QPushButton( oWnd )
Pulsante1:setText( "Premi per messaggio" )
Pulsante1:resize( 300, 50 )
Pulsante1:move( 50, 50 )
Pulsante1:Connect( "clicked()", { || messaggio() } )
oWnd:show()
QApplication():exec()
RETURN
PROCEDURE messaggio
LOCAL oBox
oBox := QMessageBox()
oBox:setInformativeText( "attenzione!!! " )
oBox:setWindowTitle( "Informazione" )
oBox:exec()
RETURN

View File

@@ -1,33 +0,0 @@
#include "hbqtgui.ch"
STATIC oWnd
PROCEDURE Main()
LOCAL Pulsante1, Pulsante2
oWnd := QMainWindow()
oWnd:setWindowTitle( "Prova dei pulsanti" )
oWnd:resize( 640, 480 )
Pulsante1 := QPushButton( oWnd )
Pulsante1:setText( "Quit" )
Pulsante1:move( 50, 50 )
Pulsante1:Connect( "clicked()", { || QApplication():quit() } )
Pulsante2 := QPushButton( oWnd )
Pulsante2:setText( "Premere per modificare la barra del titolo" )
Pulsante2:move( 50, 100 )
Pulsante2:setIcon( QIcon( "Star_32.bmp" ) )
Pulsante2:resize( 300, 50 )
Pulsante2:Connect( "clicked()", { || modifica() } )
oWnd:show()
QApplication():exec()
RETURN
PROCEDURE modifica()
oWnd:setWindowTitle( "Evviva, ci sono riuscito !!!!!!!!!" )
RETURN

View File

@@ -1,21 +0,0 @@
#include "hbqtgui.ch"
PROCEDURE Main()
LOCAL oWnd
LOCAL oSBar
oWnd := QMainWindow()
oWnd:show()
oWnd:setWindowTitle( "Giovanni" )
oWnd:resize( 300, 200 )
oSBar := QStatusBar( oWnd )
oWnd:setStatusBar( oSBar )
oSBar:showMessage( "Harbour-QT Statusbar Ready!" )
QApplication():exec()
RETURN

View File

@@ -1,28 +0,0 @@
#include "hbqtgui.ch"
PROCEDURE Main()
LOCAL oWnd
LOCAL barra_schede
LOCAL clienti, fornitori, magazzino
oWnd := QMainWindow()
oWnd:setWindowTitle( "Finestra di Giovanni" )
oWnd:resize( 500, 300 )
barra_schede := QTabWidget( oWnd )
barra_schede:resize( 400, 200 )
barra_schede:move( 50, 50 )
clienti := QWidget()
fornitori := QWidget()
magazzino := QWidget()
barra_schede:addTab( clienti, "Scheda Clienti" )
barra_schede:addTab( fornitori, "Scheda Fornitori" )
barra_schede:addTab( magazzino, "Scheda Magazzino" )
oWnd:show()
QApplication():exec()
RETURN

View File

@@ -1,29 +0,0 @@
#include "hbqtgui.ch"
STATIC testo
PROCEDURE Main()
LOCAL oWnd
LOCAL orolo
oWnd := QMainWindow()
oWnd:setWindowTitle( "Finestra di Giovanni" )
oWnd:resize( 250, 150 )
testo := Qlabel( oWnd )
testo:setText( "clocking..." )
testo:move( 100, 100 )
orolo := QTimer()
orolo:Connect( "timeout()", { || stampa_orologio() } )
orolo:start( 1000 )
oWnd:show()
QApplication():exec()
RETURN
PROCEDURE stampa_orologio
testo:setText( Time() )
RETURN

View File

@@ -1,48 +0,0 @@
#include "hbqtgui.ch"
STATIC testo
STATIC orolo
PROCEDURE Main()
LOCAL oWnd
LOCAL pulsante_start, pulsante_stop
oWnd := QMainWindow()
oWnd:setWindowTitle( "Finestra di Giovanni" )
oWnd:resize( 300, 200 )
testo := Qlabel( oWnd )
testo:setText( "clocking..." )
testo:move( 50, 50 )
testo:resize( 200, 100 )
orolo := QTimer()
orolo:Connect( "timeout()", { || stampa_orologio() } )
pulsante_start := QPushButton( oWnd )
pulsante_start:move( 150, 50 )
pulsante_start:setText( "Start" )
pulsante_start:connect( "pressed()", { || start() } )
pulsante_stop := QPushButton( oWnd )
pulsante_stop:move( 150, 100 )
pulsante_stop:setText( "Stop" )
pulsante_stop:connect( "pressed()", { || stop() } )
oWnd:show()
QApplication():exec()
RETURN
PROCEDURE stampa_orologio
testo:setText( Time() )
RETURN
PROCEDURE start
orolo:start( 1000 )
RETURN
PROCEDURE stop
orolo:stop()
RETURN

View File

@@ -1,21 +0,0 @@
#include "hbqtgui.ch"
PROCEDURE Main()
LOCAL oWnd
LOCAL Pulsante1
oWnd := QMainWindow()
oWnd:setWindowTitle( "Prova dei pulsanti" )
oWnd:resize( 300, 200 )
Pulsante1 := QPushButton( oWnd )
Pulsante1:setText( "Quit" )
Pulsante1:move( 50, 50 )
Pulsante1:Connect( "clicked()", { || QApplication():quit() } )
Pulsante1:setStyleSheet( "background-color: yellow; border: 2px solid # FF0000;")
oWnd:show()
QApplication():exec()
RETURN

View File

@@ -1,57 +0,0 @@
#include "hbqtgui.ch"
PROCEDURE Main()
LOCAL finestra
LOCAL oMenuBar, oMenu1, oVoceIns, oVoceMod
// ----------Impostazione Finestra-----------
finestra := QmainWindow()
finestra:SetFixedSize( 300, 200 )
finestra:setWindowTitle( "Volto" )
// ----------Impostazione Menu-----------
oMenuBar := QMenuBar( finestra )
oMenuBar:resize( 700, 22 )
oMenu1 := QMenu()
oMenu1:setTitle( "Anagrafica" )
oVoceIns := QAction( oMenu1 )
oVoceIns:setText( "Inserimento" )
oVoceIns:connect( "triggered(bool)", { || inserimento() } )
oVoceMod := QAction( oMenu1 )
oVoceMod:setText( "Modifica" )
oVoceMod:connect( "triggered(bool)", { || modifica() } )
oMenu1:addAction( oVoceIns )
oMenu1:addAction( oVoceMod )
oMenuBar:addMenu( oMenu1 )
finestra:Show()
QApplication():exec()
RETURN
PROCEDURE inserimento()
STATIC finestra2
finestra2 := QmainWindow()
finestra2:SetFixedSize( 640, 480 )
finestra2:setWindowTitle( "Inserimento Anagrafica" )
finestra2:Show()
RETURN
PROCEDURE modifica()
STATIC finestra2
finestra2 := QmainWindow()
finestra2:SetFixedSize( 640, 480 )
finestra2:setWindowTitle( "Modifica Anagrafica" )
finestra2:Show()
RETURN

View File

@@ -1,17 +0,0 @@
#include "hbqtgui.ch"
PROCEDURE Main()
LOCAL finestra, ui, file
file := QFile( "prova.ui" )
file:open( 1 )
ui := QUiLoader()
finestra := ui:load( file )
file:close()
finestra:show()
QApplication():exec()
RETURN

View File

@@ -1,110 +0,0 @@
#include "hbqtgui.ch"
STATIC tabella
PROCEDURE Main()
//------------Dichiarazioni--------------
LOCAL finestra
LOCAL cella, valore
LOCAL num_campi, num_record, intestazioni
LOCAL x, y
LOCAL pulsante_primo, pulsante_ultimo
finestra := QMainWindow()
finestra:resize( 800, 600 )
//------------Apre DBF e conta campi e record------------
creafiletest()
USE test
num_record = RecCount()
num_campi = FCount()
//------------Dimensiona tabella--------------
tabella := QTableWidget( finestra )
tabella:move( 50, 50 )
tabella:resize( 700, 450 )
tabella:setRowCount( num_record )
tabella:setColumnCount( num_campi )
tabella:setColumnWidth( 0, 200 )
//------------Riempie tabella--------------
for x = 1 TO num_record
for y = 1 TO num_campi
cella := QTableWidgetItem()
valore = FieldGet( y )
DO CASE
CASE ValType( valore ) = "C"
cella:setText( valore )
CASE ValType( valore ) = "N"
cella:setText( AllTrim( Str(valore ) ) )
CASE ValType( valore ) = "D"
cella:setText( Dtoc( valore ) )
CASE ValType( valore ) = "L"
cella:setText( iif( valore = .T. ,"Yes","No" ) )
end CASE
tabella:setItem( x - 1, y - 1, cella )
next y
SKIP
next x
//------------Crea intestazioni tabella--------------
intestazioni := QStringList()
for x = 1 TO 50
intestazioni:append( field( x ) )
next k
tabella:setHorizontalHeaderLabels( intestazioni )
USE
//------------Pulsanti--------------
pulsante_primo := QPushButton( finestra )
pulsante_primo:move( 100, 520 )
pulsante_primo:setText( "Primo" )
pulsante_primo:Connect( "clicked()", { || primo() } )
pulsante_ultimo := QPushButton( finestra )
pulsante_ultimo:move( 300, 520 )
pulsante_ultimo:setText( "Ultimo" )
pulsante_ultimo:Connect( "clicked()", { || ultimo() } )
//------------Esecuzione--------------
finestra:show()
QApplication():exec()
RETURN
PROCEDURE primo()
tabella:scrollToTop()
tabella:setCurrentCell( 0, 0 )
tabella:setFocus()
RETURN
PROCEDURE ultimo()
tabella:scrollToBottom()
tabella:setCurrentCell( tabella:rowCount() - 1, 0 )
tabella:setFocus()
RETURN
PROCEDURE creafiletest()
LOCAL aCampi, i, m_num
IF .NOT. File( "test.dbf" )
aCampi := {}
AAdd( aCampi, { "num", "N", 6, 0 } )
AAdd( aCampi, { "nome", "C", 20, 0 } )
AAdd( aCampi, { "cognome", "C", 25, 0 } )
AAdd( aCampi, { "dt_nasc", "D", 8, 0 } )
AAdd( aCampi, { "yesno", "L", 1, 0 } )
dbCreate( "test.dbf", aCampi, "DBFNTX" )
ENDIF
USE test
GO BOTTOM
m_num := test -> num
for i := 1 TO 50
APPEND BLANK
test -> num := ++ m_num
test -> nome := "pippo"
test -> cognome := "pluto"
test -> dt_nasc := CToD( "10/12/2001" )
test -> yesno := .F.
next
CLOSE test
RETURN

View File

@@ -1,21 +0,0 @@
#include "hbqtgui.ch"
PROCEDURE Main()
LOCAL oWnd
LOCAL stringa
LOCAL dialogo
oWnd := QMainWindow()
oWnd:setWindowTitle( "Finestra di Giovanni" )
oWnd:resize( 400, 300 )
oWnd:show()
dialogo := QInputDialog()
stringa = dialogo:getText( oWnd, "Titolo", "Come ti chiami?" )
oWnd:setWindowTitle( stringa )
QApplication():exec()
RETURN

View File

@@ -1,23 +0,0 @@
#include "hbqtgui.ch"
PROCEDURE Main()
LOCAL barra_progresso
LOCAL k
barra_progresso := QProgressBar()
barra_progresso:resize( 400, 50 )
barra_progresso:move( 50, 50 )
barra_progresso:setRange( 1, 500000 )
barra_progresso:setWindowTitle( "Elaborazione in corso" )
barra_progresso:Show()
barra_progresso:repaint()
for k = 1 TO 500000
barra_progresso:setValue( k )
next k
barra_progresso:quit()
QApplication():exec()
RETURN

View File

@@ -1,22 +0,0 @@
#include "hbqtgui.ch"
PROCEDURE Main()
LOCAL finestra
LOCAL logo
finestra := QmainWindow()
finestra:SetFixedSize( 400, 300 )
finestra:setWindowTitle( "Finestra Giovanni" )
logo := QLabel( finestra )
logo:move( 50, 50 )
logo:resize( 300, 200 )
logo:SetPixmap( QPixmap( "test.jpg" ) )
logo:setStyleSheet( "border: 2px solid #0000ff;" )
finestra:show()
QApplication():exec()
RETURN

View File

@@ -1,20 +0,0 @@
#include "hbqtgui.ch"
PROCEDURE Main()
LOCAL oWnd
LOCAL testo
oWnd := QMainWindow()
oWnd:setWindowTitle( "Finestra di Giovanni" )
oWnd:resize( 300, 200 )
testo := Qlabel( oWnd )
testo:setText( "<font color=#FF0000 size=7>Gio</font>" )
testo:move( 10, 10 )
testo:resize( 280, 100 )
oWnd:show()
QApplication():exec()
RETURN

View File

@@ -1,67 +0,0 @@
#include "hbqtgui.ch"
STATIC palette
STATIC slider_rosso, slider_verde, slider_blu
STATIC testo
PROCEDURE Main()
LOCAL finestra
LOCAL font
finestra := QMainWindow()
finestra:resize( 320, 400 )
finestra:setWindowTitle( "Giovanni" )
font := QFont()
font:setPointSize( 30 )
font:setBold( .T. )
testo := QLabel( finestra )
testo:setText( "Colori" )
testo:move( 100, 10 )
testo:resize( 200, 100 )
testo:setfont( font )
slider_rosso := QSlider( finestra )
slider_rosso:resize( 30, 200 )
slider_rosso:move( 100, 120 )
slider_rosso:setMinimum( 0 )
slider_rosso:setMaximum( 255 )
slider_rosso:setSingleStep( 1 )
slider_rosso:setPageStep( 10 )
slider_rosso:setValue( 0 )
slider_rosso:Connect( "valueChanged(int)", { || cambia_colori() } )
slider_verde := QSlider( finestra )
slider_verde:resize( 30, 200 )
slider_verde:move( 150, 120 )
slider_verde:setMinimum( 0 )
slider_verde:setMaximum( 255 )
slider_verde:setSingleStep( 1 )
slider_verde:setPageStep( 10 )
slider_verde:setValue( 0 )
slider_verde:Connect( "valueChanged(int)", { || cambia_colori() } )
slider_blu := QSlider( finestra )
slider_blu:resize( 30, 200 )
slider_blu:move( 200, 120 )
slider_blu:setMinimum( 0 )
slider_blu:setMaximum( 255 )
slider_blu:setSingleStep( 1 )
slider_blu:setPageStep( 10 )
slider_blu:setValue( 0 )
slider_blu:Connect( "valueChanged(int)", { || cambia_colori() } )
finestra:show()
QApplication():exec()
RETURN
PROCEDURE cambia_colori()
palette := QPalette()
palette:SetColor( QPalette_WindowText, QColor( slider_rosso:value , slider_verde:value , slider_blu:value ) )
testo:setPalette( palette )
RETURN

View File

@@ -1,42 +0,0 @@
#include "hbqtgui.ch"
STATIC font
STATIC testo
STATIC modificatore
PROCEDURE Main()
LOCAL finestra
finestra := QMainWindow()
finestra:resize( 320, 200 )
finestra:setWindowTitle( "Giovanni" )
font := QFont()
font:setPointSize( 30 )
testo := QLabel( finestra )
testo:setText( "Testo" )
testo:move( 10, 10 )
testo:resize( 280, 100 )
testo:setfont( font )
modificatore := QSpinBox( finestra )
modificatore:move( 50, 150 )
modificatore:resize( 50, 25 )
modificatore:Connect( "valueChanged(int)", { || cambia_dimensione() } )
modificatore:setMinimum( 1 )
modificatore:setMaximum( 72 )
modificatore:setSingleStep( 1 )
modificatore:setValue( 30 )
finestra:show()
QApplication():exec()
RETURN
PROCEDURE cambia_dimensione()
font:setPointSize( modificatore:value )
testo:setfont( font )
RETURN

View File

@@ -1,28 +0,0 @@
#include "hbqtgui.ch"
PROCEDURE Main()
LOCAL finestra
LOCAL casella
finestra := QMainWindow()
finestra:resize( 320, 200 )
finestra:setWindowTitle( "Giovanni" )
casella := QComboBox( finestra )
casella:move( 100, 50 )
casella:resize( 100, 25 )
casella:addItem( "Francia" )
casella:addItem( "Italia" )
casella:addItem( "U.S.A." )
casella:addItem( "Germania" )
casella:addItem( "Belgio" )
casella:addItem( "Spagna" )
casella:addItem( "Portogallo" )
casella:addItem( "Islanda" )
finestra:show()
QApplication():exec()
RETURN

View File

@@ -1,37 +0,0 @@
#include "hbqtgui.ch"
STATIC testo
STATIC casella
PROCEDURE Main()
LOCAL finestra
LOCAL font
finestra := QMainWindow()
finestra:resize( 320, 200 )
finestra:setWindowTitle( "Giovanni" )
font := QFont()
testo := Qlabel( finestra )
testo:setText( "Ciao a tutti" )
testo:resize( 200, 80 )
testo:move( 50, 20 )
testo:setfont( font )
casella := QFontComboBox( finestra )
casella:move( 50, 100 )
casella:resize( 200, 25 )
casella:Connect( "currentFontChanged(QFont)", { || cambia_testo() } )
finestra:show()
QApplication():exec()
RETURN
PROCEDURE cambia_testo
testo:setFont( casella:currentFont() )
RETURN

View File

@@ -1,46 +0,0 @@
#include "hbqtgui.ch"
PROCEDURE Main()
LOCAL finestra, pulsante_diminuisci, pulsante_aumenta, lcd
finestra := QMainWindow()
finestra:resize( 300, 200 )
finestra:setWindowTitle( "Giovanni" )
lcd := QLCDNumber( finestra )
lcd:move( 50, 50 )
lcd:resize( 200, 50 )
pulsante_diminuisci := QPushButton( finestra )
pulsante_diminuisci:resize( 30, 30 )
pulsante_diminuisci:move( 70, 130 )
pulsante_diminuisci:setText( "-" )
pulsante_diminuisci:Connect( "clicked()", { || decrementa( lcd ) } )
pulsante_aumenta := QPushButton( finestra )
pulsante_aumenta:resize( 30, 30 )
pulsante_aumenta:move( 200, 130 )
pulsante_aumenta:setText( "+" )
pulsante_aumenta:Connect( "clicked()", { || incrementa( lcd ) } )
finestra:show()
QApplication():exec()
RETURN
PROCEDURE incrementa( lcd )
LOCAL x
x := lcd:value()
x ++
lcd:display( x )
RETURN
PROCEDURE decrementa( lcd )
LOCAL x
x := lcd:value()
x --
lcd:display( x )
RETURN

View File

@@ -1,51 +0,0 @@
#include "hbqtgui.ch"
STATIC edit1, edit2, edit3
PROCEDURE Main()
LOCAL finestra
LOCAL testo
LOCAL calcola
SET DATE ITALIAN
finestra := QMainWindow()
finestra:resize( 400, 300 )
finestra:setWindowTitle( "Giovanni" )
testo := QLabel( finestra )
testo:setText( "Difference between two dates" )
testo:move( 130, 20 )
testo:resize( 171, 16 )
edit1 := QLineEdit( finestra )
edit1:resize( 113, 20 )
edit1:move( 140, 100 )
edit2 := QLineEdit( finestra )
edit2:resize( 113, 20 )
edit2:move( 140, 130 )
edit3 := QLineEdit( finestra )
edit3:resize( 113, 20 )
edit3:move( 140, 180 )
calcola := QPushButton( finestra )
calcola:resize( 75, 23 )
calcola:move( 270, 180 )
calcola:setText( "Calculate" )
calcola:Connect( "clicked()", { || calcola() } )
finestra:show()
QApplication():exec()
RETURN
PROCEDURE calcola()
LOCAL differenza
differenza = Abs( CToD( edit1:text() ) - CToD( edit2:text() ) )
edit3:setText( AllTrim( Str(differenza ) ) )
RETURN

View File

@@ -1,41 +0,0 @@
#include "hbqtgui.ch"
PROCEDURE Main()
LOCAL finestra
LOCAL bottone1, bottone2, bottone3
finestra := QMainWindow()
finestra:resize( 400, 300 )
finestra:setWindowTitle( "Giovanni" )
bottone1 := QRadioButton( finestra )
bottone1:move( 100, 50 )
bottone1:setText( "Si" )
bottone1:Connect( "clicked()", { || messaggio( "SI" ) } )
bottone2 := QRadioButton( finestra )
bottone2:move( 100, 80 )
bottone2:setText( "No" )
bottone2:Connect( "clicked()", { || messaggio( "NO" ) } )
bottone3 := QRadioButton( finestra )
bottone3:move( 100, 110 )
bottone3:setText( "Non so" )
bottone3:Connect( "clicked()", { || messaggio( "NON SO" ) } )
finestra:show()
QApplication():exec()
RETURN
PROCEDURE messaggio( msg )
LOCAL oBox
oBox := QMessageBox()
oBox:setInformativeText( msg )
oBox:setWindowTitle( "Informazione" )
oBox:exec()
RETURN