aboutsummaryrefslogtreecommitdiffstats
path: root/ethereal/ui/qml_app.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-07-02 06:13:50 +0800
committerobscuren <geffobscura@gmail.com>2014-07-02 06:13:50 +0800
commitc4f9151c67b1481490978a9dca0599b3e92680d5 (patch)
treef02199cf5a2f87595937c5f8c94bda343347fa9f /ethereal/ui/qml_app.go
parent283532137713d20ca82d264bd105cf7cb0e47b65 (diff)
downloaddexon-c4f9151c67b1481490978a9dca0599b3e92680d5.tar.gz
dexon-c4f9151c67b1481490978a9dca0599b3e92680d5.tar.zst
dexon-c4f9151c67b1481490978a9dca0599b3e92680d5.zip
Moved files
Diffstat (limited to 'ethereal/ui/qml_app.go')
-rw-r--r--ethereal/ui/qml_app.go59
1 files changed, 0 insertions, 59 deletions
diff --git a/ethereal/ui/qml_app.go b/ethereal/ui/qml_app.go
deleted file mode 100644
index d23fdd110..000000000
--- a/ethereal/ui/qml_app.go
+++ /dev/null
@@ -1,59 +0,0 @@
-package ethui
-
-import (
- "github.com/ethereum/eth-go/ethchain"
- "github.com/ethereum/eth-go/ethpub"
- "github.com/ethereum/eth-go/ethutil"
- "github.com/go-qml/qml"
-)
-
-type QmlApplication struct {
- win *qml.Window
- engine *qml.Engine
- lib *UiLib
- path string
-}
-
-func NewQmlApplication(path string, lib *UiLib) *QmlApplication {
- engine := qml.NewEngine()
- return &QmlApplication{engine: engine, path: path, lib: lib}
-}
-
-func (app *QmlApplication) Create() error {
- component, err := app.engine.LoadFile(app.path)
- if err != nil {
- logger.Warnln(err)
- }
- app.win = component.CreateWindow(nil)
-
- return nil
-}
-
-func (app *QmlApplication) Destroy() {
- app.engine.Destroy()
-}
-
-func (app *QmlApplication) NewWatcher(quitChan chan bool) {
-}
-
-// Events
-func (app *QmlApplication) NewBlock(block *ethchain.Block) {
- pblock := &ethpub.PBlock{Number: int(block.BlockInfo().Number), Hash: ethutil.Bytes2Hex(block.Hash())}
- app.win.Call("onNewBlockCb", pblock)
-}
-
-func (app *QmlApplication) ObjectChanged(stateObject *ethchain.StateObject) {
- app.win.Call("onObjectChangeCb", ethpub.NewPStateObject(stateObject))
-}
-
-func (app *QmlApplication) StorageChanged(storageObject *ethchain.StorageState) {
- app.win.Call("onStorageChangeCb", ethpub.NewPStorageState(storageObject))
-}
-
-// Getters
-func (app *QmlApplication) Engine() *qml.Engine {
- return app.engine
-}
-func (app *QmlApplication) Window() *qml.Window {
- return app.win
-}