You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

51 lines
1.9 KiB

#! /usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Copyright 2018, Nils Hilbricht, Germany ( https://www.hilbricht.net )
This file is part of the Laborejo Software Suite ( https://www.laborejo.org ),
more specifically its template base application.
The Template Base Application is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
"""
import logging; logging.info("import {}".format(__file__))
#Standard Library Modules
#Third Party Modules
from PyQt5 import QtWidgets, QtCore, QtGui
#Template Modules
from template.qtgui.helper import stretchRect
#User modules
import engine.api as api
from .constantsAndConfigs import constantsAndConfigs
class Note(QtWidgets.QGraphicsRectItem):
def __init__(self, parentLayer, pitch:int, velocity:int, color):
"""Position in the layer/scene is not calculated in the item itself but outside"""
super().__init__(0,0, 1, constantsAndConfigs.stafflineGap, parent=parentLayer) #x, y, w, h
self.setParentItem(parentLayer)
self.parentLayer = parentLayer
self.pitch = pitch
self.velocity = velocity
self.setBrush(color)
self.ids = set() #IDs are set by the creating function. Most have only one, but notes have two
def stretchXCoordinates(self, factor):
pass