Active Topics

 



Notices


Reply
Thread Tools
Posts: 2,102 | Thanked: 1,309 times | Joined on Sep 2006
#761
Nothing that I know of, but if you find some method I'd be happy to look at incorporating it.
 

The Following User Says Thank You to lardman For This Useful Post:
Posts: 67 | Thanked: 14 times | Joined on Mar 2010 @ Portland OR USA
#762
Originally Posted by lardman View Post
Nothing that I know of, but if you find some method I'd be happy to look at incorporating it.
Columbus takes the GPs and creates a blue tooth connection to the computer, is it a special thing for that Program? Or something that is used at the system level... I wonder.
 

The Following User Says Thank You to telecomgeek79 For This Useful Post:
Posts: 109 | Thanked: 45 times | Joined on Aug 2010
#763
Originally Posted by lardman View Post
No, that's the one, rename it (get rid of the .txt extension which I had to add to allow the file to be attached) and place it in /usr/share/mbarcode/plugins/pythonqt/

Then it should just appear in the plugin settings window (if you want to disable all other plugins and only have that one running) or otherwise it will be listed in the results window when you scan an EAN/ISBN barcode.

You'll need to install pyside from extras-devel (if this script were packaged up correctly rather than just a single file, that would be a dep to be automatically installed.)

It's just Python code, take a look at it, should be pretty easy to understand what it's doing, etc.
I installed pyside, and I renamed the plugin and put it in the directory listed above (copy and pasted just to be sure).

It doesn't come up in the plugins list, I even tried rebooting the phone. When I scan a barcode there's nothing available to write to a file.

Last edited by eachna; 2011-02-09 at 02:13.
 

The Following User Says Thank You to eachna For This Useful Post:
Posts: 5,795 | Thanked: 3,151 times | Joined on Feb 2007 @ Agoura Hills Calif
#764
I didn't know anything about this till a few days ago when I got a card from Symantec saying I could enter their contest by using my barcode application. I remembered there was one available, downloaded mbarcode and it worked perfectly.
__________________
All I want is 40 acres, a mule, and Xterm.
 

The Following 2 Users Say Thank You to geneven For This Useful Post:
Posts: 8 | Thanked: 4 times | Joined on Jan 2011 @ Vancouver, BC, Canada
#765
I've been looking at the mbarcode code and I see xml files describing the interface. I was expecting to see interface defined in QML instead.
My experience with Qt is very limited so my question would be if using xml -based description for interface (I assume those are processed by qdbusxml2cpp) is a preferable way of describing/designing user interfaces? What about QML - will that result in better performance as Qt documentation claims?
 
Posts: 2,102 | Thanked: 1,309 times | Joined on Sep 2006
#766
Originally Posted by eachna View Post
I installed pyside, and I renamed the plugin and put it in the directory listed above (copy and pasted just to be sure).

It doesn't come up in the plugins list, I even tried rebooting the phone. When I scan a barcode there's nothing available to write to a file.
Try starting mbarcode from the terminal and see whether it has any messages about the plugin. Can you confirm the filename and path for me too please as it works fine for me.
 
Posts: 2,102 | Thanked: 1,309 times | Joined on Sep 2006
#767
Originally Posted by apolkhanov View Post
I've been looking at the mbarcode code and I see xml files describing the interface. I was expecting to see interface defined in QML instead.
My experience with Qt is very limited so my question would be if using xml -based description for interface (I assume those are processed by qdbusxml2cpp) is a preferable way of describing/designing user interfaces? What about QML - will that result in better performance as Qt documentation claims?
The XML comes from .ui files from Qt Designer. My understanding is that these are parsed at startup to generate the objects that they represent. QML is afaiu designed to write the whole app, rather than just a couple of window's worth of widgets and is used via Javascript. I'd be more interested in getting rid of the XML stuff and coding the entire UI directly in C++ rather than going near QML tbh.

No idea about the speed claims, but I can't see how using Javascript is going to help things.
 

The Following User Says Thank You to lardman For This Useful Post:
Posts: 109 | Thanked: 45 times | Joined on Aug 2010
#768
Originally Posted by lardman View Post
Try starting mbarcode from the terminal and see whether it has any messages about the plugin. Can you confirm the filename and path for me too please as it works fine for me.
File name:
[1|user@Nokia-N900|/usr/share/mbarcode/plugins/pythonqt]ls
isbn_saver.py

Path:
[1|user@Nokia-N900|/usr/share/mbarcode/plugins/pythonqt]pwd
/usr/share/mbarcode/plugins/pythonqt

Debugging:

[1|user@Nokia-N900|/usr/share/mbarcode/plugins/pythonqt]"main():" Started mbarcode
[1|user@Nokia-N900|/usr/share/mbarcode/plugins/pythonqt]kill "main():" Showed splash, t= 2673
"main():" Showing window
"MaemoBarcodeWindow():" Started MaemoBarcodeWindow
"MaemoBarcodeWindow():" Killing the camera app, t= 2931
"MaemoBarcodeWindow():" Setting window title, t= 3174
"MaemoBarcodeWindow():" Setting up dbus, t= 3176
"MaemoBarcodeWindow():" Setting up lensCoverPropertyModified
"MaemoBarcodeWindow():" Setting up focusButtonPropertyModified
"MaemoBarcodeWindow():" Setting up cameraButtonPropertyModified
"MaemoBarcodeWindow():" Initing state of lens cover, t= 3231
"MaemoBarcodeWindow():" Creating settings, t= 3235
"MaemoBarcodeWindow():" Initializing decoder, t= 3337
"ZBarDecoderThread():" Created scanner
"ZBarDecoderThread():" Enabled scanner
"ZBarDecoderThread():" Created image
"MaemoBarcodeWindow():" Initializing video widget, t= 3382
VideoWidget::VideoWidget(): Called
VideoWidget::VideoWidget(): Getting device type
We're an N900
VideoWidget::VideoWidget(): Initializing pipeline
VideoWidget::initPipeline() called
VideoWidget::initPipeline(): initializing gstreamer
VideoWidget::initPipeline(): creating new pipeline
VideoWidget::initPipeline(): getting bus
VideoWidget::initPipeline(): adding watch
VideoWidget::initPipeline(): unrefing bus
VideoWidget::initPipeline(): making factory
VideoWidget::initPipeline(): setting object
VideoWidget::initPipeline(): camera_src is now loaded
VideoWidget::initPipeline(): Creating csp_filter
VideoWidget::initPipeline(): csp_filter is now loaded
VideoWidget::initPipeline(): Using N900 caps
VideoWidget::initPipeline(): Used N900 caps
VideoWidget::initPipeline(): Linking filtered
VideoWidget::initPipeline(): Unref caps
VideoWidget::initPipeline(): Using rgb caps
VideoWidget::initPipeline(): Linking again
VideoWidget::initPipeline(): Linking another filtered
VideoWidget::initPipeline(): Unrefing caps
VideoWidget::initPipeline(): Ask for emitted signals
VideoWidget::initPipeline(): Creating screen sink
Pipeline initialized with success!
VideoWidget::VideoWidget(): Pipeline initialized
VideoWidget::VideoWidget(): Setting up images
VideoWidget::VideoWidget(): Setting up frame counts
VideoWidget::VideoWidget(): Finished
"MaemoBarcodeWindow():" Setting video widget attributes, t= 5908
"MaemoBarcodeWindow():" Finished setting video widget attributes, t= 5911
"MaemoBarcodeWindow():" Connecting signals, t= 5915
"MaemoBarcodeWindow():" Initializing buttons, t= 5918
"MaemoBarcodeWindow():" Checking lens cover state, t= 5991
"MaemoBarcodeWindow():" Setting central widget, t= 5994
"MaemoBarcodeWindow():" Finished, t= 6470
"main():" Setup DBus connections, t= 6527
MaemoBarcodeWindow::lensCoverPropertyModified(): is true
VideoWidget::start(): Called with startEvenIfNotYetStarted = false and lensCoverOpen = true
VideoWidget::start(): Setting pipeline state
VideoWidget::refocus(): Calling refocus
VideoWidget::refocus(): Interval is 2000
VideoWidget::refocus(): Refocus called
New buffer added!
Appsink initialized!
Start dmtx thread running
Start zbar thread running
analyse_image(): start dmtx thread running
analyse_image(): no barcode found, start zbar thread running
analyse_image(): no barcode found, start zbar thread running
analyse_image(): no barcode found, start zbar thread running
analyse_image(): no barcode found, start zbar thread running
analyse_image(): no barcode found, start zbar thread running
analyse_image(): start dmtx thread running
analyse_image(): no barcode found, start zbar thread running
VideoWidget::busCallback(): Autofocus failed message received.
analyse_image(): no barcode found, start zbar thread running
analyse_image(): no barcode found, start zbar thread running
analyse_image(): no barcode found, start zbar thread running
VideoWidget::refocus(): Calling refocus
VideoWidget::refocus(): Interval is 2000
VideoWidget::refocus(): Refocus called
analyse_image(): no barcode found, start zbar thread running
analyse_image(): no barcode found, start zbar thread running
analyse_image(): start dmtx thread running
analyse_image(): no barcode found, start zbar thread running
analyse_image(): no barcode found, start zbar thread running
analyse_image(): no barcode found, start zbar thread running
analyse_image(): no barcode found, start zbar thread running
analyse_image(): no barcode found, start zbar thread running
analyse_image(): start dmtx thread running
analyse_image(): no barcode found, start zbar thread running
analyse_image(): no barcode found, start zbar thread running
analyse_image(): no barcode found, start zbar thread running
VideoWidget::busCallback(): Autofocus failed message received.
VideoWidget::refocus(): Calling refocus
VideoWidget::refocus(): Interval is 2000
VideoWidget::refocus(): Refocus called
analyse_image(): no barcode found, start zbar thread running
analyse_image(): no barcode found, start zbar thread running
analyse_image(): no barcode found, start zbar thread running
analyse_image(): start dmtx thread running
analyse_image(): no barcode found, start zbar thread running
analyse_image(): no barcode found, start zbar thread running
analyse_image(): no barcode found, start zbar thread running
analyse_image(): no barcode found, start zbar thread running
MaemoBarcodeWindow::lensCoverPropertyModified(): is false
VideoWidget::stop(): Called with stopCompletely = false
VideoWidget::stop(): Setting pipeline to paused


The Top of the plugin info (to make sure I have the right file). I couldn't capture all of it:
import sys
from PySide import QtGui, QtCore

# Barcode types returned by libzbar, from zbar.h
#
# typedef enum zbar_symbol_type_e {
# ZBAR_NONE = 0, /**< no symbol decoded */
# ZBAR_PARTIAL = 1, /**< intermediate status */
# ZBAR_EAN8 = 8, /**< EAN-8 */
# ZBAR_UPCE = 9, /**< UPC-E */
# ZBAR_ISBN10 = 10, /**< ISBN-10 (from EAN-13). @since 0.4 */
# ZBAR_UPCA = 12, /**< UPC-A */
# ZBAR_EAN13 = 13, /**< EAN-13 */
# ZBAR_ISBN13 = 14, /**< ISBN-13 (from EAN-13). @since 0.4 */
# ZBAR_I25 = 25, /**< Interleaved 2 of 5. @since 0.4 */
# ZBAR_DATABAR = 34, /**< GS1 DataBar (RSS). @since 0.11 */
# ZBAR_DATABAR_EXP = 35, /**< GS1 DataBar Expanded. @since 0.11 */
# ZBAR_CODE39 = 39, /**< Code 39. @since 0.4 */
# ZBAR_PDF417 = 57, /**< PDF417. @since 0.6 */
# ZBAR_QRCODE = 64, /**< QR Code. @since 0.10 */
# ZBAR_CODE93 = 93, /**< Code 93. @since 0.11 */
# ZBAR_CODE128 = 128, /**< Code 128 */
# ZBAR_SYMBOL = 0x00ff, /**< mask for base symbol type */
# ZBAR_ADDON2 = 0x0200, /**< 2-digit add-on flag */
# ZBAR_ADDON5 = 0x0500, /**< 5-digit add-on flag */
# ZBAR_ADDON = 0x0700, /**< add-on flag mask */
# } zbar_symbol_type_t;

Last edited by eachna; 2011-02-11 at 15:55.
 
Posts: 8 | Thanked: 4 times | Joined on Jan 2011 @ Vancouver, BC, Canada
#769
Originally Posted by lardman View Post
I'd be more interested in getting rid of the XML stuff and coding the entire UI directly in C++ rather than going near QML tbh.
.
I researched it further and I can say that your with is partially granted by the fact that those *.ui file converted to ui_<something>.h/cpp files by qmake and then everything together compiled as regular c++ project. --> see "#include "ui_mainwindow.h"" in a code. That answers you worries that xml is parsed by application at runtime - it is not. UI editor with preview is a nice tool IMHO.
 
Posts: 2,102 | Thanked: 1,309 times | Joined on Sep 2006
#770
@eachna:

Do you have mbarcode-plugin-pythonqtwrapper installed?

Assuming you do, try opening the settings menu (which forces the plugins to be loaded) then see if there are any error messages related to loading this plugin.

The paths all look fine, the only other possibilities are that the Python script name doesn't match the class name within (the two must match, bar the .py extension) or perhaps it has dos line endings rather than unix, which is stopping it from being loaded.
 
Reply

Tags
barcode, camera, mbarcode


 
Forum Jump


All times are GMT. The time now is 19:28.