mixxxdj/mixxx — pull request #286 by demos (2014-07-03 15:18:36+00:00)
Title: Allow inline svg handling Variable elements in skins

This is the same pr as https://github.com/mixxxdj/mixxx/pull/285 but cleaner :)

I needed the skin parser to be able to manage Variable elements in svg for cues and loops buttons so I added a function to do it and hooked it directly if a svg element is present in a (un)pressed element.

So now, I can handle inlined svg in my pushbuttons like this :
```xml

```
As asked, here is the cleaned branch (thanks for the git tricks).

So now some questions/todo list :
+ I used QDir in getSkinPath to be able to use my QTemporaryFile. Latelly, I realized I had to place it in /tmp because I couldn't use the autoremove (the file is on close but I had to close it before setPixmap...). So it's not required for this feature but it looks more "Qt friendly" so I let it.
+ I'm not sure that creating a temp file is the best way.
+ I'm not sure there is a way to set attributes depending on some vars (css would be the good practice normally but are they supported now?).
+ Variables are not handled in svg file, only in inline svg.
+ Only WPushButton supports inline svg for the moment.

I think that the best approach is to remove the use of a temp file by making the Paintable class able to use a QByteArray as input but without certitude.

You're insight is welcome!