2011-02-11 13:52 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
* contrib/hbide/dbstruct.ui
* contrib/hbide/idebrowse.prg
* contrib/hbide/ideharbourhelp.prg
* contrib/hbide/idehome.prg
! Fixed: "Welcom" tab - tooltip and links were broken sometimes.
+ Added: "ideBrowse" - "Structure" dialog - <Copy Struct> button.
Click results in structure of the current table structure
be pasted on the clipboard under this format:
. LOCAL aStruct := { { "Name", "C", 20, 0 },;
{ "Code", "C", 8, 0 } }
% Tried to fix "nix" dependant path cases. Hopefully
"Documents Viewer" be avialble on "nixes".
This commit is contained in:
@@ -16,6 +16,20 @@
|
||||
The license applies to all entries newer than 2009-04-28.
|
||||
*/
|
||||
|
||||
2011-02-11 13:52 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
|
||||
* contrib/hbide/dbstruct.ui
|
||||
* contrib/hbide/idebrowse.prg
|
||||
* contrib/hbide/ideharbourhelp.prg
|
||||
* contrib/hbide/idehome.prg
|
||||
! Fixed: "Welcom" tab - tooltip and links were broken sometimes.
|
||||
+ Added: "ideBrowse" - "Structure" dialog - <Copy Struct> button.
|
||||
Click results in structure of the current table structure
|
||||
be pasted on the clipboard under this format:
|
||||
. LOCAL aStruct := { { "Name", "C", 20, 0 },;
|
||||
{ "Code", "C", 8, 0 } }
|
||||
% Tried to fix "nix" dependant path cases. Hopefully
|
||||
"Documents Viewer" be avialble on "nixes".
|
||||
|
||||
2011-02-11 21:57 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
|
||||
* contrib/hbqt/qtcore/hbqt_pointer.cpp
|
||||
* contrib/hbqt/qtcore/hbqt.h
|
||||
|
||||
@@ -313,6 +313,19 @@
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="buttonCopyStruct">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>204</x>
|
||||
<y>360</y>
|
||||
<width>75</width>
|
||||
<height>23</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Copy Struct</string>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
|
||||
@@ -486,7 +486,7 @@ METHOD IdeBrowseManager:setPanel( cPanel )
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
METHOD IdeBrowseManager:execEvent( cEvent, p, p1 )
|
||||
LOCAL cTable, cPath, cPanel, qEvent, qMime, qList, i, cExt, qUrl
|
||||
LOCAL cTable, cPath, cPanel, qEvent, qMime, qList, i, cExt, qUrl, aStruct, cTmp
|
||||
|
||||
HB_SYMBOL_UNUSED( p )
|
||||
HB_SYMBOL_UNUSED( p1 )
|
||||
@@ -667,6 +667,22 @@ METHOD IdeBrowseManager:execEvent( cEvent, p, p1 )
|
||||
EXIT
|
||||
CASE "buttonZaptable_clicked"
|
||||
EXIT
|
||||
CASE "buttonCopyStruct_clicked"
|
||||
IF !empty( aStruct := ::oCurBrw:dbStruct() )
|
||||
i := 0
|
||||
aeval( aStruct, {|e_| iif( len( e_[ 1 ] ) > i, i := len( e_[ 1 ] ), NIL ) } )
|
||||
i += 2
|
||||
|
||||
cTmp := " LOCAL aStruct := {"
|
||||
aeval( aStruct, {|e_,n| cTmp += iif( n == 1, ' { ', space( 20 ) + ' { ' ) + ;
|
||||
pad( '"' + e_[ 1 ] + '"', i ) + ', "' + e_[ 2 ] + '", ' + ;
|
||||
str( e_[ 3 ], 4, 0 ) + ', ' + ;
|
||||
str( e_[ 4 ], 2, 0 ) + ' }' + ;
|
||||
iif( len( aStruct ) == n, " }", ",;" ) + hb_eol() } )
|
||||
|
||||
QClipboard():setText( cTmp )
|
||||
ENDIF
|
||||
EXIT
|
||||
/* End - left-toolbar actions */
|
||||
|
||||
ENDSWITCH
|
||||
@@ -854,6 +870,9 @@ METHOD IdeBrowseManager:buildUiStruct()
|
||||
::qStruct:q_comboType:addItem( "Logical" )
|
||||
|
||||
oTbl:connect( "itemSelectionChanged()", {|| ::execEvent( "fieldsTable_itemSelectionChanged" ) } )
|
||||
|
||||
::qStruct:q_buttonCopyStruct:connect( "clicked()", {|| ::execEvent( "buttonCopyStruct_clicked" ) } )
|
||||
|
||||
RETURN Self
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
@@ -676,11 +676,13 @@ STATIC FUNCTION hbide_buildFoldersTree( aNodes, aPaths )
|
||||
FOR i := 1 TO len( aSubs )
|
||||
IF !empty( aSubs[ i ] )
|
||||
cCPath := hbide_buildPathFromSubs( aSubs, i )
|
||||
n := ascan( aNodes, {|e_| hb_FileMatch( hbide_pathNormalized( e_[ 4 ], .t. ), hbide_pathNormalized( cRoot + cCPath, .t. ) ) } )
|
||||
//n := ascan( aNodes, {|e_| hb_FileMatch( hbide_pathNormalized( e_[ 4 ], .t. ), hbide_pathNormalized( cRoot + cCPath, .t. ) ) } )
|
||||
n := ascan( aNodes, {|e_| hb_FileMatch( hbide_pathNormalized( e_[ 4 ], .f. ), hbide_pathNormalized( cRoot + cCPath, .f. ) ) } )
|
||||
|
||||
IF n == 0
|
||||
cPPath := hbide_buildPathFromSubs( aSubs, i - 1 )
|
||||
nP := ascan( aNodes, {|e_| hb_FileMatch( hbide_pathNormalized( e_[ 4 ], .t. ), hbide_pathNormalized( cRoot + cPPath, .t. ) ) } )
|
||||
//nP := ascan( aNodes, {|e_| hb_FileMatch( hbide_pathNormalized( e_[ 4 ], .t. ), hbide_pathNormalized( cRoot + cPPath, .t. ) ) } )
|
||||
nP := ascan( aNodes, {|e_| hb_FileMatch( hbide_pathNormalized( e_[ 4 ], .f. ), hbide_pathNormalized( cRoot + cPPath, .f. ) ) } )
|
||||
|
||||
oParent := aNodes[ nP, 1 ]
|
||||
|
||||
|
||||
@@ -174,22 +174,22 @@ METHOD IdeHome:execEvent( nMode, p )
|
||||
LOCAL cAct, qUrl, cText, cExt
|
||||
|
||||
DO CASE
|
||||
CASE nMode == tabWidget_currentChanged
|
||||
CASE nMode == "tabWidget_currentChanged"
|
||||
IF p == 0
|
||||
::qCurBrowser := ::qWelcomeBrowser
|
||||
ELSEIF p == 1
|
||||
::qCurBrowser := ::qFaqBrowser
|
||||
ENDIF
|
||||
|
||||
CASE nMode == browserStat_anchorClicked
|
||||
CASE nMode == "browserStat_anchorClicked"
|
||||
qUrl := QUrlFromPointer( p )
|
||||
cText := lower( qUrl:toString() )
|
||||
cText := qUrl:toString()
|
||||
|
||||
IF "prj-" $ cText
|
||||
IF "prj-" $ lower( cText )
|
||||
::cClickedProject := substr( cText, 5 )
|
||||
::buildProjectDetails( ::cClickedProject )
|
||||
|
||||
ELSEIF "fle-" $ cText
|
||||
ELSEIF "fle-" $ lower( cText )
|
||||
::cClickedSource := substr( cText, 5 )
|
||||
|
||||
/* Send it for Editing */
|
||||
@@ -203,7 +203,7 @@ METHOD IdeHome:execEvent( nMode, p )
|
||||
::buildProjectDetails( ::cClickedProject )
|
||||
ENDIF
|
||||
|
||||
CASE nMode == browserWelcome_contextMenuRequested .OR. nMode == browserFaq_contextMenuRequested
|
||||
CASE nMode == "browserWelcome_contextMenuRequested" .OR. nMode == "browserFaq_contextMenuRequested"
|
||||
|
||||
IF !empty( cAct := hbide_popupBrwContextMenu( ::qCurBrowser, p ) )
|
||||
IF cAct $ "Back,Forward,Home"
|
||||
@@ -289,8 +289,8 @@ METHOD IdeHome:buildWelcomeTab()
|
||||
::qWelcomeBrowser := qBrw
|
||||
::qCurBrowser := qBrw
|
||||
|
||||
qBrw:connect( "anchorClicked(QUrl)" , {|p| ::execEvent( browserStat_anchorClicked , p ) } )
|
||||
qBrw:connect( "customContextMenuRequested(QPoint)", {|p| ::execEvent( browserWelcome_contextMenuRequested, p ) } )
|
||||
qBrw:connect( "anchorClicked(QUrl)" , {|p| ::execEvent( "browserStat_anchorClicked" , p ) } )
|
||||
qBrw:connect( "customContextMenuRequested(QPoint)", {|p| ::execEvent( "browserWelcome_contextMenuRequested", p ) } )
|
||||
|
||||
qSList := QStringList()
|
||||
qSList:append( "docs" )
|
||||
@@ -488,7 +488,7 @@ METHOD IdeHome:buildFaqTab()
|
||||
qBrw:setContextMenuPolicy( Qt_CustomContextMenu )
|
||||
::setStyleSheetTextBrowser( qBrw )
|
||||
|
||||
qBrw:connect( "customContextMenuRequested(QPoint)", {|p| ::execEvent( browserFaq_contextMenuRequested, p ) } )
|
||||
qBrw:connect( "customContextMenuRequested(QPoint)", {|p| ::execEvent( "browserFaq_contextMenuRequested", p ) } )
|
||||
|
||||
::oFaqTab := oTab
|
||||
::qFaqBrowser := qBrw
|
||||
|
||||
Reference in New Issue
Block a user