diff options
author | obscuren <geffobscura@gmail.com> | 2014-07-02 02:09:37 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2014-07-02 02:09:37 +0800 |
commit | dd869064a678918544678c9cb8413d1e9a94de89 (patch) | |
tree | fc2354d02af43f7298ff280b2b3b39713b67ce23 /ethereal/ui/qml_app.go | |
parent | 7a2a63f32b209f0358fa6be1e76b49319d8f309f (diff) | |
download | dexon-dd869064a678918544678c9cb8413d1e9a94de89.tar dexon-dd869064a678918544678c9cb8413d1e9a94de89.tar.gz dexon-dd869064a678918544678c9cb8413d1e9a94de89.tar.bz2 dexon-dd869064a678918544678c9cb8413d1e9a94de89.tar.lz dexon-dd869064a678918544678c9cb8413d1e9a94de89.tar.xz dexon-dd869064a678918544678c9cb8413d1e9a94de89.tar.zst dexon-dd869064a678918544678c9cb8413d1e9a94de89.zip |
delete?
Diffstat (limited to 'ethereal/ui/qml_app.go')
-rw-r--r-- | ethereal/ui/qml_app.go | 59 |
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 := ðpub.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 -} |