From 36faf950360ebd5dde95b0d31eb38f851fe62e50 Mon Sep 17 00:00:00 2001 From: Pritpal Bedi Date: Sat, 9 Jan 2010 19:03:28 +0000 Subject: [PATCH] 2010-01-09 10:53 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com) * contrib/hbqt/hbqt_hbslots.cpp * contrib/hbqt/hbqt_hbslots.h + Added few more slots. ! Improved formatting. * contrib/hbxbp/xbprtf.prg ! Corrected "undoAvailable(bool)" slot string. * contrib/hbide/hbide.prg * contrib/hbide/ideactions.prg * contrib/hbide/ideeditor.prg * contrib/hbide/idemisc.prg * contrib/hbide/ideobject.prg + Implemented context menu in the editor tabs. Now it is synchronized with toolbar with same look and feel. + Implemented to re-position editor tabs with drag. HOWTO: Place mouse pointer over a tab -> keep pressed left button -> move mouse pointer left or right -> ( tab will move with your action ) -> release left button when desired position is obtained. --- harbour/ChangeLog | 24 ++ harbour/contrib/hbide/hbide.prg | 23 +- harbour/contrib/hbide/ideactions.prg | 4 +- harbour/contrib/hbide/ideeditor.prg | 282 ++++++++++----- harbour/contrib/hbide/idemisc.prg | 12 +- harbour/contrib/hbide/ideobject.prg | 18 + harbour/contrib/hbqt/hbqt_hbslots.cpp | 481 ++++++++++++++------------ harbour/contrib/hbqt/hbqt_hbslots.h | 4 + harbour/contrib/hbxbp/xbprtf.prg | 2 +- 9 files changed, 542 insertions(+), 308 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 758432f088..82ac62638d 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,30 @@ past entries belonging to author(s): Viktor Szakats. */ +2010-01-09 10:53 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com) + * contrib/hbqt/hbqt_hbslots.cpp + * contrib/hbqt/hbqt_hbslots.h + + Added few more slots. + ! Improved formatting. + + * contrib/hbxbp/xbprtf.prg + ! Corrected "undoAvailable(bool)" slot string. + + * contrib/hbide/hbide.prg + * contrib/hbide/ideactions.prg + * contrib/hbide/ideeditor.prg + * contrib/hbide/idemisc.prg + * contrib/hbide/ideobject.prg + + Implemented context menu in the editor tabs. + Now it is synchronized with toolbar with same look and feel. + + + Implemented to re-position editor tabs with drag. + HOWTO: Place mouse pointer over a tab -> + keep pressed left button -> + move mouse pointer left or right -> + ( tab will move with your action ) -> + release left button when desired position is obtained. + 2010-01-09 12:54 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) * INSTALL + Extended Linux deb/rpm sections: diff --git a/harbour/contrib/hbide/hbide.prg b/harbour/contrib/hbide/hbide.prg index 8fc5afba62..e6c17107fd 100644 --- a/harbour/contrib/hbide/hbide.prg +++ b/harbour/contrib/hbide/hbide.prg @@ -214,6 +214,7 @@ CLASS HbIde METHOD setPosAndSizeByIni() METHOD setPosByIni() + METHOD setSizeByIni() METHOD execAction() METHOD manageFuncContext() @@ -307,10 +308,7 @@ METHOD HbIde:create( cProjIni ) hbide_loadThemes( Self ) /* Prepare Editor's Tabs */ - ::oDa:oTabWidget := XbpTabWidget():new():create( ::oDa, , {0,0}, {10,10}, , .t. ) - ::oDa:oTabWidget:oWidget:setUsesScrollButtons( .f. ) - ::oTabWidget := ::oDa:oTabWidget - ::qTabWidget := ::oDa:oTabWidget:oWidget + ::oED:prepareTabWidget() /* Attach GRID Layout to Editor Area - Futuristic */ ::qLayout := QGridLayout():new() @@ -341,6 +339,10 @@ METHOD HbIde:create( cProjIni ) ::oPM:setCurrentProject( ::cWrkProject, .f. ) ::cWrkTheme := ::aINI[ INI_HBIDE, CurrentTheme ] + /* Set components Sizes */ + ::setSizeByIni( ::oProjTree:oWidget, ProjectTreeGeometry ) + ::setSizeByIni( ::oEditTree:oWidget, ProjectTreeGeometry ) + /* Request Main Window to Appear on the Screen */ ::oDlg:Show() @@ -567,6 +569,19 @@ METHOD HbIde:setPosByIni( qWidget, nPart ) /*----------------------------------------------------------------------*/ +METHOD HbIde:setSizeByIni( qWidget, nPart ) + LOCAL aRect + + IF !empty( ::aIni[ INI_HBIDE, nPart ] ) + aRect := hb_atokens( ::aIni[ INI_HBIDE, nPart ], "," ) + aeval( aRect, {|e,i| aRect[ i ] := val( e ) } ) + qWidget:resize( aRect[ 3 ], aRect[ 4 ] ) + ENDIF + + RETURN Self + +/*----------------------------------------------------------------------*/ + METHOD HbIde:manageFocusInEditor() IF ::getCurrentTab() > 0 diff --git a/harbour/contrib/hbide/ideactions.prg b/harbour/contrib/hbide/ideactions.prg index 9e80301a9a..7443a6ac14 100644 --- a/harbour/contrib/hbide/ideactions.prg +++ b/harbour/contrib/hbide/ideactions.prg @@ -140,7 +140,7 @@ METHOD IdeActions:buildActions() aAct := ::loadActions() FOR EACH a_ IN aAct - IF !hb_hHasKey( ::hActions, a_[ ACT_NAME ] ) + IF !( hb_hHasKey( ::hActions, a_[ ACT_NAME ] ) ) qAction := QAction():new( ::qDlg ) qAction:setCheckable( iif( empty( a_[ ACT_CHECKABLE ] ), .F., ; @@ -159,6 +159,7 @@ METHOD IdeActions:buildActions() qAction:setTooltip( strtran( a_[ ACT_TEXT ], "~", "" ) ) ::hActions[ a_[ ACT_NAME ] ] := qAction + ENDIF NEXT @@ -517,6 +518,7 @@ METHOD IdeActions:buildMainMenu() oSubMenu := XbpMenu():new( oMenuBar ):create() oSubMenu:title := "~Help" oSubMenu:addItem( { ::getAction( "AboutIDE" ), {|| hbide_help( 1 ) } } ) + hbide_menuAddSep( oSubMenu ) oSubMenu:addItem( { ::getAction( "AboutHarbour" ), {|| hbide_help( 4 ) } } ) hbide_menuAddSep( oSubMenu ) oSubMenu:addItem( { ::getAction( "HarbourUsersList" ), {|| hbide_help( 3 ) } } ) diff --git a/harbour/contrib/hbide/ideeditor.prg b/harbour/contrib/hbide/ideeditor.prg index ac7d73b629..703935cef2 100644 --- a/harbour/contrib/hbide/ideeditor.prg +++ b/harbour/contrib/hbide/ideeditor.prg @@ -75,6 +75,9 @@ CLASS IdeEditsManager INHERIT IdeObject + DATA qContextMenu + DATA aActions INIT {} + METHOD new() METHOD create() @@ -111,10 +114,85 @@ CLASS IdeEditsManager INHERIT IdeObject METHOD getEditorByTabObject() METHOD getEditorByIndex() + METHOD prepareTabWidget() + METHOD exeBlock() + ENDCLASS /*----------------------------------------------------------------------*/ +METHOD IdeEditsManager:new( oIde ) + + ::oIde := oIde + + RETURN Self + +/*----------------------------------------------------------------------*/ + +METHOD IdeEditsManager:create( oIde ) + + DEFAULT oIde TO ::oIde + + ::oIde := oIde + + ::qContextMenu := QMenu():new() + + aadd( ::aActions, { "TB_Cut" , ::qContextMenu:addAction_4( ::oAC:getAction( "TB_Cut" ) ) } ) + aadd( ::aActions, { "TB_Copy" , ::qContextMenu:addAction_4( ::oAC:getAction( "TB_Copy" ) ) } ) + aadd( ::aActions, { "TB_Paste" , ::qContextMenu:addAction_4( ::oAC:getAction( "TB_Paste" ) ) } ) + aadd( ::aActions, { "" , ::qContextMenu:addSeparator() } ) + aadd( ::aActions, { "TB_Undo" , ::qContextMenu:addAction_4( ::oAC:getAction( "TB_Undo" ) ) } ) + aadd( ::aActions, { "TB_Redo" , ::qContextMenu:addAction_4( ::oAC:getAction( "TB_Redo" ) ) } ) + aadd( ::aActions, { "" , ::qContextMenu:addSeparator() } ) + aadd( ::aActions, { "TB_Save" , ::qContextMenu:addAction_4( ::oAC:getAction( "TB_Save" ) ) } ) + aadd( ::aActions, { "TB_Close" , ::qContextMenu:addAction_4( ::oAC:getAction( "TB_Close" ) ) } ) + aadd( ::aActions, { "" , ::qContextMenu:addSeparator() } ) + aadd( ::aActions, { "TB_Compile" , ::qContextMenu:addAction_4( ::oAC:getAction( "TB_Compile" ) ) } ) + aadd( ::aActions, { "TB_CompilePPO", ::qContextMenu:addAction_4( ::oAC:getAction( "TB_CompilePPO" ) ) } ) + aadd( ::aActions, { "" , ::qContextMenu:addSeparator() } ) + aadd( ::aActions, { "Apply Theme" , ::qContextMenu:addAction( "Apply Theme" ) } ) + + RETURN Self + +/*----------------------------------------------------------------------*/ + +METHOD IdeEditsManager:prepareTabWidget() + + ::oIde:oDa:oTabWidget := XbpTabWidget():new():create( ::oDa, , {0,0}, {10,10}, , .t. ) + ::oIde:oTabWidget := ::oDa:oTabWidget + ::oIde:qTabWidget := ::oDa:oTabWidget:oWidget + + ::qTabWidget:setUsesScrollButtons( .f. ) + ::qTabWidget:setMovable( .t. ) + + ::qTabWidget:setContextMenuPolicy( Qt_CustomContextMenu ) + ::connect( ::qTabWidget, "customContextMenuRequested(QPoint)", {|o,p| ::exeBlock( 1, p, o ) } ) + + RETURN Self + +/*----------------------------------------------------------------------*/ + +METHOD IdeEditsManager:exeBlock( nMode, p ) + //LOCAL qObj + + HB_SYMBOL_UNUSED( p ) + + DO CASE + CASE nMode == 1 // "customContextMenuRequested(QPoint)" + #if 0 + qObj := QWidget():configure( ::qTabWidget:childAt_1( QPoint():configure( p ) ) ) + IF !e + hbide_dbg( qObj:x(), qObj:y() ) + #endif + CASE nMode == 2 + CASE nMode == 3 + ENDCASE + + + RETURN Nil + +/*----------------------------------------------------------------------*/ + METHOD IdeEditsManager:buildEditor( cSourceFile, nPos, nHPos, nVPos, cTheme ) aadd( ::aEdits, IdeEditor():new():create( ::oIde, cSourceFile, nPos, nHPos, nVPos, cTheme ) ) @@ -237,24 +315,6 @@ METHOD IdeEditsManager:setSourceVisibleByIndex( nIndex ) /* nIndex is 0 based */ /*----------------------------------------------------------------------*/ -METHOD IdeEditsManager:new( oIde ) - - ::oIde := oIde - - RETURN Self - -/*----------------------------------------------------------------------*/ - -METHOD IdeEditsManager:create( oIde ) - - DEFAULT oIde TO ::oIde - - ::oIde := oIde - - RETURN Self - -/*----------------------------------------------------------------------*/ - METHOD IdeEditsManager:undo() IF !empty( ::qCurEdit ) ::qCurEdit:undo() @@ -556,11 +616,10 @@ CLASS IdeEditor INHERIT IdeObject METHOD activateTab() METHOD closeTab() METHOD dispEditInfo() - METHOD onBlockCountChanged() - METHOD onContentsChanged() METHOD setTabImage() METHOD applyTheme() METHOD setDocumentProperties() + METHOD exeBlock() ENDCLASS @@ -623,10 +682,22 @@ METHOD IdeEditor:create( oIde, cSourceFile, nPos, nHPos, nVPos, cTheme ) ::qHiliter := ::oThemes:SetSyntaxHilighting( ::qEdit, @::cTheme ) ENDIF - Qt_Slots_Connect( ::pSlots, ::qEdit , "textChanged()" , {|| ::setTabImage() } ) - Qt_Slots_Connect( ::pSlots, ::qEdit , "cursorPositionChanged()", {|| ::dispEditInfo() } ) - Qt_Slots_Connect( ::pSlots, ::qDocument, "blockCountChanged(int)" , {|o,i| ::onBlockCountChanged( i, o ) } ) - Qt_Slots_Connect( ::pSlots, ::qDocument, "contentsChanged()" , {|| ::onContentsChanged() } ) + ::qEdit:setContextMenuPolicy( Qt_CustomContextMenu ) + ::connect( ::qEdit , "customContextMenuRequested(QPoint)", {|o,p| ::exeBlock( 1, p, o ) } ) + + /* QPlainTextEdit */ + ::Connect( ::qEdit , "textChanged()" , {| | ::setTabImage() } ) + ::Connect( ::qEdit , "cursorPositionChanged()" , {| | ::dispEditInfo() } ) + ::Connect( ::qEdit , "copyAvailable(bool)" , {|o,p | ::exeBlock( 3, p, o ) } ) + ::Connect( ::qEdit , "modificationChanged(bool)", {|o,p | ::exeBlock( 4, p, o ) } ) + ::Connect( ::qEdit , "redoAvailable(bool)" , {|o,p | ::exeBlock( 5, p, o ) } ) + ::Connect( ::qEdit , "selectionChanged()" , {|o,p | ::exeBlock( 6, p, o ) } ) + ::Connect( ::qEdit , "undoAvailable(bool)" , {|o,p | ::exeBlock( 7, p, o ) } ) + ::Connect( ::qEdit , "updateRequest(QRect,int)" , {|o,p,p1| ::exeBlock( 8, p, p1, o ) } ) + /* QTextDocument */ + ::Connect( ::qDocument, "blockCountChanged(int)" , {|o,p | ::exeBlock( 21, p, o ) } ) + ::Connect( ::qDocument, "contentsChanged()" , {| | ::exeBlock( 22 ) } ) + ::qEdit:show() ::qCursor := QTextCursor():configure( ::qEdit:textCursor() ) @@ -646,6 +717,67 @@ METHOD IdeEditor:create( oIde, cSourceFile, nPos, nHPos, nVPos, cTheme ) /*----------------------------------------------------------------------*/ +METHOD IdeEditor:exeBlock( nMode, p, p1 ) + LOCAL pAct, qAct + //LOCAL qRect + + HB_SYMBOL_UNUSED( p ) + HB_SYMBOL_UNUSED( p1 ) + + SWITCH nMode + /* QPlainTextEdit */ + CASE 1 // "customContextMenuRequested(QPoint)" + IF !empty( pAct := ::oED:qContextMenu:exec_1( ::qEdit:mapToGlobal( p ) ) ) + qAct := QAction():configure( pAct ) + DO CASE + CASE qAct:text() == "Apply Theme" + ::applyTheme() + ENDCASE + ENDIF + EXIT + CASE 2 + EXIT + CASE 3 // "copyAvailable(bool)" + hbide_dbg( "copyAvailable(bool)" ) + EXIT + CASE 4 // "modificationChanged(bool)" + hbide_dbg( "modificationChanged(bool)" ) + EXIT + CASE 5 // "redoAvailable(bool)" + hbide_dbg( "redoAvailable(bool)" ) + EXIT + CASE 6 // "selectionChanged()" + hbide_dbg( "selectionChanged()" ) + EXIT + CASE 7 // "undoAvailable(bool)" + hbide_dbg( "undoAvailable(bool)" ) + EXIT + CASE 8 // "updateRequest(QRect,int)" + //qRect := QRect():configure( p ) + //hbide_dbg( "updateRequest(QRect,int)", qRect:x(), qRect:y(), qRect:width(), qRect:height(), p1 ) + EXIT + /* QTabPage */ + CASE 11 // QEvent_ContextMenu + hbide_dbg( "QEvent_ContextMenu" ) + EXIT + CASE 12 // QEvent_ContextMenu + hbide_dbg( "QEvent_ContextMenu" ) + EXIT + /* QTextDocument */ + CASE 21 // "blockCountChanged(int)" + ::nBlock := QTextCursor():configure( ::qEdit:textCursor() ):blockNumber() + EXIT + CASE 22 // "contentsChanged()" + hbide_dbg( "contentsChanged()" ) + EXIT + + + ENDSWITCH + + RETURN Nil + +/*----------------------------------------------------------------------*/ + METHOD IdeEditor:setDocumentProperties() LOCAL qCursor @@ -701,6 +833,51 @@ METHOD IdeEditor:destroy() RETURN Self /*----------------------------------------------------------------------*/ + +METHOD IdeEditor:buildTabPage( cSource ) + + ::oTab := XbpTabPage():new( ::oIde:oDA, , { 5,5 }, { 700,400 }, , .t. ) + + IF Empty( cSource ) + ::oTab:caption := "Untitled " + hb_ntos( hbide_getNextUntitled() ) + ELSE + ::oTab:caption := ::cFile + ::cExt + ENDIF + ::oTab:minimized := .F. + + ::oTab:create() + + ::qTabWidget:setCurrentIndex( ::qTabWidget:indexOf( ::oTab:oWidget ) ) + ::qTabWidget:setTabTooltip( ::qTabWidget:indexOf( ::oTab:oWidget ), cSource ) + + ::oTab:tabActivate := {|mp1,mp2,oXbp| ::activateTab( mp1, mp2, oXbp ) } + ::oTab:closeRequested := {|mp1,mp2,oXbp| ::closeTab( mp1, mp2, oXbp ) } + + ::oTab:oWidget:setContextMenuPolicy( Qt_CustomContextMenu ) + ::connect( ::oTab:oWidget, "customContextMenuRequested(QPoint)", {|o,e| ::exeBlock( 11, e, o ) } ) + + RETURN Self + +/*----------------------------------------------------------------------*/ + +METHOD IdeEditor:closeTab( mp1, mp2, oXbp ) + + IF PCount() == 00 + mp1 := ::nID + mp2 := ascan( ::aTabs, {|e_| e_[ TAB_OEDITOR ]:nID == mp1 } ) + ELSE + mp2 := ascan( ::aTabs, {|e_| e_[ TAB_OTAB ] == oXbp } ) + ENDIF + + * Requested tab exists? + IF !Empty( mp2 ) + ::oIde:closeSource( mp2 ) + ENDIF + + RETURN Self + +/*----------------------------------------------------------------------*/ + /* * Remove the tab of the main screen and clean the objects from memory.Note that * this function does not question the User if he wants to save or not the @@ -787,63 +964,6 @@ METHOD IdeEditor:removeTabPage() /*----------------------------------------------------------------------*/ -METHOD IdeEditor:buildTabPage( cSource ) - - ::oTab := XbpTabPage():new( ::oIde:oDA, , { 5,5 }, { 700,400 }, , .t. ) - - IF Empty( cSource ) - ::oTab:caption := "Untitled " + hb_ntos( hbide_getNextUntitled() ) - ELSE - ::oTab:caption := ::cFile + ::cExt - ENDIF - ::oTab:minimized := .F. - - ::oTab:create() - - ::qTabWidget:setCurrentIndex( ::qTabWidget:indexOf( ::oTab:oWidget ) ) - ::qTabWidget:setTabTooltip( ::qTabWidget:indexOf( ::oTab:oWidget ), cSource ) - - ::oTab:tabActivate := {|mp1,mp2,oXbp| ::activateTab( mp1, mp2, oXbp ) } - ::oTab:closeRequested := {|mp1,mp2,oXbp| ::closeTab( mp1, mp2, oXbp ) } - - RETURN Self - -/*----------------------------------------------------------------------*/ - -METHOD IdeEditor:closeTab( mp1, mp2, oXbp ) - - IF PCount() == 00 - mp1 := ::nID - mp2 := ascan( ::aTabs, {|e_| e_[ TAB_OEDITOR ]:nID == mp1 } ) - ELSE - mp2 := ascan( ::aTabs, {|e_| e_[ TAB_OTAB ] == oXbp } ) - ENDIF - - * Requested tab exists? - IF !Empty( mp2 ) - ::oIde:closeSource( mp2 ) - ENDIF - - RETURN Self - -/*----------------------------------------------------------------------*/ - -METHOD IdeEditor:onContentsChanged() - - // hbide_dbg( "onContentsChanged()" ) - - RETURN Self - -/*----------------------------------------------------------------------*/ - -METHOD IdeEditor:onBlockCountChanged() - - ::nBlock := ::qCursor := QTextCursor():configure( ::qEdit:textCursor() ):blockNumber() - - RETURN Self - -/*----------------------------------------------------------------------*/ - METHOD IdeEditor:dispEditInfo() LOCAL s diff --git a/harbour/contrib/hbide/idemisc.prg b/harbour/contrib/hbide/idemisc.prg index 0e23904c5d..1d6a12d3a2 100644 --- a/harbour/contrib/hbide/idemisc.prg +++ b/harbour/contrib/hbide/idemisc.prg @@ -100,7 +100,7 @@ PROCEDURE hbide_justACall() FUNCTION hbide_execPopup( aPops, aPos, qParent ) LOCAL i, qPop, qPoint, qAct, cAct, xRet, pAct, a_ - qPop := QMenu():new( IIF( hb_isObject( qParent ), qParent, NIL ) ) + qPop := QMenu():new( iif( hb_isObject( qParent ), qParent, NIL ) ) FOR i := 1 TO len( aPops ) IF empty( aPops[ i,1 ] ) @@ -117,9 +117,10 @@ FUNCTION hbide_execPopup( aPops, aPos, qParent ) qPoint := QPoint():new( aPos[ 1 ], aPos[ 2 ] ) pAct := qPop:exec_1( qPoint ) - qAct := QAction():configure( pAct ) - - IF !empty( qAct:pPtr ) .and. !empty( cAct := qAct:text() ) + //IF !empty( qAct:pPtr ) .and. !empty( cAct := qAct:text() ) + IF !empty( pAct ) + qAct := QAction():configure( pAct ) + cAct := qAct:text() FOR EACH a_ IN aPops IF hb_isObject( a_[ 1 ] ) IF a_[ 1 ]:text() == cAct @@ -163,6 +164,9 @@ FUNCTION hbide_createTarget( cFile, txt_ ) /*----------------------------------------------------------------------*/ FUNCTION hbide_posAndSize( qWidget ) + LOCAL qRect := QRect():configure( qWidget:geometry() ) + + hbide_dbg( qRect:x(), qRect:y(), qRect:width(), qRect:height() ) RETURN hb_ntos( qWidget:x() ) + "," + hb_ntos( qWidget:y() ) + "," + ; hb_ntos( qWidget:width() ) + "," + hb_ntos( qWidget:height() ) + "," diff --git a/harbour/contrib/hbide/ideobject.prg b/harbour/contrib/hbide/ideobject.prg index 40a50a494a..7e6c250b3c 100644 --- a/harbour/contrib/hbide/ideobject.prg +++ b/harbour/contrib/hbide/ideobject.prg @@ -77,6 +77,7 @@ CLASS IdeObject DATA oIde DATA oUI + DATA qContextMenu ACCESS oFR INLINE ::oIde:oFR ACCESS oED INLINE ::oIde:oED @@ -138,12 +139,29 @@ CLASS IdeObject METHOD create() VIRTUAL METHOD destroy() VIRTUAL + DATA aSlots INIT {} + DATA aEvents INIT {} + METHOD connect() + ERROR HANDLER OnError() ENDCLASS /*----------------------------------------------------------------------*/ +METHOD IdeObject:connect( qWidget, cSlot, bBlock ) + + IF Qt_Slots_Connect( ::pSlots, qWidget, cSlot, bBlock ) + aadd( ::aSlots, { qWidget, cSlot } ) + ELSE + hbide_dbg( "FAILED:", cSlot ) + ENDIF + + RETURN Self + +/*----------------------------------------------------------------------*/ + + METHOD IdeObject:onError( ... ) LOCAL cMsg diff --git a/harbour/contrib/hbqt/hbqt_hbslots.cpp b/harbour/contrib/hbqt/hbqt_hbslots.cpp index 27dee7d860..23d4db0d59 100644 --- a/harbour/contrib/hbqt/hbqt_hbslots.cpp +++ b/harbour/contrib/hbqt/hbqt_hbslots.cpp @@ -72,7 +72,8 @@ static bool connect_signal( QString signal, QObject * object, HBSlots * t_slots { bool ret; - if( signal == ( QString ) "clicked()" ) ret = object->connect( object, SIGNAL( clicked() ), t_slots, SLOT( clicked() ), Qt::AutoConnection ); + if( signal == ( QString ) "customContextMenuRequested(QPoint)" ) ret = object->connect( object, SIGNAL( customContextMenuRequested( const QPoint & ) ), t_slots, SLOT( customContextMenuRequested( const QPoint & ) ), Qt::AutoConnection ); + else if( signal == ( QString ) "clicked()" ) ret = object->connect( object, SIGNAL( clicked() ), t_slots, SLOT( clicked() ), Qt::AutoConnection ); else if( signal == ( QString ) "returnPressed()" ) ret = object->connect( object, SIGNAL( returnPressed() ), t_slots, SLOT( returnPressed() ), Qt::AutoConnection ); else if( signal == ( QString ) "triggered()" ) ret = object->connect( object, SIGNAL( triggered() ), t_slots, SLOT( triggered() ), Qt::AutoConnection ); else if( signal == ( QString ) "hovered()" ) ret = object->connect( object, SIGNAL( hovered() ), t_slots, SLOT( hovered() ), Qt::AutoConnection ); @@ -129,7 +130,7 @@ static bool connect_signal( QString signal, QObject * object, HBSlots * t_slots else if( signal == ( QString ) "cursorPositionChanged()" ) ret = object->connect( object, SIGNAL( cursorPositionChanged() ), t_slots, SLOT( cursorPositionChanged() ), Qt::AutoConnection ); else if( signal == ( QString ) "redoAvailable(bool)" ) ret = object->connect( object, SIGNAL( redoAvailable( bool ) ), t_slots, SLOT( redoAvailable( bool ) ), Qt::AutoConnection ); else if( signal == ( QString ) "textChanged()" ) ret = object->connect( object, SIGNAL( textChanged() ), t_slots, SLOT( textChanged() ), Qt::AutoConnection ); - else if( signal == ( QString ) "undoAvailable(available)" ) ret = object->connect( object, SIGNAL( undoAvailable( bool ) ), t_slots, SLOT( undoAvailable( bool ) ), Qt::AutoConnection ); + else if( signal == ( QString ) "undoAvailable(bool)" ) ret = object->connect( object, SIGNAL( undoAvailable( bool ) ), t_slots, SLOT( undoAvailable( bool ) ), Qt::AutoConnection ); else if( signal == ( QString ) "timeout()" ) ret = object->connect( object, SIGNAL( timeout() ), t_slots, SLOT( timeout() ), Qt::AutoConnection ); /* Generic purpose mechanism to receive key and mouse events off subclasses */ else if( signal == ( QString ) "keyPressEvent()" ) ret = object->connect( object, SIGNAL( sg_keyPressEvent( QKeyEvent * ) ), t_slots, SLOT( keyPressEvent( QKeyEvent * ) ), Qt::AutoConnection ); @@ -190,6 +191,8 @@ static bool connect_signal( QString signal, QObject * object, HBSlots * t_slots else if( signal == ( QString ) "documentLayoutChanged()" ) ret = object->connect( object, SIGNAL( documentLayoutChanged() ), t_slots, SLOT( documentLayoutChanged() ), Qt::AutoConnection ); else if( signal == ( QString ) "modificationChanged(bool)" ) ret = object->connect( object, SIGNAL( modificationChanged( bool ) ), t_slots, SLOT( modificationChanged( bool ) ), Qt::AutoConnection ); else if( signal == ( QString ) "undoCommandAdded()" ) ret = object->connect( object, SIGNAL( undoCommandAdded() ), t_slots, SLOT( undoCommandAdded() ), Qt::AutoConnection ); + /* QPlainTextEdit */ + else if( signal == ( QString ) "updateRequest(QRect,int)" ) ret = object->connect( object, SIGNAL( updateRequest( const QRect &, int ) ), t_slots, SLOT( updateRequest( const QRect &, int ) ), Qt::AutoConnection ); else ret = false; return ret; @@ -197,116 +200,117 @@ static bool connect_signal( QString signal, QObject * object, HBSlots * t_slots static bool disconnect_signal( QObject * object, const char * signal ) { - if( signal == ( QString ) "clicked()" ) return object->disconnect( SIGNAL( clicked() ) ); - else if( signal == ( QString ) "returnPressed()" ) return object->disconnect( SIGNAL( returnPressed() ) ); - else if( signal == ( QString ) "triggered()" ) return object->disconnect( SIGNAL( triggered() ) ); - else if( signal == ( QString ) "hovered()" ) return object->disconnect( SIGNAL( hovered() ) ); - else if( signal == ( QString ) "viewportEntered()" ) return object->disconnect( SIGNAL( viewportEntered() ) ); - else if( signal == ( QString ) "pressed()" ) return object->disconnect( SIGNAL( pressed() ) ); - else if( signal == ( QString ) "released()" ) return object->disconnect( SIGNAL( released() ) ); - else if( signal == ( QString ) "stateChanged(int)" ) return object->disconnect( SIGNAL( stateChanged( int ) ) ); - else if( signal == ( QString ) "activated(int)" ) return object->disconnect( SIGNAL( activated( int ) ) ); - else if( signal == ( QString ) "currentIndexChanged(int)" ) return object->disconnect( SIGNAL( currentIndexChanged( int ) ) ); - else if( signal == ( QString ) "highlighted(int)" ) return object->disconnect( SIGNAL( highlighted( int ) ) ); - else if( signal == ( QString ) "triggered(bool)" ) return object->disconnect( SIGNAL( triggered( bool ) ) ); - else if( signal == ( QString ) "clicked(QModelIndex)" ) return object->disconnect( SIGNAL( clicked( const QModelIndex & ) ) ); - else if( signal == ( QString ) "doubleClicked(QModelIndex)" ) return object->disconnect( SIGNAL( doubleClicked( const QModelIndex & ) ) ); - else if( signal == ( QString ) "entered(QModelIndex)" ) return object->disconnect( SIGNAL( entered( const QModelIndex & ) ) ); - else if( signal == ( QString ) "hovered(action)" ) return object->disconnect( SIGNAL( hovered( QAction * ) ) ); - else if( signal == ( QString ) "currentChanged(int)" ) return object->disconnect( SIGNAL( currentChanged( int ) ) ); - else if( signal == ( QString ) "actionTriggered(int)" ) return object->disconnect( SIGNAL( actionTriggered(int) ) ); - else if( signal == ( QString ) "rangeChanged(int,int)" ) return object->disconnect( SIGNAL( rangeChanged(int,int) ) ); - else if( signal == ( QString ) "sliderMoved(int)" ) return object->disconnect( SIGNAL( sliderMoved(int) ) ); - else if( signal == ( QString ) "sliderPressed()" ) return object->disconnect( SIGNAL( sliderPressed() ) ); - else if( signal == ( QString ) "sliderReleased()" ) return object->disconnect( SIGNAL( sliderReleased() ) ); - else if( signal == ( QString ) "valueChanged(int)" ) return object->disconnect( SIGNAL( valueChanged(int) ) ); - else if( signal == ( QString ) "cursorPositionChanged(int,int)" ) return object->disconnect( SIGNAL( cursorPositionChanged(int,int) ) ); - else if( signal == ( QString ) "editingFinished()" ) return object->disconnect( SIGNAL( editingFinished() ) ); - else if( signal == ( QString ) "returnPressed()" ) return object->disconnect( SIGNAL( returnPressed() ) ); - else if( signal == ( QString ) "selectionChanged()" ) return object->disconnect( SIGNAL( selectionChanged() ) ); - else if( signal == ( QString ) "textChanged(QString)" ) return object->disconnect( SIGNAL( textChanged( const QString &) ) ); - else if( signal == ( QString ) "textEdited(QString)" ) return object->disconnect( SIGNAL( textEdited( const QString &) ) ); + if( signal == ( QString ) "customContextMenuRequested(QPoint)" ) return object->disconnect( SIGNAL( customContextMenuRequested( const QPoint & ) ) ); + else if( signal == ( QString ) "clicked()" ) return object->disconnect( SIGNAL( clicked() ) ); + else if( signal == ( QString ) "returnPressed()" ) return object->disconnect( SIGNAL( returnPressed() ) ); + else if( signal == ( QString ) "triggered()" ) return object->disconnect( SIGNAL( triggered() ) ); + else if( signal == ( QString ) "hovered()" ) return object->disconnect( SIGNAL( hovered() ) ); + else if( signal == ( QString ) "viewportEntered()" ) return object->disconnect( SIGNAL( viewportEntered() ) ); + else if( signal == ( QString ) "pressed()" ) return object->disconnect( SIGNAL( pressed() ) ); + else if( signal == ( QString ) "released()" ) return object->disconnect( SIGNAL( released() ) ); + else if( signal == ( QString ) "stateChanged(int)" ) return object->disconnect( SIGNAL( stateChanged( int ) ) ); + else if( signal == ( QString ) "activated(int)" ) return object->disconnect( SIGNAL( activated( int ) ) ); + else if( signal == ( QString ) "currentIndexChanged(int)" ) return object->disconnect( SIGNAL( currentIndexChanged( int ) ) ); + else if( signal == ( QString ) "highlighted(int)" ) return object->disconnect( SIGNAL( highlighted( int ) ) ); + else if( signal == ( QString ) "triggered(bool)" ) return object->disconnect( SIGNAL( triggered( bool ) ) ); + else if( signal == ( QString ) "clicked(QModelIndex)" ) return object->disconnect( SIGNAL( clicked( const QModelIndex & ) ) ); + else if( signal == ( QString ) "doubleClicked(QModelIndex)" ) return object->disconnect( SIGNAL( doubleClicked( const QModelIndex & ) ) ); + else if( signal == ( QString ) "entered(QModelIndex)" ) return object->disconnect( SIGNAL( entered( const QModelIndex & ) ) ); + else if( signal == ( QString ) "hovered(action)" ) return object->disconnect( SIGNAL( hovered( QAction * ) ) ); + else if( signal == ( QString ) "currentChanged(int)" ) return object->disconnect( SIGNAL( currentChanged( int ) ) ); + else if( signal == ( QString ) "actionTriggered(int)" ) return object->disconnect( SIGNAL( actionTriggered(int) ) ); + else if( signal == ( QString ) "rangeChanged(int,int)" ) return object->disconnect( SIGNAL( rangeChanged(int,int) ) ); + else if( signal == ( QString ) "sliderMoved(int)" ) return object->disconnect( SIGNAL( sliderMoved(int) ) ); + else if( signal == ( QString ) "sliderPressed()" ) return object->disconnect( SIGNAL( sliderPressed() ) ); + else if( signal == ( QString ) "sliderReleased()" ) return object->disconnect( SIGNAL( sliderReleased() ) ); + else if( signal == ( QString ) "valueChanged(int)" ) return object->disconnect( SIGNAL( valueChanged(int) ) ); + else if( signal == ( QString ) "cursorPositionChanged(int,int)" ) return object->disconnect( SIGNAL( cursorPositionChanged(int,int) ) ); + else if( signal == ( QString ) "editingFinished()" ) return object->disconnect( SIGNAL( editingFinished() ) ); + else if( signal == ( QString ) "returnPressed()" ) return object->disconnect( SIGNAL( returnPressed() ) ); + else if( signal == ( QString ) "selectionChanged()" ) return object->disconnect( SIGNAL( selectionChanged() ) ); + else if( signal == ( QString ) "textChanged(QString)" ) return object->disconnect( SIGNAL( textChanged( const QString &) ) ); + else if( signal == ( QString ) "textEdited(QString)" ) return object->disconnect( SIGNAL( textEdited( const QString &) ) ); else if( signal == ( QString ) "currentItemChanged(QTWItem)" ) return object->disconnect( SIGNAL( currentItemChanged( QTreeWidgetItem *, QTreeWidgetItem * ) ) ); - else if( signal == ( QString ) "itemActivated(QTWItem)" ) return object->disconnect( SIGNAL( itemActivated( QTreeWidgetItem *, int ) ) ); - else if( signal == ( QString ) "itemChanged(QTWItem)" ) return object->disconnect( SIGNAL( itemChanged( QTreeWidgetItem *, int ) ) ); - else if( signal == ( QString ) "itemClicked(QTWItem)" ) return object->disconnect( SIGNAL( itemClicked( QTreeWidgetItem *, int ) ) ); - else if( signal == ( QString ) "itemCollapsed(QTWItem)" ) return object->disconnect( SIGNAL( itemCollapsed( QTreeWidgetItem * ) ) ); - else if( signal == ( QString ) "itemDoubleClicked(QTWItem)" ) return object->disconnect( SIGNAL( itemDoubleClicked( QTreeWidgetItem *, int ) ) ); - else if( signal == ( QString ) "itemEntered(QTWItem)" ) return object->disconnect( SIGNAL( itemEntered( QTreeWidgetItem *, int ) ) ); - else if( signal == ( QString ) "itemExpanded(QTWItem)" ) return object->disconnect( SIGNAL( itemExpanded( QTreeWidgetItem * ) ) ); - else if( signal == ( QString ) "itemPressed(QTWItem)" ) return object->disconnect( SIGNAL( itemPressed( QTreeWidgetItem *, int ) ) ); - else if( signal == ( QString ) "itemSelectionChanged()" ) return object->disconnect( SIGNAL( itemSelectionChanged() ) ); - else if( signal == ( QString ) "iconChanged()" ) return object->disconnect( SIGNAL( iconChanged() ) ); - else if( signal == ( QString ) "titleChanged(QString)" ) return object->disconnect( SIGNAL( titleChanged( const QString & ) ) ); - else if( signal == ( QString ) "urlChanged(QUrl)" ) return object->disconnect( SIGNAL( urlChanged( const QUrl & ) ) ); - else if( signal == ( QString ) "currentFontChanged(QFont)" ) return object->disconnect( SIGNAL( currentFontChanged( const QFont & ) ) ); - else if( signal == ( QString ) "fontSelected(QFont)" ) return object->disconnect( SIGNAL( fontSelected( const QFont & ) ) ); - else if( signal == ( QString ) "accepted()" ) return object->disconnect( SIGNAL( accepted() ) ); - else if( signal == ( QString ) "finished(int)" ) return object->disconnect( SIGNAL( finished( int ) ) ); - else if( signal == ( QString ) "rejected()" ) return object->disconnect( SIGNAL( rejected() ) ); - else if( signal == ( QString ) "currentChanged(QString)" ) return object->disconnect( SIGNAL( currentChanged( const QString & ) ) ); - else if( signal == ( QString ) "directoryEntered(QString)" ) return object->disconnect( SIGNAL( directoryEntered( const QString & ) ) ); - else if( signal == ( QString ) "fileSelected(QString)" ) return object->disconnect( SIGNAL( fileSelected( const QString & ) ) ); - else if( signal == ( QString ) "filesSelected(QStringList)" ) return object->disconnect( SIGNAL( filesSelected( const QStringList & ) ) ); - else if( signal == ( QString ) "filterSelected(QString)" ) return object->disconnect( SIGNAL( filterSelected( const QString & ) ) ); - else if( signal == ( QString ) "accepted(QPrinter)" ) return object->disconnect( SIGNAL( accepted( QPrinter * ) ) ); - else if( signal == ( QString ) "copyAvailable(bool)" ) return object->disconnect( SIGNAL( copyAvailable( bool ) ) ); - else if( signal == ( QString ) "currentCharFormatChanged(QTextCharFormat)" ) return object->disconnect( SIGNAL( currentCharFormatChanged( const QTextCharFormat & ) ) ); - else if( signal == ( QString ) "cursorPositionChanged()" ) return object->disconnect( SIGNAL( cursorPositionChanged() ) ); - else if( signal == ( QString ) "redoAvailable(bool)" ) return object->disconnect( SIGNAL( redoAvailable( bool ) ) ); - else if( signal == ( QString ) "textChanged()" ) return object->disconnect( SIGNAL( textChanged() ) ); - else if( signal == ( QString ) "undoAvailable(available)" ) return object->disconnect( SIGNAL( undoAvailable( bool ) ) ); - else if( signal == ( QString ) "timeout()" ) return object->disconnect( SIGNAL( timeout() ) ); - else if( signal == ( QString ) "keyPressEvent()" ) return object->disconnect( SIGNAL( sg_keyPressEvent( QKeyEvent * ) ) ); - else if( signal == ( QString ) "keyReleaseEvent()" ) return object->disconnect( SIGNAL( sg_keyReleaseEvent( QKeyEvent * ) ) ); - else if( signal == ( QString ) "mouseMoveEvent()" ) return object->disconnect( SIGNAL( sg_mouseMoveEvent( QMouseEvent * ) ) ); - else if( signal == ( QString ) "mouseDoubleClickEvent()" ) return object->disconnect( SIGNAL( sg_mouseDoubleClickEvent( QMouseEvent * ) ) ); - else if( signal == ( QString ) "mousePressEvent()" ) return object->disconnect( SIGNAL( sg_mousePressEvent( QMouseEvent * ) ) ); - else if( signal == ( QString ) "mouseReleaseEvent()" ) return object->disconnect( SIGNAL( sg_mouseReleaseEvent( QMouseEvent * ) ) ); - else if( signal == ( QString ) "wheelEvent()" ) return object->disconnect( SIGNAL( sg_wheelEvent( QWheelEvent * ) ) ); - else if( signal == ( QString ) "resizeEvent()" ) return object->disconnect( SIGNAL( sg_resizeEvent( QResizeEvent * ) ) ); - else if( signal == ( QString ) "scrollContentsBy(int,int)" ) return object->disconnect( SIGNAL( sg_scrollContentsBy( int, int ) ) ); - else if( signal == ( QString ) "geometriesChanged()" ) return object->disconnect( SIGNAL( geometriesChanged() ) ); - else if( signal == ( QString ) "sectionAutoResize(int,int)" ) return object->disconnect( SIGNAL( sectionAutoResize( int, QHeaderView::ResizeMode ) ) ); - else if( signal == ( QString ) "sectionClicked(int)" ) return object->disconnect( SIGNAL( sectionClicked( int ) ) ); - else if( signal == ( QString ) "sectionCountChanged(int,int)" ) return object->disconnect( SIGNAL( sectionCountChanged( int, int ) ) ); - else if( signal == ( QString ) "sectionDoubleClicked(int)" ) return object->disconnect( SIGNAL( sectionDoubleClicked( int ) ) ); - else if( signal == ( QString ) "sectionEntered(int)" ) return object->disconnect( SIGNAL( sectionEntered( int ) ) ); - else if( signal == ( QString ) "sectionHandleDoubleClicked(int)" ) return object->disconnect( SIGNAL( sectionHandleDoubleClicked( int ) ) ); - else if( signal == ( QString ) "sectionMoved(int,int,int)" ) return object->disconnect( SIGNAL( sectionMoved( int, int, int ) ) ); - else if( signal == ( QString ) "sectionPressed(int)" ) return object->disconnect( SIGNAL( sectionPressed( int ) ) ); - else if( signal == ( QString ) "sectionResized(int,int,int)" ) return object->disconnect( SIGNAL( sectionResized( int, int, int ) ) ); - else if( signal == ( QString ) "sortIndicatorChanged(int,int)" ) return object->disconnect( SIGNAL( sortIndicatorChanged( int, Qt::SortOrder ) ) ); - else if( signal == ( QString ) "buttonClicked(int)" ) return object->disconnect( SIGNAL( buttonClicked( int ) ) ); - else if( signal == ( QString ) "buttonPressed(int)" ) return object->disconnect( SIGNAL( buttonPressed( int ) ) ); - else if( signal == ( QString ) "buttonReleased(int)" ) return object->disconnect( SIGNAL( buttonReleased( int ) ) ); - else if( signal == ( QString ) "linkActivated(QString)" ) return object->disconnect( SIGNAL( linkActivated( const QString & ) ) ); - else if( signal == ( QString ) "linkHovered(QString)" ) return object->disconnect( SIGNAL( linkHovered( const QString & ) ) ); - else if( signal == ( QString ) "cellActivated(int,int)" ) return object->disconnect( SIGNAL( cellActivated( int, int ) ) ); - else if( signal == ( QString ) "cellChanged(int,int)" ) return object->disconnect( SIGNAL( cellChanged( int, int ) ) ); - else if( signal == ( QString ) "cellClicked(int,int)" ) return object->disconnect( SIGNAL( cellClicked( int, int ) ) ); - else if( signal == ( QString ) "cellDoubleClicked(int,int)" ) return object->disconnect( SIGNAL( cellDoubleClicked( int, int ) ) ); - else if( signal == ( QString ) "cellEntered(int,int)" ) return object->disconnect( SIGNAL( cellEntered( int, int ) ) ); - else if( signal == ( QString ) "cellPressed(int,int)" ) return object->disconnect( SIGNAL( cellPressed( int, int ) ) ); - else if( signal == ( QString ) "currentCellChanged(int,int,int,int)" ) return object->disconnect( SIGNAL( currentCellChanged( int, int, int, int ) ) ); - else if( signal == ( QString ) "tabCloseRequested(int)" ) return object->disconnect( SIGNAL( tabCloseRequested( int ) ) ); - else if( signal == ( QString ) "paintRequested(QPrinter)" ) return object->disconnect( SIGNAL( paintRequested( QPrinter * ) ) ); + else if( signal == ( QString ) "itemActivated(QTWItem)" ) return object->disconnect( SIGNAL( itemActivated( QTreeWidgetItem *, int ) ) ); + else if( signal == ( QString ) "itemChanged(QTWItem)" ) return object->disconnect( SIGNAL( itemChanged( QTreeWidgetItem *, int ) ) ); + else if( signal == ( QString ) "itemClicked(QTWItem)" ) return object->disconnect( SIGNAL( itemClicked( QTreeWidgetItem *, int ) ) ); + else if( signal == ( QString ) "itemCollapsed(QTWItem)" ) return object->disconnect( SIGNAL( itemCollapsed( QTreeWidgetItem * ) ) ); + else if( signal == ( QString ) "itemDoubleClicked(QTWItem)" ) return object->disconnect( SIGNAL( itemDoubleClicked( QTreeWidgetItem *, int ) ) ); + else if( signal == ( QString ) "itemEntered(QTWItem)" ) return object->disconnect( SIGNAL( itemEntered( QTreeWidgetItem *, int ) ) ); + else if( signal == ( QString ) "itemExpanded(QTWItem)" ) return object->disconnect( SIGNAL( itemExpanded( QTreeWidgetItem * ) ) ); + else if( signal == ( QString ) "itemPressed(QTWItem)" ) return object->disconnect( SIGNAL( itemPressed( QTreeWidgetItem *, int ) ) ); + else if( signal == ( QString ) "itemSelectionChanged()" ) return object->disconnect( SIGNAL( itemSelectionChanged() ) ); + else if( signal == ( QString ) "iconChanged()" ) return object->disconnect( SIGNAL( iconChanged() ) ); + else if( signal == ( QString ) "titleChanged(QString)" ) return object->disconnect( SIGNAL( titleChanged( const QString & ) ) ); + else if( signal == ( QString ) "urlChanged(QUrl)" ) return object->disconnect( SIGNAL( urlChanged( const QUrl & ) ) ); + else if( signal == ( QString ) "currentFontChanged(QFont)" ) return object->disconnect( SIGNAL( currentFontChanged( const QFont & ) ) ); + else if( signal == ( QString ) "fontSelected(QFont)" ) return object->disconnect( SIGNAL( fontSelected( const QFont & ) ) ); + else if( signal == ( QString ) "accepted()" ) return object->disconnect( SIGNAL( accepted() ) ); + else if( signal == ( QString ) "finished(int)" ) return object->disconnect( SIGNAL( finished( int ) ) ); + else if( signal == ( QString ) "rejected()" ) return object->disconnect( SIGNAL( rejected() ) ); + else if( signal == ( QString ) "currentChanged(QString)" ) return object->disconnect( SIGNAL( currentChanged( const QString & ) ) ); + else if( signal == ( QString ) "directoryEntered(QString)" ) return object->disconnect( SIGNAL( directoryEntered( const QString & ) ) ); + else if( signal == ( QString ) "fileSelected(QString)" ) return object->disconnect( SIGNAL( fileSelected( const QString & ) ) ); + else if( signal == ( QString ) "filesSelected(QStringList)" ) return object->disconnect( SIGNAL( filesSelected( const QStringList & ) ) ); + else if( signal == ( QString ) "filterSelected(QString)" ) return object->disconnect( SIGNAL( filterSelected( const QString & ) ) ); + else if( signal == ( QString ) "accepted(QPrinter)" ) return object->disconnect( SIGNAL( accepted( QPrinter * ) ) ); + else if( signal == ( QString ) "copyAvailable(bool)" ) return object->disconnect( SIGNAL( copyAvailable( bool ) ) ); + else if( signal == ( QString ) "currentCharFormatChanged(QTextCharFormat)" ) return object->disconnect( SIGNAL( currentCharFormatChanged( const QTextCharFormat & ) ) ); + else if( signal == ( QString ) "cursorPositionChanged()" ) return object->disconnect( SIGNAL( cursorPositionChanged() ) ); + else if( signal == ( QString ) "redoAvailable(bool)" ) return object->disconnect( SIGNAL( redoAvailable( bool ) ) ); + else if( signal == ( QString ) "textChanged()" ) return object->disconnect( SIGNAL( textChanged() ) ); + else if( signal == ( QString ) "undoAvailable(available)" ) return object->disconnect( SIGNAL( undoAvailable( bool ) ) ); + else if( signal == ( QString ) "timeout()" ) return object->disconnect( SIGNAL( timeout() ) ); + else if( signal == ( QString ) "keyPressEvent()" ) return object->disconnect( SIGNAL( sg_keyPressEvent( QKeyEvent * ) ) ); + else if( signal == ( QString ) "keyReleaseEvent()" ) return object->disconnect( SIGNAL( sg_keyReleaseEvent( QKeyEvent * ) ) ); + else if( signal == ( QString ) "mouseMoveEvent()" ) return object->disconnect( SIGNAL( sg_mouseMoveEvent( QMouseEvent * ) ) ); + else if( signal == ( QString ) "mouseDoubleClickEvent()" ) return object->disconnect( SIGNAL( sg_mouseDoubleClickEvent( QMouseEvent * ) ) ); + else if( signal == ( QString ) "mousePressEvent()" ) return object->disconnect( SIGNAL( sg_mousePressEvent( QMouseEvent * ) ) ); + else if( signal == ( QString ) "mouseReleaseEvent()" ) return object->disconnect( SIGNAL( sg_mouseReleaseEvent( QMouseEvent * ) ) ); + else if( signal == ( QString ) "wheelEvent()" ) return object->disconnect( SIGNAL( sg_wheelEvent( QWheelEvent * ) ) ); + else if( signal == ( QString ) "resizeEvent()" ) return object->disconnect( SIGNAL( sg_resizeEvent( QResizeEvent * ) ) ); + else if( signal == ( QString ) "scrollContentsBy(int,int)" ) return object->disconnect( SIGNAL( sg_scrollContentsBy( int, int ) ) ); + else if( signal == ( QString ) "geometriesChanged()" ) return object->disconnect( SIGNAL( geometriesChanged() ) ); + else if( signal == ( QString ) "sectionAutoResize(int,int)" ) return object->disconnect( SIGNAL( sectionAutoResize( int, QHeaderView::ResizeMode ) ) ); + else if( signal == ( QString ) "sectionClicked(int)" ) return object->disconnect( SIGNAL( sectionClicked( int ) ) ); + else if( signal == ( QString ) "sectionCountChanged(int,int)" ) return object->disconnect( SIGNAL( sectionCountChanged( int, int ) ) ); + else if( signal == ( QString ) "sectionDoubleClicked(int)" ) return object->disconnect( SIGNAL( sectionDoubleClicked( int ) ) ); + else if( signal == ( QString ) "sectionEntered(int)" ) return object->disconnect( SIGNAL( sectionEntered( int ) ) ); + else if( signal == ( QString ) "sectionHandleDoubleClicked(int)" ) return object->disconnect( SIGNAL( sectionHandleDoubleClicked( int ) ) ); + else if( signal == ( QString ) "sectionMoved(int,int,int)" ) return object->disconnect( SIGNAL( sectionMoved( int, int, int ) ) ); + else if( signal == ( QString ) "sectionPressed(int)" ) return object->disconnect( SIGNAL( sectionPressed( int ) ) ); + else if( signal == ( QString ) "sectionResized(int,int,int)" ) return object->disconnect( SIGNAL( sectionResized( int, int, int ) ) ); + else if( signal == ( QString ) "sortIndicatorChanged(int,int)" ) return object->disconnect( SIGNAL( sortIndicatorChanged( int, Qt::SortOrder ) ) ); + else if( signal == ( QString ) "buttonClicked(int)" ) return object->disconnect( SIGNAL( buttonClicked( int ) ) ); + else if( signal == ( QString ) "buttonPressed(int)" ) return object->disconnect( SIGNAL( buttonPressed( int ) ) ); + else if( signal == ( QString ) "buttonReleased(int)" ) return object->disconnect( SIGNAL( buttonReleased( int ) ) ); + else if( signal == ( QString ) "linkActivated(QString)" ) return object->disconnect( SIGNAL( linkActivated( const QString & ) ) ); + else if( signal == ( QString ) "linkHovered(QString)" ) return object->disconnect( SIGNAL( linkHovered( const QString & ) ) ); + else if( signal == ( QString ) "cellActivated(int,int)" ) return object->disconnect( SIGNAL( cellActivated( int, int ) ) ); + else if( signal == ( QString ) "cellChanged(int,int)" ) return object->disconnect( SIGNAL( cellChanged( int, int ) ) ); + else if( signal == ( QString ) "cellClicked(int,int)" ) return object->disconnect( SIGNAL( cellClicked( int, int ) ) ); + else if( signal == ( QString ) "cellDoubleClicked(int,int)" ) return object->disconnect( SIGNAL( cellDoubleClicked( int, int ) ) ); + else if( signal == ( QString ) "cellEntered(int,int)" ) return object->disconnect( SIGNAL( cellEntered( int, int ) ) ); + else if( signal == ( QString ) "cellPressed(int,int)" ) return object->disconnect( SIGNAL( cellPressed( int, int ) ) ); + else if( signal == ( QString ) "currentCellChanged(int,int,int,int)" ) return object->disconnect( SIGNAL( currentCellChanged( int, int, int, int ) ) ); + else if( signal == ( QString ) "tabCloseRequested(int)" ) return object->disconnect( SIGNAL( tabCloseRequested( int ) ) ); + else if( signal == ( QString ) "paintRequested(QPrinter)" ) return object->disconnect( SIGNAL( paintRequested( QPrinter * ) ) ); /* QIODevice & QProcess */ - else if( signal == ( QString ) "aboutToClose()" ) return object->disconnect( SIGNAL( aboutToClose() ) ); - else if( signal == ( QString ) "bytesWritten(int)" ) return object->disconnect( SIGNAL( bytesWritten( qint64 ) ) ); - else if( signal == ( QString ) "readChannelFinished()" ) return object->disconnect( SIGNAL( readChannelFinished() ) ); - else if( signal == ( QString ) "readyRead()" ) return object->disconnect( SIGNAL( readyRead() ) ); - else if( signal == ( QString ) "error(int)" ) return object->disconnect( SIGNAL( error( int ) ) ); - else if( signal == ( QString ) "finished(int,int)" ) return object->disconnect( SIGNAL( finished( int, QProcess::ExitStatus ) ) ); - else if( signal == ( QString ) "readyReadStandardError()" ) return object->disconnect( SIGNAL( readyReadStandardError() ) ); - else if( signal == ( QString ) "readyReadStandardOutput()" ) return object->disconnect( SIGNAL( readyReadStandardOutput() ) ); - else if( signal == ( QString ) "started()" ) return object->disconnect( SIGNAL( started() ) ); - else if( signal == ( QString ) "stateChanged(int)" ) return object->disconnect( SIGNAL( stateChanged( int ) ) ); + else if( signal == ( QString ) "aboutToClose()" ) return object->disconnect( SIGNAL( aboutToClose() ) ); + else if( signal == ( QString ) "bytesWritten(int)" ) return object->disconnect( SIGNAL( bytesWritten( qint64 ) ) ); + else if( signal == ( QString ) "readChannelFinished()" ) return object->disconnect( SIGNAL( readChannelFinished() ) ); + else if( signal == ( QString ) "readyRead()" ) return object->disconnect( SIGNAL( readyRead() ) ); + else if( signal == ( QString ) "error(int)" ) return object->disconnect( SIGNAL( error( int ) ) ); + else if( signal == ( QString ) "finished(int,int)" ) return object->disconnect( SIGNAL( finished( int, QProcess::ExitStatus ) ) ); + else if( signal == ( QString ) "readyReadStandardError()" ) return object->disconnect( SIGNAL( readyReadStandardError() ) ); + else if( signal == ( QString ) "readyReadStandardOutput()" ) return object->disconnect( SIGNAL( readyReadStandardOutput() ) ); + else if( signal == ( QString ) "started()" ) return object->disconnect( SIGNAL( started() ) ); + else if( signal == ( QString ) "stateChanged(int)" ) return object->disconnect( SIGNAL( stateChanged( int ) ) ); /* QComboBox */ - else if( signal == ( QString ) "activated(text)" ) return object->disconnect( SIGNAL( activated( const QString & ) ) ); - else if( signal == ( QString ) "currentIndexChanged(text)" ) return object->disconnect( SIGNAL( currentIndexChanged( const QString & ) ) ); - else if( signal == ( QString ) "editTextChanged(text)" ) return object->disconnect( SIGNAL( editTextChanged( const QString & ) ) ); - else if( signal == ( QString ) "highlighted(text)" ) return object->disconnect( SIGNAL( highlighted( const QString & ) ) ); + else if( signal == ( QString ) "activated(text)" ) return object->disconnect( SIGNAL( activated( const QString & ) ) ); + else if( signal == ( QString ) "currentIndexChanged(text)" ) return object->disconnect( SIGNAL( currentIndexChanged( const QString & ) ) ); + else if( signal == ( QString ) "editTextChanged(text)" ) return object->disconnect( SIGNAL( editTextChanged( const QString & ) ) ); + else if( signal == ( QString ) "highlighted(text)" ) return object->disconnect( SIGNAL( highlighted( const QString & ) ) ); /* QTextDocument */ else if( signal == ( QString ) "blockCountChanged(int)" ) return object->disconnect( SIGNAL( blockCountChanged( int ) ) ); else if( signal == ( QString ) "contentsChange(int,int,int)" ) return object->disconnect( SIGNAL( contentsChange( int, int, int ) ) ); @@ -315,6 +319,7 @@ static bool disconnect_signal( QObject * object, const char * signal ) else if( signal == ( QString ) "documentLayoutChanged()" ) return object->disconnect( SIGNAL( documentLayoutChanged() ) ); else if( signal == ( QString ) "modificationChanged(bool)" ) return object->disconnect( SIGNAL( modificationChanged( bool ) ) ); else if( signal == ( QString ) "undoCommandAdded()" ) return object->disconnect( SIGNAL( undoCommandAdded() ) ); + else if( signal == ( QString ) "updateRequest(QRect,int)" ) return object->disconnect( SIGNAL( updateRequest( const QRect &, int ) ) ); return false; } @@ -654,6 +659,44 @@ static void hbqt_SlotsExecPointerPointer( HBSlots * t_slots, QObject * object, c } } +static void hbqt_SlotsExecQRectInt( HBSlots * t_slots, QObject * object, const char * pszEvent, const QRect & r, int dy ) +{ + if( object ) + { + int i = object->property( pszEvent ).toInt(); + if( i > 0 && i <= t_slots->listBlock.size() && hb_vmRequestReenter() ) + { + PHB_ITEM pObject = hb_itemPutPtr( NULL, object ); + PHB_ITEM p1 = hb_itemPutPtr( NULL, new QRect( r ) ); + PHB_ITEM p2 = hb_itemPutNI( NULL, dy ); + hb_vmEvalBlockV( t_slots->listBlock.at( i - 1 ), 2, pObject, p1, p2 ); + hb_itemRelease( pObject ); + delete ( ( QRect * ) hb_itemGetPtr( p1 ) ); + hb_itemRelease( p1 ); + hb_itemRelease( p2 ); + hb_vmRequestRestore(); + } + } +} + +static void hbqt_SlotsExecQPoint( HBSlots * t_slots, QObject * object, const char * pszEvent, const QPoint & pos ) +{ + if( object ) + { + int i = object->property( pszEvent ).toInt(); + if( i > 0 && i <= t_slots->listBlock.size() && hb_vmRequestReenter() ) + { + PHB_ITEM pObject = hb_itemPutPtr( NULL, object ); + PHB_ITEM p1 = hb_itemPutPtr( NULL, new QPoint( pos ) ); + hb_vmEvalBlockV( t_slots->listBlock.at( i - 1 ), 2, pObject, p1 ); + hb_itemRelease( pObject ); + delete ( ( QPoint * ) hb_itemGetPtr( p1 ) ); + hb_itemRelease( p1 ); + hb_vmRequestRestore(); + } + } +} + HBSlots::HBSlots( QObject* parent ) : QObject( parent ) { } @@ -677,125 +720,129 @@ HBSlots::~HBSlots() } /* Generic Key and Mouse Events emitted by subclass objects */ -void HBSlots::keyPressEvent( QKeyEvent * event ) { hbqt_SlotsExecPointer( this, qobject_cast( sender() ), "keyPressEvent()", event ); } -void HBSlots::keyReleaseEvent( QKeyEvent * event ) { hbqt_SlotsExecPointer( this, qobject_cast( sender() ), "keyReleaseEvent()", event ); } -void HBSlots::mouseMoveEvent( QMouseEvent * event ) { hbqt_SlotsExecPointer( this, qobject_cast( sender() ), "mouseMoveEvent()", event ); } -void HBSlots::mouseDoubleClickEvent( QMouseEvent * event ) { hbqt_SlotsExecPointer( this, qobject_cast( sender() ), "mouseDoubleClickEvent()", event ); } -void HBSlots::mousePressEvent( QMouseEvent * event ) { hbqt_SlotsExecPointer( this, qobject_cast( sender() ), "mousePressEvent()", event ); } -void HBSlots::mouseReleaseEvent( QMouseEvent * event ) { hbqt_SlotsExecPointer( this, qobject_cast( sender() ), "mouseReleaseEvent()", event ); } -void HBSlots::wheelEvent( QWheelEvent * event ) { hbqt_SlotsExecPointer( this, qobject_cast( sender() ), "wheelEvent()", event ); } -void HBSlots::resizeEvent( QResizeEvent * event ) { hbqt_SlotsExecPointer( this, qobject_cast( sender() ), "resizeEvent()", event ); } -void HBSlots::triggered( bool checked ) { hbqt_SlotsExecBool( this, qobject_cast( sender() ), "triggered(bool)", checked ); } -void HBSlots::hovered( QAction * action ) { hbqt_SlotsExecPointer( this, qobject_cast( sender() ), "hovered(action)", action ); } -void HBSlots::clicked() { hbqt_SlotsExec( this, qobject_cast( sender() ), "clicked()" ); } -void HBSlots::returnPressed() { hbqt_SlotsExec( this, qobject_cast( sender() ), "returnPressed()" ); } -void HBSlots::viewportEntered() { hbqt_SlotsExec( this, qobject_cast( sender() ), "viewportEntered()" ); } -void HBSlots::pressed() { hbqt_SlotsExec( this, qobject_cast( sender() ), "pressed()" ); } -void HBSlots::released() { hbqt_SlotsExec( this, qobject_cast( sender() ), "released()" ); } -void HBSlots::triggered() { hbqt_SlotsExec( this, qobject_cast( sender() ), "triggered()" ); } -void HBSlots::hovered() { hbqt_SlotsExec( this, qobject_cast( sender() ), "hovered()" ); } -void HBSlots::stateChanged( int state ) { hbqt_SlotsExecInt( this, qobject_cast( sender() ), "stateChanged(int)", state ); } -void HBSlots::activated( int index ) { hbqt_SlotsExecInt( this, qobject_cast( sender() ), "activated(int)", index ); } -void HBSlots::currentIndexChanged( int index ) { hbqt_SlotsExecInt( this, qobject_cast( sender() ), "currentIndexChanged(int)", index ); } -void HBSlots::currentChanged( int index ) { hbqt_SlotsExecInt( this, qobject_cast( sender() ), "currentChanged(int)", index ); } -void HBSlots::highlighted( int index ) { hbqt_SlotsExecInt( this, qobject_cast( sender() ), "highlighted(int)", index ); } -void HBSlots::clicked( const QModelIndex & index ) { hbqt_SlotsExecModel( this, qobject_cast( sender() ), "clicked(QModelIndex)", index ); } -void HBSlots::doubleClicked( const QModelIndex & index ) { hbqt_SlotsExecModel( this, qobject_cast( sender() ), "doubleClicked(QModelIndex)", index ); } -void HBSlots::entered( const QModelIndex & index ) { hbqt_SlotsExecModel( this, qobject_cast( sender() ), "entered(QModelIndex)", index ); } -void HBSlots::actionTriggered( int action ) { hbqt_SlotsExecInt( this, qobject_cast( sender() ), "actionTriggered(int)", action ); } -void HBSlots::rangeChanged( int min, int max ) { hbqt_SlotsExecIntInt( this, qobject_cast( sender() ), "rangeChanged(int)", min, max ); } -void HBSlots::sliderMoved( int value ) { hbqt_SlotsExecInt( this, qobject_cast( sender() ), "sliderMoved(int)", value ); } -void HBSlots::sliderPressed() { hbqt_SlotsExec( this, qobject_cast( sender() ), "sliderPressed()" ); } -void HBSlots::sliderReleased() { hbqt_SlotsExec( this, qobject_cast( sender() ), "sliderReleased()" ); } -void HBSlots::valueChanged( int value ) { hbqt_SlotsExecInt( this, qobject_cast( sender() ), "valueChanged(int)", value ); } -void HBSlots::cursorPositionChanged( int iOld, int iNew ) { hbqt_SlotsExecIntInt( this, qobject_cast( sender() ), "cursorPositionChanged(int,int)", iOld, iNew ); } -void HBSlots::editingFinished() { hbqt_SlotsExec( this, qobject_cast( sender() ), "editingFinished()" ); } -void HBSlots::selectionChanged() { hbqt_SlotsExec( this, qobject_cast( sender() ), "selectionChanged()" ); } -void HBSlots::textChanged( const QString & text ) { hbqt_SlotsExecString( this, qobject_cast( sender() ), "textChanged(QString)", text ); } -void HBSlots::textEdited( const QString & text ) { hbqt_SlotsExecString( this, qobject_cast( sender() ), "textEdited(QString)", text ); } +void HBSlots::customContextMenuRequested( const QPoint & pos ) { hbqt_SlotsExecQPoint( this, qobject_cast( sender() ), "customContextMenuRequested(QPoint)", pos ); } +void HBSlots::keyPressEvent( QKeyEvent * event ) { hbqt_SlotsExecPointer( this, qobject_cast( sender() ), "keyPressEvent()", event ); } +void HBSlots::keyReleaseEvent( QKeyEvent * event ) { hbqt_SlotsExecPointer( this, qobject_cast( sender() ), "keyReleaseEvent()", event ); } +void HBSlots::mouseMoveEvent( QMouseEvent * event ) { hbqt_SlotsExecPointer( this, qobject_cast( sender() ), "mouseMoveEvent()", event ); } +void HBSlots::mouseDoubleClickEvent( QMouseEvent * event ) { hbqt_SlotsExecPointer( this, qobject_cast( sender() ), "mouseDoubleClickEvent()", event ); } +void HBSlots::mousePressEvent( QMouseEvent * event ) { hbqt_SlotsExecPointer( this, qobject_cast( sender() ), "mousePressEvent()", event ); } +void HBSlots::mouseReleaseEvent( QMouseEvent * event ) { hbqt_SlotsExecPointer( this, qobject_cast( sender() ), "mouseReleaseEvent()", event ); } +void HBSlots::wheelEvent( QWheelEvent * event ) { hbqt_SlotsExecPointer( this, qobject_cast( sender() ), "wheelEvent()", event ); } +void HBSlots::resizeEvent( QResizeEvent * event ) { hbqt_SlotsExecPointer( this, qobject_cast( sender() ), "resizeEvent()", event ); } +void HBSlots::triggered( bool checked ) { hbqt_SlotsExecBool( this, qobject_cast( sender() ), "triggered(bool)", checked ); } +void HBSlots::hovered( QAction * action ) { hbqt_SlotsExecPointer( this, qobject_cast( sender() ), "hovered(action)", action ); } +void HBSlots::clicked() { hbqt_SlotsExec( this, qobject_cast( sender() ), "clicked()" ); } +void HBSlots::returnPressed() { hbqt_SlotsExec( this, qobject_cast( sender() ), "returnPressed()" ); } +void HBSlots::viewportEntered() { hbqt_SlotsExec( this, qobject_cast( sender() ), "viewportEntered()" ); } +void HBSlots::pressed() { hbqt_SlotsExec( this, qobject_cast( sender() ), "pressed()" ); } +void HBSlots::released() { hbqt_SlotsExec( this, qobject_cast( sender() ), "released()" ); } +void HBSlots::triggered() { hbqt_SlotsExec( this, qobject_cast( sender() ), "triggered()" ); } +void HBSlots::hovered() { hbqt_SlotsExec( this, qobject_cast( sender() ), "hovered()" ); } +void HBSlots::stateChanged( int state ) { hbqt_SlotsExecInt( this, qobject_cast( sender() ), "stateChanged(int)", state ); } +void HBSlots::activated( int index ) { hbqt_SlotsExecInt( this, qobject_cast( sender() ), "activated(int)", index ); } +void HBSlots::currentIndexChanged( int index ) { hbqt_SlotsExecInt( this, qobject_cast( sender() ), "currentIndexChanged(int)", index ); } +void HBSlots::currentChanged( int index ) { hbqt_SlotsExecInt( this, qobject_cast( sender() ), "currentChanged(int)", index ); } +void HBSlots::highlighted( int index ) { hbqt_SlotsExecInt( this, qobject_cast( sender() ), "highlighted(int)", index ); } +void HBSlots::clicked( const QModelIndex & index ) { hbqt_SlotsExecModel( this, qobject_cast( sender() ), "clicked(QModelIndex)", index ); } +void HBSlots::doubleClicked( const QModelIndex & index ) { hbqt_SlotsExecModel( this, qobject_cast( sender() ), "doubleClicked(QModelIndex)", index ); } +void HBSlots::entered( const QModelIndex & index ) { hbqt_SlotsExecModel( this, qobject_cast( sender() ), "entered(QModelIndex)", index ); } +void HBSlots::actionTriggered( int action ) { hbqt_SlotsExecInt( this, qobject_cast( sender() ), "actionTriggered(int)", action ); } +void HBSlots::rangeChanged( int min, int max ) { hbqt_SlotsExecIntInt( this, qobject_cast( sender() ), "rangeChanged(int)", min, max ); } +void HBSlots::sliderMoved( int value ) { hbqt_SlotsExecInt( this, qobject_cast( sender() ), "sliderMoved(int)", value ); } +void HBSlots::sliderPressed() { hbqt_SlotsExec( this, qobject_cast( sender() ), "sliderPressed()" ); } +void HBSlots::sliderReleased() { hbqt_SlotsExec( this, qobject_cast( sender() ), "sliderReleased()" ); } +void HBSlots::valueChanged( int value ) { hbqt_SlotsExecInt( this, qobject_cast( sender() ), "valueChanged(int)", value ); } +void HBSlots::cursorPositionChanged( int iOld, int iNew ) { hbqt_SlotsExecIntInt( this, qobject_cast( sender() ), "cursorPositionChanged(int,int)", iOld, iNew ); } +void HBSlots::editingFinished() { hbqt_SlotsExec( this, qobject_cast( sender() ), "editingFinished()" ); } +void HBSlots::selectionChanged() { hbqt_SlotsExec( this, qobject_cast( sender() ), "selectionChanged()" ); } +void HBSlots::textChanged( const QString & text ) { hbqt_SlotsExecString( this, qobject_cast( sender() ), "textChanged(QString)", text ); } +void HBSlots::textEdited( const QString & text ) { hbqt_SlotsExecString( this, qobject_cast( sender() ), "textEdited(QString)", text ); } /* TreeViewobject */ -void HBSlots::currentItemChanged( QTreeWidgetItem * current, QTreeWidgetItem * previous ) { hbqt_SlotsExecPointerPointer( this, qobject_cast( sender() ), "currentItemChanged(QTWItem)", current, previous ); } -void HBSlots::itemActivated( QTreeWidgetItem * item, int column ) { hbqt_SlotsExecPointerInt( this, qobject_cast( sender() ), "itemActivated(QTWItem)", item, column ); } -void HBSlots::itemChanged( QTreeWidgetItem * item, int column ) { hbqt_SlotsExecPointerInt( this, qobject_cast( sender() ), "itemChanged(QTWItem)", item, column ); } -void HBSlots::itemClicked( QTreeWidgetItem * item, int column ) { hbqt_SlotsExecPointerInt( this, qobject_cast( sender() ), "itemClicked(QTWItem)", item, column ); } -void HBSlots::itemDoubleClicked( QTreeWidgetItem * item, int column ) { hbqt_SlotsExecPointerInt( this, qobject_cast( sender() ), "itemDoubleClicked(QTWItem)", item, column ); } -void HBSlots::itemEntered( QTreeWidgetItem * item, int column ) { hbqt_SlotsExecPointerInt( this, qobject_cast( sender() ), "itemEntered(QTWItem)", item, column ); } -void HBSlots::itemPressed( QTreeWidgetItem * item, int column ) { hbqt_SlotsExecPointerInt( this, qobject_cast( sender() ), "itemPressed(QTWItem)", item, column ); } -void HBSlots::itemExpanded( QTreeWidgetItem * item ) { hbqt_SlotsExecPointer( this, qobject_cast( sender() ), "itemExpanded(QTWItem)", item ); } -void HBSlots::itemCollapsed( QTreeWidgetItem * item ) { hbqt_SlotsExecPointer( this, qobject_cast( sender() ), "itemCollapsed(QTWItem)", item ); } -void HBSlots::itemSelectionChanged() { hbqt_SlotsExec( this, qobject_cast( sender() ), "itemSelectionChanged()" ); } +void HBSlots::currentItemChanged( QTreeWidgetItem * current, QTreeWidgetItem * previous ) { hbqt_SlotsExecPointerPointer( this, qobject_cast( sender() ), "currentItemChanged(QTWItem)", current, previous ); } +void HBSlots::itemActivated( QTreeWidgetItem * item, int column ) { hbqt_SlotsExecPointerInt( this, qobject_cast( sender() ), "itemActivated(QTWItem)", item, column ); } +void HBSlots::itemChanged( QTreeWidgetItem * item, int column ) { hbqt_SlotsExecPointerInt( this, qobject_cast( sender() ), "itemChanged(QTWItem)", item, column ); } +void HBSlots::itemClicked( QTreeWidgetItem * item, int column ) { hbqt_SlotsExecPointerInt( this, qobject_cast( sender() ), "itemClicked(QTWItem)", item, column ); } +void HBSlots::itemDoubleClicked( QTreeWidgetItem * item, int column ) { hbqt_SlotsExecPointerInt( this, qobject_cast( sender() ), "itemDoubleClicked(QTWItem)", item, column ); } +void HBSlots::itemEntered( QTreeWidgetItem * item, int column ) { hbqt_SlotsExecPointerInt( this, qobject_cast( sender() ), "itemEntered(QTWItem)", item, column ); } +void HBSlots::itemPressed( QTreeWidgetItem * item, int column ) { hbqt_SlotsExecPointerInt( this, qobject_cast( sender() ), "itemPressed(QTWItem)", item, column ); } +void HBSlots::itemExpanded( QTreeWidgetItem * item ) { hbqt_SlotsExecPointer( this, qobject_cast( sender() ), "itemExpanded(QTWItem)", item ); } +void HBSlots::itemCollapsed( QTreeWidgetItem * item ) { hbqt_SlotsExecPointer( this, qobject_cast( sender() ), "itemCollapsed(QTWItem)", item ); } +void HBSlots::itemSelectionChanged() { hbqt_SlotsExec( this, qobject_cast( sender() ), "itemSelectionChanged()" ); } /* QDialog (s)*/ -void HBSlots::currentFontChanged( const QFont & font ) { hbqt_SlotsExecFont( this, qobject_cast( sender() ), "currentFontChanged(QFont)", font ); } -void HBSlots::fontSelected( const QFont & font ) { hbqt_SlotsExecFont( this, qobject_cast( sender() ), "fontSelected(QFont)", font ); } -void HBSlots::accepted() { hbqt_SlotsExec( this, qobject_cast( sender() ), "accepted()" ); } -void HBSlots::finished( int result ) { hbqt_SlotsExecInt( this, qobject_cast( sender() ), "finished(int)", result ); } -void HBSlots::rejected() { hbqt_SlotsExec( this, qobject_cast( sender() ), "rejected()" ); } -void HBSlots::currentChanged( const QString & path ) { hbqt_SlotsExecString( this, qobject_cast( sender() ), "currentChanged(QString)", path ); } -void HBSlots::directoryEntered( const QString & directory ) { hbqt_SlotsExecString( this, qobject_cast( sender() ), "directoryEntered(QString)", directory ); } -void HBSlots::fileSelected( const QString & file ) { hbqt_SlotsExecString( this, qobject_cast( sender() ), "fileSelected(QString)", file ); } -void HBSlots::filesSelected( const QStringList & selected ) { hbqt_SlotsExecStringList( this, qobject_cast( sender() ), "filesSelected(QStringList)", selected ); } -void HBSlots::filterSelected( const QString & filter ) { hbqt_SlotsExecString( this, qobject_cast( sender() ), "filterSelected(QString)", filter ); } +void HBSlots::currentFontChanged( const QFont & font ) { hbqt_SlotsExecFont( this, qobject_cast( sender() ), "currentFontChanged(QFont)", font ); } +void HBSlots::fontSelected( const QFont & font ) { hbqt_SlotsExecFont( this, qobject_cast( sender() ), "fontSelected(QFont)", font ); } +void HBSlots::accepted() { hbqt_SlotsExec( this, qobject_cast( sender() ), "accepted()" ); } +void HBSlots::finished( int result ) { hbqt_SlotsExecInt( this, qobject_cast( sender() ), "finished(int)", result ); } +void HBSlots::rejected() { hbqt_SlotsExec( this, qobject_cast( sender() ), "rejected()" ); } +void HBSlots::currentChanged( const QString & path ) { hbqt_SlotsExecString( this, qobject_cast( sender() ), "currentChanged(QString)", path ); } +void HBSlots::directoryEntered( const QString & directory ) { hbqt_SlotsExecString( this, qobject_cast( sender() ), "directoryEntered(QString)", directory ); } +void HBSlots::fileSelected( const QString & file ) { hbqt_SlotsExecString( this, qobject_cast( sender() ), "fileSelected(QString)", file ); } +void HBSlots::filesSelected( const QStringList & selected ) { hbqt_SlotsExecStringList( this, qobject_cast( sender() ), "filesSelected(QStringList)", selected ); } +void HBSlots::filterSelected( const QString & filter ) { hbqt_SlotsExecString( this, qobject_cast( sender() ), "filterSelected(QString)", filter ); } /* QPrintDialog */ -void HBSlots::accepted( QPrinter * printer ) { hbqt_SlotsExecPointer( this, qobject_cast( sender() ), "accepted(QPrinter)", printer ); } +void HBSlots::accepted( QPrinter * printer ) { hbqt_SlotsExecPointer( this, qobject_cast( sender() ), "accepted(QPrinter)", printer ); } /* QTextEdit */ -void HBSlots::copyAvailable( bool yes ) { hbqt_SlotsExecBool( this, qobject_cast( sender() ), "copyAvailable(bool)", yes ); } -void HBSlots::currentCharFormatChanged( const QTextCharFormat & f ) { hbqt_SlotsExecTextCharFormat( this, qobject_cast( sender() ), "currentCharFormatChanged(QTextCharFormat)", f ); } -void HBSlots::cursorPositionChanged() { hbqt_SlotsExec( this, qobject_cast( sender() ), "cursorPositionChanged()" ); } -void HBSlots::redoAvailable( bool available ) { hbqt_SlotsExecBool( this, qobject_cast( sender() ), "redoAvailable(bool)", available ); } -void HBSlots::textChanged() { hbqt_SlotsExec( this, qobject_cast( sender() ), "textChanged()" ); } -void HBSlots::undoAvailable( bool available ) { hbqt_SlotsExecBool( this, qobject_cast( sender() ), "undoAvailable(available)", available ); } -void HBSlots::timeout() { hbqt_SlotsExec( this, qobject_cast( sender() ), "timeout()" ); } -void HBSlots::scrollContentsBy( int x, int y ) { hbqt_SlotsExecIntInt( this, qobject_cast( sender() ), "scrollContentsBy(int,int)", x, y ); } -void HBSlots::geometriesChanged() { hbqt_SlotsExec( this, qobject_cast( sender() ), "geometriesChanged()" ); } -void HBSlots::sectionAutoResize( int logicalIndex, QHeaderView::ResizeMode mode ) { hbqt_SlotsExecIntInt( this, qobject_cast( sender() ), "sectionAutoResize(int,int)", logicalIndex, mode ); } -void HBSlots::sectionClicked( int logicalIndex ) { hbqt_SlotsExecInt( this, qobject_cast( sender() ), "sectionClicked(int)", logicalIndex ); } -void HBSlots::sectionCountChanged( int oldCount, int newCount ) { hbqt_SlotsExecIntInt( this, qobject_cast( sender() ), "sectionCountChanged(int,int)", oldCount, newCount ); } -void HBSlots::sectionDoubleClicked( int logicalIndex ) { hbqt_SlotsExecInt( this, qobject_cast( sender() ), "sectionDoubleClicked(int)", logicalIndex ); } -void HBSlots::sectionEntered( int logicalIndex ) { hbqt_SlotsExecInt( this, qobject_cast( sender() ), "sectionEntered(int)", logicalIndex ); } -void HBSlots::sectionHandleDoubleClicked( int logicalIndex ) { hbqt_SlotsExecInt( this, qobject_cast( sender() ), "sectionHandleDoubleClicked(int)", logicalIndex ); } +void HBSlots::copyAvailable( bool yes ) { hbqt_SlotsExecBool( this, qobject_cast( sender() ), "copyAvailable(bool)", yes ); } +void HBSlots::currentCharFormatChanged( const QTextCharFormat & f ) { hbqt_SlotsExecTextCharFormat( this, qobject_cast( sender() ), "currentCharFormatChanged(QTextCharFormat)", f ); } +void HBSlots::cursorPositionChanged() { hbqt_SlotsExec( this, qobject_cast( sender() ), "cursorPositionChanged()" ); } +void HBSlots::redoAvailable( bool available ) { hbqt_SlotsExecBool( this, qobject_cast( sender() ), "redoAvailable(bool)", available ); } +void HBSlots::textChanged() { hbqt_SlotsExec( this, qobject_cast( sender() ), "textChanged()" ); } +void HBSlots::undoAvailable( bool available ) { hbqt_SlotsExecBool( this, qobject_cast( sender() ), "undoAvailable(available)", available ); } +void HBSlots::timeout() { hbqt_SlotsExec( this, qobject_cast( sender() ), "timeout()" ); } +void HBSlots::scrollContentsBy( int x, int y ) { hbqt_SlotsExecIntInt( this, qobject_cast( sender() ), "scrollContentsBy(int,int)", x, y ); } +void HBSlots::geometriesChanged() { hbqt_SlotsExec( this, qobject_cast( sender() ), "geometriesChanged()" ); } +void HBSlots::sectionAutoResize( int logicalIndex, QHeaderView::ResizeMode mode ) { hbqt_SlotsExecIntInt( this, qobject_cast( sender() ), "sectionAutoResize(int,int)", logicalIndex, mode ); } +void HBSlots::sectionClicked( int logicalIndex ) { hbqt_SlotsExecInt( this, qobject_cast( sender() ), "sectionClicked(int)", logicalIndex ); } +void HBSlots::sectionCountChanged( int oldCount, int newCount ) { hbqt_SlotsExecIntInt( this, qobject_cast( sender() ), "sectionCountChanged(int,int)", oldCount, newCount ); } +void HBSlots::sectionDoubleClicked( int logicalIndex ) { hbqt_SlotsExecInt( this, qobject_cast( sender() ), "sectionDoubleClicked(int)", logicalIndex ); } +void HBSlots::sectionEntered( int logicalIndex ) { hbqt_SlotsExecInt( this, qobject_cast( sender() ), "sectionEntered(int)", logicalIndex ); } +void HBSlots::sectionHandleDoubleClicked( int logicalIndex ) { hbqt_SlotsExecInt( this, qobject_cast( sender() ), "sectionHandleDoubleClicked(int)", logicalIndex ); } void HBSlots::sectionMoved( int logicalIndex, int oldVisualIndex, int newVisualIndex ) { hbqt_SlotsExecIntIntInt( this, qobject_cast( sender() ), "sectionMoved(int,int,int)", logicalIndex, oldVisualIndex, newVisualIndex ); } -void HBSlots::sectionPressed( int logicalIndex ) { hbqt_SlotsExecInt( this, qobject_cast( sender() ), "sectionPressed(int)", logicalIndex ); } -void HBSlots::sectionResized( int logicalIndex, int oldSize, int newSize ) { hbqt_SlotsExecIntIntInt( this, qobject_cast( sender() ), "sectionResized(int,int,int)", logicalIndex, oldSize, newSize ); } -void HBSlots::sortIndicatorChanged( int logicalIndex, Qt::SortOrder order ) { hbqt_SlotsExecIntInt( this, qobject_cast( sender() ), "sortIndicatorChanged(int,int)", logicalIndex, order ); } -void HBSlots::buttonClicked( int id ) { hbqt_SlotsExecInt( this, qobject_cast( sender() ), "buttonClicked(int)", id ); } -void HBSlots::buttonPressed( int id ) { hbqt_SlotsExecInt( this, qobject_cast( sender() ), "buttonPressed(int)", id ); } -void HBSlots::buttonReleased( int id ) { hbqt_SlotsExecInt( this, qobject_cast( sender() ), "buttonReleased(int)", id ); } -void HBSlots::linkActivated( const QString & link ) { hbqt_SlotsExecString( this, qobject_cast( sender() ), "linkActivated(QString)", link ); } -void HBSlots::linkHovered( const QString & link ) { hbqt_SlotsExecString( this, qobject_cast( sender() ), "linkHovered(QString)", link ); } -void HBSlots::cellActivated( int row, int column ) { hbqt_SlotsExecIntInt( this, qobject_cast( sender() ), "cellActivated(int,int)", row, column ); } -void HBSlots::cellChanged( int row, int column ) { hbqt_SlotsExecIntInt( this, qobject_cast( sender() ), "cellChanged(int,int)", row, column ); } -void HBSlots::cellClicked( int row, int column ) { hbqt_SlotsExecIntInt( this, qobject_cast( sender() ), "cellClicked(int,int)", row, column ); } -void HBSlots::cellDoubleClicked( int row, int column ) { hbqt_SlotsExecIntInt( this, qobject_cast( sender() ), "cellDoubleClicked(int,int)", row, column ); } -void HBSlots::cellEntered( int row, int column ) { hbqt_SlotsExecIntInt( this, qobject_cast( sender() ), "cellEntered(int,int)", row, column ); } -void HBSlots::cellPressed( int row, int column ) { hbqt_SlotsExecIntInt( this, qobject_cast( sender() ), "cellEntered(int,int)", row, column ); } +void HBSlots::sectionPressed( int logicalIndex ) { hbqt_SlotsExecInt( this, qobject_cast( sender() ), "sectionPressed(int)", logicalIndex ); } +void HBSlots::sectionResized( int logicalIndex, int oldSize, int newSize ) { hbqt_SlotsExecIntIntInt( this, qobject_cast( sender() ), "sectionResized(int,int,int)", logicalIndex, oldSize, newSize ); } +void HBSlots::sortIndicatorChanged( int logicalIndex, Qt::SortOrder order ) { hbqt_SlotsExecIntInt( this, qobject_cast( sender() ), "sortIndicatorChanged(int,int)", logicalIndex, order ); } +void HBSlots::buttonClicked( int id ) { hbqt_SlotsExecInt( this, qobject_cast( sender() ), "buttonClicked(int)", id ); } +void HBSlots::buttonPressed( int id ) { hbqt_SlotsExecInt( this, qobject_cast( sender() ), "buttonPressed(int)", id ); } +void HBSlots::buttonReleased( int id ) { hbqt_SlotsExecInt( this, qobject_cast( sender() ), "buttonReleased(int)", id ); } +void HBSlots::linkActivated( const QString & link ) { hbqt_SlotsExecString( this, qobject_cast( sender() ), "linkActivated(QString)", link ); } +void HBSlots::linkHovered( const QString & link ) { hbqt_SlotsExecString( this, qobject_cast( sender() ), "linkHovered(QString)", link ); } +void HBSlots::cellActivated( int row, int column ) { hbqt_SlotsExecIntInt( this, qobject_cast( sender() ), "cellActivated(int,int)", row, column ); } +void HBSlots::cellChanged( int row, int column ) { hbqt_SlotsExecIntInt( this, qobject_cast( sender() ), "cellChanged(int,int)", row, column ); } +void HBSlots::cellClicked( int row, int column ) { hbqt_SlotsExecIntInt( this, qobject_cast( sender() ), "cellClicked(int,int)", row, column ); } +void HBSlots::cellDoubleClicked( int row, int column ) { hbqt_SlotsExecIntInt( this, qobject_cast( sender() ), "cellDoubleClicked(int,int)", row, column ); } +void HBSlots::cellEntered( int row, int column ) { hbqt_SlotsExecIntInt( this, qobject_cast( sender() ), "cellEntered(int,int)", row, column ); } +void HBSlots::cellPressed( int row, int column ) { hbqt_SlotsExecIntInt( this, qobject_cast( sender() ), "cellEntered(int,int)", row, column ); } void HBSlots::currentCellChanged( int currentRow, int currentColumn, int previousRow, int previousColumn ) { hbqt_SlotsExecIntIntIntInt( this, qobject_cast( sender() ), "currentCellChanged(int,int,int,int)", currentRow, currentColumn, previousRow, previousColumn ); } -void HBSlots::tabCloseRequested( int index ) { hbqt_SlotsExecInt( this, qobject_cast( sender() ), "tabCloseRequested(int)", index ); } -void HBSlots::paintRequested( QPrinter * printer ) { hbqt_SlotsExecPointer( this, qobject_cast( sender() ), "paintRequested(QPrinter)", printer ); } +void HBSlots::tabCloseRequested( int index ) { hbqt_SlotsExecInt( this, qobject_cast( sender() ), "tabCloseRequested(int)", index ); } +void HBSlots::paintRequested( QPrinter * printer ) { hbqt_SlotsExecPointer( this, qobject_cast( sender() ), "paintRequested(QPrinter)", printer ); } /* QIODevice */ -void HBSlots::aboutToClose() { hbqt_SlotsExec( this, qobject_cast( sender() ), "aboutToClose()" ); } -void HBSlots::bytesWritten( qint64 bytes ) { hbqt_SlotsExecInt( this, qobject_cast( sender() ), "bytesWritten(int)", bytes ); } -void HBSlots::readChannelFinished() { hbqt_SlotsExec( this, qobject_cast( sender() ), "readChannelFinished()" ); } -void HBSlots::readyRead() { hbqt_SlotsExec( this, qobject_cast( sender() ), "readyRead()" ); } +void HBSlots::aboutToClose() { hbqt_SlotsExec( this, qobject_cast( sender() ), "aboutToClose()" ); } +void HBSlots::bytesWritten( qint64 bytes ) { hbqt_SlotsExecInt( this, qobject_cast( sender() ), "bytesWritten(int)", bytes ); } +void HBSlots::readChannelFinished() { hbqt_SlotsExec( this, qobject_cast( sender() ), "readChannelFinished()" ); } +void HBSlots::readyRead() { hbqt_SlotsExec( this, qobject_cast( sender() ), "readyRead()" ); } /* QProcess */ -void HBSlots::error( QProcess::ProcessError error ) { hbqt_SlotsExecInt( this, qobject_cast( sender() ), "error(error)", error ); } -void HBSlots::finished( int exitCode, QProcess::ExitStatus exitStatus ) { hbqt_SlotsExecIntInt( this, qobject_cast( sender() ), "finished(int,int)", exitCode, exitStatus ); } -void HBSlots::readyReadStandardError() { hbqt_SlotsExec( this, qobject_cast( sender() ), "readyReadStandardError()" ); } -void HBSlots::readyReadStandardOutput() { hbqt_SlotsExec( this, qobject_cast( sender() ), "readyReadStandardOutput()" ); } -void HBSlots::started() { hbqt_SlotsExec( this, qobject_cast( sender() ), "started()" ); } -void HBSlots::stateChanged( QProcess::ProcessState newState ) { hbqt_SlotsExecInt( this, qobject_cast( sender() ), "stateChanged(int)", newState ); } +void HBSlots::error( QProcess::ProcessError error ) { hbqt_SlotsExecInt( this, qobject_cast( sender() ), "error(error)", error ); } +void HBSlots::finished( int exitCode, QProcess::ExitStatus exitStatus ) { hbqt_SlotsExecIntInt( this, qobject_cast( sender() ), "finished(int,int)", exitCode, exitStatus ); } +void HBSlots::readyReadStandardError() { hbqt_SlotsExec( this, qobject_cast( sender() ), "readyReadStandardError()" ); } +void HBSlots::readyReadStandardOutput() { hbqt_SlotsExec( this, qobject_cast( sender() ), "readyReadStandardOutput()" ); } +void HBSlots::started() { hbqt_SlotsExec( this, qobject_cast( sender() ), "started()" ); } +void HBSlots::stateChanged( QProcess::ProcessState newState ) { hbqt_SlotsExecInt( this, qobject_cast( sender() ), "stateChanged(int)", newState ); } /* QComboBox */ -void HBSlots::activated( const QString & text ) { hbqt_SlotsExecString( this, qobject_cast( sender() ), "activated(text)", text ); } -void HBSlots::currentIndexChanged( const QString & text ) { hbqt_SlotsExecString( this, qobject_cast( sender() ), "currentIndexChanged(text)", text ); } -void HBSlots::editTextChanged( const QString & text ) { hbqt_SlotsExecString( this, qobject_cast( sender() ), "editTextChanged(text)", text ); } -void HBSlots::highlighted( const QString & text ) { hbqt_SlotsExecString( this, qobject_cast( sender() ), "highlighted(text)", text ); } +void HBSlots::activated( const QString & text ) { hbqt_SlotsExecString( this, qobject_cast( sender() ), "activated(text)", text ); } +void HBSlots::currentIndexChanged( const QString & text ) { hbqt_SlotsExecString( this, qobject_cast( sender() ), "currentIndexChanged(text)", text ); } +void HBSlots::editTextChanged( const QString & text ) { hbqt_SlotsExecString( this, qobject_cast( sender() ), "editTextChanged(text)", text ); } +void HBSlots::highlighted( const QString & text ) { hbqt_SlotsExecString( this, qobject_cast( sender() ), "highlighted(text)", text ); } /* QTextDocument */ -void HBSlots::blockCountChanged( int newBlockCount ) { hbqt_SlotsExecInt( this, qobject_cast( sender() ), "blockCountChanged(int)", newBlockCount ); } +void HBSlots::blockCountChanged( int newBlockCount ) { hbqt_SlotsExecInt( this, qobject_cast( sender() ), "blockCountChanged(int)", newBlockCount ); } void HBSlots::contentsChange( int position, int charsRemoved, int charsAdded ) { hbqt_SlotsExecIntIntInt( this, qobject_cast( sender() ), "contentsChange(int,int,int)", position, charsRemoved, charsAdded ); } -void HBSlots::contentsChanged() { hbqt_SlotsExec( this, qobject_cast( sender() ), "contentsChanged()" ); } -void HBSlots::cursorPositionChanged( const QTextCursor & cursor ) { hbqt_SlotsExecQTextCursor( this, qobject_cast( sender() ), "cursorPositionChanged(QTextCursor)", cursor ); } -void HBSlots::documentLayoutChanged() { hbqt_SlotsExec( this, qobject_cast( sender() ), "documentLayoutChanged()" ); } -void HBSlots::modificationChanged( bool changed ) { hbqt_SlotsExecBool( this, qobject_cast( sender() ), "modificationChanged(bool)", changed ); } -void HBSlots::undoCommandAdded() { hbqt_SlotsExec( this, qobject_cast( sender() ), "undoCommandAdded()" ); } +void HBSlots::contentsChanged() { hbqt_SlotsExec( this, qobject_cast( sender() ), "contentsChanged()" ); } +void HBSlots::cursorPositionChanged( const QTextCursor & cursor ) { hbqt_SlotsExecQTextCursor( this, qobject_cast( sender() ), "cursorPositionChanged(QTextCursor)", cursor ); } +void HBSlots::documentLayoutChanged() { hbqt_SlotsExec( this, qobject_cast( sender() ), "documentLayoutChanged()" ); } +void HBSlots::modificationChanged( bool changed ) { hbqt_SlotsExecBool( this, qobject_cast( sender() ), "modificationChanged(bool)", changed ); } +void HBSlots::undoCommandAdded() { hbqt_SlotsExec( this, qobject_cast( sender() ), "undoCommandAdded()" ); } +/* QPlainTextEdit */ +void HBSlots::updateRequest( const QRect & rect, int dy ) { hbqt_SlotsExecQRectInt( this, qobject_cast( sender() ), "updateRequest(QRect,int)", rect, dy ); } + /**/ /*----------------------------------------------------------------------*/ diff --git a/harbour/contrib/hbqt/hbqt_hbslots.h b/harbour/contrib/hbqt/hbqt_hbslots.h index 2e0705c04a..d567115be7 100644 --- a/harbour/contrib/hbqt/hbqt_hbslots.h +++ b/harbour/contrib/hbqt/hbqt_hbslots.h @@ -77,6 +77,8 @@ public: QList listObj; public slots: + /* QWidget */ + void customContextMenuRequested( const QPoint & pos ); void clicked(); void triggered(); void triggered( bool checked ); @@ -228,6 +230,8 @@ public slots: void documentLayoutChanged(); void modificationChanged( bool changed ); void undoCommandAdded(); + /* QPlainTextEdit */ + void updateRequest( const QRect & rect, int dy ); /* */ }; diff --git a/harbour/contrib/hbxbp/xbprtf.prg b/harbour/contrib/hbxbp/xbprtf.prg index 72d5593698..0d66aab068 100644 --- a/harbour/contrib/hbxbp/xbprtf.prg +++ b/harbour/contrib/hbxbp/xbprtf.prg @@ -173,7 +173,7 @@ METHOD XbpRtf:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible ) ::connect( ::pWidget, "currentCharFormatChanged(QTextCharFormat)", {|o,p| ::exeBlock( 2, p, o ) } ) ::connect( ::pWidget, "cursorPositionChanged()" , {|o,p| ::exeBlock( 3, p, o ) } ) ::connect( ::pWidget, "redoAvailable(bool)" , {|o,p| ::exeBlock( 4, p, o ) } ) - ::connect( ::pWidget, "undoAvailable(available)" , {|o,p| ::exeBlock( 5, p, o ) } ) + ::connect( ::pWidget, "undoAvailable(bool)" , {|o,p| ::exeBlock( 5, p, o ) } ) ::connect( ::pWidget, "textChanged()" , {|o,p| ::exeBlock( 6, p, o ) } ) ::connect( ::pWidget, "selectionChanged()" , {|o,p| ::exeBlock( 7, p, o ) } )