|
|
2009-12-02
, 13:47
|
|
Posts: 2,102 |
Thanked: 1,309 times |
Joined on Sep 2006
|
#52
|
I know it's probably out of the scope of mbarcode, but Qt itself has some plugin/scripting oriented functionality. Out of the box you get C(++), Javascript, plus Python and Lua via extra libs (there might be others I don't know about).
edit: Didn't really answer your question about zbar compatibility, but anyways... I guess getting the decode barcode to clipboard is the most simple way to go - and possible the only viable option.
but from the javascript the barcode is chopped into bits, we'd need to see the rest of the code to work out how those bits are used.|
|
2009-12-02
, 14:23
|
|
Posts: 219 |
Thanked: 94 times |
Joined on Nov 2009
@ Helsinki, Finland
|
#53
|
Well you can copy from the text fields in mbarcode atm, but it would probably be preferable if you could scan the barcode (just test and see if it recognises it) and then open a specific webpage with the barcode number as a parameter. Not sure if that's doable mind youbut from the javascript the barcode is chopped into bits, we'd need to see the rest of the code to work out how those bits are used.
From the Javascript you can see that it just wants the whole data without chopping. The code chops it and fills a form in the web page (bank account, payment amount, reference number etc.).|
|
2009-12-02
, 14:27
|
|
Posts: 3,319 |
Thanked: 5,610 times |
Joined on Aug 2008
@ Finland
|
#54
|
Do you have a link to any articles about using plugins in e.g. Python in a C/C++ Qt app?
|
|
2009-12-02
, 15:52
|
|
Posts: 13 |
Thanked: 6 times |
Joined on Nov 2009
|
#55
|
If plugins need to have their own GUI then is't applications, not plugins. In my opinion, the best way to handle this barcodes is:|
|
2009-12-02
, 16:17
|
|
Posts: 2,102 |
Thanked: 1,309 times |
Joined on Sep 2006
|
#56
|
| The Following User Says Thank You to lardman For This Useful Post: | ||
|
|
2009-12-02
, 17:35
|
|
|
Posts: 251 |
Thanked: 131 times |
Joined on Oct 2009
@ USA
|
#57
|
Ok, looks like some problem in my DBus signalling code (sending messages out to other interested apps). Does this happen all the time, for every barcode you scan and decode?
|
|
2009-12-02
, 19:03
|
|
Posts: 13 |
Thanked: 6 times |
Joined on Nov 2009
|
#59
|
which means apps would need to register an interest in a certain type of barcode/barcode payload type
I just thought that the plugin method would be less messy and would centralise all the relevant applications in one place.
|
|
2009-12-02
, 20:17
|
|
Posts: 2,102 |
Thanked: 1,309 times |
Joined on Sep 2006
|
#60
|
![]() |
| Tags |
| barcode, camera, mbarcode |
| Thread Tools | |
|
edit: Didn't really answer your question about zbar compatibility, but anyways... I guess getting the decode barcode to clipboard is the most simple way to go - and possible the only viable option.
function barCode(curForm) { var bCode = null; bCode = prompt ("Lue laskun viivakoodi ao. tekstikenttään.", "") if ( bCode == null) return false //* start code may be missing so lets look for version (1/2) var bV = bCode.substring(0,1); if (bV == "1" || bV == "2") {bCode = "^" + bCode;} bV = bCode.substring(1,2); var bEr = true; if (bV == "1" || bV == "2") { bEr = false; } if ( (bCode.length < 50) || (bEr) ) { alert("Viivakoodin luku ei onnistu") ; return false; } if ( curForm.paymentbeneficiaryname.value > " ") alert("Tarkista saajan tilinumero ja nimi, niitä ei korvattu viivakoodilta") else curForm.paymenttoaccount.value = bCode.substring(2,16); curForm.paymentamount.value = l_z(bCode.substring(16,22) + "," + bCode.substring(22,24)); curForm.paymentreference.value = l_z(bCode.substring(24,44)); curForm.paymentduedate.value = bCode.substring(48,50) + "." + bCode.substring(46,48) + "." + bCode.substring(44,46); // For application logging curForm.newpaymentlogging.value = "1"; // only euros accepted if (bV == "1") { curForm.paymentamount.value = " "; } return false; }Last edited by naabi; 2009-12-02 at 12:48.