[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-panel-devel
Subject:    Accessing a C++ dataengine from a QML plasmoid
From:       Guillaume DE BURE <guillaume.debure () gmail ! com>
Date:       2013-01-30 21:10:40
Message-ID: 6126001.1G0vcuC6RM () localhost
[Download RAW message or body]

Hi all,

Reading the documentation on userbase did not really help me on understanding what is \
going wrong on what I'm trying to achieve, maybe one of you will be able to help.

Some context:
For years, I've been trying to use plasma inside Skrooge to manage our dashboard. \
Long story short, I've somehow managed to get something ruunning in C++, but would \
like to move to QML, as this is clearly the way to go.

The problem:
I have a dataengine running inside Skrooge, that fetches data from the .skg file \
(which is in fact, an SQLite file). This dataengine is written in C++, and the \
relevant code can be found there: \
https://projects.kde.org/projects/extragear/office/skrooge/repository/revisions/plasma-dashboard/entry/skg_dataengine/skgdataengine.cpp#L97


As you can see this dataengine contains a source "Accounts", for which keys are an \
account name, and values are a QHash containing other account properties. Accessing \
this data from a C++ plasmoid works well (code: \
https://projects.kde.org/projects/extragear/office/skrooge/repository/revisions/plasma-dashboard/entry/plugins/applet/account/accountskroogoid.cpp)


However, I am not completely clear how to access it in QML. Userbase seems to say it \
should be possible: http://techbase.kde.org/Development/Tutorials/Plasma/QML/API#DataModel


So I made an attempt that looks like this, but that does not work:
https://projects.kde.org/projects/extragear/office/skrooge/repository/revisions/plasma-dashboard/entry/plugins/applet/account-qml/contents/ui/main.qml


Can anybody help me ? Thanks in advance :)

Guillaume


-- 
Skrooge, a free, Open Source, personal finances software for linux, Mac OS, Windows
http://skrooge.org
_______________________________________________
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic