Developing apps for Toon

Forum about forum-provided applications on Toon

Moderators: marcelr, TerrorSource, Toonz, TheHogNL

Re: Developing apps for Toon

Postby TerrorSource » Sun Dec 29, 2019 4:42 pm

@hvxl

I'm testing with the local image file (2.3 in the document) but seems i cant get it working..

Logs:
file://qmf/qml/apps/xxx/xxxTile.qml:53:2: QML Image: Error transferring http://localhost/images/xxx/xxx_large.jpg - server replied: Not Found

qml file:
source: "http://localhost/images/xxx/xxx_large.jpg"

image file:
/HCBv2/qml/images/xxx/xxx_large.jpg
TerrorSource
Member
Member
 
Posts: 417
Joined: May 2017

Re: Developing apps for Toon

Postby hvxl » Sun Dec 29, 2019 11:09 pm

I just tested it again to make sure it works. This is the code I used (in directory /HCBv2/qml/apps/xxx):

XxxApp.qml:
Code: Select all
import QtQuick 2.1
import qb.base 1.0

App {
    property url tileUrl: "XxxTile.qml"

    function init() {
        const args = {
            thumbCategory: "general",
            thumbLabel: "Xxx",
            thumbIcon: "qrc:/images/unknown.svg",
            thumbIconVAlignment: "center",
            thumbWeight: 30
        }
        registry.registerWidget("tile", tileUrl, this, null, args);
    }
}

XxxTile.qml:
Code: Select all
import QtQuick 2.1
import qb.components 1.0

Tile {
    Image {
        anchors.centerIn: parent
        source: "http://localhost/images/xxx/xxx_large.jpg"
    }
}

toonfb0001.png
Xxx tile screen shot
toonfb0001.png (21.39 KiB) Viewed 2381 times

What happens if you try to access the file from the command line?:
cd /tmp
wget http://localhost/images/xxx/xxx_large.jpg

I'm doing this on a toon 1. I expect it works on toon 2 as well, but I don't have one to test that assumption.
Schelte
hvxl
Senior Member
Senior Member
 
Posts: 1303
Joined: June 2010

Re: Developing apps for Toon

Postby ralph123 » Wed Jan 15, 2020 6:39 pm

I'm a newbie in building apps. I'm looking into showing the values of my SolarEdge inverter.
Is it a lot of work to build an app that shows only 1 value. SolarEdge has an api. Andy I found a pyton script. https://pypi.org/project/solaredge/

For history etc. I use the SolarEdge app. It's nice to see the current Kw/h of the solarpanels on my Toon.
ralph123
Starting Member
Starting Member
 
Posts: 7
Joined: January 2020

Re: Developing apps for Toon

Postby TheHogNL » Thu Jan 16, 2020 1:41 pm

ralph123 wrote:I'm a newbie in building apps. I'm looking into showing the values of my SolarEdge inverter.
Is it a lot of work to build an app that shows only 1 value. SolarEdge has an api. Andy I found a pyton script. https://pypi.org/project/solaredge/

For history etc. I use the SolarEdge app. It's nice to see the current Kw/h of the solarpanels on my Toon.


Why not invest in a 25 euro kWh meter and then use the native solar app on the Toon? The values from the solaredge api are only updated once per 5 minutes.
Member of the Toon Software Collective
User avatar
TheHogNL
Forum Moderator
Forum Moderator
 
Posts: 1543
Joined: August 2017

Re: Developing apps for Toon

Postby glsf91 » Wed Mar 11, 2020 9:44 pm

Sorry for deleting my previous posts, I solved them finally.

I want to test the thumbnail icon for my application.

If I try: property url thumbnailIcon: "http://localhost/nl-icon.png"
I get the error: qrc:/apps/homescreen/TileThumbnail.qml:73:3: QML Image: Failed to get image from provider: image://scaled//localhost/nl-icon.png

I know I can use above url for an image elsewhere in the app, but I want to test it for the thumbnail icon.

Is there a way to test my own thumbnail icon before it is in the TSC resource file?


Edit:
Answer: above is not possible. Has to use resourcefile for thumbnail
glsf91
Member
Member
 
Posts: 143
Joined: September 2017

Previous

Return to Toon Apps

Who is online

Users browsing this forum: No registered users and 1 guest