![]() KDE Developer ![]()
|
I'd need to update the data of a dataengine manually, without setting an update interval.
I searched on http://api.kde.org/4.x-api/kdelibs-apidocs/plasma/html/classPlasma_1_1DataEngine.html#ccb20ef9b196ce72938c4e80201559a3 but I couln't find a way to do so. Deleting the object and recreating it with Plasma::Applet::dataEngine("name") does the trick but when I close the plasmoid it crashes:
Is there a way or am I bound to set an update interval and connect the signal of the dataengine to a slot that does nothing? |
![]() Administrator ![]()
|
Judging by the documentation, you can call setData() at any time to update data stored in the data engine, however as it is a protected method, you would need to be the data engine itself to do this.
Plasma does not support plasmoid initiated deletion of data engines, they are managed by Plasma itself, which will delete them when they are no longer used. What exactly are you trying to accomplish? |
![]() KDE Developer ![]()
|
I have a pointer to the soliddevice DataEngine.
Now if a device is mounted, I can get the free space via the dataengine, but if it is not mounted obviously I can't. So, if the device is unmounted when I start my plasmoid, and then I mount it, I need to tell the dataengine to refresh its data because now i want to get the free space. |
![]() Administrator ![]()
|
That should be handled by the DataEngine itself, which should listen to the appropriate Solid signals to update the available data.
Please submit the changes you make to the DataEngine to the Plasma group on the Reviewboard ( reviewboard.kde.org ) |
![]() KDE Developer ![]()
|
So I thought, but you can see using the plasmaengineexplorer, watching the keys and the values of a device and mounting and umounting it that the "Free Space" key doesn't shows up or hides.
Maybe it is a bug, because I just saw that the "Accessible" key changes values to yes or no when I mount or umount it. For the Reviewboard, I want to add a bar to show the free space and an other thing before proposing it. I think that in few weeks I'll finish it. |
Registered users: Bing [Bot], Google [Bot], Sogou [Bot]