Behaviours with States
Hi there, In my QML plasmoid I was tracking a bug related to using Behaviours with States, when I found this helpful documentation page: http://qt-project.org/doc/qt-4.8/qml-behaviors-and-states.html This solved it for me, or rather nudged me in the right direction. I have found another way of solving this problem - just explicitly define the default state: states: [ State { name: GreenState when: mouser.containsMouse PropertyChanges { target: coloredRect color: green } }, State { name: PropertyChanges { target: coloredRect color: red } } ] This does not require the rest of the QML app to be aware of the name of the new default state; nor does it require the default state conditions to be precisely defined (which sometimes might be a challenge, and besides opens the plasmoid for new, hard to track errors). The empty name denotes the default base state anyway. I have tested it in my plasmoid and it indeed works. I think it would be a good idea to out that in the docs. -- Pozdrawiam Michał rysiek Woźniak Fundacja Wolnego i Otwartego Oprogramowania signature.asc Description: This is a digitally signed message part. ___ Plasma-devel mailing list Plasma-devel@kde.org https://mail.kde.org/mailman/listinfo/plasma-devel
Re: Using a system-default File Dialog in QML
Dnia sobota, 13 kwietnia 2013 o 19:56:25 Michał 'rysiek' Woźniak napisał(a): Hi again, I managed to load and show the dialog, now am having problems handling the signals. What is the correct way of handling them? I tried: (...) Okay, got it. Sorry for bothering you guys. The magic incantation that got the job done was: fd = new SaveFileDialog() function fdAccepted(fdlg) { console.log('exportTaskConfig(): file dialog accepted') console.log('+- file selected: ' + fdlg.file) } fd.accepted.connect(fdAccepted) -- Pozdrawiam Michał rysiek Woźniak Fundacja Wolnego i Otwartego Oprogramowania signature.asc Description: This is a digitally signed message part. ___ Plasma-devel mailing list Plasma-devel@kde.org https://mail.kde.org/mailman/listinfo/plasma-devel
Re: Copy text to clipboard from javascript plasmoid
Hi there, Yes, this is a thread from 2010. Still, I cannot find any info on using the clipboard directly from QML/JS. I found two interesting things. First of all, a C++ solution: http://ruedigergad.com/2011/08/06/qml-and-clipboard-interaction/ However, I do not know C++, so this is not a solution for me. The second thing is what the original poster: http://salout.github.com/blog/2010/02/07/simple_ruby_plasmoid.html This, however, is a Ruby example. I have found a Qt QML object: http://doc.qt.digia.com/4.7/qml-qt-members.html But the Qt.application does not contain the clipboard object. So apparently this is not the way. Any pointers? -- Pozdrawiam Michał rysiek Woźniak Fundacja Wolnego i Otwartego Oprogramowania signature.asc Description: This is a digitally signed message part. ___ Plasma-devel mailing list Plasma-devel@kde.org https://mail.kde.org/mailman/listinfo/plasma-devel
IOJob file write access
Hi there, I am reading the docs on IOJob and LocalIO: http://techbase.kde.org/Development/Tutorials/Plasma/JavaScript/API- IOJobs http://techbase.kde.org/Development/Tutorials/Plasma/JavaScript/API- LocalIO Am I reading this correctly that the IOJob object gives a read-only access to files? If so, is there a way to get write-access to files in QML/JS? -- Pozdrawiam Michał rysiek Woźniak Fundacja Wolnego i Otwartego Oprogramowania signature.asc Description: This is a digitally signed message part. ___ Plasma-devel mailing list Plasma-devel@kde.org https://mail.kde.org/mailman/listinfo/plasma-devel
Using a system-default File Dialog in QML
Hi there, I can't find a way to use a standard, system-default file dialog in QML. Is there a way? All I was able to find were ways to implement one in QML, which seems an overkill and a bad idea from the usability perspective (users are accustomed to their system-default file dialogs). -- Pozdrawiam Michał rysiek Woźniak Fundacja Wolnego i Otwartego Oprogramowania signature.asc Description: This is a digitally signed message part. ___ Plasma-devel mailing list Plasma-devel@kde.org https://mail.kde.org/mailman/listinfo/plasma-devel
Re: Using a system-default File Dialog in QML
Dnia sobota, 13 kwietnia 2013 o 18:52:09 Shaun Reich napisał(a): through javascript. be sure to have your .desktop extension enabled: http://techbase.kde.org/Development/Tutorials/Plasma/JavaScript/API -FileDialog Great, thanks! Dnia sobota, 13 kwietnia 2013 o 18:51:37 Djuro Drljaca napisał(a): as far as I know this is not possible directly ... but you can probably create a c++ component that does this and then import it to QML. I am not a C++ developer, I haven't had the pleasure of playing with pure *years*. This is not really an option... -- Pozdrawiam Michał rysiek Woźniak Fundacja Wolnego i Otwartego Oprogramowania signature.asc Description: This is a digitally signed message part. ___ Plasma-devel mailing list Plasma-devel@kde.org https://mail.kde.org/mailman/listinfo/plasma-devel
Re: Using a system-default File Dialog in QML
Dnia sobota, 13 kwietnia 2013 o 19:07:59 Michał 'rysiek' Woźniak napisał(a): Dnia sobota, 13 kwietnia 2013 o 18:52:09 Shaun Reich napisał(a): through javascript. be sure to have your .desktop extension enabled: http://techbase.kde.org/Development/Tutorials/Plasma/JavaScript/A PI -FileDialog Great, thanks! Dnia sobota, 13 kwietnia 2013 o 18:51:37 Djuro Drljaca napisał(a): as far as I know this is not possible directly ... but you can probably create a c++ component that does this and then import it to QML. I am not a C++ developer, I haven't had the pleasure of playing with pure *years*. This is not really an option... *with pure C Not sure how that got cut... -- Pozdrawiam Michał rysiek Woźniak Fundacja Wolnego i Otwartego Oprogramowania signature.asc Description: This is a digitally signed message part. ___ Plasma-devel mailing list Plasma-devel@kde.org https://mail.kde.org/mailman/listinfo/plasma-devel
Re: Using a system-default File Dialog in QML
Hi again, I managed to load and show the dialog, now am having problems handling the signals. What is the correct way of handling them? I tried: fd = new SaveFileDialog() fd.onAccepted = function(fd) { console.log('exportTaskConfig(): file dialog accepted') console.log('+- file selected: ' + fd.file) } ...then... fd.accepted = function(fd) { console.log('exportTaskConfig(): file dialog accepted') console.log('+- file selected: ' + fd.file) } ...then... fd.onAccepted: { console.log('exportTaskConfig(): file dialog accepted') console.log('+- file selected: ' + fd.file) } The first two did not seem to work; the last one is apparently syntactically incorrect. -- Pozdrawiam Michał rysiek Woźniak Fundacja Wolnego i Otwartego Oprogramowania signature.asc Description: This is a digitally signed message part. ___ Plasma-devel mailing list Plasma-devel@kde.org https://mail.kde.org/mailman/listinfo/plasma-devel
Testing several plasmoid instances at the same time
Hi there, I am writing a plasmoid that is supposed to have drag and drop support - but am unable to test it efficiently with plasmoidviewer, as I have not found a way to display several instances of the same plasmoid in the same containment so that I could drag and drop between them. Any hints? Am I missing something? -- Pozdrawiam Michał rysiek Woźniak Fundacja Wolnego i Otwartego Oprogramowania signature.asc Description: This is a digitally signed message part. ___ Plasma-devel mailing list Plasma-devel@kde.org https://mail.kde.org/mailman/listinfo/plasma-devel
Tasker in 4.10?
Hi there, Seen the StackFolder thread and thought why the heck not?. You might remember a few of my threads about Tasker. here's the KDE-Look: http://kde-look.org/content/show.php?content=152988 And here's my repo (contains much more fresh code): https://redmine.hackerspace.pl/projects/private-tasker/repository And here's the rationale/idea: http://rys.io/en/71 Is it possible to get Tasker in 4.10? What is the procedure? What are the deadlines? Obviously the code needs a bit of love, but I am going to work on that anyway. -- Pozdrawiam Michał rysiek Woźniak Fundacja Wolnego i Otwartego Oprogramowania signature.asc Description: This is a digitally signed message part. ___ Plasma-devel mailing list Plasma-devel@kde.org https://mail.kde.org/mailman/listinfo/plasma-devel
Re: Tasker in 4.10?
Dnia piątek, 28 września 2012 o 21:46:18 Aaron J. Seigo napisał(a): On Friday, September 28, 2012 19:59:45 MichaÅ 'rysiek' Woźniak wrote: Is it possible to get Tasker in 4.10? What is the procedure? it has to be: * maintained * work in all form factors (planar/desktop, vertical, horizontal) * follow the typical Plasma principles of resizability, no blocking UI (modal dialogs are evil, e.g.) etc * stable preferably: * usable/useful not only with a mouse but with touch too * the UI done in QML * bonus points for integration with other KDE technologies Fantastic! Thanks, now I got myself a roadmap! btw, where is currently developed (git repo address e.g.)? I sent a link to a repo, here it is again: https://redmine.hackerspace.pl/projects/private-tasker/repository Hummm... Now that I think about it, I should get some anonymous access goiong. Another point to the roadmap! What are the deadlines? deadlines are described in the KDE SC release schedule. in fact, if you google for KDE SC 4.10 release schedule (you can replace the release # with other numbers too of course :) it's the first hit that comes back. Cool! -- Pozdrawiam Michał rysiek Woźniak Fundacja Wolnego i Otwartego Oprogramowania signature.asc Description: This is a digitally signed message part. ___ Plasma-devel mailing list Plasma-devel@kde.org https://mail.kde.org/mailman/listinfo/plasma-devel
Re: System tray
Dnia wtorek, 18 września 2012 o 13:12:37 Daniel Nicoletti napisał(a): 2012/9/18 Aaron J. Seigo ase...@kde.org: On Tuesday, September 18, 2012 10:58:32 Marco Martin wrote: - for the popup as just icons: not overly strong opinion, but I tend to prefer using text as well. agreed. it makes it clearer what each icon is, but also gives a much bigger hit area and allows them to be easily scanned (a grid is difficult for many to scan quickly). Would it be hard to add an option to instead of a popup expand the plasmoid and show the remaining icons? +1 This could be placed somewhere in the plasmoid config dialogue. I really dislike the popup expecially because when I click on a plasmoid there it opens in the middle of the screen, and not close to the panel. +1. For some strange reason, plasmoids here (KDE 4.8.4) slide *upwards*, instead of down, even when we're talking about bottom-panel-based ones. This looks strange and sometimes leaves artifatcs on the screen. -- Pozdrawiam Michał rysiek Woźniak Fundacja Wolnego i Otwartego Oprogramowania signature.asc Description: This is a digitally signed message part. ___ Plasma-devel mailing list Plasma-devel@kde.org https://mail.kde.org/mailman/listinfo/plasma-devel
Ordering items in QML Column
Hi there, Is there a way to re-order items in QML Column element? I can, of course, remove all items and add them in a new order, but that seems a very inelegant solution. In the docs there is no info on any ordering methods nor properties (or at least I do not see those): http://doc.qt.nokia.com/4.7/qml-column.html -- Pozdrawiam Michał rysiek Woźniak Fundacja Wolnego i Otwartego Oprogramowania signature.asc Description: This is a digitally signed message part. ___ Plasma-devel mailing list Plasma-devel@kde.org https://mail.kde.org/mailman/listinfo/plasma-devel
Drag and drop across plasmoids
Hi there, Is there a way to do drag-and-drop across several QML/JS plasmoids? Or even better - into other programs/apps? This would be a very neat feature for anybody that uses several plasmoids of a given kind (like my Tasker) - being able to move similar items from one plasmoid instance to the other just makes sense, doesn't it. Alternatively, copy-and-paste/clipboard support would be immensely helpful, even with export item to plain text requirement. -- Pozdrawiam Michał rysiek Woźniak Fundacja Wolnego i Otwartego Oprogramowania signature.asc Description: This is a digitally signed message part. ___ Plasma-devel mailing list Plasma-devel@kde.org https://mail.kde.org/mailman/listinfo/plasma-devel
Re: Files, config, and welcome (again)
Dnia niedziela, 29 lipca 2012 o 17:05:24 Kevin Krammer napisał(a): On Saturday, 2012-07-28, Michał 'rysiek' Woźniak wrote: I get: The module 'org.kde' is not installed Any hints? Not being able to save the tasks between Plasma sessions is a bit of a dealbreaker for a ToDo plasmoid... ;) I think some of those are part of the kdeqmlplugin which is part of kdepim- runtime. Maybe it wasn't built or installed properly. Apparently, I would need to have 4.8 installed here, I only have 4.7. For now implemented saving task status to config with a nasty JSON.stringify() call. It works and it's not even that costly, performance-wise. Anyway, the Tasker aka Perfect ToDo-oid is now published and online, comments and suggestions welcome: http://kde-look.org/content/show.php?content=152988 Thanks for all your help. -- Pozdrawiam Michał rysiek Woźniak Fundacja Wolnego i Otwartego Oprogramowania signature.asc Description: This is a digitally signed message part. ___ Plasma-devel mailing list Plasma-devel@kde.org https://mail.kde.org/mailman/listinfo/plasma-devel
Re: Files, config, and welcome (again)
Dnia poniedziałek, 30 lipca 2012 o 14:49:03 Kevin Krammer napisał(a): On Monday, 2012-07-30, Kevin Krammer wrote: On Monday, 2012-07-30, Michał 'rysiek' Woźniak wrote: Dnia niedziela, 29 lipca 2012 o 17:05:24 Kevin Krammer napisał(a): On Saturday, 2012-07-28, Michał 'rysiek' Woźniak wrote: I get: The module 'org.kde' is not installed Any hints? Not being able to save the tasks between Plasma sessions is a bit of a dealbreaker for a ToDo plasmoid... ;) I think some of those are part of the kdeqmlplugin which is part of kdepim- runtime. Maybe it wasn't built or installed properly. Apparently, I would need to have 4.8 installed here, I only have 4.7. This is strange, the directory was added in April 2010, so it should even be part of kdepim-runtime 4.6 More interestingly I have it in my install from source prefix but not in the one from packages (4.8) so it could be a packaging problem. Actually I was wrong on this one, I have kdepim-runtime 4.4 (Debian/Unstable), so it can't have that plugin yet. Could be the same for you, maybe contact the distributor's KDE team. Unless you are also on Debian this still stands though. Yes, Debian Unstable (or, to be precise, Aptosid). I would also love any comments on the plasmoid itself, if you had a chance of testing it. -- Pozdrawiam Michał rysiek Woźniak Fundacja Wolnego i Otwartego Oprogramowania signature.asc Description: This is a digitally signed message part. ___ Plasma-devel mailing list Plasma-devel@kde.org https://mail.kde.org/mailman/listinfo/plasma-devel
Re: Files, config, and welcome (again)
Dnia piątek, 20 lipca 2012 o 09:35:35 Kevin Krammer napisał(a): On Thursday, 2012-07-19, Michał 'rysiek' Woźniak wrote: Hi again, Got entangled in a lot of other work, finally getting back to the QML/JS ToDo plasmoid of mine. I still cannot find any docs on accessing the calendar (either directly or through Akonadi) from QML/JS. I would appreciate any hints/links on that - is that at all possible?.. Check if some of the stuff in kdepim/mobile/tasks can help you with that. It looks promising, but when I try to copy the imports: import Qt 4.7 as QML import org.kde 4.5 import org.kde.akonadi 4.5 as Akonadi import org.kde.pim.mobileui 4.5 as KPIM import org.kde.kcal 4.5 as KCal import org.kde.akonadi.tasks 4.5 as Tasks I get: The module 'org.kde' is not installed Any hints? Not being able to save the tasks between Plasma sessions is a bit of a dealbreaker for a ToDo plasmoid... ;) -- Pozdrawiam Michał rysiek Woźniak Fundacja Wolnego i Otwartego Oprogramowania signature.asc Description: This is a digitally signed message part. ___ Plasma-devel mailing list Plasma-devel@kde.org https://mail.kde.org/mailman/listinfo/plasma-devel
Re: Files, config, and welcome (again)
Hi again, Got entangled in a lot of other work, finally getting back to the QML/JS ToDo plasmoid of mine. I still cannot find any docs on accessing the calendar (either directly or through Akonadi) from QML/JS. I would appreciate any hints/links on that - is that at all possible?.. Thanks! -- Pozdrawiam Michał rysiek Woźniak Fundacja Wolnego i Otwartego Oprogramowania signature.asc Description: This is a digitally signed message part. ___ Plasma-devel mailing list Plasma-devel@kde.org https://mail.kde.org/mailman/listinfo/plasma-devel
Re: Files, config, and welcome (again)
Hi there, Thanks for all the answers, I was travelling and couldn't get back on this sooner. Dnia niedziela, 15 kwietnia 2012 o 10:14:13 Djuro Drljaca napisał(a): as far as I know it is very important to know where you tested it. If you only tested it in the plasmoidveiwer then this is probably the reason it doesn't work. Install the plasmoid on the system and try it there ... then I think it probably will work. Yes, you were right. Indeed, when added to the plasma desktop the config does work. Thanks! Dnia niedziela, 15 kwietnia 2012 o 18:22:52 Mark napisał(a): If you're making a qml only plasmoid then KCal is not possible since it doesn't have a qml binding (as far as I know...). Well, I am trying to stick with QML/JS. I have absolutely no experience with C++ and learning it just to write a plasmoid seems an overkill... Dnia niedziela, 15 kwietnia 2012 o 18:45:11 Kevin Krammer napisał(a): In either case using KDE's todo classes is certainly the right way to go, since it will allow the applet to show/edit data created by other todo/task handling applications such as KOrganizer or Zanshin (http://zanshin.kde.org/) Zanshin looks great, thanks for the info. And yes, using something that would talk with the Calendar seems a great idea. Problem is, I cannot find any documentation on doing that in QML/JS. The Kontact touch related directories in kdepim could be helpful here, i.e. those are QML based user interfaces for components that are traditionally part of the Kontact suite. Where can I find those. Since Todos/Tasks are another subtype of calendar entry (like event) some of the calendar Plasma integration points might be a good start as well. Any link? Can't find that anywhere. Dnia czwartek, 19 kwietnia 2012 o 18:32:06 Anton Kreuzkamp napisał(a): Just read your notes on what it should be able to do. I don't know what the akonadi-kcal-solution is able to do. Probably not quite everything you want... O..k. Any docs on it? I recommend you to get in touch with the kdepim-gurus and get to know what it is able to do and eventually (ideally) how to get the missing parts inside akonadi directly, as this is where it belongs. Thanks, will try. PS: that means I can delete one item from my todo-list, which is Create Akonadi-based Todo-Plasmoid. Yay! :) Hey, I haven't done it yet! ;) -- Pozdrawiam Michał rysiek Woźniak Fundacja Wolnego i Otwartego Oprogramowania signature.asc Description: This is a digitally signed message part. ___ Plasma-devel mailing list Plasma-devel@kde.org https://mail.kde.org/mailman/listinfo/plasma-devel
Files, config, and welcome (again)
Hello, I have already written to this list and some of you might know me from other channels (like IRC or StatusNet). Either way - hi and hello! Also, I hope I am writing in the right place. If not, do tell and point me in the right direction. Now, to the point! I am writing a Todo/tasks plasmoid, inspired by TaskTimer. Here's my braindump about it: http://rys.io/en/71 One thing I am missing at this moment, and am missing dearly, is a way to save the state of the tasks (text, elapsed time, etc) so that it gets restored upon plasmoid restart (not sure if this is the right word). This can be easily done with a simple JSON text file, or even an INI file for that matter. So basically what I need is either a config store or a way to read/write pure text files. I tried using the KConfig XT, but surprisingly the values did not get saved (yes, main.xml file is created and contains the right stuff); this happened even with the kdeexamples configuration example. Besides, I am wondering if the rigid structure of KConfig XT files is a good bet here; I am adding/removing todo items in the plasmoid, and as far as I understand config entries are defined beforehand - so I would have to store key-value pairs (in JSON?) within the config XML file. Doesn't seem right. So, three questions: - am I missing something about the KConfig XT approach? - maybe there is a better config API for QML/JS plasmoids? - is there a way to read/write files from a QML/JS plasmoid? I am running KDE SC 4.7.4 in Debian Sid. -- Pozdrawiam Michał rysiek Woźniak Fundacja Wolnego i Otwartego Oprogramowania signature.asc Description: This is a digitally signed message part. ___ Plasma-devel mailing list Plasma-devel@kde.org https://mail.kde.org/mailman/listinfo/plasma-devel