diff options
Diffstat (limited to 'Godeps/_workspace/src/github.com/obscuren/qml/examples/imgprovider')
3 files changed, 0 insertions, 48 deletions
diff --git a/Godeps/_workspace/src/github.com/obscuren/qml/examples/imgprovider/imgprovider.go b/Godeps/_workspace/src/github.com/obscuren/qml/examples/imgprovider/imgprovider.go deleted file mode 100644 index 533a23b86..000000000 --- a/Godeps/_workspace/src/github.com/obscuren/qml/examples/imgprovider/imgprovider.go +++ /dev/null @@ -1,43 +0,0 @@ -package main - -import ( - "fmt" - "gopkg.in/qml.v1" - "image" - "image/png" - "os" -) - -func main() { - if err := qml.Run(run); err != nil { - fmt.Fprintf(os.Stderr, "error: %v\n", err) - os.Exit(1) - } -} - -func run() error { - engine := qml.NewEngine() - engine.AddImageProvider("pwd", func(id string, width, height int) image.Image { - f, err := os.Open(id) - if err != nil { - panic(err) - } - defer f.Close() - image, err := png.Decode(f) - if err != nil { - panic(err) - } - return image - }) - - component, err := engine.LoadFile("imgprovider.qml") - if err != nil { - return err - } - - win := component.CreateWindow(nil) - win.Show() - win.Wait() - - return nil -} diff --git a/Godeps/_workspace/src/github.com/obscuren/qml/examples/imgprovider/imgprovider.qml b/Godeps/_workspace/src/github.com/obscuren/qml/examples/imgprovider/imgprovider.qml deleted file mode 100644 index 0c5c747f0..000000000 --- a/Godeps/_workspace/src/github.com/obscuren/qml/examples/imgprovider/imgprovider.qml +++ /dev/null @@ -1,5 +0,0 @@ -import QtQuick 2.0 - -Image { - source: "image://pwd/ubuntu-gopher.png" -} diff --git a/Godeps/_workspace/src/github.com/obscuren/qml/examples/imgprovider/ubuntu-gopher.png b/Godeps/_workspace/src/github.com/obscuren/qml/examples/imgprovider/ubuntu-gopher.png Binary files differdeleted file mode 100644 index 3f51d3798..000000000 --- a/Godeps/_workspace/src/github.com/obscuren/qml/examples/imgprovider/ubuntu-gopher.png +++ /dev/null |