The idea is that you drop a file from a webpage, or basically a URL onto Plasma and Plasma creates a suitable applet to display this URL. For example an image frame for picture, or a previewer for pdf files. Downloading the data itself (and possibly saving it) is left to the applets. The mimetype needs to be retrieved as it cannot be determined from the URL.
The code pathes I've changed or added are, roughly:
- "something" is dropped onto Plasma
- if it's a remote URL, we don't know the mimetype of the object behind the URL yet
- a KIO::TransferJob is used to retrieve the mimetype asynchronously, and will call back
- we open a QMenu that says "Fetching file type..."
- If the user closes the menu while the mimetype is being retrieved, we will open a new one
- When the TransferJob calls back, and we have our mimetype, we offer a list of applets suitable for this kind of content
- If the user chooses to create an applet, we put the transfer job on hold to make it available for recycling by the applet
- If the user dismisses the offering, we kill the job
Thanks to marco for reviewing and everybody else for the input :)
Next steps are making some more applets work with this.
CCMAIL:plasma-devel@kde.org
svn path=/trunk/KDE/kdelibs/; revision=1009004
libplasma
This directory contains the classes making up libplasma, which provides the
core framework used by Plasma applictions, such as the Plasma desktop shell
and its components. This includes applet and extension definitions and loading,
common GUI elements, data and service interaction, search system, etc.
Domain specific sets of functionality, e.g. for network awareness or sensors,
are not found here but as DataEngine, Service, Applet, PackageStructure, etc
plugins.
Commit Guidelines:
* If your patch is not an obvious or trivial bug fix, have it peer reviewed
by another Plasma developer; http://reviewboard.kde.org is your friend :)
* All code MUST follow the kdelibs coding style, as found at:
http://techbase.kde.org/Policies/Kdelibs_Coding_Style
* All new public API MUST have apidox written before committing and must go
through an API review with another Plasma developer. We have to maintain
binary compatibility, remember!
Unit tests are next to godliness. (Though as you can see, right now libplasma
is hellbound.)
Please refer to the Plasma website (http://plasma.kde.org) and Plasma wiki
(http://techbase.kde.org/Projects/Plasma) for API documentation and design
documents regarding this library.