![]() Registered Member ![]()
|
Hi. I recently developed a CLI application which creates collages out of images and would like to create a GUI frontend for it that runs in the system tray and sets the resulting collages as desktop wallpaper. Currently, I am using the built in wallpaper switcher with a folder containing a couple hundred pre-generated collages, but I would very much like to create and use the collages on demand instead.
Where could I find the documentation that would help me figure out how to set the desktop wallpaper from a C++ application designed with Qt? |
![]() Administrator ![]()
|
I'm afraid as a concious design decision, Plasma Desktop doesn't allow the wallpaper to be changed externally. The only way to do it is through the user interface, or using Plasma's integrated scripting functionality - which the user must manually click "Run" to execute. The dialog allowing you to run this is also very technical, and is intended for the use of developers.
To allow you to achieve what you want, you may find it more useful to offer a Plasma Wallpaper plugin which users must select - and which in turn would then either perform the same functions as your Qt application, or co-ordinate with it to display the appropriate collage images as needed.
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
![]() Registered Member ![]()
|
So would it then be possible to have a system tray application that interfaces with the plasma wallpaper plugin? It would be nice to be able to double click on a system tray icon to generate a new wallpaper collage or right click on it to open settings to configure the collage generator. Is there a post somewhere that I can read to understand why the wallpaper is not allowed to be set externally? I can't really understand why that feature was removed. After a bit of Googling, I've found that you used to be able to set the wallpaper from the command line in KDE3. Is there any hope of this functionality being restored? If not, how can I go about figuring out which of KDE's source file(s) need to be changed in order to add this functionality myself?
|
![]() Administrator ![]()
|
There is very little chance of the feature being restored - particularly as development is now focused on Plasma Next ( the Qt 5 / KDE Frameworks 5 version ).
In terms of a post outlining this - I suggest checking the archives of the plasma-devel mailing list. As for being able to interface with it via a System Tray icon - can you please clarify what you'd like to achieve? As far as I know, you wouldn't be able to trigger a configuration dialog, but your wallpaper plugin could support changing the shown wallpaper to a given image on request.
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
![]() Registered Member ![]()
|
Okay so I've decided how I'm going to do this. I will create an application that runs in the system tray. The user will have to set their desktop wallpaper setting to "slideshow" and direct it to the folder the collage program is outputting to. Probably something like "~/.config/OmegaWall/Desktop1" and set the time interval to use the same setting as configured in the collage program. The collage program will alternate between creating two files wallpaper1.png and wallpaper2.png and KDE's slideshow setting will alternate between the two. Clicking on the system tray icon will bring up options, where the various command line arguments can be passed to the collage program with a simple point and click interface.
The disadvantage: Since the time intervals must be synced between my program and KDE, it will be hard (impossible?) to trigger an immediate change of the wallpaper upon double clicking the system tray icon. I have to say I really like KDE, but this is really off-putting for me. |
Registered users: Bing [Bot], blue_bullet, Google [Bot], Yahoo [Bot]