Changeset View
Changeset View
Standalone View
Standalone View
src/app/plugins/GuitarView/GuitarView.qml
- This file was added.
| 1 | /**************************************************************************** | ||||
|---|---|---|---|---|---|
| 2 | ** | ||||
| 3 | ** Copyright (C) 2016 by Sandro S. Andrade <sandroandrade@kde.org> | ||||
| 4 | ** | ||||
| 5 | ** This program is free software; you can redistribute it and/or | ||||
| 6 | ** modify it under the terms of the GNU General Public License as | ||||
| 7 | ** published by the Free Software Foundation; either version 2 of | ||||
| 8 | ** the License or (at your option) version 3 or any later version | ||||
| 9 | ** accepted by the membership of KDE e.V. (or its successor approved | ||||
| 10 | ** by the membership of KDE e.V.), which shall act as a proxy | ||||
| 11 | ** defined in Section 14 of version 3 of the license. | ||||
| 12 | ** | ||||
| 13 | ** This program is distributed in the hope that it will be useful, | ||||
| 14 | ** but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
| 15 | ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||||
| 16 | ** GNU General Public License for more details. | ||||
| 17 | ** | ||||
| 18 | ** You should have received a copy of the GNU General Public License | ||||
| 19 | ** along with this program. If not, see <http://www.gnu.org/licenses/>. | ||||
| 20 | ** | ||||
| 21 | ****************************************************************************/ | ||||
| 22 | | ||||
| 23 | import QtQuick 2.7 | ||||
| 24 | import QtQuick.Controls 2.0 | ||||
| 25 | | ||||
| 26 | Flickable { | ||||
| 27 | id: flickable | ||||
| 28 | | ||||
| 29 | width: guitar.width | ||||
| 30 | height: 156.4 | ||||
| 31 | contentWidth: guitar.width | ||||
| 32 | boundsBehavior: Flickable.OvershootBounds | ||||
| 33 | clip: true | ||||
| 34 | | ||||
| 35 | function noteOn(chan, pitch, vel) { | ||||
| 36 | } | ||||
| 37 | function noteOff(chan, pitch, vel) { | ||||
| 38 | } | ||||
| 39 | function noteMark(chan, pitch, vel, color) { | ||||
| 40 | } | ||||
| 41 | function noteUnmark(chan, pitch, vel, color) { | ||||
| 42 | } | ||||
| 43 | function clearAllMarks() { | ||||
| 44 | } | ||||
| 45 | function scrollToNote(pitch) { | ||||
| 46 | } | ||||
| 47 | function highlightKey(pitch, color) { | ||||
| 48 | } | ||||
| 49 | function itemForPitch(pitch) { | ||||
| 50 | } | ||||
| 51 | | ||||
| 52 | Rectangle { | ||||
| 53 | id: guitar | ||||
| 54 | | ||||
| 55 | width: board.board_width * 410 + 8.5; height: parent.height | ||||
| 56 | anchors.horizontalCenter: parent.horizontalCenter | ||||
| 57 | radius: 5 | ||||
| 58 | color: "#141414" | ||||
| 59 | | ||||
| 60 | Item { | ||||
| 61 | id: board | ||||
| 62 | width: parent.width | ||||
| 63 | height: fretBoard1.height | ||||
| 64 | anchors.centerIn: parent | ||||
| 65 | | ||||
| 66 | property double board_width: 2.5 | ||||
| 67 | | ||||
| 68 | FretBoard { id: nut; anchors.left: parent.left ; width: board.board_width * 8.5; is_nut: true} | ||||
| 69 | FretBoard { id: fretBoard1; anchors.left: nut.right ; width: board.board_width * 29.466} | ||||
| 70 | FretBoard { id: fretBoard2; anchors.left: fretBoard1.right; width: board.board_width * 27.812} | ||||
| 71 | FretBoard { id: fretBoard3; anchors.left: fretBoard2.right; width: board.board_width * 26.251; show_fret_marker: true} | ||||
| 72 | FretBoard { id: fretBoard4; anchors.left: fretBoard3.right; width: board.board_width * 24.788} | ||||
| 73 | FretBoard { id: fretBoard5; anchors.left: fretBoard4.right; width: board.board_width * 23.387; show_fret_marker: true} | ||||
| 74 | FretBoard { id: fretBoard6; anchors.left: fretBoard5.right; width: board.board_width * 22.075} | ||||
| 75 | FretBoard { id: fretBoard7; anchors.left: fretBoard6.right; width: board.board_width * 20.836; show_fret_marker: true} | ||||
| 76 | FretBoard { id: fretBoard8; anchors.left: fretBoard7.right; width: board.board_width * 19.666} | ||||
| 77 | FretBoard { id: fretBoard9; anchors.left: fretBoard8.right; width: board.board_width * 18.562; show_fret_marker: true} | ||||
| 78 | FretBoard { id: fretBoard10; anchors.left: fretBoard9.right; width: board.board_width * 17.521} | ||||
| 79 | FretBoard { id: fretBoard11; anchors.left: fretBoard10.right; width: board.board_width * 16.537} | ||||
| 80 | FretBoard { id: fretBoard12; anchors.left: fretBoard11.right; width: board.board_width * 15.609; show_fret_marker: true; show_two_markers: true} | ||||
| 81 | FretBoard { id: fretBoard13; anchors.left: fretBoard12.right; width: board.board_width * 14.733} | ||||
| 82 | FretBoard { id: fretBoard14; anchors.left: fretBoard13.right; width: board.board_width * 13.906} | ||||
| 83 | FretBoard { id: fretBoard15; anchors.left: fretBoard14.right; width: board.board_width * 13.126; show_fret_marker: true} | ||||
| 84 | FretBoard { id: fretBoard16; anchors.left: fretBoard15.right; width: board.board_width * 12.289} | ||||
| 85 | FretBoard { id: fretBoard17; anchors.left: fretBoard16.right; width: board.board_width * 11.693; show_fret_marker: true} | ||||
| 86 | FretBoard { id: fretBoard18; anchors.left: fretBoard17.right; width: board.board_width * 11.037} | ||||
| 87 | FretBoard { id: fretBoard19; anchors.left: fretBoard18.right; width: board.board_width * 10.418} | ||||
| 88 | FretBoard { id: fretBoard20; anchors.left: fretBoard19.right; width: board.board_width * 9.833} | ||||
| 89 | FretBoard { id: fretBoard21; anchors.left: fretBoard20.right; width: board.board_width * 9.282} | ||||
| 90 | FretBoard { id: fretBoard22; anchors.left: fretBoard21.right; width: board.board_width * 9.760} | ||||
| 91 | FretBoard { id: chords; anchors.left: fretBoard22.right; width: board.board_width * 30; is_end: true} | ||||
| 92 | } | ||||
| 93 | } | ||||
| 94 | | ||||
| 95 | ScrollIndicator.horizontal: ScrollIndicator { active: true } | ||||
| 96 | } | ||||