Skip to content
Snippets Groups Projects
Instrument.qml 632 B
Newer Older
/** This file is part of Nootka (http://nootka.sf.net)               *
 * Copyright (C) 2017 by Tomasz Bojczuk (seelook@gmail.com)          *
 * on the terms of GNU GPLv3 license (http://www.gnu.org/licenses)   */
  id: root
  property Item instrument: null
  height: nootkaWindow.height / 4 //5 for piano
  width: nootkaWindow.width

  Component.onCompleted: {
    var c = Qt.createComponent("qrc:/Guitar.qml")
    instrument = c.createObject(root, {"anchors.fill": root})
    instrument.onNoteChanged.connect(callNote)

  function callNote() { root.note(instrument.note) }