fivetouch

Moderator: Enrico Maria Giordano

Re: fivetouch

Postby Antonio Linares » Tue Jun 09, 2015 5:08 pm

You can not use a do while there.

If you want to request the user more data, you have to run the entire dialog again
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42099
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: fivetouch

Postby solving » Thu Jun 11, 2015 4:14 pm

salve
in questo esempio mi ritorna Errore nei comandi :

oBrw:setCurrentCell(0,0)
oBrw:setCurrentCell(oBrw:rowCount()-1,0)

Grazie

* ------------------------ ELENCO
FUNCTION Elenco( fDbf, fNtx )
local oDlg := QDialog()
local oBrw := QTableView( oDlg )
local oModel := QStandardItemModel( 3, 4, oDlg )
LOCAL nNumRecord := 0, i
LOCAL oBtnEnd, oBtnUp, oBtnDw

* --- Dichiaro Button
@ 320, 25 BUTTON oBtnEnd PROMPT "Abbandona" OF oDlg ;
ACTION oDlg:End()

@ 320, 150 BUTTON oBtnUp PROMPT "Inizio" OF oDlg ;
ACTION Inizio( oBrw )

@ 320, 250 BUTTON oBtnDw PROMPT "Fine" OF oDlg ;
ACTION Fine( oBrw )

* --- Apro File
USE( fDbf ) INDEX ( fNtx ) ALIAS Dati NEW
nNumRecord := Dati->( RecCount() )

* --- Imposto Intestazione
oModel:SetHorizontalHeaderItem( 0, QStandardItem( "Codice" ) )
oModel:SetHorizontalHeaderItem( 1, QStandardItem( "Descrizione" ) )
oModel:SetHorizontalHeaderItem( 2, QStandardItem( "Q.tà" ) )
oModel:SetHorizontalHeaderItem( 3, QStandardItem( "Prezzo" ) )

* --- Carico Dati
For i = 0 TO nNumRecord
oModel:SetItem( i, 0, QStandardItem( Dati->CODICE ) )
oModel:SetItem( i, 1, QStandardItem( Dati->DESC ) )
oModel:SetItem( i, 2, QStandardItem( STR(Dati->QTA) ) )
oModel:SetItem( i, 3, QStandardItem( STR(Dati->PRE) ) )
Dati->( DBSKIP() )
NEXT

* --- Chiudo File
Dati->( DBCLOSEAREA() )

* --- Imposto Form Principale
oDlg:SetWindowTitle( "Elenco" )
oDlg:Resize( 450, 350 )
oDlg:Center()

* --- Imposto Form Browse
oBrw:SetModel( oModel )
oBrw:Resize( 445, 310 )

* --- Imposto Larghezza Colonne della Browse
oBrw:setColumnWidth(0, 90)
oBrw:setColumnWidth(1, 200)
oBrw:setColumnWidth(2, 40)
oBrw:setColumnWidth(3, 50)

* --- Esecuzione
oBrw:show()
oDlg:Exec()

RETURN NIL

* --- Posizione Top del Browse
FUNCTION Inizio( oBrw )
oBrw:scrollToTop()
*oBrw:setCurrentCell(0,0)
oBrw:setFocus()
RETURN NIL

* --- Posizione Bottom del Browse
FUNCTION Fine( oBrw )
oBrw:scrollToBottom()
*oBrw:setCurrentCell(oBrw:rowCount()-1,0)
oBrw:setFocus()
RETURN NIL

-------------------------------

info sulla sintassi per la funzione VALID nell'istruzione :
@ 15, 060 GET oCod VAR cCod OF oDlg

se uso @ 15, 060 GET oCod VAR cCod OF oDlg Valid myFunc()
BUFF.prg(99)
Error E0030
Syntax error "syntax error at '@'"

grazie
solving
 
Posts: 65
Joined: Fri Jun 05, 2009 7:55 am
Location: Sicily ( ct ) - Italy

Re: fivetouch

Postby Antonio Linares » Thu Jun 11, 2015 4:20 pm

VALID clause is not supported yet, sorry
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42099
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: fivetouch

Postby Antonio Linares » Thu Jun 11, 2015 4:21 pm

Current GET supported clauses:

Code: Select all  Expand view
#xcommand @ <nRow>, <nCol> GET <oGet> ;
             [ VAR <uData> ] ;
             [ OF <oWnd> ] ;
             [ SIZE <nWidth>, <nHeight> ] ;              
       => ;    
          <oGet> := QLineEdit():New( <oWnd> ) ;
          [; <oGet>:SetText( IfNil( <uData>, "" ) ) ] ;
          [; <oGet>:Move( <nCol>, <nRow> ) ] ;
          [; <oGet>:Resize( IfNil( <nWidth>, 80 ), IfNil( <nHeight>, 30 ) ) ] ;          
          [; <oGet>:Connect( "textChanged(QString)",;
                    { | cValue | <uData> := cValue } ) ]
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42099
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

esempio di qt + harbour con valid

Postby solving » Tue Jun 16, 2015 2:38 pm

salve

esempio di qt + harbour con valid

si puo' usare con fivetouch ?




#include "hbqtstd.ch"

FUNCTION Main()
LOCAL nWidth, nHeight, nColor
LOCAL SAYLIST := {}
LOCAL GETLIST := {}
nWidth := 5
nHeight := 0
nColor := "Red "
@ 02, 05 Qsay "Width: " Qget nWidth VALID nWidth >= 5 .AND. nWidth <= 10
@ 03, 05 Qsay "Heigth:" Qget nHeight
@ 06, 30 Qsay "Color: " Qget nColor
QREAD
QApplication():exec()
RETURN NIL
solving
 
Posts: 65
Joined: Fri Jun 05, 2009 7:55 am
Location: Sicily ( ct ) - Italy

Re: fivetouch

Postby Antonio Linares » Tue Jun 16, 2015 4:26 pm

VALID is not currently supported, so you have to validate the GET data yourself.

Please review QLineEdit() docs:

http://doc.qt.io/qt-4.8/qlineedit.html
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42099
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Previous

Return to All products support

Who is online

Users browsing this forum: No registered users and 4 guests