![]() Registered Member ![]()
|
How do I implement my own settings in the settings dialog that shows up for my plasmoid? I can't find any documentation really, but I think I just don't know what to search...
I basically just want to draw up my own page to have a tree view like so:
etc that the user will customise, then it'll be parsed into this:
Any help appreciated. PS: I currently have my plasmoid loading a config file formatted as above to execute those programs, just want to display a treeview in the settings dialog. Also some hints on how to read in Kickoff's menu would be nice, so the user can pick programs from there to put in my plasmoid. |
![]() Administrator ![]()
|
For this, I would recommend using Qt's Model View architecture. You can read your configuration file using KConfig, then provide this information to the QTreeView through the model.
With regards to reading Kickoff's menu, you need to look at the documentation for KServiceGroup and KService. Also, see kdebase/workspace/plasma/generic/dataengines/apps/appsengine.cpp an example.
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
![]() Registered Member ![]()
|
http://doc.qt.nokia.com/4.6/model-view- ... ction.html
Is that what you're talking about? I want to add a category to this dialog: ![]() Applet::createConfigurationInterface() has something to do with it, I think. |
![]() Administrator ![]()
|
Yes, that is the Model View documentation.
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
![]() Registered Member ![]()
|
I thought maybe I could do it all in a text editor (which I guess I can), but it looks like using QT Designer is the way to do it ala:
http://www.kdevelop.org/3.0/doc/tutorial_settings/#p4 Thanks for you help. While looking at the KDE Menu Editor for UI ideas I just decided to adapt their code to fit into a QWidget instead of making my own. Hopefully it goes somothly, lol. |
Registered users: Bing [Bot], blue_bullet, Google [Bot], rockscient, Yahoo [Bot]