{"id":355,"date":"2008-03-18T13:44:29","date_gmt":"2008-03-18T13:44:29","guid":{"rendered":"http:\/\/www.notmart.org\/index.php\/Software\/On_device_notifier_again"},"modified":"2008-03-18T13:44:29","modified_gmt":"2008-03-18T13:44:29","slug":"on_device_notifier_again","status":"publish","type":"post","link":"https:\/\/notmart.org\/blog\/2008\/03\/on_device_notifier_again\/","title":{"rendered":"On device notifier again"},"content":{"rendered":"<p>Another post on devicenotifier :), so let me introduce his shiny new look:<br \/>\n<img decoding=\"async\" src=\"http:\/\/www.notmart.org\/misc\/article_images\/devicenotifier_new_look.png\" alt=\"new devicenotifier\" style=\"clear:both;float:none\"\/><br \/>\nThe code derives directly from the kickoff delegate (with some fixes to RTL layouts), but the interesting part is that it has been pushed in libplasma, so all listviews in plasma that works like a menu can use it and have a consistent look (At the moment kickoff is still independent but i will port it shortly)<\/p>\n<p>This will make possible for third party applets that wants to have a listview\/menu that is well integrated into plasma without much hassle.<br \/>\nTo use it you must use the new Plasma::Delegate class (or a subclass of it) and either use the roles that Plasma::delegate defines or if you can&#8217;t modify the model, use its function setRole(internalrole, yourrole) to map a role of the model to a role of Plesma::Delegate<\/p>\n<p>If you want to paint additional data into an item you can subclass the delegate, and in the paint function calling Plasma::Delegate::paint and then paint the additional things in the space left empty that you can retrieve with the functions rectAfterTitle, rectAfterSubTitle and emptyRect.<\/p>\n<p>That&#8217;s it \ud83d\ude00<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Another post on devicenotifier :), so let me introduce his shiny new look: The code derives directly from the kickoff delegate (with some fixes to RTL layouts), but the interesting part is that it has been pushed in libplasma, so all listviews in plasma that works like a menu can use it and have a [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[2,10,21,7,101],"class_list":["post-355","post","type-post","status-publish","format-standard","hentry","category-software","tag-kde","tag-kde4","tag-linux","tag-plasma","tag-plasmoid"],"_links":{"self":[{"href":"https:\/\/notmart.org\/blog\/wp-json\/wp\/v2\/posts\/355","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/notmart.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/notmart.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/notmart.org\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/notmart.org\/blog\/wp-json\/wp\/v2\/comments?post=355"}],"version-history":[{"count":0,"href":"https:\/\/notmart.org\/blog\/wp-json\/wp\/v2\/posts\/355\/revisions"}],"wp:attachment":[{"href":"https:\/\/notmart.org\/blog\/wp-json\/wp\/v2\/media?parent=355"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/notmart.org\/blog\/wp-json\/wp\/v2\/categories?post=355"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/notmart.org\/blog\/wp-json\/wp\/v2\/tags?post=355"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}