• 1
  • 2(current)
  • 3
  • 4
  • 5
  • 27
Release PyXBMCt: a Python framework for simple creating UI for XBMC addons
#16
There's a reason for that (no setID): The controlgroup holds a speedup mechanism in the form of an ID -> control* map for the constant "get control with id <foo>" that gets done. If you go and change the ID, then you'll need to update that map, which means that the child control needs public access to that function in the parent etc.

When you create a control from python, one of the things you provide is the ID, right? i.e. do you really need a way to set the ID from python?

Cheers,
Jonathan
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#17
(2013-10-08, 01:34)jmarshall Wrote: When you create a control from python, one of the things you provide is the ID, right?

Nope, no argument for ID.

Seems after creating a control, control.getId(), does return an ID. So.. I guess that doesn't explain why onFocus isn't working.
Reply
#18
I have finished the QuickStart Guide for those who would want to use PyXBMCt for their addons.
Also I've added a clickable button to close a PyXBMCt window with mouse, like in Confluence skin dialogs.
Links and a screenshot in the OP are updated.
Reply
#19
Hi,

did you develop any "real" apps yet with the framework?

Sorry if its a dump question but i am just starting to school me on XBMC development and python:
Can i place graphic elements as well with your framework?

cheers,

Arnd
Reply
#20
(2013-10-12, 10:59)tycho-x Wrote: Hi,

did you develop any "real" apps yet with the framework?

Yes, it started as UI for my private Addic7ed.com subtitles addon for TV series (no, I'm not going to release it publicly, so please don't ask), but then I've decided to re-work it as a general-purpose addon UI framework to hide the complexities of dealing with xbmcgui classes directly and to make is as much "pythonic" as possible.Smile Especially for those who are familiar with Tkinter, PyQt or other desktop Python GUI frameworks.

Image

Quote:Sorry if its a dump question but i am just starting to school me on XBMC development and python:
Can i place graphic elements as well with your framework?

Define "graphic elements". If you mean images, then yes, there is Image control based on xbmcgui.ControlImage. I'd recommend to read the QuickStart guide (it includes brief descriptions for available controls) and look into the example addon code.
Reply
#21
BTW, where should I report bugs found in some xbmcgui controls? XBMC.org does not have a link to Track anymore. Has it been deprecated?
Reply
#22
(2013-10-15, 10:54)Roman_V_M Wrote: BTW, where should I report bugs found in some xbmcgui controls? XBMC.org does not have a link to Track anymore. Has it been deprecated?

still says "bugtracker" on the top bar of the forum Smile
put it under python/scripts component
Read/follow the forum rules.
For troubleshooting and bug reporting, read this first
Interested in seeing some YouTube videos about Kodi? Go here and subscribe
Reply
#23
I have decided to promote the current version to 1.0 release. Feel free to use it in your addons.Smile
Reply
#24
This is one awesome UI for beginners like me, thank you very much!
I have a few questions. Is it python or php you're writing as code? And is there any way to access the GPIO pins through your plugin?
I'm doing a plugin to turn lights on/off with a relay board, and I need to know if I can turn the pins on/off to trigger the relay.
Reply
#25
(2013-10-24, 17:36)Aweponken Wrote: Is it python or php you're writing as code?

I guess, the topic title is pretty clear on that matter. As for the code examples in the OP, unfortunately the forum engine does not provide special code-highlighting facility for Python, so we have to use what's available.

Quote:And is there any way to access the GPIO pins through your plugin?

I have no idea what it means, but PyXBMCt is strictly a GUI framework for XBMC addons. If you need to add some business-logic on top of that, it's up to you how you code it.
Reply
#26
GPIO = General Purpose Input Output - probably referring to the GPIO headers on a Raspberry Pi.
If I have helped you or increased your knowledge, click the 'thumbs up' button to give thanks :) (People with less than 20 posts won't see the "thumbs up" button.)
Reply
#27
Smile 
(2013-10-24, 18:21)Roman_V_M Wrote:
(2013-10-24, 17:36)Aweponken Wrote: Is it python or php you're writing as code?

I guess, the topic title is pretty clear on that matter. As for the code examples in the OP, unfortunately the forum engine does not provide special code-highlighting facility for Python, so we have to use what's available.
Sorry about that, got a little confused with the code examples.


(2013-10-25, 07:55)nickr Wrote: GPIO = General Purpose Input Output - probably referring to the GPIO headers on a Raspberry Pi.
Exactly, thank you! Any info about this Roman_V_M? Smile
Reply
#28
The difficulty with accessing the Pi's GPIO pins is that they require root access and XBMCpython scripts don't run with superuser privileges.

If you want to use the pins to do something from a script I'd suggest starting a new thread as it's not particularly relevant to the PyXBMCt script. That way people can focus directly on helping you.
BBC Live Football Scores: Football scores notifications service.
script.squeezeinfo: shows what's playing on your Logitech Media Server
Reply
#29
I would like to use this framework in a plugin I'm working on for notification popups. The xbmc build-in notification is limited to single line of text and images don't seem to display on full-screen (when video is playing). Do you have controls (windows) pre-build I could utilize for this purpose.

Thanks for your hard work on this framework,
Reply
#30
(2013-10-28, 16:52)hpooni Wrote: I would like to use this framework in a plugin I'm working on for notification popups. The xbmc build-in notification is limited to single line of text and images don't seem to display on full-screen (when video is playing). Do you have controls (windows) pre-build I could utilize for this purpose.

Thanks for your hard work on this framework,

AddonDialogWindow and BlankDialogWindow container classes are always displayed on top of XBMC UI, including video. On the previous page you can see a real add-on based on AddonDialogWindow class.
If you need to display your window only temporarily, you can use .show() method instead of doModal().
The following example will display a message window for 3 sec:
PHP Code:
import time
from pyxbmct
.addonwindow import *

message AdonDialogWindow('Message Header')
message.setGeometry(20010011)
label Label('Message text'alignment=alignment=ALIGN_CENTER)
message.placeControl(label00)
message.show()
time.sleep(3.0)
message.close() 
In this example the message window has only 1 control - a text label, but you can use all available controls in your own message window, including images.
The only drawback is that with show() you won't be able to close the window manually because show() method does not have an event loop, unlike doModal().
Reply
  • 1
  • 2(current)
  • 3
  • 4
  • 5
  • 27

Logout Mark Read Team Forum Stats Members Help
PyXBMCt: a Python framework for simple creating UI for XBMC addons4