Skip to content
Snippets Groups Projects
Select7note.qml 1.54 KiB
Newer Older
  • Learn to ignore specific revisions
  • /** This file is part of Nootka (http://nootka.sf.net)               *
    
     * Copyright (C) 2017-2021 by Tomasz Bojczuk (seelook@gmail.com)     *
    
     * on the terms of GNU GPLv3 license (http://www.gnu.org/licenses)   */
    
    
    SeeLook's avatar
    SeeLook committed
    import "../"
    import Nootka 1.0
    
    import QtQuick 2.12
    import QtQuick.Controls 2.12
    
    SeeLook's avatar
    SeeLook committed
        property alias is7B: bButt.checked
        property int style: -1
    
    SeeLook's avatar
    SeeLook committed
        width: mainLay.width
        height: mainLay.height
        onStyleChanged: {
            if (style > -1) {
                var sp = "";
                for (var n = 1; n < 8; ++n) sp += NOO.noteName(NOO.note(n, 1, 0), style, false) + " "
                preview.text = sp;
            }
    
    SeeLook's avatar
    SeeLook committed
    
        Grid {
            id: mainLay
    
            columns: 2
            spacing: NOO.factor()
            verticalItemAlignment: Grid.AlignVCenter
    
            ButtonGroup {
    
                id: bhGr
    
    SeeLook's avatar
    SeeLook committed
            }
    
            Row {
                id: butRow
    
                y: (parent.height - height) / 2
                spacing: NOO.factor() / 2
    
                Text {
                    text: qsTr("7th note is:")
                    color: enabled ? activPal.text : disdPal.text
                    anchors.verticalCenter: parent.verticalCenter
                }
    
                TradioButton {
                    id: bButt
    
    
                    ButtonGroup.group: bhGr
    
    SeeLook's avatar
    SeeLook committed
                    text: "B"
                }
    
                TradioButton {
    
                    ButtonGroup.group: bhGr
    
    SeeLook's avatar
    SeeLook committed
                    text: "H"
                    checked: !bButt.checked
                }
    
            }
    
            Text {
                id: preview
    
                font.pixelSize: NOO.factor() * 2
                color: activPal.text
            }
    
    
    SeeLook's avatar
    SeeLook committed
    }