Projekat

Općenito

Profil

Prijedlozi #17239 » fin_qt.diff

Ernad Husremović, 07.06.2009 21:37

Pregled razlika:

Makefile
HB_INC_COMPILE += -I$(TOP)../fmk_lib/include
HB_LIB_COMPILE += $(HB_LIB_QT) -Lc:/harbour/lib
PRG_SOURCES=\
launcher.prg \
......
rddntx \
hbcommon \
hbct \
hbmisc \
fmk_skeleton \
fmk_security \
fmk_common \
......
fmk_lokalizacija \
fmk_rabat \
hbdebug \
$(HB_GT_LIB)
hbqt \
QtGui4 \
QtCore4 \
QtNetwork4 \
QtWebkit4 \
supc++ \
gtqtc
EXE_NAME=fin.exe
launcher.prg
#include "fin.ch"
static oWnd := nil
EXTERNAL DESCEND
EXTERNAL RIGHT
......
cModul:="FIN"
PUBLIC goModul
my_qt_window()
//MsgInfo()
oFin := TFinMod():new(NIL, cModul, D_FI_VERZIJA, D_FI_PERIOD , cKorisn, cSifra, p3,p4,p5,p6,p7)
goModul:=oFin
......
return
FUNCTION MsgInfo( cMsg )
LOCAL oMB
oMB := QMessageBox():new()
oMB:setInformativeText( cMsg )
oMB:setWindowTitle( "Harbour-QT" )
oMB:show()
RETURN nil
#define QT_PTROF( oObj ) ( oObj:pPtr )
#define QT_EVE_TRIGGERED "triggered(bool)"
#define QT_EVE_TRIGGERED_B "triggered(bool)"
#define QT_EVE_HOVERED "hovered()"
#define QT_EVE_CLICKED "clicked()"
function my_qt_window()
oWnd := QMainWindow():new()
oWnd:setWindowTitle( "Testing - QMainWindow, QMenu, QMenuBar and QAction " )
oWnd:resize( 640, 200 )
Build_MenuBar( oWnd )
oWnd:show()
return
STATIC FUNCTION Build_MenuBar( oWnd )
LOCAL oMenuBar, oMenu
oMenuBar := QMenuBar():new( QT_PTROF( oWnd ) )
//oMenuBar:resize( oWnd:width(), 25 )
oMenu := QMenu():new( QT_PTROF( oMenuBar ) )
oMenu:setTitle( "&File" )
Qt_Connect_Signal( oMenu:addAction( "&Colors" ), QT_EVE_TRIGGERED_B, {|w,l| Dialogs( "Colors" , w, l ) } )
oMenu:addSeparator()
// Qt_Connect_Signal( oMenu:addAction_1( "new.png" , "&New" ), QT_EVE_TRIGGERED_B, {|w,l| FileDialog( "New" , w, l ) } )
// Qt_Connect_Signal( oMenu:addAction_1( "open.png", "&Open" ), QT_EVE_TRIGGERED_B, {|w,l| FileDialog( "Open", w, l ) } )
// oMenu:addSeparator()
// Qt_Connect_Signal( oMenu:addAction_1( "save.png", "&Save" ), QT_EVE_TRIGGERED_B, {|w,l| FileDialog( "Save", w, l ) } )
// oMenu:addSeparator()
// Qt_Connect_Signal( oMenu:addAction( "E&xit" ), QT_EVE_TRIGGERED_B, {|w,l| MsgInfo( "Exit ?" ) } )
// oMenuBar:addMenu( QT_PTROF( oMenu ) )
/*
oMenu := QMenu():new( QT_PTROF( oMenuBar ) )
oMenu:setTitle( "&Dialogs" )
Qt_Connect_Signal( oMenu:addAction( "&Colors" ), QT_EVE_TRIGGERED_B, {|w,l| Dialogs( "Colors" , w, l ) } )
Qt_Connect_Signal( oMenu:addAction( "&Fonts" ), QT_EVE_TRIGGERED_B, {|w,l| Dialogs( "Fonts" , w, l ) } )
oMenu:addSeparator()
Qt_Connect_Signal( oMenu:addAction( "&PageSetup" ), QT_EVE_TRIGGERED_B, {|w,l| Dialogs( "PageSetup", w, l ) } )
Qt_Connect_Signal( oMenu:addAction( "P&review" ), QT_EVE_TRIGGERED_B, {|w,l| Dialogs( "Preview" , w, l ) } )
oMenu:addSeparator()
Qt_Connect_Signal( oMenu:addAction( "&Wizard" ), QT_EVE_TRIGGERED_B, {|w,l| Dialogs( "Wizard" , w, l ) } )
Qt_Connect_Signal( oMenu:addAction( "W&ebPage" ), QT_EVE_TRIGGERED_B, {|w,l| Dialogs( "WebPage" , w, l ) } )
oMenuBar:addMenu( QT_PTROF( oMenu ) )
*/
oWnd:setMenuBar( QT_PTROF( oMenuBar ) )
RETURN nil
STATIC FUNCTION Dialogs( cType, w, l )
LOCAL oDlg, oUrl
DO CASE
CASE cType == "PageSetup"
oDlg := QPageSetupDialog():new()
oDlg:setWindowTitle( "Harbour-QT PageSetup Dialog" )
oDlg:show()
CASE cType == "Preview"
oDlg := QPrintPreviewDialog():new()
oDlg:setWindowTitle( "Harbour-QT Preview Dialog" )
oDlg:show()
CASE cType == "Wizard"
oDlg := QWizard():new()
oDlg:setWindowTitle( "Harbour-QT Wizard to Show Slides etc." )
oDlg:show()
CASE cType == "Colors"
oDlg := QColorDialog():new()
oDlg:setWindowTitle( "Harbour-QT Color Selection Dialog" )
oDlg:show()
CASE cType == "WebPage"
oDlg := QWebView():new()
oUrl := QUrl():new()
oUrl:setUrl( "http://www.harbour.vouch.info" )
QT_QWebView_SetUrl( QT_PTROF( oDlg ), QT_PTROF( oUrl ) )
oDlg:setWindowTitle( "Harbour-QT Web Page Navigator" )
oDlg:show()
CASE cType == "Fonts"
oDlg := QFontDialog():new()
oDlg:setWindowTitle( "Harbour-QT Font Selector" )
oDlg:show()
ENDCASE
RETURN nil
o_fin.ch
#xcommand O_PRIPR => select (F_PRIPR); usex (PRIVPATH+"PRIPR") ; set order to tag "1"
#xcommand O_PRIPRRP => select (F_PRIPRRP); usex (strtran(cDirPriv,goModul:oDataBase:cSezonDir,SLASH)+"PRIPR") alias priprrp; set order to 1
#xcommand O_SUBAN => OKumul(F_SUBAN,KUMPATH,"SUBAN",5); set order to tag 1
#xcommand O_KUF => OKumul(F_KUF ,KUMPATH,"KUF" ,2); set order to tag "ID"
#xcommand O_KIF => OKumul(F_KIF ,KUMPATH,"KIF" ,2); set order to tag "ID"
#xcommand O_ANAL => OKumul(F_ANAL,KUMPATH,"ANAL",3) ; set order to tag 1
#xcommand O_SINT => OKumul(F_SINT,KUMPATH,"SINT",2) ; set order to tag 1
#xcommand O_NALOG => OKumul(F_NALOG,KUMPATH,"NALOG",2); set order to tag 1
#xcommand O_RSUBAN => select (F_SUBAN); user (KUMPATH+"SUBAN"); set order to 1
#xcommand O_RANAL => select (F_ANAL); user (KUMPATH+"ANAL") ; set order to 1
#xcommand O_SINTSUB => select (F_SUBAN); use (KUMPATH+"SUBAN"); set order to 1
#xcommand O_BUDZET => select (F_BUDZET); use (KUMPATH+"BUDZET") ; set order to 1
#xcommand O_PAREK => select (F_PAREK); use (KUMPATH+"PAREK") ; set order to 1
#xcommand O_BBKLAS => O_POMDB(F_BBKLAS,"BBKLAS"); set order to 1
#xcommand O_IOS => O_POMDB(F_IOS,"IOS"); set order to 1
#xcommand O_PNALOG => select (F_PNALOG); usex (PRIVPATH+"PNALOG"); set order to 1
#xcommand O_PSUBAN => select (F_PSUBAN); usex (PRIVPATH+"PSUBAN"); set order to 1
#xcommand O_PANAL => select (F_PANAL); usex (PRIVPATH+"PANAL") ; set order to 1
#xcommand O_PSINT => select (F_PSINT); usex (PRIVPATH+"PSINT") ; set order to 1
#xcommand O_RJ => select (F_RJ); use (KUMPATH+"RJ") ; set order to tag "ID"
#xcommand O_FUNK => select (F_FUNK); use (KUMPATH+"FUNK") ; set order to tag "ID"
#xcommand O_FOND => select (F_FOND); use (KUMPATH+"FOND") ; set order to tag "ID"
#xcommand O_KONIZ => select (F_KONIZ); use (KUMPATH+"KONIZ") ; set order to tag "ID"
#xcommand O_IZVJE => select (F_IZVJE); use (KUMPATH+"IZVJE") ; set order to tag "ID"
#xcommand O_ZAGLI => select (F_ZAGLI); use (KUMPATH+"ZAGLI") ; set order to tag "ID"
#xcommand O_KOLIZ => select (F_KOLIZ); use (KUMPATH+"KOLIZ") ; set order to tag "ID"
#xcommand O_BUIZ => select (F_BUIZ); use (KUMPATH+"BUIZ") ; set order to tag "ID"
#xcommand O_KONTO => select (F_KONTO); use (SIFPATH+"KONTO"); set order to tag "ID"
#xcommand OX_KONTO => select (F_KONTO); usex (SIFPATH+"KONTO") ; set order to tag "ID"
#xcommand O_VKSG => select (F_VKSG); use (SIFPATH+"VKSG"); set order to tag "1"
#xcommand OX_VKSG => select (F_VKSG); usex (SIFPATH+"VKSG") ; set order to tag "1"
#xcommand O_RKONTO => select (F_KONTO); user (SIFPATH+"KONTO") ; set order to tag "ID"
#xcommand O_PARTN => select (F_PARTN); use (SIFPATH+"PARTN") ; set order to tag "ID"
#xcommand OX_PARTN => select (F_PARTN); usex (SIFPATH+"PARTN") ; set order to tag "ID"
#xcommand O_RPARTN => select (F_PARTN); user (SIFPATH+"PARTN") ; set order to tag "ID"
#xcommand O_TNAL => select (F_TNAL); use (SIFPATH+"TNAL") ; set order to tag "ID"
#xcommand OX_TNAL => select (F_TNAL); usex (SIFPATH+"TNAL") ; set order to tag "ID"
#xcommand O_TDOK => select (F_TDOK); use (SIFPATH+"TDOK") ; set order to tag "ID"
#xcommand OX_TDOK => select (F_TDOK); usex (SIFPATH+"TDOK") ; set order to tag "ID"
#xcommand O_PKONTO => select (F_PKONTO); use (SIFPATH+"pkonto") ; set order to tag "ID"
#xcommand OX_PKONTO => select (F_PKONTO); usex (SIFPATH+"pkonto") ; set order to tag "ID"
#xcommand O_VALUTE => select(F_VALUTE); use (SIFPATH+"VALUTE") ; set order to tag "ID"
#xcommand OX_VALUTE => select(F_VALUTE); usex (SIFPATH+"VALUTE") ; set order to tag "ID"
#xcommand O_FAKT => select (F_FAKT) ; use (gFaktKum+"FAKT") ; set order to tag "1"
#xcommand O_KALK => select (F_KALK) ; use (gKalkKum+"KALK") ; set order to tag "1"
#xcommand O_ROBA => select(F_ROBA); use (SIFPATH+"ROBA") ; set order to tag "ID"
#xcommand O_SAST => select(F_SAST); use (SIFPATH+"SAST") ; set order to tag "ID"
#xcommand O_TARIFA => select(F_TARIFA); use (SIFPATH+"TARIFA") ; set order to tag "ID"
#xcommand O_TRFP2 => select(F_TRFP2); use (SIFPATH+"trfp2") ; set order to tag "ID"
#xcommand O_TRFP3 => select(F_TRFP3); use (SIFPATH+"trfp3") ; set order to tag "ID"
#xcommand O_KONCIJ => select(F_KONCIJ); use (SIFPATH+"KONCIJ") ; set order to tag "ID"
#xcommand O_FINMAT => select(F_FINMAT); usex (PRIVPATH+"FINMAT") ; set order to 1
#xcommand O__KONTO => select(F__KONTO); use (PRIVPATH+"_KONTO")
#xcommand O__PARTN => select(F__PARTN); use (PRIVPATH+"_PARTN")
#xcommand O_UGOV => select(F_UGOV); use (strtran(KUMPATH,"FIN","FAKT")+"UGOV") ; set order to tag "ID"
#xcommand O_RUGOV => select(F_RUGOV); use (STRTRAN(KUMPATH,"FIN","FAKT")+"RUGOV") ; set order to tag "ID"
#xcommand O_DEST => select(F_DEST); use (STRTRAN(KUMPATH,"FIN","FAKT")+"DEST") ; set order to tag "1"
#xcommand O_VRSTEP => SELECT (F_VRSTEP); USE (SIFPATH+"VRSTEP"); set order to tag "ID"
#xcommand O_VPRIH => SELECT (F_VPRIH); USE (SIFPATH+"VPRIH"); set order to tag "ID"
#xcommand O_ULIMIT => SELECT (F_ULIMIT); USE (SIFPATH+"ULIMIT"); set order to tag "ID"
#xcommand O_TIPBL => SELECT (F_TIPBL); USE (SIFPATH+"TIPBL"); set order to tag "1"
#xcommand O_VRNAL => SELECT (F_VRNAL); USE (SIFPATH+"VRNAL"); set order to tag "1"
#xcommand O_PRENHH => select(F_PRENHH); usex (PRIVPATH+"PRENHH"); set order to tag "1"
#xcommand O_PRIPR => select (F_PRIPR); usex (PRIVPATH+"PRIPR") ; set order to tag "1"
#xcommand O_PRIPRRP => select (F_PRIPRRP); usex (strtran(cDirPriv,goModul:oDataBase:cSezonDir,SLASH)+"PRIPR") alias priprrp; set order to 1
#xcommand O_SUBAN => OKumul(F_SUBAN,KUMPATH,"SUBAN",5); set order to tag 1
#xcommand O_KUF => OKumul(F_KUF ,KUMPATH,"KUF" ,2); set order to tag "ID"
#xcommand O_KIF => OKumul(F_KIF ,KUMPATH,"KIF" ,2); set order to tag "ID"
#xcommand O_ANAL => OKumul(F_ANAL,KUMPATH,"ANAL",3) ; set order to tag 1
#xcommand O_SINT => OKumul(F_SINT,KUMPATH,"SINT",2) ; set order to tag 1
#xcommand O_NALOG => OKumul(F_NALOG,KUMPATH,"NALOG",2); set order to tag 1
#xcommand O_RSUBAN => select (F_SUBAN); user (KUMPATH+"SUBAN"); set order to 1
#xcommand O_RANAL => select (F_ANAL); user (KUMPATH+"ANAL") ; set order to 1
#xcommand O_SINTSUB => select (F_SUBAN); use (KUMPATH+"SUBAN"); set order to 1
#xcommand O_BUDZET => select (F_BUDZET); use (KUMPATH+"BUDZET") ; set order to 1
#xcommand O_PAREK => select (F_PAREK); use (KUMPATH+"PAREK") ; set order to 1
#xcommand O_BBKLAS => O_POMDB(F_BBKLAS,"BBKLAS"); set order to 1
#xcommand O_IOS => O_POMDB(F_IOS,"IOS"); set order to 1
#xcommand O_PNALOG => select (F_PNALOG); usex (PRIVPATH+"PNALOG"); set order to 1
#xcommand O_PSUBAN => select (F_PSUBAN); usex (PRIVPATH+"PSUBAN"); set order to 1
#xcommand O_PANAL => select (F_PANAL); usex (PRIVPATH+"PANAL") ; set order to 1
#xcommand O_PSINT => select (F_PSINT); usex (PRIVPATH+"PSINT") ; set order to 1
#xcommand O_RJ => select (F_RJ); use (KUMPATH+"RJ") ; set order to tag "ID"
#xcommand O_FUNK => select (F_FUNK); use (KUMPATH+"FUNK") ; set order to tag "ID"
#xcommand O_FOND => select (F_FOND); use (KUMPATH+"FOND") ; set order to tag "ID"
#xcommand O_KONIZ => select (F_KONIZ); use (KUMPATH+"KONIZ") ; set order to tag "ID"
#xcommand O_IZVJE => select (F_IZVJE); use (KUMPATH+"IZVJE") ; set order to tag "ID"
#xcommand O_ZAGLI => select (F_ZAGLI); use (KUMPATH+"ZAGLI") ; set order to tag "ID"
#xcommand O_KOLIZ => select (F_KOLIZ); use (KUMPATH+"KOLIZ") ; set order to tag "ID"
#xcommand O_BUIZ => select (F_BUIZ); use (KUMPATH+"BUIZ") ; set order to tag "ID"
#xcommand O_KONTO => select (F_KONTO); use (SIFPATH+"KONTO"); set order to tag "ID"
#xcommand OX_KONTO => select (F_KONTO); usex (SIFPATH+"KONTO") ; set order to tag "ID"
#xcommand O_VKSG => select (F_VKSG); use (SIFPATH+"VKSG"); set order to tag "1"
#xcommand OX_VKSG => select (F_VKSG); usex (SIFPATH+"VKSG") ; set order to tag "1"
#xcommand O_RKONTO => select (F_KONTO); user (SIFPATH+"KONTO") ; set order to tag "ID"
#xcommand O_PARTN => select (F_PARTN); use (SIFPATH+"PARTN") ; set order to tag "ID"
#xcommand OX_PARTN => select (F_PARTN); usex (SIFPATH+"PARTN") ; set order to tag "ID"
#xcommand O_RPARTN => select (F_PARTN); user (SIFPATH+"PARTN") ; set order to tag "ID"
#xcommand O_TNAL => select (F_TNAL); use (SIFPATH+"TNAL") ; set order to tag "ID"
#xcommand OX_TNAL => select (F_TNAL); usex (SIFPATH+"TNAL") ; set order to tag "ID"
#xcommand O_TDOK => select (F_TDOK); use (SIFPATH+"TDOK") ; set order to tag "ID"
#xcommand OX_TDOK => select (F_TDOK); usex (SIFPATH+"TDOK") ; set order to tag "ID"
#xcommand O_PKONTO => select (F_PKONTO); use (SIFPATH+"pkonto") ; set order to tag "ID"
#xcommand OX_PKONTO => select (F_PKONTO); usex (SIFPATH+"pkonto") ; set order to tag "ID"
#xcommand O_VALUTE => select(F_VALUTE); use (SIFPATH+"VALUTE") ; set order to tag "ID"
#xcommand OX_VALUTE => select(F_VALUTE); usex (SIFPATH+"VALUTE") ; set order to tag "ID"
#xcommand O_FAKT => select (F_FAKT) ; use (gFaktKum+"FAKT") ; set order to tag "1"
#xcommand O_KALK => select (F_KALK) ; use (gKalkKum+"KALK") ; set order to tag "1"
#xcommand O_ROBA => select(F_ROBA); use (SIFPATH+"ROBA") ; set order to tag "ID"
#xcommand O_SAST => select(F_SAST); use (SIFPATH+"SAST") ; set order to tag "ID"
#xcommand O_TARIFA => select(F_TARIFA); use (SIFPATH+"TARIFA") ; set order to tag "ID"
#xcommand O_TRFP2 => select(F_TRFP2); use (SIFPATH+"trfp2") ; set order to tag "ID"
#xcommand O_TRFP3 => select(F_TRFP3); use (SIFPATH+"trfp3") ; set order to tag "ID"
#xcommand O_KONCIJ => select(F_KONCIJ); use (SIFPATH+"KONCIJ") ; set order to tag "ID"
#xcommand O_FINMAT => select(F_FINMAT); usex (PRIVPATH+"FINMAT") ; set order to 1
#xcommand O__KONTO => select(F__KONTO); use (PRIVPATH+"_KONTO")
#xcommand O__PARTN => select(F__PARTN); use (PRIVPATH+"_PARTN")
#xcommand O_UGOV => select(F_UGOV); use (strtran(KUMPATH,"FIN","FAKT")+"UGOV") ; set order to tag "ID"
#xcommand O_RUGOV => select(F_RUGOV); use (STRTRAN(KUMPATH,"FIN","FAKT")+"RUGOV") ; set order to tag "ID"
#xcommand O_DEST => select(F_DEST); use (STRTRAN(KUMPATH,"FIN","FAKT")+"DEST") ; set order to tag "1"
#xcommand O_VRSTEP => SELECT (F_VRSTEP); USE (SIFPATH+"VRSTEP"); set order to tag "ID"
#xcommand O_VPRIH => SELECT (F_VPRIH); USE (SIFPATH+"VPRIH"); set order to tag "ID"
#xcommand O_ULIMIT => SELECT (F_ULIMIT); USE (SIFPATH+"ULIMIT"); set order to tag "ID"
#xcommand O_TIPBL => SELECT (F_TIPBL); USE (SIFPATH+"TIPBL"); set order to tag "1"
#xcommand O_VRNAL => SELECT (F_VRNAL); USE (SIFPATH+"VRNAL"); set order to tag "1"
#xcommand O_PRENHH => select(F_PRENHH); usex (PRIVPATH+"PRENHH"); set order to tag "1"
prenos-razmjena_podataka_menu.prg
AADD(opc, "4. export dbf (svi nalozi) ")
AADD(opcexe, {|| st_sv_nal() })
if IsPlanika()
AADD(opc, "6. pos->fin ")
AADD(opcexe, {|| PosFin()})
endif
AADD(opc, "6. pos->fin ")
AADD(opcexe, {|| PosFin()})
Menu_SC("raz")
tfinmod.prg
::oSqlLog:=TSqlLogNew()
PID("START")
//PID("START")
if gSql=="D"
::oSqlLog:open()
::oDatabase:scan()
......
method setGVars()
SetFmkSGVars()
//SetFmkSGVars()
set_global_vars()
SetFmkRGVars()
private cSection:="1"
(2-2/6)