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

List:       kde-panel-devel
Subject:    Re: Storing a list of elements in QML
From:       Daniel Kreuter <d.kreuter () fh-bingen ! de>
Date:       2012-07-11 16:56:35
Message-ID: 2386191.o47U7zMy69 () linux-h9fb ! site
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


On Wednesday, July 11, 2012 07:30:50 AM Arthur Taborda wrote:

Hey

I am recently learning (at least trying to) plasmoid development in QML for a 
week. To do this I am developing a very simple pomodoro plasmoid, but right 
now I'm stuck because I can't find any documentation to make some simple 
things.

In my plasmoid I have a list of tasks and I need to store this tasks 
somewhere. I don't know how is the proper way to do this, but I'm assuming 
it's on the kcfg file. The problem is that I am not sure how to store a list of 
elements in kcfg, and how to get back in a ListModel too. I am trying now 
using a big string separated by commas, but it doesn't seen the right way, and 
it's not working too...

GitHub repo: https://github.com/arthurtaborda/Tomatoid

Please help me :/

-- 
Arthur Taborda

Hi,

for storing data in qml you can make use of the Model-View Pattern of Qt 
(described in detail here: http://doc.qt.nokia.com/4.7-snapshot/model-view-
programming.html). 
When the tasks are in the kfcg file, there is a small tutorial here: 
http://techbase.kde.org/Development/Tutorials/Using_KConfig_XT

Hope this would help

So long

Daniel


[Attachment #5 (unknown)]

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" \
"http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" \
content="1" /><style type="text/css"> p, li { white-space: pre-wrap; }
</style></head><body style=" font-family:'Sans Serif'; font-size:9pt; \
font-weight:400; font-style:normal;"> <p style=" margin-top:0px; margin-bottom:0px; \
margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; \
-qt-user-state:0;">On Wednesday, July 11, 2012 07:30:50 AM Arthur Taborda wrote:<br \
/></p> <p style=" margin-top:12px; margin-bottom:12px; margin-left:40px; \
margin-right:40px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">Hey<br \
/><br />I am recently learning (at least trying to) plasmoid development in QML for a \
week. To do this I am developing a very simple pomodoro plasmoid, but right now I'm \
stuck because I can't find any documentation to make some simple things.<br /><br \
/>In my plasmoid I have a list of tasks and I need to store this tasks somewhere. I \
don't know how is the proper way to do this, but I'm assuming it's on the kcfg file. \
The problem is that I am not sure how to store a list of elements in kcfg, and how to \
get back in a ListModel too. I am trying now using a big string separated by commas, \
but it doesn't seen the right way, and it's not working too...<br /><br />GitHub \
repo: <a href="https://github.com/arthurtaborda/Tomatoid"><span style=" \
text-decoration: underline; \
color:#0057ae;">https://github.com/arthurtaborda/Tomatoid</span></a><br /><br \
/>Please help me :/<br /><br />-- <br />Arthur Taborda<br /></p> <p style=" \
margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px; -qt-user-state:0;">Hi,</p> <p \
style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; \
margin-right:0px; -qt-block-indent:0; text-indent:0px; ">&nbsp;</p> <p style=" \
margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px; -qt-user-state:0;">for storing data in qml you \
can make use of the Model-View Pattern of Qt (described in detail here: \
http://doc.qt.nokia.com/4.7-snapshot/model-view-programming.html). </p> <p style=" \
margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px; -qt-user-state:0;">When the tasks are in the \
kfcg file, there is a small tutorial here: \
http://techbase.kde.org/Development/Tutorials/Using_KConfig_XT</p> <p \
style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; \
margin-right:0px; -qt-block-indent:0; text-indent:0px; ">&nbsp;</p> <p style=" \
margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px; -qt-user-state:0;">Hope this would help</p> <p \
style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; \
margin-right:0px; -qt-block-indent:0; text-indent:0px; ">&nbsp;</p> <p style=" \
margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px; -qt-user-state:0;">So long</p> <p \
style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; \
margin-right:0px; -qt-block-indent:0; text-indent:0px; ">&nbsp;</p> <p style=" \
margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px; -qt-user-state:0;">Daniel<br /><br \
/></p></body></html>



_______________________________________________
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