Re: PushButton and ButtonGroups
Marco Martin wrote: On Wednesday 03 February 2010, alanm wrote: On Wednesday 03 February 2010 1:01:32 pm alanm wrote: I guess the question is, what's the correct way to do this with Plasma.PushButton since Plasma doesn't seem to have any equivalent of a QButtonGroup? Sorry in advance if I missed something obvious. ___ And it appears I missed something obvious. True to form, after hours of prior searching and experimenting, I figured it out within 10 minutes of posting a question. I had totally missed Plasma.GroupBox, which does what I need. Thanks for reading! ___ Plasma-devel mailing list Plasma-devel@kde.org https://mail.kde.org/mailman/listinfo/plasma-devel that still doesn't really solve the problem because that thing contains qwidgets... we should really put some support for this into Plasma::Frame... Yeah, it turns out didn't make them exclusive buttons like I thought it was doing. I guess for now I need to implement this manually on the callback. ___ Plasma-devel mailing list Plasma-devel@kde.org https://mail.kde.org/mailman/listinfo/plasma-devel
Re: Review request: Container plasma applet
Aaron J. Seigo wrote: On September 22, 2009, alan moore wrote: My thinking for the solution was to create a sub-containment that would and improving the panel and/or the widgets wasn't a possibility? :) Possible, but for me not very probable; I'm just a simple python hacker. Though I did think about submitting a detailed wishlist item with mockups, etc. In the end it seemed like proof-of-concept code seemed like a better path, but even that was beyond me. I'm sure the best solution is to work the capabilities into the panel. ___ Plasma-devel mailing list Plasma-devel@kde.org https://mail.kde.org/mailman/listinfo/plasma-devel
Re: Review request: Container plasma applet
Anyway, with your last sentence you was saying that I could have done a similar thing working directly on containments? yes, and that's really probably the way to go about it. use cases would probably help define what direction to actually take. I was actually a bit excited when I saw this applet myself, as I had looked into developing something along the same lines (but gave up because I didn't have the requisite coding knowledge). Basically, my use case is simple: using the KDE panel as a sidebar. The reason being that screens are getting wider and smaller for many users (think notebooks, netbooks, UMPCs), vertical space becomes more valuable, so it makes sense to put stuff like the panel (that mostly just sits there offering some controls) off to the side rather than the traditional top/bottom arrangement. When I tried this with my panel as-is, the results were problematic. Many plasmoids (such as the battery monitor) insist on being square, and in a 200 to 300 px wide sidebar they take up a huge amount of space. Some just kind of fall apart. The tray became a huge squarish thing that took up 1/4 of the height. My thinking for the solution was to create a sub-containment that would allow plasmoids to be arranged in horizontal rows on a vertical sidebar. I don't know if the plasmoid in question can do that, or if the panel can be modified to do that, but it seems a reasonable way to approach the problem. ___ Plasma-devel mailing list Plasma-devel@kde.org https://mail.kde.org/mailman/listinfo/plasma-devel
Re: Stylesheets and plasma widgets
Aaron J. Seigo wrote: On September 10, 2009, alanm wrote: Is there a better way to make these kinds of small adjustments apart from style sheets? set the font style/face/color on the nativeWidget()? Thanks; I tried this, but it didn't work (or else I'm doing it wrong). My code is: button.nativeWidget().setFont(QFont(sans,6)) What happens is the button shrinks down to the size it would be if the font were actually 6 point font, but the text is then drawn according to the size/face settings for plasma/KDE (which results in the text getting cut off). Sorry in advance if I'm doing something painfully obviously wrong. ___ Plasma-devel mailing list Plasma-devel@kde.org https://mail.kde.org/mailman/listinfo/plasma-devel
Python Containment tutorial?
Hi, In the api documentation for PyKDE on the plasma containment page (http://api.kde.org/pykde-4.2-api/plasma/Plasma.Containment.html), it says See techbase.kde.org for a tutorial on writing Containments using this class. I'm interested in created a containment plasmoid using Python, and I'm wondering if anyone can point me to the URL of this tutorial. There is no link on the API docs page and I haven't found a containment tutorial for Python on techbase. Thanks. ___ Plasma-devel mailing list Plasma-devel@kde.org https://mail.kde.org/mailman/listinfo/plasma-devel
Re: Querying the dict dataengine
Aaron J. Seigo wrote: On Saturday 15 August 2009, alan moore wrote: Hello; I am working on my first plasmoid (in Python), so apologies in advance if I'm a blockhead. I'm trying to remake the old kicker dictionary applet. I have code that works by calling the dict CLI command, but naturally I want to switch that to working with a data engine. I'm a bit hazy on how to communicate with the dict dataEngine and get what I want from it; specifically: - How do I tell it what server/dictionary to use? I saw there is a setServer() function in the code, but it's private. i don't believe there is a way to do this currently. it could be done in a few ways: * the source name could be the server, though that's not backwards compatible * there could be a serviceForSource that returns a service that lets one define what the server(s) to use for that word should be. the latter is probably the way to go. it requires a bit of work to the dict dataengine in kdebase, but wouldn't be too difficult. other engines implement serviceForSource as well, so examples abound :) Thanks, I'll look at it; though I wouldn't recommend anyone hold their breath waiting for me to produce working c++ code. I also tried using connectSource(), then assigning mydef in dataUpdated. I noticed in that case that I first got an empty dictionary, then a few moments later the actual data I was looking for. that's correct; the process is asynchronous so it will update later. there is no way around that unless we make the entire internet synchronous ;) The delay wasn't really the problem, but rather the initial bogus output. I guess I'm thinking of this like a database query -- ask a question, wait a bit, get an answer. I can see how connectSource() makes sense in a situation where you have a constant stream of data you want to tap into and pipe out to a widget, but is there not a mechanism for simply doing a one-off query? I thought that's what the query() method was for, but that wasn't working out either. Am I thinking about this all wrong? ___ Plasma-devel mailing list Plasma-devel@kde.org https://mail.kde.org/mailman/listinfo/plasma-devel
Querying the dict dataengine
Hello; I am working on my first plasmoid (in Python), so apologies in advance if I'm a blockhead. I'm trying to remake the old kicker dictionary applet. I have code that works by calling the dict CLI command, but naturally I want to switch that to working with a data engine. I'm a bit hazy on how to communicate with the dict dataEngine and get what I want from it; specifically: - How do I tell it what server/dictionary to use? I saw there is a setServer() function in the code, but it's private. - More importantly, how do I connect to it and get back a definition? I've played with the engine in engine explorer, and I understand the structure that's supposed to be coming back, but when I try it in my code I just get back an empty dictionary. My code is simply: self.dict_engine = self.dataEngine(dict) mydef = self.dict_engine.query(QString(word)) print(mydef) I also tried using connectSource(), then assigning mydef in dataUpdated. I noticed in that case that I first got an empty dictionary, then a few moments later the actual data I was looking for. Where am I going wrong here? Thanks in advance. ___ Plasma-devel mailing list Plasma-devel@kde.org https://mail.kde.org/mailman/listinfo/plasma-devel