diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 1c3e764f07..f9b73aed75 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,115 @@ The license applies to all entries newer than 2009-04-28. */ +2012-09-19 17:07 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com) + * contrib/gtwvg/toolbar.prg + + Added code to pass as a pointer to bitmap in memory. + + + contrib/hbxbp/resources + + contrib/hbxbp/resources/closetab.png + + contrib/hbxbp/resources/database.png + + contrib/hbxbp/resources/database_accept.png + + contrib/hbxbp/resources/database_add.png + + contrib/hbxbp/resources/database_down.png + + contrib/hbxbp/resources/database_lock.png + + contrib/hbxbp/resources/database_next.png + + contrib/hbxbp/resources/database_previous.png + + contrib/hbxbp/resources/database_process.png + + contrib/hbxbp/resources/database_remove.png + + contrib/hbxbp/resources/database_search.png + + contrib/hbxbp/resources/database_up.png + + contrib/hbxbp/resources/dbf_p1.png + + contrib/hbxbp/resources/dbf_p10.png + + contrib/hbxbp/resources/dbf_p2.png + + contrib/hbxbp/resources/dbf_p3.png + + contrib/hbxbp/resources/dbf_p4.png + + contrib/hbxbp/resources/dbf_p5.png + + contrib/hbxbp/resources/dbf_p6.png + + contrib/hbxbp/resources/dbf_p7.png + + contrib/hbxbp/resources/dbf_p8.png + + contrib/hbxbp/resources/dbf_p9.png + + contrib/hbxbp/resources/dbstruct.png + + contrib/hbxbp/resources/dc_delete.png + + contrib/hbxbp/resources/find.png + + contrib/hbxbp/resources/form.png + + contrib/hbxbp/resources/formview.png + + contrib/hbxbp/resources/fullscreen.png + + contrib/hbxbp/resources/gotoline3.png + + contrib/hbxbp/resources/open3.png + + contrib/hbxbp/resources/panel_7.png + + contrib/hbxbp/resources/panel_8.png + + contrib/hbxbp/resources/save3.png + + contrib/hbxbp/resources/sort.png + + contrib/hbxbp/resources/table.png + + contrib/hbxbp/resources/view_cascaded.png + + contrib/hbxbp/resources/view_docks.png + + contrib/hbxbp/resources/view_horzstacked.png + + contrib/hbxbp/resources/view_organized.png + + contrib/hbxbp/resources/view_refresh.png + + contrib/hbxbp/resources/view_tabbed.png + + contrib/hbxbp/resources/view_tiled.png + + contrib/hbxbp/resources/view_vertstacked.png + + contrib/hbxbp/resources/view_zoomin.png + + contrib/hbxbp/resources/view_zoomout.png + + + contrib/hbxbp/xbp.qrc + + Added: various images for HbpDBU() class implementation. + + * contrib/hbxbp/hbxbp.hbp + + Added: dbu.prg, xbpdbstruct.ui, xbpfethdate.ui, xbptables.ui. + + * contrib/hbxbp/hbxbp.hbx + * Regenerated. + + + contrib/hbxbp/dbu.prg + * contrib/hbxbp/dialog.prg + * contrib/hbxbp/generic.prg + * contrib/hbxbp/toolbar.prg + + contrib/hbxbp/xbpdbstruct.ui + + contrib/hbxbp/xbpfetchdate.ui + + contrib/hbxbp/xbptables.ui + + Implemented: HbpDBU() class which was developed for HbIDE initially. + Now this class is self contained object like a COM object which can + be embedded into your HbQt/HbXBP based applications. The syntax to + embed in your applications is like : + oWidget := QWidget() + oLayout := QHBoxLayout( oWidget ) + oWidget:setLayout( oLayout ) + + oDBU := HbpDBU():new() + oDBU:qtObject := oWidget + oDBU:create( , , {0,0}, {100,100}, , .T. ) + + And you will see the DBU will all its bells and whisles inside oWidget. + oWidget can be any container of your application, but it must have a + layout set on it. Layout can be any. But if it is QGridlayout then + row/column 0,0 is consumed with rowspan/columnsspan 1,1. + + It is usable as it was usable in HbIDE, but a lot of improvements/features + are planned lurking on my drawingboard. So just for now, you can play. + + * contrib/hbide/actions.prg + - Deprecated: ideDBU opening inside dock widget. Removed this action from +
and also from . + + ! Fixed: Selection Mode toggle action not working in Selected-text Toolbar. + + - contrib/hbide/browse.prg + - Removed: ideDBU source. + + * contrib/hbide/docks.prg + % Adjusted: toggle actions. + + * contrib/hbide/hbqtoolbar.prg + % Few refinements. + + * contrib/hbide/main.prg + * contrib/hbide/parts.prg + + * contrib/hbide/hbide.hbp + - Removed: browse.prg. + TODO: to remove resources consumed by ideDBU. + 2012-09-19 14:39 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl) * harbour/doc/en/compiler.txt * updated to follow recent modifications in compiler code. diff --git a/harbour/contrib/gtwvg/toolbar.prg b/harbour/contrib/gtwvg/toolbar.prg index c60b480dc7..347110d54c 100644 --- a/harbour/contrib/gtwvg/toolbar.prg +++ b/harbour/contrib/gtwvg/toolbar.prg @@ -321,6 +321,9 @@ METHOD WvgToolBar:addItem( cCaption, xImage, xDisabledImage, xHotImage, cDLL, nS CASE cType == "N" pBitmap := Wvg_PrepareBitmapFromResourceID( xImage, ::imageWidth, ::imageHeight, .t., ::hWnd ) + CASE cType == "P" + pBitmap := xImage + ENDCASE IF ! empty( pBitmap ) @@ -331,7 +334,9 @@ METHOD WvgToolBar:addItem( cCaption, xImage, xDisabledImage, xHotImage, cDLL, nS ELSE nBtn := WAPI_ImageList_Add( ::hImageList, pBitmap ) ENDIF - WVG_DeleteObject( pBitmap ) + IF cType <> "P" + WVG_DeleteObject( pBitmap ) + ENDIF WVG_AddToolbarButton( ::pWnd, nBtn, oBtn:caption, oBtn:command, 1, ::showToolTips ) diff --git a/harbour/contrib/hbide/actions.prg b/harbour/contrib/hbide/actions.prg index de33031c66..c8a930704a 100644 --- a/harbour/contrib/hbide/actions.prg +++ b/harbour/contrib/hbide/actions.prg @@ -269,7 +269,7 @@ METHOD IdeActions:loadActions() aadd( aAct, { "Copy" , "~Copy" , "copy" , "" , "No", "Yes" } ) aadd( aAct, { "Paste" , "~Paste" , "paste" , "" , "No", "Yes" } ) aadd( aAct, { "SelectAll" , "Select ~All" , "selectall" , "" , "No", "Yes" } ) - aadd( aAct, { "SelectionMode" , "Toggle Selection Mode" , "stream" , "" , "No", "Yes" } ) + aadd( aAct, { "SelectionMode" , "Toggle Selection Mode" , "stream" , "" , "Yes","Yes" } ) aadd( aAct, { "Find" , "~Find / Replace..." , "find" , "^F" , "No", "Yes" } ) aadd( aAct, { "FindEx" , "~Find / Replace Ex" , "find" , "Sh+^F", "No", "Yes" } ) aadd( aAct, { "Search" , "F~ind in Files" , "search" , "" , "No", "Yes" } ) @@ -558,7 +558,7 @@ METHOD IdeActions:buildMainMenu() oSubMenu2:oWidget:addAction( ::oThemesDock:oWidget:toggleViewAction() ) oSubMenu2:oWidget:addAction( ::oFindDock:oWidget:toggleViewAction() ) oSubMenu2:oWidget:addAction( ::oSourceThumbnailDock:oWidget:toggleViewAction() ) - oSubMenu2:oWidget:addAction( ::oQScintillaDock:oWidget:toggleViewAction() ) +// oSubMenu2:oWidget:addAction( ::oQScintillaDock:oWidget:toggleViewAction() ) oSubMenu2:oWidget:addAction( ::oReportsManagerDock:toggleViewAction() ) oSubMenu2:oWidget:addAction( ::oCuiEdDock:toggleViewAction() ) @@ -1113,7 +1113,7 @@ METHOD IdeActions:buildToolBarDocks() aadd( aBtns, { ::oThemesDock , "syntaxhiliter" } ) aadd( aBtns, { ::oFindDock , "search" } ) aadd( aBtns, { ::oSourceThumbnailDock, "thumbnail" } ) - aadd( aBtns, { ::oQScintillaDock , "browser" } ) +// aadd( aBtns, { ::oQScintillaDock , "browser" } ) aadd( aBtns, { ::oReportsManagerDock , "designer" } ) aadd( aBtns, { ::oCuiEdDock , "cuied" } ) aadd( aBtns, { ::oUiSrcDock , "fileprg" } ) @@ -1220,7 +1220,7 @@ METHOD IdeActions:buildMdiToolbar() qTBar:addToolButton( "Copy" , "Copy" , hbide_image( "copy" ), {|| ::oEM:copy() }, .f. ) qTBar:addToolButton( "Paste" , "Paste" , hbide_image( "paste" ), {|| ::oEM:paste() }, .f. ) qTBar:addToolButton( "SelectAll" , "Select all" , hbide_image( "selectall" ), {|| ::oEM:selectAll() }, .f. ) - qTBar:addToolButton( "SelectionMode", "Selection mode" , hbide_image( "stream" ), {|| ::oEM:toggleSelectionMode(), ::oIDE:manageFocusInEditor() }, .t. ) + qTBar:addAction( "SelectionMode", ::getAction( "SelectionMode" ), {|| ::oEM:toggleSelectionMode(), ::oIDE:manageFocusInEditor() } ) qTBar:addWidget( "Label1", sp1 ) qTBar:addToolButton( "Find" , "Find / Replace" , hbide_image( "find" ), {|| ::oEM:find() }, .f. ) qTBar:addToolButton( "BookMark" , "Toggle Mark" , hbide_image( "bookmark" ), {|| ::oEM:setMark() }, .f. ) @@ -1265,7 +1265,6 @@ METHOD IdeActions:buildToolbarSelectedText() ::qSelToolbar:create( "SelectedText_Toolbar" ) ::qSelToolbar:setObjectName( "ToolbarSelectedText" ) ::qSelToolbar:setWindowTitle( "Actions on Selected Text" ) - //::qSelToolbar:setWindowFlags( hb_bitOr( Qt_Tool, Qt_CustomizeWindowHint, Qt_WindowTitleHint, Qt_WindowCloseButtonHint ) ) ::qSelToolbar:setWindowFlags( hb_bitOr( Qt_Tool, Qt_CustomizeWindowHint ) ) ::qSelToolbar:setMovable( .T. ) ::qSelToolbar:setFloatable( .T. ) @@ -1278,7 +1277,7 @@ METHOD IdeActions:buildToolbarSelectedText() qTBar:addToolButton( "Cut" , "Cut" , hbide_image( "cut" ), {|| ::oEM:cut() }, .f. ) qTBar:addToolButton( "Copy" , "Copy" , hbide_image( "copy" ), {|| ::oEM:copy() }, .f. ) qTBar:addToolButton( "Paste" , "Paste" , hbide_image( "paste" ), {|| ::oEM:paste() }, .f. ) - qTBar:addToolButton( "SelMode" , "Selection Mode" , hbide_image( "stream" ), {|| ::oEM:toggleSelectionMode(), ::oIDE:manageFocusInEditor() }, .t. ) + qTBar:addAction( "SelectionMode", ::getAction( "SelectionMode" ), {|| ::oEM:toggleSelectionMode(), ::oIDE:manageFocusInEditor() } ) qTBar:addToolButton( "ToUpper" , "To Upper" , hbide_image( "toupper" ), {|| ::oEM:convertSelection( "ToUpper" ) }, .f. ) qTBar:addToolButton( "ToLower" , "To Lower" , hbide_image( "tolower" ), {|| ::oEM:convertSelection( "ToLower" ) }, .f. ) qTBar:addToolButton( "InvertCase", "Invert Case" , hbide_image( "invertcase" ), {|| ::oEM:convertSelection( "Invert" ) }, .f. ) diff --git a/harbour/contrib/hbide/docks.prg b/harbour/contrib/hbide/docks.prg index 7496efe3ec..de329facee 100644 --- a/harbour/contrib/hbide/docks.prg +++ b/harbour/contrib/hbide/docks.prg @@ -418,7 +418,7 @@ METHOD IdeDocks:buildDialog() ::oDlg:oWidget:setStyleSheet( GetStyleSheet( "QMainWindow", ::nAnimantionMode ) ) - ::oDlg:close := {|| hbide_setClose( hbide_getYesNo( "hbIDE is about to be closed!", "Are you sure?" ) ), ; + ::oDlg:close := {|| hbide_setClose( hbide_getYesNo( "HbIDE is about to be closed!", "Are you sure?" ) ), ; PostAppEvent( xbeP_Close, , , ::oDlg ) } ::oDlg:setDockOptions( QMainWindow_AllowTabbedDocks + QMainWindow_AllowNestedDocks + QMainWindow_AnimatedDocks ) ::oDlg:setTabShape( ::oINI:nDocksTabShape ) @@ -625,6 +625,7 @@ METHOD IdeDocks:execEvent( nEvent, p, p1 ) ENDIF ENDIF EXIT +#if 0 /* Deprecated */ CASE __dockQScintilla_visibilityChanged__ IF p; ::oBM:show() ; ENDIF IF !empty( p1 ) @@ -633,6 +634,7 @@ METHOD IdeDocks:execEvent( nEvent, p, p1 ) ENDIF ENDIF EXIT +#endif CASE __dockSourceThumbnail_visibilityChanged__ IF p; ::oEM:showThumbnail(); ENDIF IF !empty( p1 ) @@ -1665,7 +1667,6 @@ METHOD IdeDocks:animateComponents( nMode ) ::oTM:setStyleSheet( GetStyleSheet( "QToolBarLR5", nMode ) ) ::oEM:setStyleSheet( nMode ) - ::oBM:setStyleSheet( nMode ) /* Statusbar */ ::oSBar:oWidget:setStyleSheet( GetStyleSheet( "QStatusBar", nMode ) ) diff --git a/harbour/contrib/hbide/hbide.hbp b/harbour/contrib/hbide/hbide.hbp index a2f23ce60c..c680e85cbc 100644 --- a/harbour/contrib/hbide/hbide.hbp +++ b/harbour/contrib/hbide/hbide.hbp @@ -52,7 +52,6 @@ shortcuts.prg edit.prg plugins.prg dict.prg -browse.prg format.prg changelog.prg console.prg diff --git a/harbour/contrib/hbide/hbqtoolbar.prg b/harbour/contrib/hbide/hbqtoolbar.prg index 0e77145bb0..52c2416caa 100644 --- a/harbour/contrib/hbide/hbqtoolbar.prg +++ b/harbour/contrib/hbide/hbqtoolbar.prg @@ -5,7 +5,7 @@ /* * Harbour Project source code: * - * Copyright 2010 Pritpal Bedi + * Copyright 2010-2012 Pritpal Bedi * www - http://harbour-project.org * * This program is free software; you can redistribute it and/or modify @@ -104,8 +104,9 @@ CLASS HbqToolbar METHOD addWidget( cName, qWidget ) METHOD addAction( cName, qAction, bBlock ) METHOD addSeparator() - METHOD contains( cName ) INLINE hb_hHasKey( ::hItems, cName ) - METHOD getItem( cName ) INLINE iif( hb_hHasKey( ::hItems, cName ), ::hItems[ cName ], NIL ) + METHOD contains( cName ) INLINE hb_hHasKey( ::hActions, cName ) + METHOD getItem( cName ) INLINE iif( hb_hHasKey( ::hActions, cName ), ::hActions[ cName ], NIL ) + METHOD itemToggle( cName ) ERROR HANDLER onError( ... ) ENDCLASS @@ -276,7 +277,7 @@ METHOD HbqToolbar:addSeparator() METHOD HbqToolbar:addAction( cName, qAction, bBlock ) - DEFAULT cName TO hbide_getNextIDasString( "IdeToolButtonAction" ) + DEFAULT cName TO hbide_getNextIdAsString( "IdeToolButtonAction" ) ::oWidget:addAction( qAction ) @@ -298,7 +299,7 @@ METHOD HbqToolbar:addToolButton( cName, cDesc, cImage, bAction, lCheckable, lDra DEFAULT lCheckable TO .f. DEFAULT lDragEnabled TO .f. - oButton := QToolButton() // ::oWidget ) + oButton := QToolButton() oButton:setObjectName( cName ) oButton:setTooltip( cDesc ) oButton:setIcon( QIcon( cImage ) ) @@ -327,11 +328,11 @@ METHOD HbqToolbar:addToolButton( cName, cDesc, cImage, bAction, lCheckable, lDra METHOD HbqToolbar:setItemChecked( cName, lState ) LOCAL lOldState - IF hb_hHasKey( ::hItems, cName ) - IF ::hItems[ cName ]:isCheckable() - lOldState := ::hItems[ cName ]:isChecked() + IF hb_hHasKey( ::hActions, cName ) + IF ::hActions[ cName ]:isCheckable() + lOldState := ::hActions[ cName ]:isChecked() IF HB_ISLOGICAL( lState ) - ::hItems[ cName ]:setChecked( lState ) + ::hActions[ cName ]:setChecked( lState ) ENDIF ENDIF ENDIF @@ -343,13 +344,28 @@ METHOD HbqToolbar:setItemChecked( cName, lState ) METHOD HbqToolbar:setItemEnabled( cName, lEnabled ) LOCAL lOldEnabled - IF hb_hHasKey( ::hItems, cName ) - lOldEnabled := ::hItems[ cName ]:isEnabled() + IF hb_hHasKey( ::hActions, cName ) + lOldEnabled := ::hActions[ cName ]:isEnabled() IF HB_ISLOGICAL( lEnabled ) - ::hItems[ cName ]:setEnabled( lEnabled ) + ::hActions[ cName ]:setEnabled( lEnabled ) ENDIF ENDIF RETURN lOldEnabled /*----------------------------------------------------------------------*/ + +METHOD HbqToolbar:itemToggle( cName ) + LOCAL lOldState + + IF hb_hHasKey( ::hActions, cName ) + IF ::hActions[ cName ]:isCheckable() + lOldState := ::hActions[ cName ]:isChecked() + ::hActions[ cName ]:setChecked( ! lOldState ) + ENDIF + ENDIF + + RETURN lOldState + +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbide/main.prg b/harbour/contrib/hbide/main.prg index f9194c25df..93336bbb9a 100644 --- a/harbour/contrib/hbide/main.prg +++ b/harbour/contrib/hbide/main.prg @@ -339,6 +339,8 @@ CLASS HbIde DATA lSortedFuncList INIT .t. DATA lQuitting INIT .f. + DATA oBMM /* Testing */ + METHOD new( aParams ) METHOD create( aParams ) METHOD destroy() @@ -670,7 +672,10 @@ METHOD HbIde:create( aParams ) ::oHM := IdeHome():new():create( Self ) /* Browser Manager */ - ::oBM := IdeBrowseManager():new():create( Self ) + ::oBMM := HbpDBU():new() + ::oBMM:qtObject := ::oParts:oStackDbu + ::oBMM:create() + ::oBM := ::oBMM:oIdeMgr /* Reports Manager */ ::oRM := HbqReportsManager():new():create( ::oReportsManagerDock:oWidget ) diff --git a/harbour/contrib/hbide/parts.prg b/harbour/contrib/hbide/parts.prg index 515ffb99ae..d4c46fa1b1 100644 --- a/harbour/contrib/hbide/parts.prg +++ b/harbour/contrib/hbide/parts.prg @@ -185,7 +185,6 @@ METHOD IdeParts:execStackIndexChanged( nIndex ) CASE IDE_PART_DBU ::oIde:oSBar:hide() ::oDK:hideAllDocks() - ::oBM:showInIdeDBU() EXIT ENDSWITCH diff --git a/harbour/contrib/hbide/browse.prg b/harbour/contrib/hbxbp/dbu.prg similarity index 79% rename from harbour/contrib/hbide/browse.prg rename to harbour/contrib/hbxbp/dbu.prg index 54a62b034c..703686fe4a 100644 --- a/harbour/contrib/hbide/browse.prg +++ b/harbour/contrib/hbxbp/dbu.prg @@ -1,12 +1,13 @@ -/* + /* * $Id$ */ /* * Harbour Project source code: + * Source file for the Xbp*Classes * - * Copyright 2009-2010 Pritpal Bedi - * www - http://harbour-project.org + * Copyright 2012 Pritpal Bedi + * http://harbour-project.org * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -52,22 +53,21 @@ /*----------------------------------------------------------------------*/ /*----------------------------------------------------------------------*/ /* - * EkOnkar - * ( The LORD is ONE ) + * EkOnkar + * ( The LORD is ONE ) * - * Harbour-Qt IDE + * Harbour HbpDBU Class * - * Pritpal Bedi - * 27Jun2010 + * Pritpal Bedi + * 13Sep2012 */ /*----------------------------------------------------------------------*/ /*----------------------------------------------------------------------*/ /*----------------------------------------------------------------------*/ -#include "common.ch" #include "hbclass.ch" -#include "hbqtgui.ch" -#include "hbide.ch" +#include "common.ch" + #include "xbp.ch" #include "appevent.ch" @@ -119,8 +119,6 @@ #define BRW_TYPE_DBF 1 #define BRW_TYPE_ARRAY 2 -/*------------------------------------------------------------------------*/ - #define TBL_PANEL 1 #define TBL_NAME 2 #define TBL_ALIAS 3 @@ -150,7 +148,105 @@ /*----------------------------------------------------------------------*/ -CLASS IdeBrowseManager INHERIT IdeObject +CLASS HbpDBU INHERIT XbpWindow + + DATA oIdeMgr + + CLASSDATA lRegistered INIT .F. + + METHOD init( oParent, oOwner, aPos, aSize, aPresParams, lVisible ) + METHOD create( oParent, oOwner, aPos, aSize, aPresParams, lVisible ) + METHOD configure( oParent, oOwner, aPos, aSize, aPresParams, lVisible ) + METHOD destroy() + METHOD execSlot( nSlot, p ) + METHOD handleEvent( nEvent, mp1, mp2 ) + METHOD setStyleSheet( ... ) VIRTUAL + + DATA sl_brush + METHOD background( oBrush ) SETGET + + ENDCLASS + +/*----------------------------------------------------------------------*/ + +METHOD HbpDBU:init( oParent, oOwner, aPos, aSize, aPresParams, lVisible ) + + IF ! ::lRegistered + ::lRegistered := .T. + QResource():registerResource_1( hbqtres_xbp() ) + ENDIF + + ::xbpWindow:init( oParent, oOwner, aPos, aSize, aPresParams, lVisible ) + + RETURN Self + +/*----------------------------------------------------------------------*/ + +METHOD HbpDBU:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible ) + + ::xbpWindow:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible ) + + ::oIdeMgr := HbpBrowseManager():new():create( ::qtObject ) + ::oWidget := ::oIdeMgr:qDbu + + IF ::visible + ::show() + ENDIF + + RETURN Self + +/*----------------------------------------------------------------------*/ + +METHOD HbpDBU:execSlot( nSlot, p ) + + HB_SYMBOL_UNUSED( nSlot ) + HB_SYMBOL_UNUSED( p ) + + RETURN Self + +/*----------------------------------------------------------------------*/ + +METHOD HbpDBU:handleEvent( nEvent, mp1, mp2 ) + + HB_SYMBOL_UNUSED( nEvent ) + HB_SYMBOL_UNUSED( mp1 ) + HB_SYMBOL_UNUSED( mp2 ) + + RETURN HBXBP_EVENT_UNHANDLED + +/*----------------------------------------------------------------------*/ + +METHOD HbpDBU:background( oBrush ) + LOCAL oOldBrush := ::sl_brush + + IF HB_ISOBJECT( oBrush ) + ::sl_brush := oBrush + ENDIF + IF HB_ISOBJECT( ::sl_brush ) + ::oIdeMgr:background := ::sl_brush + ENDIF + + RETURN oOldBrush + +/*----------------------------------------------------------------------*/ + +METHOD HbpDBU:destroy() + + ::oWidget:setParent( QWidget() ) + + RETURN NIL + +/*----------------------------------------------------------------------*/ + +METHOD HbpDBU:configure( oParent, oOwner, aPos, aSize, aPresParams, lVisible ) + + ::initialize( oParent, oOwner, aPos, aSize, aPresParams, lVisible ) + + RETURN Self + +/*----------------------------------------------------------------------*/ + +CLASS HbpBrowseManager DATA qDbu DATA qStack @@ -164,6 +260,9 @@ CLASS IdeBrowseManager INHERIT IdeObject DATA qStatus DATA qTimer + DATA cWrkFolderLast INIT "" + DATA cDbStructDialogGeometry INIT "" + DATA aStatusPnls INIT {} DATA aPanels INIT {} DATA aIndexAct INIT {} @@ -188,9 +287,9 @@ CLASS IdeBrowseManager INHERIT IdeObject DATA nPrevMode INIT 0 - METHOD new( oIde ) - METHOD create( oIde ) - METHOD show() + METHOD new() + METHOD create( qtObject ) + METHOD open( aDbfs ) METHOD destroy() VIRTUAL METHOD buildToolbar() @@ -224,34 +323,45 @@ CLASS IdeBrowseManager INHERIT IdeObject METHOD showTablesTree() METHOD fetchFldsList( cAlias ) METHOD getBrowserByAlias( cAlias ) - METHOD showInIdeDBU() + + DATA sl_brush + METHOD background SETGET ENDCLASS /*----------------------------------------------------------------------*/ -METHOD IdeBrowseManager:new( oIde ) - ::oIde := oIde +METHOD HbpBrowseManager:new() - IF hbide_setAdsAvailable() - aadd( ::aRdds, "ADS" ) - ENDIF + SET DELETED ( ::lDeletedOn ) RETURN Self /*----------------------------------------------------------------------*/ -METHOD IdeBrowseManager:create( oIde ) +METHOD HbpBrowseManager:create( qtObject ) + LOCAL oLayout - SET DELETED ( ::lDeletedOn ) + IF HB_ISOBJECT( qtObject ) + ::qDbu := QWidget( qtObject ) + oLayout := qtObject:layout() + SWITCH __objGetClsName( oLayout ) + CASE "QVBOXLAYOUT" + CASE "QHBOXLAYOUT" + oLayout:addWidget( ::qDbu ) + EXIT + CASE "QGRIDLAYOUT" + oLayout:addWidget( ::qDbu, 0, 0, 1, 1 ) + EXIT + ENDSWITCH + ELSE + ::qDbu := QWidget() + ENDIF - DEFAULT oIde TO ::oIde - ::oIde := oIde - - ::qDbu := QWidget() ::qDbu:setAcceptDrops( .t. ) ::qDbu:connect( QEvent_DragEnter, {|p| ::execEvent( __dbu_dragEnterEvent__, p ) } ) ::qDbu:connect( QEvent_Drop , {|p| ::execEvent( __dbu_dropEvent__ , p ) } ) + ::qDbu:hide() /* Layout applied to dbu widget */ ::qLayout := QGridLayout() @@ -279,7 +389,6 @@ METHOD IdeBrowseManager:create( oIde ) /* */ ::buildStatusPanels() - /* Panels on the stacked widget */ ::addPanels() @@ -293,34 +402,28 @@ METHOD IdeBrowseManager:create( oIde ) ::qTimer := QTimer() ::qTimer:setInterval( 2000 ) ::qTimer:connect( "timeout()", {|| ::dispStatusInfo() } ) - - RETURN Self - -/*----------------------------------------------------------------------*/ - -METHOD IdeBrowseManager:showInIdeDBU() - - ::oQScintillaDock:oWidget:hide() - ::oParts:addWidget( IDE_PART_DBU, ::qDbu, 0, 0, 1, 1 ) - ::qDbu:show() ::qTimer:start() RETURN Self /*----------------------------------------------------------------------*/ -METHOD IdeBrowseManager:show() +METHOD HbpBrowseManager:background( oBrush ) + LOCAL oOldBrush := ::sl_brush + LOCAL oPanel - ::qToolbar:setStyleSheet( GetStyleSheet( "QToolBar", ::nAnimantionMode ) ) - ::oQScintillaDock:oWidget:setWidget( ::qDbu ) - ::oQScintillaDock:oWidget:raise() - ::qTimer:start() + IF HB_ISOBJECT( oBrush ) + ::sl_brush := oBrush + FOR EACH oPanel IN ::aPanels + oPanel:setBackground( ::sl_brush ) + NEXT + ENDIF - RETURN Self + RETURN oOldBrush /*----------------------------------------------------------------------*/ -METHOD IdeBrowseManager:getPanelNames() +METHOD HbpBrowseManager:getPanelNames() LOCAL oPanel, aNames := {}, aAttr FOR EACH oPanel IN ::aPanels @@ -336,7 +439,7 @@ METHOD IdeBrowseManager:getPanelNames() /*----------------------------------------------------------------------*/ -METHOD IdeBrowseManager:getPanelsInfo() +METHOD HbpBrowseManager:getPanelsInfo() LOCAL oBrw, oPanel, aSub LOCAL aInfo := {}, aAttr @@ -377,7 +480,7 @@ METHOD IdeBrowseManager:getPanelsInfo() /*----------------------------------------------------------------------*/ -METHOD IdeBrowseManager:setStyleSheet( nMode ) +METHOD HbpBrowseManager:setStyleSheet( nMode ) ::qToolbar:setStyleSheet( GetStyleSheet( "QToolBar", nMode ) ) ::qToolbarL:setStyleSheet( GetStyleSheet( "QToolBarLR5", nMode ) ) @@ -391,7 +494,7 @@ METHOD IdeBrowseManager:setStyleSheet( nMode ) /*------------------------------------------------------------------------*/ -METHOD IdeBrowseManager:fetchFldsList( cAlias ) +METHOD HbpBrowseManager:fetchFldsList( cAlias ) LOCAL aFlds := {}, cA, oBrw, a_, oPanel, aBrw cA := upper( cAlias ) @@ -420,7 +523,7 @@ METHOD IdeBrowseManager:fetchFldsList( cAlias ) /*------------------------------------------------------------------------*/ -METHOD IdeBrowseManager:getBrowserByAlias( cAlias ) +METHOD HbpBrowseManager:getBrowserByAlias( cAlias ) LOCAL oPanel, aBrw FOR EACH oPanel IN ::aPanels @@ -434,7 +537,7 @@ METHOD IdeBrowseManager:getBrowserByAlias( cAlias ) /*------------------------------------------------------------------------*/ -METHOD IdeBrowseManager:dispStatusInfo() +METHOD HbpBrowseManager:dispStatusInfo() ::aStatusPnls[ PNL_PANELS ]:setText( "Panels: " + hb_ntos( Len( ::aPanels ) ) + ":" + ::oCurPanel:cPanel ) ::aStatusPnls[ PNL_TABLES ]:setText( "Tables: " + hb_ntos( Len( ::oCurPanel:aBrowsers ) ) ) @@ -446,7 +549,7 @@ METHOD IdeBrowseManager:dispStatusInfo() /*------------------------------------------------------------------------*/ -METHOD IdeBrowseManager:buildStatusPanels() +METHOD HbpBrowseManager:buildStatusPanels() LOCAL qLabel qLabel := QLabel(); qLabel:setMinimumWidth( 40 ) @@ -469,11 +572,11 @@ METHOD IdeBrowseManager:buildStatusPanels() /*------------------------------------------------------------------------*/ -METHOD IdeBrowseManager:addPanels() - LOCAL cPanel, aPnl - - ::addPanel( "Main", .t. ) /* The default one */ +METHOD HbpBrowseManager:addPanels() + //LOCAL cPanel, aPnl + ::addPanel( "Main", .T. ) /* The default one */ +#if 0 /* Later */ FOR EACH cPanel IN ::oINI:aDbuPanelNames aPnl := hb_aTokens( cPanel, "," ) aSize( aPnl, 2 ) @@ -484,15 +587,15 @@ METHOD IdeBrowseManager:addPanels() ::addPanel( aPnl[ 1 ], aPnl[ 2 ] == "YES" ) ENDIF NEXT - +#endif RETURN Self /*----------------------------------------------------------------------*/ -METHOD IdeBrowseManager:addPanel( cPanel ) +METHOD HbpBrowseManager:addPanel( cPanel ) LOCAL qPanel - qPanel := IdeBrowsePanel():new( ::oIde, cPanel, self ) + qPanel := HbpBrowsePanel():new( cPanel, self ) ::qStack:addWidget( qPanel:qWidget ) aadd( ::aPanels, qPanel ) ::addPanelsMenu( cPanel ) @@ -501,11 +604,11 @@ METHOD IdeBrowseManager:addPanel( cPanel ) /*----------------------------------------------------------------------*/ -METHOD IdeBrowseManager:addPanelsMenu( cPanel ) +METHOD HbpBrowseManager:addPanelsMenu( cPanel ) LOCAL qAct IF HB_ISOBJECT( ::qPanelsMenu ) qAct := ::qPanelsMenu:addAction( cPanel ) - qAct:setIcon( QIcon( hbide_image( "panel_7" ) ) ) + qAct:setIcon( QIcon( xbp_image( "panel_7" ) ) ) qAct:connect( "triggered(bool)", {|| ::setPanel( cPanel ) } ) aadd( ::aPanelsAct, qAct ) ENDIF @@ -513,12 +616,12 @@ ENDIF /*----------------------------------------------------------------------*/ -METHOD IdeBrowseManager:isPanel( cPanel ) +METHOD HbpBrowseManager:isPanel( cPanel ) RETURN ascan( ::aPanels, {|o| o:qWidget:objectName() == cPanel } ) > 0 /*----------------------------------------------------------------------*/ -METHOD IdeBrowseManager:setPanel( cPanel ) +METHOD HbpBrowseManager:setPanel( cPanel ) LOCAL n IF ( n := ascan( ::aPanels, {|o| o:qWidget:objectName() == cPanel } ) ) > 0 @@ -532,16 +635,12 @@ METHOD IdeBrowseManager:setPanel( cPanel ) /*----------------------------------------------------------------------*/ -METHOD IdeBrowseManager:execEvent( nEvent, p, p1 ) +METHOD HbpBrowseManager:execEvent( nEvent, p, p1 ) LOCAL cTable, cPath, cPanel, qMime, qList, i, cExt, qUrl, aStruct, cTmp HB_SYMBOL_UNUSED( p ) HB_SYMBOL_UNUSED( p1 ) - IF ::lQuitting - RETURN Self - ENDIF - SWITCH nEvent CASE __dbu_dragEnterEvent__ p:acceptProposedAction() @@ -581,16 +680,18 @@ METHOD IdeBrowseManager:execEvent( nEvent, p, p1 ) EXIT CASE __buttonOpen_clicked__ - IF ::currentDriver() $ "DBFCDX,DBFNTX,DBFNSX,ADS" - IF !empty( cTable := hbide_fetchAFile( ::oIde:oDlg, "Select a Table", { { "Database File", "*.dbf" } }, ::oIde:cWrkFolderLast ) ) + IF .T. //::currentDriver() $ "DBFCDX,DBFNTX,DBFNSX,ADS" + IF !empty( cTable := hbide_fetchAFile( SetAppWindow(), "Select a Table", { { "Database File", "*.dbf" } }, ::cWrkFolderLast ) ) hb_fNameSplit( cTable, @cPath ) - ::oIde:cWrkFolderLast := cPath + ::cWrkFolderLast := cPath ::oCurPanel:addBrowser( { NIL, cTable } ) ENDIF ELSE + #if 0 IF ! empty( cTable := hbide_execScriptFunction( "tableSelect", ::currentDriver(), ::currentConxn() ) ) ::oCurPanel:addBrowser( { NIL, cTable } ) ENDIF + #endif ENDIF EXIT @@ -653,7 +754,7 @@ METHOD IdeBrowseManager:execEvent( nEvent, p, p1 ) EXIT CASE __dbStruct_closeEvent__ - ::oIde:oINI:cDbStructDialogGeometry := hbide_posAndSize( ::qStruct:oWidget ) + ::cDbStructDialogGeometry := hbide_posAndSize( ::qStruct:oWidget ) ::qStruct:close() ::lStructOpen := .f. EXIT @@ -740,11 +841,11 @@ METHOD IdeBrowseManager:execEvent( nEvent, p, p1 ) /*----------------------------------------------------------------------*/ -METHOD IdeBrowseManager:showTablesTree() +METHOD HbpBrowseManager:showTablesTree() LOCAL oUI, qTree, qParent, oPanel, qItm, aBrowser, q, aFld, qFont, nMax, nSz, oBrw LOCAL a_:={} - oUI := hbide_getUI( "tables", ::oCurPanel:qWidget ) + oUI := hbqtui_xbpTables( ::oCurPanel:qWidget ) qFont := QFont( "Courier New", 8 ) qTree := oUI:treeTables @@ -780,18 +881,18 @@ METHOD IdeBrowseManager:showTablesTree() NEXT qParent:setExpanded( .t. ) NEXT - ::oIde:setPosAndSizeByIniEx( oUI:oWidget, ::oINI:cTablesDialogGeometry ) +// ::oIde:setPosAndSizeByIniEx( oUI:oWidget, ::oINI:cTablesDialogGeometry ) oUI:buttonOk:connect( "clicked()", {|| oUI:done( 1 ) } ) oUI:exec() oUI:buttonOk:disconnect( "clicked()" ) - ::oIde:oINI:cTablesDialogGeometry := hbide_posAndSize( oUI:oWidget ) +// ::oIde:oINI:cTablesDialogGeometry := hbide_posAndSize( oUI:oWidget ) oUI:destroy() RETURN Self /*------------------------------------------------------------------------*/ -METHOD IdeBrowseManager:showStruct() +METHOD HbpBrowseManager:showStruct() IF empty( ::qStruct ) ::buildUiStruct() @@ -800,7 +901,7 @@ METHOD IdeBrowseManager:showStruct() IF ! ::lStructOpen ::lStructOpen := .t. ::populateUiStruct() - ::oIde:setPosAndSizeByIniEx( ::qStruct:oWidget, ::oINI:cDbStructDialogGeometry ) +// ::oIde:setPosAndSizeByIniEx( ::qStruct:oWidget, ::oINI:cDbStructDialogGeometry ) ::qStruct:show() ENDIF @@ -808,20 +909,7 @@ METHOD IdeBrowseManager:showStruct() /*----------------------------------------------------------------------*/ -FUNCTION hbide_fldType2Desc( cType ) - - SWITCH cType - CASE "C" ; RETURN "Character" - CASE "N" ; RETURN "Numeric" - CASE "D" ; RETURN "Date" - CASE "L" ; RETURN "Logical" - ENDSWITCH - - RETURN "" - -/*----------------------------------------------------------------------*/ - -METHOD IdeBrowseManager:populateFieldData() +METHOD HbpBrowseManager:populateFieldData() LOCAL nRow, qItm IF ( nRow := ::qStruct:tableFields:currentRow() ) >= 0 @@ -839,7 +927,7 @@ METHOD IdeBrowseManager:populateFieldData() /*----------------------------------------------------------------------*/ -METHOD IdeBrowseManager:populateUiStruct() +METHOD HbpBrowseManager:populateUiStruct() LOCAL qItm, fld_, n LOCAL oTbl := ::qStruct:tableFields LOCAL aStruct := ::oCurBrw:dbStruct() @@ -885,11 +973,11 @@ METHOD IdeBrowseManager:populateUiStruct() /*----------------------------------------------------------------------*/ -METHOD IdeBrowseManager:buildUiStruct() +METHOD HbpBrowseManager:buildUiStruct() LOCAL oTbl, n, qItm LOCAL hdr_:= { { "", 50 }, { "Field Name",200 }, { "Type", 100 }, { "Len", 50 }, { "Dec", 70 } } - ::qStruct := hbide_getUI( "dbstruct", ::qDbu ) + ::qStruct := hbqtui_xbpDbStruct( ::qDbu ) ::qStruct:setWindowFlags( Qt_Dialog ) ::qStruct:setMaximumHeight( ::qStruct:height() ) @@ -927,8 +1015,8 @@ METHOD IdeBrowseManager:buildUiStruct() /*----------------------------------------------------------------------*/ -METHOD IdeBrowseManager:open( aDbfs ) - LOCAL aInfo, cTable, oRect, oRec := ::oDlg:geometry() +METHOD HbpBrowseManager:open( aDbfs ) + LOCAL aInfo, cTable LOCAL nX := 0, nY := 0 FOR EACH cTable IN aDbfs @@ -941,21 +1029,17 @@ METHOD IdeBrowseManager:open( aDbfs ) ::oCurPanel:addBrowser( aInfo ) NEXT - oRect := ::oQScintillaDock:oWidget:geometry() - oRect:setWidth( oRec:width() - iif( empty( ::oIde:aSrcOnCmdLine() ), 50, 300 ) ) - ::oQScintillaDock:oWidget:setMinimumWidth( oRect:width() ) - ::oQScintillaDock:oWidget:show() - ::oQScintillaDock:oWidget:setMinimumWidth( 300 ) RETURN Self /*----------------------------------------------------------------------*/ -METHOD IdeBrowseManager:loadTables() - LOCAL cInfo, aInfo, oCurPanel +METHOD HbpBrowseManager:loadTables() + //LOCAL cInfo, aInfo, oCurPanel + LOCAL oCurPanel oCurPanel := ::oCurPanel - +#if 0 FOR EACH cInfo IN ::oINI:aDbuPanelsInfo aInfo := hb_aTokens( cInfo, "," ) IF ::isPanel( aInfo[ 1 ] ) @@ -963,7 +1047,7 @@ METHOD IdeBrowseManager:loadTables() ::oCurPanel:addBrowser( aInfo ) ENDIF NEXT - +#endif IF HB_ISOBJECT( oCurPanel ) ::qStack:setCurrentWidget( oCurPanel ) ENDIF @@ -971,7 +1055,7 @@ METHOD IdeBrowseManager:loadTables() /*----------------------------------------------------------------------*/ -METHOD IdeBrowseManager:addArray( aData, aAttr ) +METHOD HbpBrowseManager:addArray( aData, aAttr ) HB_SYMBOL_UNUSED( aData ) HB_SYMBOL_UNUSED( aAttr ) @@ -980,7 +1064,7 @@ METHOD IdeBrowseManager:addArray( aData, aAttr ) /*----------------------------------------------------------------------*/ -METHOD IdeBrowseManager:buildToolbar() +METHOD HbpBrowseManager:buildToolbar() LOCAL nW := 25 LOCAL qTBar @@ -989,115 +1073,114 @@ METHOD IdeBrowseManager:buildToolbar() ::sp2 := QLabel(); ::sp2:setMinimumWidth( nW ) ::sp3 := QLabel(); ::sp3:setMinimumWidth( nW ) - qTBar := HbqToolbar():new() - qTBar:orientation := Qt_Horizontal - qTBar:size := QSize( 16,16 ) + qTBar := XbpToolbar():new() + qTBar:imageWidth := 16 + qTBar:imageHeight := 16 qTBar:create() + qTBar:buttonClick := {|oButton| iif( HB_ISBLOCK( oButton:key ), Eval( oButton:key ), NIL ) } + ::qToolbar := qTBar ::buildPanelsButton() - qTBar:addWidget( , ::sp0 ) + qTBar:addItem( ::sp0 ) ::buildRddsCombo() ::buildConxnCombo() - qTBar:addToolButton( "Open" , "Open a table" , app_image( "open3" ), {|| ::execEvent( __buttonOpen_clicked__ ) }, .f. ) - qTBar:addWidget( , ::sp1 ) - qTBar:addToolButton( "Toggle" , "Show/hide form view", app_image( "formview" ), {|| ::execEvent( __buttonShowForm_clicked__ ) }, .t. ) - qTBar:addSeparator() - qTBar:addToolButton( "Structure", "Table Structure" , app_image( "dbstruct" ), {|| ::execEvent( __buttonDbStruct_clicked__ ) }, .f. ) - qTBar:addSeparator() + qTBar:addItem( { "Open" , "Open a Table" , QIcon( xbp_image( "open3" ) ), {|| ::execEvent( __buttonOpen_clicked__ ) }, .F. } ) + qTBar:addItem( ::sp1 ) + qTBar:addItem( { "Toggle" , "Show/Hide Form View", QIcon( xbp_image( "form" ) ), {|| ::execEvent( __buttonShowForm_clicked__ ) }, .T. } ) + qTBar:addItem( , , , , , XBPTOOLBAR_BUTTON_SEPARATOR ) + qTBar:addItem( { "Structure", "Table Structure" , QIcon( xbp_image( "dbstruct" ) ), {|| ::execEvent( __buttonDbStruct_clicked__ ) }, .F. } ) + qTBar:addItem( , , , , , XBPTOOLBAR_BUTTON_SEPARATOR ) ::buildIndexButton() - qTBar:addToolButton( "Search" , "Search in table" , app_image( "find" ), {|| ::execEvent( __buttonFind_clicked__ ) }, .f. ) - qTBar:addToolButton( "Goto" , "Goto record" , app_image( "gotoline3" ), {|| ::execEvent( __buttonGoto_clicked__ ) }, .f. ) - qTBar:addSeparator() - qTBar:addToolButton( "Close" , "Close current table", app_image( "dc_delete" ), {|| ::execEvent( __buttonClose_clicked__ ) }, .f. ) - qTBar:addWidget( , ::sp2 ) + qTBar:addItem( { "Search" , "Search in Table" , QIcon( xbp_image( "find" ) ), {|| ::execEvent( __buttonFind_clicked__ ) }, .F. } ) + qTBar:addItem( { "Goto" , "Goto Record" , QIcon( xbp_image( "gotoline3" ) ), {|| ::execEvent( __buttonGoto_clicked__ ) }, .F. } ) + qTBar:addItem( , , , , , XBPTOOLBAR_BUTTON_SEPARATOR ) + qTBar:addItem( { "Close" , "Close Current Table", QIcon( xbp_image( "dc_delete" ) ), {|| ::execEvent( __buttonClose_clicked__ ) }, .F. } ) + qTBar:addItem( ::sp2 ) ::buildTablesButton() RETURN Self /*----------------------------------------------------------------------*/ -METHOD IdeBrowseManager:buildLeftToolbar() +METHOD HbpBrowseManager:buildLeftToolbar() LOCAL qTBar - qTBar := HBQToolbar():new() - qTBar:size := QSize( 16,16 ) + qTBar := XbpToolbar():new() qTBar:orientation := Qt_Vertical + qTBar:imageWidth := 16 + qTBar:imageHeight := 16 qTBar:create() + qTBar:buttonClick := {|oButton| iif( HB_ISBLOCK( oButton:key ), Eval( oButton:key ), NIL ) } ::qToolbarL := qTBar - qTBar:setMaximumWidth( 24 ) - qTBar:setStyleSheet( GetStyleSheet( "QToolBar", ::nAnimantionMode ) ) - - qTBar:addToolButton( "view_tabbed" , "Toggle tabbed view" , app_image( "view_tabbed" ), {|| ::execEvent( __buttonViewTabbed_clicked__ ) }, .f. ) - qTBar:addSeparator() - qTBar:addToolButton( "view_organized" , "View as arranged" , app_image( "view_organized" ), {|| ::execEvent( __buttonViewOrganized_clicked__ ) }, .f. ) - qTBar:addToolButton( "save3" , "Save layout" , app_image( "save3" ), {|| ::execEvent( __buttonSaveLayout_clicked__ ) }, .f. ) - qTBar:addSeparator() - qTBar:addToolButton( "view_cascaded" , "View as cascaded" , app_image( "view_cascaded" ), {|| ::execEvent( __buttonViewCascaded_clicked__ ) }, .f. ) - qTBar:addToolButton( "view_tiled" , "View as tiled" , app_image( "view_tiled" ), {|| ::execEvent( __buttonViewTiled_clicked__ ) }, .f. ) - qTBar:addToolButton( "fullscreen" , "View Maximized" , app_image( "fullscreen" ), {|| ::execEvent( __buttonViewMaximized_clicked__ ) }, .f. ) - qTBar:addToolButton( "view_vertstacked", "View Vertically Tiled" , app_image( "view_vertstacked" ), {|| ::execEvent( __buttonViewStackedVert_clicked__ ) }, .f. ) - qTBar:addToolButton( "view_horzstacked", "View Horizontally Tiled" , app_image( "view_horzstacked" ), {|| ::execEvent( __buttonViewStackedHorz_clicked__ ) }, .f. ) - qTBar:addToolButton( "view_zoomin" , "View Zoom In" , app_image( "view_zoomin" ), {|| ::execEvent( __buttonViewZoomedIn_clicked__ ) }, .f. ) - qTBar:addToolButton( "view_zoomout" , "View Zoom Out" , app_image( "view_zoomout" ), {|| ::execEvent( __buttonViewZoomedOut_clicked__ ) }, .f. ) - qTBar:addSeparator() - - qTBar:addToolButton( "database_add" , "Append a record" , app_image( "database_add" ), {|| ::execEvent( __buttonAppendRecord_clicked__ ) }, .f. ) - qTBar:addToolButton( "database_remove" , "Delete a record" , app_image( "database_remove" ), {|| ::execEvent( __buttonDelRecord_clicked__ ) }, .f. ) - qTBar:addToolButton( "database_lock" , "Lock/Unlock Record" , app_image( "database_lock" ), {|| ::execEvent( __buttonLockRecord_clicked__ ) }, .f. ) - qTBar:addSeparator() - qTBar:addToolButton( "database_up" , "Goto Top" , app_image( "database_up" ), {|| ::execEvent( __buttonGoTop_clicked__ ) }, .f. ) - qTBar:addToolButton( "database_down" , "Goto Bottom" , app_image( "database_down" ), {|| ::execEvent( __buttonGoBottom_clicked__ ) }, .f. ) - qTBar:addToolButton( "database_previous", "Scroll to First Column" , app_image( "database_previous" ), {|| ::execEvent( __buttonScrollToFirst_clicked__ ) }, .f. ) - qTBar:addToolButton( "database_next" , "Scroll to Last Column" , app_image( "database_next" ), {|| ::execEvent( __buttonScrollToLast_clicked__ ) }, .f. ) - qTBar:addSeparator() - qTBar:addToolButton( "database_search" , "Search in Table" , app_image( "database_search" ), {|| ::execEvent( __buttonSearchInTable_clicked__ ) }, .f. ) - qTBar:addSeparator() - qTBar:addToolButton( "database_process" , "Zap Table" , app_image( "database_process" ), {|| ::execEvent( __buttonZaptable_clicked__ ) }, .f. ) + qTBar:addItem( { "view_tabbed" , "Toggle Tabbed View" , QIcon( xbp_image( "view_tabbed" ) ), {|| ::execEvent( __buttonViewTabbed_clicked__ ) }, .f. } ) + qTBar:addItem( , , , , , XBPTOOLBAR_BUTTON_SEPARATOR ) + qTBar:addItem( { "view_organized" , "View as Arranged" , QIcon( xbp_image( "view_organized" ) ), {|| ::execEvent( __buttonViewOrganized_clicked__ ) }, .f. } ) + qTBar:addItem( { "save3" , "Save Layout" , QIcon( xbp_image( "save3" ) ), {|| ::execEvent( __buttonSaveLayout_clicked__ ) }, .f. } ) + qTBar:addItem( , , , , , XBPTOOLBAR_BUTTON_SEPARATOR ) + qTBar:addItem( { "view_cascaded" , "View as Cascaded" , QIcon( xbp_image( "view_cascaded" ) ), {|| ::execEvent( __buttonViewCascaded_clicked__ ) }, .f. } ) + qTBar:addItem( { "view_tiled" , "View as Tiled" , QIcon( xbp_image( "view_tiled" ) ), {|| ::execEvent( __buttonViewTiled_clicked__ ) }, .f. } ) + qTBar:addItem( { "fullscreen" , "View Maximized" , QIcon( xbp_image( "fullscreen" ) ), {|| ::execEvent( __buttonViewMaximized_clicked__ ) }, .f. } ) + qTBar:addItem( { "view_vertstacked" , "View Vertically Tiled" , QIcon( xbp_image( "view_vertstacked" ) ), {|| ::execEvent( __buttonViewStackedVert_clicked__ ) }, .f. } ) + qTBar:addItem( { "view_horzstacked" , "View Horizontally Tiled" , QIcon( xbp_image( "view_horzstacked" ) ), {|| ::execEvent( __buttonViewStackedHorz_clicked__ ) }, .f. } ) + qTBar:addItem( { "view_zoomin" , "View Zoom In" , QIcon( xbp_image( "view_zoomin" ) ), {|| ::execEvent( __buttonViewZoomedIn_clicked__ ) }, .f. } ) + qTBar:addItem( { "view_zoomout" , "View Zoom Out" , QIcon( xbp_image( "view_zoomout" ) ), {|| ::execEvent( __buttonViewZoomedOut_clicked__ ) }, .f. } ) + qTBar:addItem( , , , , , XBPTOOLBAR_BUTTON_SEPARATOR ) + qTBar:addItem( { "database_add" , "Append Record" , QIcon( xbp_image( "database_add" ) ), {|| ::execEvent( __buttonAppendRecord_clicked__ ) }, .f. } ) + qTBar:addItem( { "database_remove" , "Delete Record" , QIcon( xbp_image( "database_remove" ) ), {|| ::execEvent( __buttonDelRecord_clicked__ ) }, .f. } ) + qTBar:addItem( { "database_lock" , "Lock/Unlock Record" , QIcon( xbp_image( "database_lock" ) ), {|| ::execEvent( __buttonLockRecord_clicked__ ) }, .f. } ) + qTBar:addItem( , , , , , XBPTOOLBAR_BUTTON_SEPARATOR ) + qTBar:addItem( { "database_up" , "Goto Top" , QIcon( xbp_image( "database_up" ) ), {|| ::execEvent( __buttonGoTop_clicked__ ) }, .f. } ) + qTBar:addItem( { "database_down" , "Goto Bottom" , QIcon( xbp_image( "database_down" ) ), {|| ::execEvent( __buttonGoBottom_clicked__ ) }, .f. } ) + qTBar:addItem( { "database_previous", "Scroll to First Column" , QIcon( xbp_image( "database_previous" ) ), {|| ::execEvent( __buttonScrollToFirst_clicked__ ) }, .f. } ) + qTBar:addItem( { "database_next" , "Scroll to Last Column" , QIcon( xbp_image( "database_next" ) ), {|| ::execEvent( __buttonScrollToLast_clicked__ ) }, .f. } ) + qTBar:addItem( , , , , , XBPTOOLBAR_BUTTON_SEPARATOR ) + qTBar:addItem( { "database_search" , "Search in Table" , QIcon( xbp_image( "database_search" ) ), {|| ::execEvent( __buttonSearchInTable_clicked__ ) }, .f. } ) + qTBar:addItem( , , , , , XBPTOOLBAR_BUTTON_SEPARATOR ) + qTBar:addItem( { "database_process" , "Zap Table" , QIcon( xbp_image( "database_process" ) ), {|| ::execEvent( __buttonZaptable_clicked__ ) }, .f. } ) RETURN NIL /*------------------------------------------------------------------------*/ -METHOD IdeBrowseManager:buildPanelsButton() +METHOD HbpBrowseManager:buildPanelsButton() ::qPanelsMenu := QMenu() - ::qPanelsMenu:setStyleSheet( GetStyleSheet( "QMenuPop", ::nAnimantionMode ) ) ::qPanelsButton := QToolButton() - ::qPanelsButton:setTooltip( "ideDBU Panels" ) - ::qPanelsButton:setIcon( QIcon( hbide_image( "panel_8" ) ) ) + ::qPanelsButton:setTooltip( "HbpDBU Panels" ) + ::qPanelsButton:setIcon( QIcon( xbp_image( "panel_8" ) ) ) ::qPanelsButton:setPopupMode( QToolButton_MenuButtonPopup ) ::qPanelsButton:setMenu( ::qPanelsMenu ) ::qPanelsButton:connect( "clicked()", {|| ::execEvent( __qPanelsButton_clicked__ ) } ) - ::qToolbar:addWidget( , ::qPanelsButton ) + ::qToolbar:addItem( ::qPanelsButton ) RETURN Self /*----------------------------------------------------------------------*/ -METHOD IdeBrowseManager:buildConxnCombo() +METHOD HbpBrowseManager:buildConxnCombo() ::qConxnCombo := QComboBox() ::qConxnCombo:setToolTip( "Connection to open next table" ) - ::qToolBar:addWidget( , ::qConxnCombo ) + ::qToolBar:addItem( ::qConxnCombo ) RETURN Self /*----------------------------------------------------------------------*/ -METHOD IdeBrowseManager:buildRddsCombo() - LOCAL aRdds, cRdd - +METHOD HbpBrowseManager:buildRddsCombo() + LOCAL cRdd + #if 0 IF !empty( aRdds := hbide_execScriptFunction( "rdds" ) ) aeval( aRdds, {|e| aadd( ::aRdds, e ) } ) ENDIF - + #endif ::qRddCombo := QComboBox() ::qRddCombo:setToolTip( "Rdd to open next table" ) FOR EACH cRdd IN ::aRdds @@ -1105,61 +1188,59 @@ METHOD IdeBrowseManager:buildRddsCombo() ::qRddCombo:addItem( cRdd ) NEXT ::qRddCombo:connect( "currentIndexChanged(QString)", {|p| ::loadConxnCombo( p ) } ) - ::qToolBar:addWidget( , ::qRddCombo ) + ::qToolBar:addItem( ::qRddCombo ) RETURN Self /*----------------------------------------------------------------------*/ -METHOD IdeBrowseManager:buildTablesButton() +METHOD HbpBrowseManager:buildTablesButton() ::qTablesMenu := QMenu() - ::qTablesMenu:setStyleSheet( GetStyleSheet( "QMenuPop", ::nAnimantionMode ) ) ::qTablesButton := QToolButton() ::qTablesButton:setTooltip( "Tables" ) - ::qTablesButton:setIcon( QIcon( hbide_image( "database" ) ) ) + ::qTablesButton:setIcon( QIcon( xbp_image( "table" ) ) ) ::qTablesButton:setPopupMode( QToolButton_MenuButtonPopup ) ::qTablesButton:setMenu( ::qTablesMenu ) ::qTablesButton:connect( "clicked()", {|| ::execEvent( __buttonTables_clicked__ ) } ) - ::qToolbar:addWidget( , ::qTablesButton ) + ::qToolbar:addItem( ::qTablesButton ) RETURN Self /*----------------------------------------------------------------------*/ -METHOD IdeBrowseManager:buildIndexButton() +METHOD HbpBrowseManager:buildIndexButton() ::qIndexMenu := QMenu() - ::qIndexMenu:setStyleSheet( GetStyleSheet( "QMenuPop", ::nAnimantionMode ) ) ::qIndexButton := QToolButton() ::qIndexButton:setTooltip( "Indexes" ) - ::qIndexButton:setIcon( QIcon( hbide_image( "sort" ) ) ) + ::qIndexButton:setIcon( QIcon( xbp_image( "sort" ) ) ) ::qIndexButton:setPopupMode( QToolButton_MenuButtonPopup ) ::qIndexButton:setMenu( ::qIndexMenu ) ::qIndexButton:connect( "clicked()", {|| ::execEvent( __buttonIndex_clicked__ ) } ) - ::qToolbar:addWidget( , ::qIndexButton ) + ::qToolbar:addItem( ::qIndexButton ) RETURN Self /*----------------------------------------------------------------------*/ -METHOD IdeBrowseManager:loadConxnCombo( cDriver ) - LOCAL aConxns, cConxn, a_ +METHOD HbpBrowseManager:loadConxnCombo( cDriver ) + LOCAL cConxn, a_ DEFAULT cDriver TO ::currentDriver() ::aConxns := {} - + #if 0 IF !empty( aConxns := hbide_execScriptFunction( "connections", cDriver ) ) aeval( aConxns, {|e| aadd( ::aConxns, e ) } ) ENDIF - + #endif ::qConxnCombo:clear() FOR EACH cConxn IN ::aConxns a_:= hb_aTokens( cConxn, ";" ) @@ -1175,7 +1256,7 @@ STATIC FUNCTION hbide_getMenuBlock( oPanel, oBrw, cIndex ) /*----------------------------------------------------------------------*/ -METHOD IdeBrowseManager:updateIndexMenu( oBrw ) +METHOD HbpBrowseManager:updateIndexMenu( oBrw ) LOCAL qAct, aIndex, cIndex FOR EACH qAct IN ::aIndexAct @@ -1197,11 +1278,11 @@ METHOD IdeBrowseManager:updateIndexMenu( oBrw ) /*----------------------------------------------------------------------*/ // -// Class IdeBrowsePanel +// Class HbpBrowsePanel // /*----------------------------------------------------------------------*/ -CLASS IdeBrowsePanel INHERIT IdeObject +CLASS HbpBrowsePanel DATA oManager @@ -1216,7 +1297,7 @@ CLASS IdeBrowsePanel INHERIT IdeObject DATA aBrowsers INIT {} ACCESS subWindows() INLINE ::aBrowsers - METHOD new( oIde, cPanel, oManager ) + METHOD new( cPanel, oManager ) METHOD destroy() METHOD destroyBrw( oBrw ) METHOD execEvent( nEvent, p ) @@ -1240,9 +1321,8 @@ CLASS IdeBrowsePanel INHERIT IdeObject /*----------------------------------------------------------------------*/ -METHOD IdeBrowsePanel:new( oIde, cPanel, oManager ) +METHOD HbpBrowsePanel:new( cPanel, oManager ) - ::oIde := oIde ::cPanel := cPanel ::oManager := oManager @@ -1262,7 +1342,7 @@ METHOD IdeBrowsePanel:new( oIde, cPanel, oManager ) /*----------------------------------------------------------------------*/ -METHOD IdeBrowsePanel:destroy() +METHOD HbpBrowsePanel:destroy() LOCAL aBrw, oSub ::qWidget:disconnect( "subWindowActivated(QMdiSubWindow*)" ) @@ -1284,7 +1364,7 @@ METHOD IdeBrowsePanel:destroy() /*----------------------------------------------------------------------*/ -METHOD IdeBrowsePanel:onError( ... ) +METHOD HbpBrowsePanel:onError( ... ) LOCAL cMsg cMsg := __GetMessage() @@ -1296,7 +1376,7 @@ METHOD IdeBrowsePanel:onError( ... ) /*------------------------------------------------------------------------*/ -METHOD IdeBrowsePanel:setViewStyle( nStyle ) +METHOD HbpBrowsePanel:setViewStyle( nStyle ) LOCAL qObj, a_ LOCAL nOldStyle := ::nViewStyle @@ -1347,7 +1427,7 @@ METHOD IdeBrowsePanel:setViewStyle( nStyle ) /*----------------------------------------------------------------------*/ -METHOD IdeBrowsePanel:tileVertically() +METHOD HbpBrowsePanel:tileVertically() LOCAL qObj, qVPort, nH, nT, nW, a_ qObj := ::activeSubWindow() @@ -1364,7 +1444,7 @@ METHOD IdeBrowsePanel:tileVertically() /*----------------------------------------------------------------------*/ -METHOD IdeBrowsePanel:tileHorizontally() +METHOD HbpBrowsePanel:tileHorizontally() LOCAL qObj, qVPort, nH, nT, nW, nL, a_ qObj := ::activeSubWindow() @@ -1382,7 +1462,7 @@ METHOD IdeBrowsePanel:tileHorizontally() /*----------------------------------------------------------------------*/ -METHOD IdeBrowsePanel:tilesZoom( nMode ) +METHOD HbpBrowsePanel:tilesZoom( nMode ) LOCAL qMdi, nT, nL, nH, nW, qRect, a_ IF ::nViewStyle == HBPMDI_STYLE_TILEDVERT .OR. ::nViewStyle == HBPMDI_STYLE_TILEDHORZ @@ -1412,7 +1492,7 @@ METHOD IdeBrowsePanel:tilesZoom( nMode ) /*----------------------------------------------------------------------*/ -METHOD IdeBrowsePanel:saveGeometry() +METHOD HbpBrowsePanel:saveGeometry() LOCAL a_ IF ::nViewStyle == HBPMDI_STYLE_ORGANIZED FOR EACH a_ IN ::aBrowsers @@ -1423,7 +1503,7 @@ METHOD IdeBrowsePanel:saveGeometry() /*------------------------------------------------------------------------*/ -METHOD IdeBrowsePanel:restGeometry() +METHOD HbpBrowsePanel:restGeometry() LOCAL a_ FOR EACH a_ IN ::aBrowsers IF HB_ISOBJECT( a_[ SUB_GEOMETRY ] ) @@ -1434,7 +1514,7 @@ METHOD IdeBrowsePanel:restGeometry() /*----------------------------------------------------------------------*/ -METHOD IdeBrowsePanel:destroyBrw( oBrw ) +METHOD HbpBrowsePanel:destroyBrw( oBrw ) LOCAL n, oSub IF ( n := ascan( ::aBrowsers, {|e_| e_[ SUB_BROWSER ] == oBrw } ) ) > 0 @@ -1454,7 +1534,7 @@ METHOD IdeBrowsePanel:destroyBrw( oBrw ) /*------------------------------------------------------------------------*/ -METHOD IdeBrowsePanel:execEvent( nEvent, p ) +METHOD HbpBrowsePanel:execEvent( nEvent, p ) LOCAL n, oBrw SWITCH nEvent @@ -1477,7 +1557,7 @@ METHOD IdeBrowsePanel:execEvent( nEvent, p ) /*------------------------------------------------------------------------*/ -METHOD IdeBrowsePanel:setIndex( oBrw, cIndex ) +METHOD HbpBrowsePanel:setIndex( oBrw, cIndex ) IF ascan( ::aBrowsers, {|e_| e_[ SUB_BROWSER ] == oBrw } ) > 0 RETURN oBrw:setIndex( cIndex ) ENDIF @@ -1485,7 +1565,7 @@ METHOD IdeBrowsePanel:setIndex( oBrw, cIndex ) /*----------------------------------------------------------------------*/ -METHOD IdeBrowsePanel:getIndexInfo( oBrw ) +METHOD HbpBrowsePanel:getIndexInfo( oBrw ) IF ascan( ::aBrowsers, {|e_| e_[ SUB_BROWSER ] == oBrw } ) > 0 RETURN oBrw:getIndexInfo() ENDIF @@ -1493,7 +1573,7 @@ METHOD IdeBrowsePanel:getIndexInfo( oBrw ) /*----------------------------------------------------------------------*/ -METHOD IdeBrowsePanel:setCurrentBrowser( oBrw ) +METHOD HbpBrowsePanel:setCurrentBrowser( oBrw ) IF ascan( ::aBrowsers, {|e_| e_[ SUB_BROWSER ] == oBrw } ) > 0 ::oManager:oCurBrw := oBrw ENDIF @@ -1501,7 +1581,7 @@ METHOD IdeBrowsePanel:setCurrentBrowser( oBrw ) /*------------------------------------------------------------------------*/ -METHOD IdeBrowsePanel:prepare() +METHOD HbpBrowsePanel:prepare() LOCAL aSub FOR EACH aSub IN ::aBrowsers aSub[ SUB_BROWSER ]:configure() @@ -1510,9 +1590,9 @@ METHOD IdeBrowsePanel:prepare() /*------------------------------------------------------------------------*/ -METHOD IdeBrowsePanel:addBrowser( aInfo ) +METHOD HbpBrowsePanel:addBrowser( aInfo ) LOCAL oBrw - oBrw := IdeBrowse():new( ::oIde, ::oManager, Self, aInfo ):create() + oBrw := HbpBrowse():new( ::oManager, Self, aInfo ):create() IF empty( oBrw:oBrw ) RETURN Self ENDIF @@ -1522,7 +1602,7 @@ METHOD IdeBrowsePanel:addBrowser( aInfo ) /*------------------------------------------------------------------------*/ -METHOD IdeBrowsePanel:activateBrowser() +METHOD HbpBrowsePanel:activateBrowser() IF Len( ::aBrowsers ) > 0 ::qWidget:setActiveSubWindow( ::aBrowsers[ 1, SUB_WINDOW ] ) ENDIF @@ -1530,11 +1610,11 @@ METHOD IdeBrowsePanel:activateBrowser() /*----------------------------------------------------------------------*/ // -// Class IdeBrowse +// Class HbpBrowse // /*----------------------------------------------------------------------*/ -CLASS IdeBrowse INHERIT IdeObject +CLASS HbpBrowse DATA oWnd DATA oBrw @@ -1543,7 +1623,6 @@ CLASS IdeBrowse INHERIT IdeObject DATA qFLayout DATA qSplitter DATA qTimer - DATA qStatus DATA qScrollArea DATA nID INIT 0 @@ -1586,8 +1665,8 @@ CLASS IdeBrowse INHERIT IdeObject CLASSDATA nIdentity INIT 0 - METHOD new( oIde, oManager, oPanel, aInfo ) - METHOD create( oIde, oManager, oPanel, aInfo ) + METHOD new( oManager, oPanel, aInfo ) + METHOD create( oManager, oPanel, aInfo ) METHOD configure() METHOD destroy() METHOD execEvent( nEvent, p, p1 ) @@ -1643,9 +1722,8 @@ CLASS IdeBrowse INHERIT IdeObject /*----------------------------------------------------------------------*/ -METHOD IdeBrowse:new( oIde, oManager, oPanel, aInfo ) +METHOD HbpBrowse:new( oManager, oPanel, aInfo ) - ::oIde := oIde ::oManager := oManager ::oPanel := oPanel ::aInfo := aInfo @@ -1654,7 +1732,7 @@ METHOD IdeBrowse:new( oIde, oManager, oPanel, aInfo ) /*----------------------------------------------------------------------*/ -METHOD IdeBrowse:destroy() +METHOD HbpBrowse:destroy() IF ::lOpened ( ::cAlias )->( dbCloseArea() ) @@ -1670,15 +1748,14 @@ METHOD IdeBrowse:destroy() /*----------------------------------------------------------------------*/ -METHOD IdeBrowse:create( oIde, oManager, oPanel, aInfo ) +METHOD HbpBrowse:create( oManager, oPanel, aInfo ) LOCAL xVrb, cT, cName, n LOCAL lMissing := .t. - DEFAULT oIde TO ::oIde DEFAULT oManager TO ::oManager DEFAULT oPanel TO ::oPanel DEFAULT aInfo TO ::aInfo - ::oIde := oIde + ::oManager := oManager ::oPanel := oPanel ::aInfo := aInfo @@ -1777,7 +1854,7 @@ METHOD IdeBrowse:create( oIde, oManager, oPanel, aInfo ) /*----------------------------------------------------------------------*/ -METHOD IdeBrowse:buildBrowser() +METHOD HbpBrowse:buildBrowser() LOCAL qLayout, oWnd, oXbpBrowse oWnd := XbpWindow():new() @@ -1838,23 +1915,11 @@ METHOD IdeBrowse:buildBrowser() ::oWnd := oWnd ::oBrw := oXbpBrowse -#if 0 - ::qVerSpl := QSplitter( Qt_Vertical ) - ::qSplitter:addWidget( ::qVerSpl ) - - ::qVerSpl:addWidget( ::qForm ) - - ::qClose := QToolButton() - ::qClose:setIcon( QIcon( hbide_image( "closetab" ) ) ) - ::qClose:hide() - - ::qVerSpl:addWidget( ::qClose ) -#endif RETURN Self /*----------------------------------------------------------------------*/ -METHOD IdeBrowse:buildColumns() +METHOD HbpBrowse:buildColumns() LOCAL oXbpColumn, aPresParam, a_ IF ::nType == BRW_TYPE_DBF @@ -1883,7 +1948,7 @@ METHOD IdeBrowse:buildColumns() /*----------------------------------------------------------------------*/ -METHOD IdeBrowse:buildForm() +METHOD HbpBrowse:buildForm() LOCAL a_, qLbl, qEdit IF ::nType == BRW_TYPE_DBF @@ -1899,7 +1964,7 @@ METHOD IdeBrowse:buildForm() /*----------------------------------------------------------------------*/ -METHOD IdeBrowse:buildMdiWindow() +METHOD HbpBrowse:buildMdiWindow() LOCAL qRect, cR STATIC nID := 0 @@ -1916,7 +1981,7 @@ METHOD IdeBrowse:buildMdiWindow() ::qMdi:setWindowTitle( ::cTable ) ::qMdi:setObjectName( hb_ntos( nID ) ) - ::qMdi:setWindowIcon( QIcon( hbide_image( "dbf_p" + hb_ntos( ::nID ) ) ) ) + ::qMdi:setWindowIcon( QIcon( xbp_image( "dbf_p" + hb_ntos( ::nID ) ) ) ) IF ! empty( ::aInfo[ TBL_GEOMETRY ] ) qRect := hb_aTokens( ::aInfo[ TBL_GEOMETRY ], " " ) @@ -1941,7 +2006,7 @@ METHOD IdeBrowse:buildMdiWindow() /*------------------------------------------------------------------------*/ -METHOD IdeBrowse:configure() +METHOD HbpBrowse:configure() LOCAL nOff LOCAL nRowPos := ::oBrw:rowPos() LOCAL nColPos := ::oBrw:colPos() @@ -1967,7 +2032,7 @@ METHOD IdeBrowse:configure() /*------------------------------------------------------------------------*/ -METHOD IdeBrowse:execEvent( nEvent, p, p1 ) +METHOD HbpBrowse:execEvent( nEvent, p, p1 ) HB_SYMBOL_UNUSED( p ) HB_SYMBOL_UNUSED( p1 ) @@ -2033,7 +2098,7 @@ METHOD IdeBrowse:execEvent( nEvent, p, p1 ) /*----------------------------------------------------------------------*/ -METHOD IdeBrowse:buildContextMenu() +METHOD HbpBrowse:buildContextMenu() LOCAL a_, cPmt, nZeros, cIndex ::qMdi:setFocus( 0 ) @@ -2101,7 +2166,7 @@ STATIC FUNCTION hbide_indexArray( obj, cIndex, nOrder ) /*----------------------------------------------------------------------*/ -METHOD IdeBrowse:dispInfo() +METHOD HbpBrowse:dispInfo() LOCAL cTitle IF !empty( ::qMdi ) @@ -2122,7 +2187,7 @@ METHOD IdeBrowse:dispInfo() /*----------------------------------------------------------------------*/ -METHOD IdeBrowse:fetchAlias( cTable ) +METHOD HbpBrowse:fetchAlias( cTable ) LOCAL cFile STATIC n := 0 @@ -2148,7 +2213,7 @@ STATIC FUNCTION hbide_xtosForForm( xVrb ) /*----------------------------------------------------------------------*/ -METHOD IdeBrowse:populateForm() +METHOD HbpBrowse:populateForm() LOCAL a_, oCol IF ::nType == BRW_TYPE_DBF @@ -2165,7 +2230,7 @@ METHOD IdeBrowse:populateForm() /*----------------------------------------------------------------------*/ -METHOD IdeBrowse:saveField( nField, x ) +METHOD HbpBrowse:saveField( nField, x ) IF ( ::cAlias )->( DbrLock() ) ( ::cAlias )->( FieldPut( nField, x ) ) ( ::cAlias )->( DbCommit() ) @@ -2178,7 +2243,7 @@ METHOD IdeBrowse:saveField( nField, x ) /*----------------------------------------------------------------------*/ -METHOD IdeBrowse:dataLink( nField ) +METHOD HbpBrowse:dataLink( nField ) LOCAL bBlock IF ::nType == BRW_TYPE_DBF @@ -2191,7 +2256,7 @@ METHOD IdeBrowse:dataLink( nField ) /*----------------------------------------------------------------------*/ -METHOD IdeBrowse:getPP( aStruct ) +METHOD HbpBrowse:getPP( aStruct ) LOCAL aPresParam := {} aadd( aPresParam, { XBP_PP_COL_HA_CAPTION , aStruct[ 1 ] } ) @@ -2201,7 +2266,7 @@ METHOD IdeBrowse:getPP( aStruct ) /*----------------------------------------------------------------------*/ -METHOD IdeBrowse:skipBlock( nHowMany ) +METHOD HbpBrowse:skipBlock( nHowMany ) LOCAL nRecs, nCurPos LOCAL nSkipped := 0 @@ -2249,7 +2314,7 @@ METHOD IdeBrowse:skipBlock( nHowMany ) /*----------------------------------------------------------------------*/ -METHOD IdeBrowse:next() +METHOD HbpBrowse:next() LOCAL nSaveRecNum := ( ::cAlias )->( recno() ) LOCAL lMoved := .T. @@ -2267,7 +2332,7 @@ METHOD IdeBrowse:next() /*----------------------------------------------------------------------*/ -METHOD IdeBrowse:previous() +METHOD HbpBrowse:previous() LOCAL nSaveRecNum := ( ::cAlias )->( recno() ) LOCAL lMoved := .T. @@ -2282,7 +2347,7 @@ METHOD IdeBrowse:previous() /*----------------------------------------------------------------------*/ -METHOD IdeBrowse:getSome( cType, cFor ) +METHOD HbpBrowse:getSome( cType, cFor ) LOCAL nOrd := ::indexOrd() LOCAL qWidget := QApplication():focusWidget() // ::oWnd:oWidget @@ -2301,7 +2366,7 @@ METHOD IdeBrowse:getSome( cType, cFor ) /*------------------------------------------------------------------------*/ -METHOD IdeBrowse:seekAsk( nMode ) +METHOD HbpBrowse:seekAsk( nMode ) IF ::indexOrd() == 0 RETURN Self @@ -2313,7 +2378,7 @@ METHOD IdeBrowse:seekAsk( nMode ) /*------------------------------------------------------------------------*/ -METHOD IdeBrowse:searchAsk( nMode ) +METHOD HbpBrowse:searchAsk( nMode ) LOCAL xValue, cFor DEFAULT nMode TO 0 @@ -2332,7 +2397,7 @@ METHOD IdeBrowse:searchAsk( nMode ) /*----------------------------------------------------------------------*/ -METHOD IdeBrowse:search( cSearch, lSoft, lLast, nMode ) +METHOD HbpBrowse:search( cSearch, lSoft, lLast, nMode ) LOCAL nRec DEFAULT nMode TO 0 @@ -2375,7 +2440,7 @@ METHOD IdeBrowse:search( cSearch, lSoft, lLast, nMode ) /*----------------------------------------------------------------------*/ -METHOD IdeBrowse:refreshAll() +METHOD HbpBrowse:refreshAll() LOCAL qRect ::oBrw:refreshAll() @@ -2393,7 +2458,7 @@ METHOD IdeBrowse:refreshAll() /*----------------------------------------------------------------------*/ -METHOD IdeBrowse:toColumn( ncIndex ) +METHOD HbpBrowse:toColumn( ncIndex ) LOCAL nIndex IF valtype( ncIndex ) == "C" @@ -2416,7 +2481,7 @@ METHOD IdeBrowse:toColumn( ncIndex ) /*----------------------------------------------------------------------*/ -METHOD IdeBrowse:lock() +METHOD HbpBrowse:lock() IF ::nType == BRW_TYPE_DBF IF ! ( ::cAlias )->( DbrLock() ) @@ -2430,7 +2495,7 @@ METHOD IdeBrowse:lock() /*----------------------------------------------------------------------*/ -METHOD IdeBrowse:goToAsk() +METHOD HbpBrowse:goToAsk() LOCAL nRec IF ! empty( nRec := ( QInputDialog() ):getInt( ::qMdi, "Goto", "Record_# ?", ::recno(), 1, ::lastrec() ) ) @@ -2442,7 +2507,7 @@ METHOD IdeBrowse:goToAsk() /*----------------------------------------------------------------------*/ -METHOD IdeBrowse:ordKeyGoto( nRec ) +METHOD HbpBrowse:ordKeyGoto( nRec ) IF ::nType == BRW_TYPE_DBF ( ::cAlias )->( OrdKeyGoto( nRec ) ) @@ -2457,7 +2522,7 @@ METHOD IdeBrowse:ordKeyGoto( nRec ) /*----------------------------------------------------------------------*/ -METHOD IdeBrowse:goto( nRec ) +METHOD HbpBrowse:goto( nRec ) IF ::nType == BRW_TYPE_DBF ( ::cAlias )->( DbGoto( nRec ) ) @@ -2472,7 +2537,7 @@ METHOD IdeBrowse:goto( nRec ) /*----------------------------------------------------------------------*/ -METHOD IdeBrowse:goTop() +METHOD HbpBrowse:goTop() IF ::nType == BRW_TYPE_DBF ( ::cAlias )->( DbGotop() ) @@ -2484,7 +2549,7 @@ METHOD IdeBrowse:goTop() /*----------------------------------------------------------------------*/ -METHOD IdeBrowse:goBottom() +METHOD HbpBrowse:goBottom() IF ::nType == BRW_TYPE_DBF ( ::cAlias )->( DbGoBottom() ) @@ -2497,7 +2562,7 @@ METHOD IdeBrowse:goBottom() /*----------------------------------------------------------------------*/ -METHOD IdeBrowse:setOrder( nOrder ) +METHOD HbpBrowse:setOrder( nOrder ) IF ::nType == BRW_TYPE_DBF ( ::cAlias )->( DbSetOrder( nOrder ) ) @@ -2508,7 +2573,7 @@ METHOD IdeBrowse:setOrder( nOrder ) /*----------------------------------------------------------------------*/ -METHOD IdeBrowse:indexOrd() +METHOD HbpBrowse:indexOrd() IF ::nType == BRW_TYPE_DBF RETURN ( ::cAlias )->( IndexOrd() ) @@ -2518,7 +2583,7 @@ METHOD IdeBrowse:indexOrd() /*----------------------------------------------------------------------*/ -METHOD IdeBrowse:ordKeyNo() +METHOD HbpBrowse:ordKeyNo() IF ::nType == BRW_TYPE_DBF RETURN ( ::cAlias )->( OrdKeyNo() ) @@ -2530,7 +2595,7 @@ METHOD IdeBrowse:ordKeyNo() /*----------------------------------------------------------------------*/ -METHOD IdeBrowse:recNo() +METHOD HbpBrowse:recNo() IF ::nType == BRW_TYPE_DBF RETURN ( ::cAlias )->( RecNo() ) @@ -2542,7 +2607,7 @@ METHOD IdeBrowse:recNo() /*----------------------------------------------------------------------*/ -METHOD IdeBrowse:ordKeyCount() +METHOD HbpBrowse:ordKeyCount() IF ::nType == BRW_TYPE_DBF RETURN ( ::cAlias )->( ordKeyCount() ) @@ -2554,7 +2619,7 @@ METHOD IdeBrowse:ordKeyCount() /*----------------------------------------------------------------------*/ -METHOD IdeBrowse:lastRec() +METHOD HbpBrowse:lastRec() IF ::nType == BRW_TYPE_DBF RETURN ( ::cAlias )->( LastRec() ) @@ -2566,7 +2631,7 @@ METHOD IdeBrowse:lastRec() /*----------------------------------------------------------------------*/ -METHOD IdeBrowse:setIndex( cIndex ) +METHOD HbpBrowse:setIndex( cIndex ) LOCAL n IF ( n := ascan( ::aIndex, cIndex ) ) > 0 @@ -2582,7 +2647,7 @@ METHOD IdeBrowse:setIndex( cIndex ) /*----------------------------------------------------------------------*/ -METHOD IdeBrowse:getIndexInfo() +METHOD HbpBrowse:getIndexInfo() LOCAL a_:= {}, i, cKey IF ::nType == BRW_TYPE_DBF @@ -2600,7 +2665,7 @@ METHOD IdeBrowse:getIndexInfo() /*----------------------------------------------------------------------*/ -METHOD IdeBrowse:ordName( nOrder ) +METHOD HbpBrowse:ordName( nOrder ) DEFAULT nOrder TO ::indexOrd() IF ::nType == BRW_TYPE_DBF @@ -2611,7 +2676,7 @@ METHOD IdeBrowse:ordName( nOrder ) /*----------------------------------------------------------------------*/ -METHOD IdeBrowse:indexKeyValue( nOrder ) +METHOD HbpBrowse:indexKeyValue( nOrder ) LOCAL xValue IF ::nType == BRW_TYPE_DBF @@ -2622,7 +2687,7 @@ METHOD IdeBrowse:indexKeyValue( nOrder ) /*------------------------------------------------------------------------*/ -METHOD IdeBrowse:indexKey( nOrder ) +METHOD HbpBrowse:indexKey( nOrder ) DEFAULT nOrder TO ::indexOrd() IF ::nType == BRW_TYPE_DBF @@ -2633,7 +2698,7 @@ METHOD IdeBrowse:indexKey( nOrder ) /*----------------------------------------------------------------------*/ -METHOD IdeBrowse:append() +METHOD HbpBrowse:append() IF ::nType == BRW_TYPE_DBF ( ::cAlias )->( DbAppend() ) @@ -2649,7 +2714,7 @@ METHOD IdeBrowse:append() /*------------------------------------------------------------------------*/ -METHOD IdeBrowse:delete( lAsk ) +METHOD HbpBrowse:delete( lAsk ) DEFAULT lAsk TO .t. @@ -2673,7 +2738,7 @@ METHOD IdeBrowse:delete( lAsk ) /*------------------------------------------------------------------------*/ -METHOD IdeBrowse:recall() +METHOD HbpBrowse:recall() IF ::nType == BRW_TYPE_DBF IF ( ::cAlias )->( Deleted() ) @@ -2691,7 +2756,7 @@ METHOD IdeBrowse:recall() /*------------------------------------------------------------------------*/ -METHOD IdeBrowse:use() +METHOD HbpBrowse:use() LOCAL bError, oErr LOCAL lErr := .f. @@ -2719,7 +2784,7 @@ METHOD IdeBrowse:use() EXIT OTHERWISE - lErr := hbide_execScriptFunction( "tableUse", ::cTable, ::cAlias, ::cDriver, ::cConxn ) /* cTable holds the information about connection */ + //lErr := hbide_execScriptFunction( "tableUse", ::cTable, ::cAlias, ::cDriver, ::cConxn ) /* cTable holds the information about connection */ EXIT ENDSWITCH @@ -2735,7 +2800,7 @@ METHOD IdeBrowse:use() /*----------------------------------------------------------------------*/ -METHOD IdeBrowse:exists() +METHOD HbpBrowse:exists() SWITCH ::cDriver CASE "DBFCDX" @@ -2744,9 +2809,155 @@ METHOD IdeBrowse:exists() CASE "ADS" RETURN hb_fileExists( ::cTable ) OTHERWISE - RETURN hbide_execScriptFunction( "tableExists", ::cTable, ::cDriver, ::cConxn ) + //RETURN hbide_execScriptFunction( "tableExists", ::cTable, ::cDriver, ::cConxn ) ENDSWITCH RETURN .f. /*----------------------------------------------------------------------*/ + +STATIC FUNCTION hbide_pathToOSPath( cPath ) + LOCAL n + + cPath := strtran( cPath, "//", hb_ps() ) + cPath := strtran( cPath, "/" , hb_ps() ) + cPath := strtran( cPath, "\\", hb_ps() ) + cPath := strtran( cPath, "\" , hb_ps() ) + + IF ( n := at( ":", cPath ) ) > 0 + cPath := substr( cPath, 1, n - 1 ) + substr( cPath, n ) + ENDIF + + RETURN cPath + +/*----------------------------------------------------------------------*/ + +STATIC FUNCTION hbide_array2string( a_, cDlm ) + LOCAL s := "" + + aeval( a_, {|e| s += e + cDlm } ) + + RETURN s + +/*----------------------------------------------------------------------*/ + +STATIC FUNCTION hbide_fetchAFile( oWnd, cTitle, aFlt, cDftDir, cDftSuffix, lAllowMulti ) + LOCAL oDlg + + DEFAULT cTitle TO "Please Select a File" + DEFAULT aFlt TO { { "All Files", "*" } } + DEFAULT cDftDir TO hb_dirBase() + DEFAULT lAllowMulti TO .f. + + oDlg := XbpFileDialog():new():create( oWnd, , { 10,10 } ) + + oDlg:title := cTitle + oDlg:center := .t. + oDlg:fileFilters := aFlt + IF HB_ISSTRING( cDftSuffix ) + oDlg:oWidget:setDefaultSuffix( cDftSuffix ) + ENDIF + + RETURN oDlg:open( cDftDir, , lAllowMulti ) + +/*----------------------------------------------------------------------*/ + +STATIC FUNCTION hbide_fetchAString( qParent, cDefault, cWhat, cTitle ) + LOCAL qGo, cText + + DEFAULT cDefault TO "" + DEFAULT cWhat TO "" + DEFAULT cTitle TO "A String Value" + + qGo := QInputDialog( qParent ) + qGo:setTextValue( cDefault ) + qGo:setLabelText( cWhat ) + qGo:setWindowTitle( cTitle ) + + qGo:exec() + cText := qGo:textValue() + qGo:setParent( QWidget() ) + + RETURN cText + +/*----------------------------------------------------------------------*/ + +STATIC FUNCTION hbide_fetchADate( qParent, cTitle, cPrompt, dDefault ) + LOCAL qDate, oUI, nRet + + DEFAULT cTitle TO "A Date Value" + DEFAULT cPrompt TO "What" + + oUI := hbqtui_xbpFetchDate( qParent ) + + oUI:setWindowTitle( cTitle ) + oUI:labelPrompt:setText( cPrompt ) + IF dDefault != NIL + qDate := QDate() + qDate:setYear( year( dDefault ) ) + qDate:setMonth( month( dDefault ) ) + qDate:setDay( day( dDefault ) ) + oUI:editDate:setDate( qDate ) + ENDIF + + oUI:buttonOk:connect( "clicked()", {|| oUI:done( 1 ) } ) + oUI:buttonCancel:connect( "clicked()", {|| oUI:done( 0 ) } ) + + nRet := oUI:exec() + + oUI:buttonOk:disconnect( "clicked()" ) + oUI:buttonCancel:disconnect( "clicked()" ) + + IF nRet == 1 + qDate := oUI:editDate:date() + RETURN stod( strzero( qDate:year(), 4 ) + strzero( qDate:month(),2 ) + strzero( qDate:day(), 2 ) ) + ENDIF + + RETURN NIL + +/*------------------------------------------------------------------------*/ + +STATIC FUNCTION hbide_getYesNo( cMsg, cInfo, cTitle, qParent ) + LOCAL oMB, nRet + + DEFAULT cTitle TO "Option Please!" + DEFAULT qParent TO SetAppWindow():oWidget + + oMB := QMessageBox( qParent ) + oMB:setText( ""+ cMsg +"" ) + IF !empty( cInfo ) + oMB:setInformativeText( cInfo ) + ENDIF + oMB:setIcon( QMessageBox_Information ) + oMB:setWindowTitle( cTitle ) + oMB:setWindowFlags( Qt_Dialog ) + oMB:setStandardButtons( QMessageBox_Yes + QMessageBox_No ) + + nRet := oMB:exec() + + oMB:setParent( QWidget() ) + + RETURN nRet == QMessageBox_Yes + +/*----------------------------------------------------------------------*/ + +STATIC FUNCTION hbide_posAndSize( qWidget ) + + RETURN hb_ntos( qWidget:x() ) + "," + hb_ntos( qWidget:y() ) + "," + ; + hb_ntos( qWidget:width() ) + "," + hb_ntos( qWidget:height() ) + "," + +/*----------------------------------------------------------------------*/ + +STATIC FUNCTION hbide_fldType2Desc( cType ) + + SWITCH cType + CASE "C" ; RETURN "Character" + CASE "N" ; RETURN "Numeric" + CASE "D" ; RETURN "Date" + CASE "L" ; RETURN "Logical" + ENDSWITCH + + RETURN "" + +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbxbp/dialog.prg b/harbour/contrib/hbxbp/dialog.prg index 21205ef892..9f9572c551 100644 --- a/harbour/contrib/hbxbp/dialog.prg +++ b/harbour/contrib/hbxbp/dialog.prg @@ -135,7 +135,7 @@ METHOD XbpDialog:init( oParent, oOwner, aPos, aSize, aPresParams, lVisible ) ::resizeMode := 0 ::mouseMode := 0 - ::drawingArea := XbpDrawingArea():new( self, , {0,0}, ::aSize, , .t. ) + ::drawingArea := XbpDrawingArea():new( self, , {0,0}, ::aSize, , .F. ) RETURN Self diff --git a/harbour/contrib/hbxbp/generic.prg b/harbour/contrib/hbxbp/generic.prg index 682a1ab010..3b9677667a 100644 --- a/harbour/contrib/hbxbp/generic.prg +++ b/harbour/contrib/hbxbp/generic.prg @@ -612,3 +612,22 @@ FUNCTION ConfirmBox( oOwner, cMessage, cTitle, nButtons, nStyle, nStartBtn ) RETURN nRet /*----------------------------------------------------------------------*/ + +FUNCTION Xbp_getNextIdAsString( cString ) + + STATIC hIDs := {=>} + + IF ! hb_hHasKey( hIDs, cString ) + hIDs[ cString ] := 0 + ENDIF + + RETURN cString + "_" + hb_ntos( ++hIDs[ cString ] ) + +/*----------------------------------------------------------------------*/ + +FUNCTION Xbp_Image( cName ) + + RETURN ":/xbp/resources" + "/" + cName + ".png" + +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbxbp/hbxbp.hbp b/harbour/contrib/hbxbp/hbxbp.hbp index cb1e35d3cd..6a70b33e56 100644 --- a/harbour/contrib/hbxbp/hbxbp.hbp +++ b/harbour/contrib/hbxbp/hbxbp.hbp @@ -55,3 +55,10 @@ tabpage.prg toolbar.prg treeview.prg window.prg +dbu.prg + +xbp.qrc + +xbptables.ui +xbpdbstruct.ui +xbpfetchdate.ui diff --git a/harbour/contrib/hbxbp/hbxbp.hbx b/harbour/contrib/hbxbp/hbxbp.hbx index a0b6417d68..3cc5a09913 100644 --- a/harbour/contrib/hbxbp/hbxbp.hbx +++ b/harbour/contrib/hbxbp/hbxbp.hbx @@ -70,7 +70,15 @@ DYNAMIC GRASPLINE DYNAMIC GRASTRINGAT DYNAMIC GRATRANSLATE DYNAMIC HBPAPPDESKTOP +DYNAMIC HBPBROWSE +DYNAMIC HBPBROWSEMANAGER +DYNAMIC HBPBROWSEPANEL +DYNAMIC HBPDBU DYNAMIC HBPPROCESS +DYNAMIC HBQTRES_XBP +DYNAMIC HBQTUI_XBPDBSTRUCT +DYNAMIC HBQTUI_XBPFETCHDATE +DYNAMIC HBQTUI_XBPTABLES DYNAMIC HBXBP_APPEVENTMODIFIER DYNAMIC HBXBP_APPEVENTTOQKEYEVENT DYNAMIC HBXBP_CLEAREVENTBUFFER @@ -88,6 +96,9 @@ DYNAMIC POSTAPPEVENT DYNAMIC SETAPPEVENT DYNAMIC SETAPPFOCUS DYNAMIC SETAPPWINDOW +DYNAMIC UI_XBPDBSTRUCT +DYNAMIC UI_XBPFETCHDATE +DYNAMIC UI_XBPTABLES DYNAMIC XBP3STATE DYNAMIC XBPBITMAP DYNAMIC XBPBROWSE @@ -129,6 +140,8 @@ DYNAMIC XBPTOOLBARBUTTON DYNAMIC XBPTREEVIEW DYNAMIC XBPTREEVIEWITEM DYNAMIC XBPWINDOW +DYNAMIC XBP_GETNEXTIDASSTRING +DYNAMIC XBP_IMAGE DYNAMIC XBP_XBPTOQTNAME #if defined( __HBEXTREQ__ ) .OR. defined( __HBEXTERN__HBXBP__REQUEST ) diff --git a/harbour/contrib/hbxbp/resources/closetab.png b/harbour/contrib/hbxbp/resources/closetab.png new file mode 100644 index 0000000000..ef9e02086c Binary files /dev/null and b/harbour/contrib/hbxbp/resources/closetab.png differ diff --git a/harbour/contrib/hbxbp/resources/database.png b/harbour/contrib/hbxbp/resources/database.png new file mode 100644 index 0000000000..09e60ca969 Binary files /dev/null and b/harbour/contrib/hbxbp/resources/database.png differ diff --git a/harbour/contrib/hbxbp/resources/database_accept.png b/harbour/contrib/hbxbp/resources/database_accept.png new file mode 100644 index 0000000000..d1c1ea009a Binary files /dev/null and b/harbour/contrib/hbxbp/resources/database_accept.png differ diff --git a/harbour/contrib/hbxbp/resources/database_add.png b/harbour/contrib/hbxbp/resources/database_add.png new file mode 100644 index 0000000000..56154bd4aa Binary files /dev/null and b/harbour/contrib/hbxbp/resources/database_add.png differ diff --git a/harbour/contrib/hbxbp/resources/database_down.png b/harbour/contrib/hbxbp/resources/database_down.png new file mode 100644 index 0000000000..45bef4f553 Binary files /dev/null and b/harbour/contrib/hbxbp/resources/database_down.png differ diff --git a/harbour/contrib/hbxbp/resources/database_lock.png b/harbour/contrib/hbxbp/resources/database_lock.png new file mode 100644 index 0000000000..4bf67f58b6 Binary files /dev/null and b/harbour/contrib/hbxbp/resources/database_lock.png differ diff --git a/harbour/contrib/hbxbp/resources/database_next.png b/harbour/contrib/hbxbp/resources/database_next.png new file mode 100644 index 0000000000..2b331161d9 Binary files /dev/null and b/harbour/contrib/hbxbp/resources/database_next.png differ diff --git a/harbour/contrib/hbxbp/resources/database_previous.png b/harbour/contrib/hbxbp/resources/database_previous.png new file mode 100644 index 0000000000..0b82732845 Binary files /dev/null and b/harbour/contrib/hbxbp/resources/database_previous.png differ diff --git a/harbour/contrib/hbxbp/resources/database_process.png b/harbour/contrib/hbxbp/resources/database_process.png new file mode 100644 index 0000000000..b32c305585 Binary files /dev/null and b/harbour/contrib/hbxbp/resources/database_process.png differ diff --git a/harbour/contrib/hbxbp/resources/database_remove.png b/harbour/contrib/hbxbp/resources/database_remove.png new file mode 100644 index 0000000000..a8d37e00a4 Binary files /dev/null and b/harbour/contrib/hbxbp/resources/database_remove.png differ diff --git a/harbour/contrib/hbxbp/resources/database_search.png b/harbour/contrib/hbxbp/resources/database_search.png new file mode 100644 index 0000000000..e8664ac108 Binary files /dev/null and b/harbour/contrib/hbxbp/resources/database_search.png differ diff --git a/harbour/contrib/hbxbp/resources/database_up.png b/harbour/contrib/hbxbp/resources/database_up.png new file mode 100644 index 0000000000..23876648c0 Binary files /dev/null and b/harbour/contrib/hbxbp/resources/database_up.png differ diff --git a/harbour/contrib/hbxbp/resources/dbf_p1.png b/harbour/contrib/hbxbp/resources/dbf_p1.png new file mode 100644 index 0000000000..136854204a Binary files /dev/null and b/harbour/contrib/hbxbp/resources/dbf_p1.png differ diff --git a/harbour/contrib/hbxbp/resources/dbf_p10.png b/harbour/contrib/hbxbp/resources/dbf_p10.png new file mode 100644 index 0000000000..69ce1f73d8 Binary files /dev/null and b/harbour/contrib/hbxbp/resources/dbf_p10.png differ diff --git a/harbour/contrib/hbxbp/resources/dbf_p2.png b/harbour/contrib/hbxbp/resources/dbf_p2.png new file mode 100644 index 0000000000..42aa4ea275 Binary files /dev/null and b/harbour/contrib/hbxbp/resources/dbf_p2.png differ diff --git a/harbour/contrib/hbxbp/resources/dbf_p3.png b/harbour/contrib/hbxbp/resources/dbf_p3.png new file mode 100644 index 0000000000..5038d42245 Binary files /dev/null and b/harbour/contrib/hbxbp/resources/dbf_p3.png differ diff --git a/harbour/contrib/hbxbp/resources/dbf_p4.png b/harbour/contrib/hbxbp/resources/dbf_p4.png new file mode 100644 index 0000000000..230cfe5e7b Binary files /dev/null and b/harbour/contrib/hbxbp/resources/dbf_p4.png differ diff --git a/harbour/contrib/hbxbp/resources/dbf_p5.png b/harbour/contrib/hbxbp/resources/dbf_p5.png new file mode 100644 index 0000000000..100b640307 Binary files /dev/null and b/harbour/contrib/hbxbp/resources/dbf_p5.png differ diff --git a/harbour/contrib/hbxbp/resources/dbf_p6.png b/harbour/contrib/hbxbp/resources/dbf_p6.png new file mode 100644 index 0000000000..5fe7e8d2d6 Binary files /dev/null and b/harbour/contrib/hbxbp/resources/dbf_p6.png differ diff --git a/harbour/contrib/hbxbp/resources/dbf_p7.png b/harbour/contrib/hbxbp/resources/dbf_p7.png new file mode 100644 index 0000000000..4ede4fc3d2 Binary files /dev/null and b/harbour/contrib/hbxbp/resources/dbf_p7.png differ diff --git a/harbour/contrib/hbxbp/resources/dbf_p8.png b/harbour/contrib/hbxbp/resources/dbf_p8.png new file mode 100644 index 0000000000..83fcaebacf Binary files /dev/null and b/harbour/contrib/hbxbp/resources/dbf_p8.png differ diff --git a/harbour/contrib/hbxbp/resources/dbf_p9.png b/harbour/contrib/hbxbp/resources/dbf_p9.png new file mode 100644 index 0000000000..a7b2da329d Binary files /dev/null and b/harbour/contrib/hbxbp/resources/dbf_p9.png differ diff --git a/harbour/contrib/hbxbp/resources/dbstruct.png b/harbour/contrib/hbxbp/resources/dbstruct.png new file mode 100644 index 0000000000..88cc63608e Binary files /dev/null and b/harbour/contrib/hbxbp/resources/dbstruct.png differ diff --git a/harbour/contrib/hbxbp/resources/dc_delete.png b/harbour/contrib/hbxbp/resources/dc_delete.png new file mode 100644 index 0000000000..3f6c455c92 Binary files /dev/null and b/harbour/contrib/hbxbp/resources/dc_delete.png differ diff --git a/harbour/contrib/hbxbp/resources/find.png b/harbour/contrib/hbxbp/resources/find.png new file mode 100644 index 0000000000..dbf9e98f41 Binary files /dev/null and b/harbour/contrib/hbxbp/resources/find.png differ diff --git a/harbour/contrib/hbxbp/resources/form.png b/harbour/contrib/hbxbp/resources/form.png new file mode 100644 index 0000000000..dc2dd3f0ea Binary files /dev/null and b/harbour/contrib/hbxbp/resources/form.png differ diff --git a/harbour/contrib/hbxbp/resources/formview.png b/harbour/contrib/hbxbp/resources/formview.png new file mode 100644 index 0000000000..2580d09879 Binary files /dev/null and b/harbour/contrib/hbxbp/resources/formview.png differ diff --git a/harbour/contrib/hbxbp/resources/fullscreen.png b/harbour/contrib/hbxbp/resources/fullscreen.png new file mode 100644 index 0000000000..e98e709168 Binary files /dev/null and b/harbour/contrib/hbxbp/resources/fullscreen.png differ diff --git a/harbour/contrib/hbxbp/resources/gotoline3.png b/harbour/contrib/hbxbp/resources/gotoline3.png new file mode 100644 index 0000000000..b10cd0d77e Binary files /dev/null and b/harbour/contrib/hbxbp/resources/gotoline3.png differ diff --git a/harbour/contrib/hbxbp/resources/open3.png b/harbour/contrib/hbxbp/resources/open3.png new file mode 100644 index 0000000000..e178b7ed3a Binary files /dev/null and b/harbour/contrib/hbxbp/resources/open3.png differ diff --git a/harbour/contrib/hbxbp/resources/panel_7.png b/harbour/contrib/hbxbp/resources/panel_7.png new file mode 100644 index 0000000000..286a59c5a4 Binary files /dev/null and b/harbour/contrib/hbxbp/resources/panel_7.png differ diff --git a/harbour/contrib/hbxbp/resources/panel_8.png b/harbour/contrib/hbxbp/resources/panel_8.png new file mode 100644 index 0000000000..d5f688b178 Binary files /dev/null and b/harbour/contrib/hbxbp/resources/panel_8.png differ diff --git a/harbour/contrib/hbxbp/resources/save3.png b/harbour/contrib/hbxbp/resources/save3.png new file mode 100644 index 0000000000..0f161b5d7d Binary files /dev/null and b/harbour/contrib/hbxbp/resources/save3.png differ diff --git a/harbour/contrib/hbxbp/resources/sort.png b/harbour/contrib/hbxbp/resources/sort.png new file mode 100644 index 0000000000..f78064b5ed Binary files /dev/null and b/harbour/contrib/hbxbp/resources/sort.png differ diff --git a/harbour/contrib/hbxbp/resources/table.png b/harbour/contrib/hbxbp/resources/table.png new file mode 100644 index 0000000000..0d1e11a834 Binary files /dev/null and b/harbour/contrib/hbxbp/resources/table.png differ diff --git a/harbour/contrib/hbxbp/resources/view_cascaded.png b/harbour/contrib/hbxbp/resources/view_cascaded.png new file mode 100644 index 0000000000..66544cb4a6 Binary files /dev/null and b/harbour/contrib/hbxbp/resources/view_cascaded.png differ diff --git a/harbour/contrib/hbxbp/resources/view_docks.png b/harbour/contrib/hbxbp/resources/view_docks.png new file mode 100644 index 0000000000..f536aaf72b Binary files /dev/null and b/harbour/contrib/hbxbp/resources/view_docks.png differ diff --git a/harbour/contrib/hbxbp/resources/view_horzstacked.png b/harbour/contrib/hbxbp/resources/view_horzstacked.png new file mode 100644 index 0000000000..d8161e41cd Binary files /dev/null and b/harbour/contrib/hbxbp/resources/view_horzstacked.png differ diff --git a/harbour/contrib/hbxbp/resources/view_organized.png b/harbour/contrib/hbxbp/resources/view_organized.png new file mode 100644 index 0000000000..7e5e19ee6a Binary files /dev/null and b/harbour/contrib/hbxbp/resources/view_organized.png differ diff --git a/harbour/contrib/hbxbp/resources/view_refresh.png b/harbour/contrib/hbxbp/resources/view_refresh.png new file mode 100644 index 0000000000..7474728b4c Binary files /dev/null and b/harbour/contrib/hbxbp/resources/view_refresh.png differ diff --git a/harbour/contrib/hbxbp/resources/view_tabbed.png b/harbour/contrib/hbxbp/resources/view_tabbed.png new file mode 100644 index 0000000000..d73b3f9b6d Binary files /dev/null and b/harbour/contrib/hbxbp/resources/view_tabbed.png differ diff --git a/harbour/contrib/hbxbp/resources/view_tiled.png b/harbour/contrib/hbxbp/resources/view_tiled.png new file mode 100644 index 0000000000..c915da61ea Binary files /dev/null and b/harbour/contrib/hbxbp/resources/view_tiled.png differ diff --git a/harbour/contrib/hbxbp/resources/view_vertstacked.png b/harbour/contrib/hbxbp/resources/view_vertstacked.png new file mode 100644 index 0000000000..9ef365c077 Binary files /dev/null and b/harbour/contrib/hbxbp/resources/view_vertstacked.png differ diff --git a/harbour/contrib/hbxbp/resources/view_zoomin.png b/harbour/contrib/hbxbp/resources/view_zoomin.png new file mode 100644 index 0000000000..f5871dc21c Binary files /dev/null and b/harbour/contrib/hbxbp/resources/view_zoomin.png differ diff --git a/harbour/contrib/hbxbp/resources/view_zoomout.png b/harbour/contrib/hbxbp/resources/view_zoomout.png new file mode 100644 index 0000000000..29e9d69ee5 Binary files /dev/null and b/harbour/contrib/hbxbp/resources/view_zoomout.png differ diff --git a/harbour/contrib/hbxbp/toolbar.prg b/harbour/contrib/hbxbp/toolbar.prg index 77a403cf55..d8f93ca5bd 100644 --- a/harbour/contrib/hbxbp/toolbar.prg +++ b/harbour/contrib/hbxbp/toolbar.prg @@ -99,17 +99,20 @@ CLASS XbpToolBar INHERIT XbpWindow DATA sl_buttonMenuClick DATA sl_buttonDropDown + DATA qByte, qMime, qDrag, qPix, qdropAction, qPos + DATA orientation INIT Qt_Horizontal + METHOD numItems() INLINE Len( ::aItems ) METHOD init( oParent, oOwner, aPos, aSize, aPresParams, lVisible ) METHOD create( oParent, oOwner, aPos, aSize, aPresParams, lVisible ) METHOD configure( oParent, oOwner, aPos, aSize, aPresParams, lVisible ) METHOD destroy() - METHOD execSlot( cSlot, p ) + METHOD execSlot( cSlot, p, p1 ) - METHOD addItem( cCaption, xImage, xDisabledImage, xHotImage, cDLL, nStyle, cKey, nMapRGB ) - METHOD delItem() - METHOD getItem() + METHOD addItem( cCaption, xImage, xDisabledImage, xHotImage, cDLL, nStyle, xKey ) + METHOD delItem( nItem_cKey ) + METHOD getItem( nItem_cKey ) METHOD clear() METHOD customize() METHOD loadImageSet() @@ -126,6 +129,10 @@ CLASS XbpToolBar INHERIT XbpWindow METHOD sendToolbarMessage() METHOD setStyle() + METHOD setItemChecked( nItem_cKey, lChecked ) + METHOD setItemEnabled( nItem_cKey, lEnabled ) + METHOD itemToggle( nItem_cKey ) + ENDCLASS /*----------------------------------------------------------------------*/ @@ -147,28 +154,31 @@ METHOD XbpToolbar:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible ) ELSEIF upper( ::oParent:className ) == "XBPDRAWINGAREA" oPar := ::oParent:oParent ELSE - RETURN Self + oPar := ::oParent ENDIF ::oParent := oPar - ::oWidget := QToolBar( ::oParent:oWidget ) - ::oWidget:setObjectName( "XBPTOOLBARMAIN" ) - ::oWidget:setWindowTitle( "Main" ) - ::oParent:oWidget:addToolBar( ::oWidget ) + ::oWidget := QToolBar( iif( Empty( ::oParent ), NIL, ::oParent:oWidget ) ) + IF ! Empty( ::oParent ) + ::oWidget:setObjectName( iif( Empty( ::oParent ), "XBPTOOLBAR", "XBPTOOLBARMAIN" ) ) + ::oWidget:setWindowTitle( "Main" ) + ::oParent:oWidget:addToolBar( ::oWidget ) + ENDIF IF ::imageWidth > 0 .and. ::imageHeight > 0 ::oWidget:setIconSize( QSize( ::imageWidth, ::imageHeight ) ) ENDIF - #if 0 + ::oWidget:setFocusPolicy( Qt_NoFocus ) + /* Assign attributes */ IF ::style == XBPTOOLBAR_STYLE_FLAT //::style := TBSTYLE_FLAT - ELSEIF ::style == XBPTOOLBAR_STYLE_VERTICAL - //::style := CCS_VERT - ELSE - ::style := 0 ENDIF + IF ::orientation == Qt_Vertical + ::oWidget:setOrientation( Qt_Vertical ) + ENDIF + // IF ::wrappable //::style += TBSTYLE_WRAPABLE ENDIF @@ -178,17 +188,17 @@ METHOD XbpToolbar:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible ) IF ::borderStyle == XBPFRAME_RECT //::style += WS_BORDER ENDIF - + // IF ::appearance == XBP_APPEARANCE_3D ENDIF - #endif IF ::visible ::show() ENDIF - ::oParent:AddChild( SELF ) - ::postCreate() - + IF ! Empty( ::oParent ) + ::oParent:AddChild( SELF ) + ::postCreate() + ENDIF RETURN Self /*----------------------------------------------------------------------*/ @@ -229,18 +239,32 @@ METHOD XbpToolbar:sendToolbarMessage() /*----------------------------------------------------------------------*/ -METHOD XbpToolbar:addItem( cCaption, xImage, xDisabledImage, xHotImage, cDLL, nStyle, cKey, nMapRGB ) +METHOD XbpToolbar:addItem( cCaption, xImage, xDisabledImage, xHotImage, cDLL, nStyle, xKey ) LOCAL oBtn - LOCAL isAction := HB_ISOBJECT( cCaption ) .AND. __ObjGetClsName( cCaption ) == "QACTION" + LOCAL isAction := HB_ISOBJECT( cCaption ) .AND. __ObjGetClsName( cCaption ) == "QACTION" + LOCAL isToolButton := HB_ISARRAY( cCaption ) + LOCAL isObject := HB_ISOBJECT( cCaption ) HB_SYMBOL_UNUSED( xDisabledImage ) HB_SYMBOL_UNUSED( xHotImage ) HB_SYMBOL_UNUSED( cDLL ) - HB_SYMBOL_UNUSED( nMapRGB ) + HB_SYMBOL_UNUSED( isToolButton ) DEFAULT nStyle TO XBPTOOLBAR_BUTTON_DEFAULT - oBtn := XbpToolbarButton():new( iif( isAction, cCaption:text(), cCaption ), nStyle, cKey ) + IF isToolButton + //addToolButton( cName, cDesc, cImage, bAction, lCheckable, lDragEnabled ) + ASize( cCaption, 6 ) + + DEFAULT cCaption[ 1 ] TO Xbp_getNextIdAsString( "XbpToolButton" ) + DEFAULT cCaption[ 2 ] TO "" + DEFAULT cCaption[ 5 ] TO .F. + DEFAULT cCaption[ 6 ] TO .F. + + oBtn := XbpToolbarButton():new( cCaption[ 1 ], nStyle, iif( HB_ISBLOCK( cCaption[ 4 ] ), cCaption[ 4 ], xKey ) ) + ELSE + oBtn := XbpToolbarButton():new( iif( isAction, cCaption:text(), cCaption ), nStyle, xKey ) + ENDIF oBtn:index := ::numItems + 1 oBtn:command := 100 + oBtn:index @@ -252,6 +276,24 @@ METHOD XbpToolbar:addItem( cCaption, xImage, xDisabledImage, xHotImage, cDLL, nS IF isAction oBtn:oAction := cCaption + ELSEIF isToolButton + oBtn:oAction := QAction( ::oWidget ) + + oBtn:oAction:setObjectName( cCaption[ 1 ] ) + oBtn:oAction:setTooltip( cCaption[ 2 ] ) + oBtn:oAction:setIcon( cCaption[ 3 ] ) + oBtn:oAction:setCheckable( cCaption[ 5 ] ) + IF cCaption[ 6 ] + oBtn:oAction:connect( QEvent_MouseButtonPress , {|p| ::execSlot( "QEvent_MousePress" , p, cCaption[ 1 ] ) } ) + oBtn:oAction:connect( QEvent_MouseButtonRelease, {|p| ::execSlot( "QEvent_MouseRelease", p, cCaption[ 1 ] ) } ) + oBtn:oAction:connect( QEvent_MouseMove , {|p| ::execSlot( "QEvent_MouseMove" , p, cCaption[ 1 ] ) } ) + oBtn:oAction:connect( QEvent_Enter , {|p| ::execSlot( "QEvent_MouseEnter" , p, cCaption[ 1 ] ) } ) + ENDIF + + ELSEIF isObject + oBtn:oAction := QWidgetAction( ::oWidget ) + oBtn:oAction:setDefaultWidget( cCaption ) + ELSE /* Create an action */ oBtn:oAction := QAction( ::oWidget ) @@ -279,30 +321,157 @@ METHOD XbpToolbar:addItem( cCaption, xImage, xDisabledImage, xHotImage, cDLL, nS /*----------------------------------------------------------------------*/ -METHOD XbpToolbar:execSlot( cSlot, p ) +METHOD XbpToolbar:execSlot( cSlot, p, p1 ) + LOCAL qEvent, qRC - IF cSlot == "triggered(bool)" + qEvent := p + + SWITCH cSlot + + CASE "triggered(bool)" ::buttonClick( p ) + EXIT + + CASE "QEvent_MouseLeave" + EXIT + + CASE "QEvent_MouseMove" + qRC := QRect( ::qPos:x() - 5, ::qPos:y() - 5, 10, 10 ):normalized() + IF qRC:contains( qEvent:pos() ) + ::qByte := QByteArray( ::hItems[ p1 ]:objectName() ) + + ::qMime := QMimeData() + ::qMime:setData( "application/x-toolbaricon", ::qByte ) + ::qMime:setHtml( ::hItems[ p1 ]:objectName() ) + + ::qPix := QIcon( ::hItems[ p1 ]:icon ):pixmap( 16,16 ) + + ::qDrag := QDrag( SetAppWindow():oWidget ) + ::qDrag:setMimeData( ::qMime ) + ::qDrag:setPixmap( ::qPix ) + ::qDrag:setHotSpot( QPoint( 15,15 ) ) + ::qDrag:setDragCursor( ::qPix, Qt_CopyAction + Qt_IgnoreAction ) + ::qDropAction := ::qDrag:exec( Qt_CopyAction + Qt_IgnoreAction ) /* Why this is not terminated GPF's */ + + ::qDrag := NIL + ::qPos := NIL + ::hItems[ p1 ]:setChecked( .f. ) + ::hItems[ p1 ]:setWindowState( 0 ) + ENDIF + EXIT + + CASE "QEvent_MouseRelease" + ::qDrag := NIL + EXIT + + CASE "QEvent_MousePress" + ::qPos := qEvent:pos() + EXIT + + ENDSWITCH + + RETURN NIL + +/*----------------------------------------------------------------------*/ + +METHOD XbpToolbar:setItemChecked( nItem_cKey, lChecked ) + LOCAL oBtn, lOldState + + IF ! Empty( oBtn := ::getItem( nItem_cKey ) ) + IF oBtn:oAction:isCheckable() + lOldState := oBtn:oAction:isChecked() + IF HB_ISLOGICAL( lChecked ) + oBtn:oAction:setChecked( lChecked ) + ENDIF + ENDIF + ENDIF + + RETURN lOldState + +/*----------------------------------------------------------------------*/ + +METHOD XbpToolbar:setItemEnabled( nItem_cKey, lEnabled ) + LOCAL oBtn, lOldState + + IF ! Empty( oBtn := ::getItem( nItem_cKey ) ) + lOldState := oBtn:oAction:isEnabled() + IF HB_ISLOGICAL( lEnabled ) + oBtn:oAction:setEnabled( lEnabled ) + ENDIF + ENDIF + + RETURN lOldState + +/*----------------------------------------------------------------------*/ + +METHOD XbpToolbar:itemToggle( nItem_cKey ) + LOCAL oBtn, lOldState + + IF ! Empty( oBtn := ::getItem( nItem_cKey ) ) + IF oBtn:oAction:isCheckable() + lOldState := oBtn:oAction:isChecked() + oBtn:oAction:setChecked( ! lOldState ) + ENDIF + ENDIF + + RETURN lOldState + +/*----------------------------------------------------------------------*/ + +METHOD XbpToolbar:delItem( nItem_cKey ) + LOCAL a_ + + IF HB_ISNUMERIC( nItem_cKey ) + IF Len( ::aItems ) <= nItem_cKey + ::oWidget:removeAction( ::aItems[ nItem_cKey, 2 ]:oAction ) + hb_ADel( ::aItems, nItem_cKey, .T. ) + ENDIF + + ELSEIF HB_ISCHAR( nItem_cKey ) + FOR EACH a_ IN ::aItems + IF HB_ISCHAR( a_[ 2 ]:key ) + IF a_[ 2 ]:key == nItem_cKey + ::oWidget:removeAction( a_[ 2 ]:oAction ) + hb_ADel( ::aItems, a_:__enumIndex(), .T. ) + EXIT + ENDIF + ENDIF + NEXT + + ENDIF + + RETURN Self + +/*----------------------------------------------------------------------*/ + +METHOD XbpToolbar:getItem( nItem_cKey ) + LOCAL a_ + + IF HB_ISNUMERIC( nItem_cKey ) + IF Len( ::aItems ) <= nItem_cKey + RETURN ::aItems[ nItem_cKey, 2 ] + ENDIF + + ELSEIF HB_ISCHAR( nItem_cKey ) + FOR EACH a_ IN ::aItems + IF HB_ISCHAR( a_[ 2 ]:key ) + IF a_[ 2 ]:key == nItem_cKey + RETURN a_[ 2 ] + ENDIF + ENDIF + NEXT + ENDIF RETURN NIL /*----------------------------------------------------------------------*/ -METHOD XbpToolbar:delItem() - - RETURN Self - -/*----------------------------------------------------------------------*/ - -METHOD XbpToolbar:getItem() - - RETURN Self - -/*----------------------------------------------------------------------*/ - METHOD XbpToolbar:clear() + ::oWidget:clear() + ::aItems := {} + RETURN Self /*----------------------------------------------------------------------*/ @@ -438,22 +607,23 @@ CLASS XbpToolbarButton DATA tooltipText INIT "" DATA command INIT 0 DATA oAction + DATA cargo - METHOD init( cCaption, nStyle, cKey ) + METHOD init( cCaption, nStyle, xKey ) ENDCLASS /*----------------------------------------------------------------------*/ -METHOD XbpToolbarButton:init( cCaption, nStyle, cKey ) +METHOD XbpToolbarButton:init( cCaption, nStyle, xKey ) DEFAULT cCaption TO ::caption DEFAULT nStyle TO ::style - DEFAULT cKey TO ::key + DEFAULT xKey TO ::key ::caption := cCaption ::style := nStyle - ::key := cKey + ::key := xKey RETURN Self diff --git a/harbour/contrib/hbxbp/xbp.qrc b/harbour/contrib/hbxbp/xbp.qrc new file mode 100644 index 0000000000..023aaa3796 --- /dev/null +++ b/harbour/contrib/hbxbp/xbp.qrc @@ -0,0 +1,48 @@ + + + resources/view_cascaded.png + resources/view_organized.png + resources/view_tabbed.png + resources/view_tiled.png + resources/view_vertstacked.png + resources/view_horzstacked.png + resources/view_zoomin.png + resources/view_zoomout.png + resources/view_refresh.png + resources/database.png + resources/database_accept.png + resources/database_add.png + resources/database_remove.png + resources/database_lock.png + resources/database_process.png + resources/database_up.png + resources/database_down.png + resources/database_previous.png + resources/database_next.png + resources/database_search.png + resources/open3.png + resources/save3.png + resources/fullscreen.png + resources/formview.png + resources/dbstruct.png + resources/find.png + resources/gotoline3.png + resources/dc_delete.png + resources/panel_7.png + resources/panel_8.png + resources/sort.png + resources/closetab.png + resources/dbf_p1.png + resources/dbf_p2.png + resources/dbf_p3.png + resources/dbf_p4.png + resources/dbf_p5.png + resources/dbf_p6.png + resources/dbf_p7.png + resources/dbf_p8.png + resources/dbf_p9.png + resources/dbf_p10.png + resources/form.png + resources/table.png + + diff --git a/harbour/contrib/hbxbp/xbpdbstruct.ui b/harbour/contrib/hbxbp/xbpdbstruct.ui new file mode 100644 index 0000000000..6cb2724185 --- /dev/null +++ b/harbour/contrib/hbxbp/xbpdbstruct.ui @@ -0,0 +1,332 @@ + + + FormStruct + + + + 0 + 0 + 481 + 389 + + + + Structure + + + + + 8 + 8 + 463 + 53 + + + + + + + + + 12 + 6 + 63 + 16 + + + + Field Name: + + + + + + 10 + 22 + 175 + 20 + + + + + + + 198 + 4 + 73 + 16 + + + + Type: + + + + + + 198 + 20 + 101 + 22 + + + + + + + 310 + 22 + 69 + 20 + + + + + + + 312 + 6 + 46 + 14 + + + + Size: + + + + + + 396 + 6 + 46 + 14 + + + + Decimals: + + + + + + 394 + 22 + 57 + 20 + + + + + + + + 8 + 96 + 463 + 255 + + + + + + + 18 + 70 + 25 + 20 + + + + ... + + + + + + 58 + 70 + 25 + 20 + + + + ... + + + + + + 100 + 70 + 25 + 20 + + + + ... + + + + + + 186 + 70 + 25 + 20 + + + + ... + + + + + + 436 + 70 + 25 + 20 + + + + ... + + + + + + 250 + 70 + 25 + 20 + + + + ... + + + + + + 142 + 70 + 25 + 20 + + + + ... + + + + + + 322 + 70 + 25 + 20 + + + + ... + + + + + + 364 + 70 + 25 + 20 + + + + ... + + + + + + 10 + 362 + 91 + 16 + + + + Memo Block Size: + + + + + + 298 + 358 + 173 + 25 + + + + QFrame::StyledPanel + + + QFrame::Raised + + + + + 8 + 4 + 65 + 16 + + + + Record Size: + + + + + + 98 + 6 + 61 + 16 + + + + 1 + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + 102 + 360 + 77 + 22 + + + + + + + 204 + 360 + 75 + 23 + + + + Copy Struct + + + + + + diff --git a/harbour/contrib/hbxbp/xbpfetchdate.ui b/harbour/contrib/hbxbp/xbpfetchdate.ui new file mode 100644 index 0000000000..4b4bf16db2 --- /dev/null +++ b/harbour/contrib/hbxbp/xbpfetchdate.ui @@ -0,0 +1,71 @@ + + + DialogDate + + + + 0 + 0 + 194 + 104 + + + + Fetch a date + + + + + 14 + 30 + 161 + 22 + + + + true + + + + + + 14 + 68 + 75 + 24 + + + + OK + + + + + + 102 + 68 + 75 + 24 + + + + Cancel + + + + + + 14 + 8 + 159 + 16 + + + + Select a date + + + + + + diff --git a/harbour/contrib/hbxbp/xbptables.ui b/harbour/contrib/hbxbp/xbptables.ui new file mode 100644 index 0000000000..50e6b281a9 --- /dev/null +++ b/harbour/contrib/hbxbp/xbptables.ui @@ -0,0 +1,52 @@ + + + DialogTables + + + Qt::ApplicationModal + + + + 0 + 0 + 302 + 485 + + + + Opened Tables + + + true + + + true + + + + + + true + + + 1 + + + + 1 + + + + + + + + OK + + + + + + + +