Software: modifications and extensions Toon

Everything about software tools, new software development and toolchains. For developers, mostly.

Moderators: marcelr, TheHogNL, Toonz

Toonz
Forum Moderator
Forum Moderator
Posts: 1873
Joined: Mon Dec 19, 2016 1:58 pm

Re: Software: modifications and extensions Toon

Post by Toonz »

Luc_S wrote:Hey all, is there any way to open an app directly from the dim-state window?
No, because there is an overlay window active in dim state covering the whole screen. A press anywhere on screen (that overlay window) will bring you out of the Dim state
member of the Toon Software Collective
Luc_S
Starting Member
Starting Member
Posts: 45
Joined: Tue Jun 05, 2018 6:57 pm

Re: Software: modifications and extensions Toon

Post by Luc_S »

Toonz wrote:
Luc_S wrote:Hey all, is there any way to open an app directly from the dim-state window?
No, because there is an overlay window active in dim state covering the whole screen. A press anywhere on screen (that overlay window) will bring you out of the Dim state
And we are unable to tweak this overlay in any way? I'm having some trouble finding out where this overlay function is located.
Toonz
Forum Moderator
Forum Moderator
Posts: 1873
Joined: Mon Dec 19, 2016 1:58 pm

Re: Software: modifications and extensions Toon

Post by Toonz »

Luc_S wrote:
Toonz wrote:And we are unable to tweak this overlay in any way? I'm having some trouble finding out where this overlay function is located.
Look in Canvas.qml ;-)
member of the Toon Software Collective
Rudolf
Member
Member
Posts: 136
Joined: Mon Dec 04, 2017 8:50 pm

Re: Software: modifications and extensions Toon

Post by Rudolf »

Does anyone know where the module 'BasicUIControls' comes from?

I can't find it as javascript on the Toon and can't find it anywhere online as cpp (as I could with FileIO).
Are these closed source classes written in cpp by Quby?
marcelr
Global Moderator
Global Moderator
Posts: 1153
Joined: Thu May 10, 2012 10:58 pm
Location: Ehv

Re: Software: modifications and extensions Toon

Post by marcelr »

Yes, most likely.
Most of the code on Toon is open source, so there's a strong possibility that this particular module is (at least derived from) publicly available code.
Rudolf
Member
Member
Posts: 136
Joined: Mon Dec 04, 2017 8:50 pm

Re: Software: modifications and extensions Toon

Post by Rudolf »

I finally decided to mount the Toon in the living room and replace the existing thermostat.
And offcourse the missus had a comment ready right away; the hue/controlpanel-button was too bright in the dimstate.

And I must say that I agree; it's a rather large white-button with tiny black dots and a small arrow.
It's a nifty little button; because it allows you to open the controlpanel right away.
I decided it was better to invert this color scheme, black background, white dots/arrow.

Since the icon has a transparent background; we must edit its parent object.
Replace #ffffff with #000000 as shown below. (6x zeroes, for all black, instead of white)

/qmf/qml/qb/components/SlidePanelButton.qml

Code: Select all

        color: canvas.dimState ? "#000000" : (root.parent.panelOpen ? colors.canvas : colors.background)
I edited the svg using this online editing tool.
http://editor.method.ac/

The file to edit is located here:

Code: Select all

/qmf/qml/apps/controlPanel/drawables/controlPanelClosed_dim.svg
I attached both the original and the modified version (in case you mess yours up)
Attachments
controlPanelMod.zip
(911 Bytes) Downloaded 638 times
Rudolf
Member
Member
Posts: 136
Joined: Mon Dec 04, 2017 8:50 pm

Re: Software: modifications and extensions Toon

Post by Rudolf »

To copy this mod to Toon2 I've been messing with drawables.rcc (or its contents)
and found the following svg in plain-text

Code: Select all

<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><title>controlPanelClosed_dim</title><g id="Layer_2" data-name="Layer 2"><g id="control_panel" data-name="control panel"><circle cx="4" cy="4" r="4"/><circle cx="16" cy="4" r="4"/><circle cx="4" cy="16" r="4"/><path d="M19,12a1,1,0,0,0-1,1v3.586L13.414,12A1,1,0,0,0,12,13.414L16.586,18H13a1,1,0,0,0,0,2h6a1,1,0,0,0,1-1V13A1,1,0,0,0,19,12Z"/></g></g></svg>
With this online tool I was able to make some modifications:
https://www.rapidtables.com/web/tools/s ... ditor.html

Code: Select all

<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" ><title>controlPanelClosed_dim</title><g id="Layer_2" data-name="Layer 2"><g id="control_panel" data-name="control panel"><circle cx="4" cy="4" r="4" fill="grey"/><circle cx="16" cy="4" r="4" fill="grey"/><circle cx="4" cy="16" r="4" fill="grey"/><path d="M19,12a1,1,0,0,0-1,1v3.586L13.414,12A1,1,0,0,0,12,13.414L16.586,18H13a1,1,0,0,0,0,2h6a1,1,0,0,0,1-1V13A1,1,0,0,0,19,12Z" fill="grey"/></g></g></svg>
I used "grey" to maintain visibility on the white background, but white is preferred.
I can't seem to make the background black, but I'm unsure if that's necessary.

Any guidance, will this work?
TheHogNL
Forum Moderator
Forum Moderator
Posts: 2125
Joined: Sun Aug 20, 2017 8:53 pm

Re: Software: modifications and extensions Toon

Post by TheHogNL »

Nope, you can't 'text edit' the rcc files. Just leave the drawables.rcc as it is.
If you need that mod I will need to change the resources.rcc and add the new button somewhere. Takes some work though.
Member of the Toon Software Collective
Rudolf
Member
Member
Posts: 136
Joined: Mon Dec 04, 2017 8:50 pm

Re: Software: modifications and extensions Toon

Post by Rudolf »

Will the existing controlPanel app use the modified button?
Cctl01
Starting Member
Starting Member
Posts: 12
Joined: Tue Nov 06, 2018 9:51 am

Re: Software: modifications and extensions Toon

Post by Cctl01 »

I'm trying to take my first babysteps into toon programming. I wanted to start following the basic clock examples given in this thread but I'm stuck before I even began.

The problem is not being able to find the location of the clock tile. I've tried the following to find it.

Code: Select all

# find / -name clock
/qmf/qml/apps/clock
# /qmf/qml/apps/clock# ls -al
drwxr-xr-x    3 root     root           224 Sep 12 17:48 .
drwxrwxr-x   34 root     root          2752 Nov  8 11:36 ..
drwxr-xr-x    2 root     root          1952 Sep 12 17:54 lang
But as you can see all i find is a (practically) empty directory. What's going on here? :roll:
marcelr
Global Moderator
Global Moderator
Posts: 1153
Joined: Thu May 10, 2012 10:58 pm
Location: Ehv

Re: Software: modifications and extensions Toon

Post by marcelr »

Since FW 4.16.x all qml code has been packed in what is called a resource file (extension .rcc). These files are binary blobs holding all qml code. To start coding yourself, you can install the modified rcc files from the forum ftp server. Checkout this thread for more info:
viewtopic.php?f=96&t=12071

Then install the toonstore, and checkout the code that's installed through it. Our apps are still plain qml/javascript, so it's easy to read and modify these.

Happy coding!
jackli072
Starting Member
Starting Member
Posts: 1
Joined: Tue Dec 11, 2018 4:33 pm

Re: Software: modifications and extensions Toon

Post by jackli072 »

Thanks for the information.
cygnusx wrote:Well, almost everything is possible. The language is QML. It's a language to define which widgets go where and define some specifics. But, all the rest in the QML file is actually Javascript.

So, things like x&y coordinates, height, width, opacity etc. is QML, and actions like onclick, loading data on specific intervals, that's all plain javascript.

That makes it kinda easy to program for it. It's mostly basic javascript programming.

I use the original modules to make my own. For instancy, my lights/blinds screen is just a modification from the original one. The difference is that Quby does not do web requests via QML/Javascript but it has it's own daemon on the background where it communicates with. I suppose that has better software application development company performance than my solution, but that part (the daemon) is written in C, in other words, it's compiled and not (easily) modifyable. But if you are smart you can just get away with using javascript.

For instance. I made my own weather script instead of using the default one. It's based on buienradar, so the data is already publicly available. Normally, Toon gets regular weather updates from its backend daemon. This daemon reads the full weather xml and fetches the interesting part (only the weather for your location instead of all weather stations in NL) and sends it to the Toon frontend. In this way, Toon does not have to process all of the data what could make it slow.

I do almost the same. I have a PHP script running on a raspberry pi in my house. This script fetches the buienradar xml. It get's my relevant weather station and sends that part to toon. on my toon i do the rest.
Post Reply

Return to “Toon software development”