Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(236)  |  Call(225)  |  Derive(0)  |  Import(11)

src/d/r/DrumBurp-HEAD/src/GUI/QMeasure.py   DrumBurp(Download)
from PyQt4 import QtGui, QtCore
 
from Data.NotePosition import NotePosition
from Data import DBConstants
 
    def makeNotePosition(self, noteTime, drumIndex):
        np = NotePosition(measureIndex = self._index,
                          noteTime = noteTime,
                          drumIndex = drumIndex)
        return self.parentItem().augmentNotePosition(np)
 
    def measurePosition(self):
        np = NotePosition(measureIndex = self._index)

src/d/r/DrumBurp-HEAD/src/GUI/QMeasureLine.py   DrumBurp(Download)
 
from PyQt4 import QtGui, QtCore
from Data.NotePosition import NotePosition
from DBFSMEvents import MeasureLineContext
 
    def _getEndNotePosition(self):
        if self._index == 0:
            return None
        np = NotePosition(measureIndex = self._index - 1)
        return self._qStaff.augmentNotePosition(np)
 
    def _getStartNotePosition(self):
        np = NotePosition(measureIndex = self._index)

src/d/r/DrumBurp-HEAD/src/test/testScore.py   DrumBurp(Download)
from Data.DBErrors import BadTimeError, OverSizeMeasure
from Data.DBConstants import EMPTY_NOTE
from Data.NotePosition import NotePosition
 
# pylint: disable-msg=R0904
    def testDeleteMeasureByPosition(self):
        self.score.insertMeasureByIndex(16)
        self.score.insertMeasureByIndex(16)
        self.score.insertMeasureByIndex(16)
        self.score.deleteMeasureByPosition(NotePosition(0, 1))
    def testDeleteMeasureByPosition_EmptySystem(self):
        self.score.insertMeasureByIndex(16)
        self.score.insertMeasureByIndex(16)
        self.score.insertMeasureByIndex(16)
        self.score.deleteMeasureByPosition(NotePosition(0, 1))
        self.assertEqual(self.score.numMeasures(), 2)
        self.score.deleteMeasureByPosition(NotePosition(0, 1))
        self.assertEqual(self.score.numMeasures(), 1)
        self.score.deleteMeasureByPosition(NotePosition(0, 0))

src/d/r/DrumBurp-HEAD/src/GUI/QStaff.py   DrumBurp(Download)
from QMeasureLine import QMeasureLine
from QLineLabel import QLineLabel
from Data.NotePosition import NotePosition
import itertools
 
    def _makeNotePosition(self):
        np = NotePosition(staffIndex = self._index)
        return np
 
    def augmentNotePosition(self, np):

src/d/r/DrumBurp-HEAD/src/test/testNotePosition.py   DrumBurp(Download)
import unittest
 
from Data.NotePosition import NotePosition
from Data.DBErrors import BadNoteSpecification
 
    def testInitAll(self):
        np = NotePosition(1, 2, 3, 4)
        self.assertEqual(np.staffIndex, 1)
        self.assertEqual(np.measureIndex, 2)
        self.assertEqual(np.noteTime, 3)
        self.assertEqual(np.drumIndex, 4)
 
    def testInitAllByName(self):
        np = NotePosition(staffIndex = 1, measureIndex = 2,
    def testOnlyNote(self):
        np = NotePosition(noteTime = 2, drumIndex = 3)
        self.assertEqual(np.staffIndex, None)
        self.assertEqual(np.measureIndex, None)
        self.assertEqual(np.noteTime, 2)
        self.assertEqual(np.drumIndex, 3)
 
    def testMeasureAndNote(self):
        np = NotePosition(measureIndex = 1, noteTime = 2, drumIndex = 3)

src/d/r/DrumBurp-HEAD/src/GUI/QScore.py   DrumBurp(Download)
from Data import DBErrors
from Data.Score import ScoreFactory
from Data.NotePosition import NotePosition
from DBCommands import (MetaDataCommand, ScoreWidthCommand,
                        DeleteMeasureCommand, InsertAndPasteMeasures,
        for measure in self._potentials:
            if measure not in notesByMeasures:
                qmeasure = self.getQMeasure(NotePosition(measure[0],
                                                         measure[1]))
                qmeasure.setPotentials()
        for measure in newMeasures:
            qmeasure = self.getQMeasure(NotePosition(measure[0], measure[1]))

src/d/r/DrumBurp-HEAD/src/test/testStaff.py   DrumBurp(Download)
from Data.DBConstants import EMPTY_NOTE
from Data.DBErrors import BadTimeError
from Data.NotePosition import NotePosition
 
# pylint: disable-msg=R0904
    def testDeleteMeasure(self):
        self.staff.addMeasure(Measure(1))
        self.staff.addMeasure(Measure(2))
        self.staff.deleteMeasure(NotePosition(measureIndex = 0))
        self.assertEqual(self.staff.numMeasures(), 1)
    def testInsertMeasure(self):
        self.staff.addMeasure(Measure(1))
        self.staff.addMeasure(Measure(3))
        self.staff.insertMeasure(NotePosition(measureIndex = 1), Measure(2))
        for i, measure in enumerate(self.staff):
            self.assertEqual(len(measure), i + 1)
 
    def testInsertMeasureAtStart(self):
        self.staff.addMeasure(Measure(2))
        self.staff.insertMeasure(NotePosition(measureIndex = 0), Measure(1))
    def testInsertMeasureAtEnd(self):
        self.staff.addMeasure(Measure(1))
        self.staff.insertMeasure(NotePosition(measureIndex = 1), Measure(2))
        for i, measure in enumerate(self.staff):
            self.assertEqual(len(measure), i + 1)

src/d/r/DrumBurp-HEAD/src/test/testMeasure.py   DrumBurp(Download)
from Data.DBErrors import BadTimeError
from Data.DBConstants  import EMPTY_NOTE
from Data.NotePosition import NotePosition
from Data import fileUtils
# pylint: disable-msg=R0904
    def testIsEmpty_False(self):
        self.measure.addNote(NotePosition(noteTime = 0, drumIndex = 0), "o")
        self.assertFalse(self.measure.isEmpty())
 
    def testGetNote_BadTime(self):
    def testNumNotes(self):
        for i in range(0, 16):
            self.measure.addNote(NotePosition(noteTime = i, drumIndex = 0), "o")
        self.assertEqual(self.measure.numNotes(), 16)
 
    def testAddNote(self):
        self.measure.addNote(NotePosition(noteTime = 0, drumIndex = 0), "o")
        notePos = NotePosition(noteTime = 0, drumIndex = 0)

src/d/r/DrumBurp-HEAD/src/GUI/DBCommands.py   DrumBurp(Download)
import DBMidi
from Data import DBConstants
from Data.NotePosition import NotePosition
from Data.Measure import Measure
import DBVersion
    def __init__(self, qScore, positions):
        super(ClearMeasureCommand, self).__init__(qScore, NotePosition(),
                                                  "clear measures")
        self._positions = [np.makeMeasurePosition() for np in positions]
        self._oldMeasures = [self._score.copyMeasure(note)
    def __init__(self, qScore, newPaperSize):
        super(SetPaperSizeCommand, self).__init__(qScore,
                                                  NotePosition(),
                                                  "set page size")
        self._new = newPaperSize
    def __init__(self, qScore, newCount):
        super(SetDefaultCountCommand, self).__init__(qScore,
                                                     NotePosition(),
                                                     "set default count")
        self._new = newCount
    def __init__(self, qScore, newSpacing):
        super(SetSystemSpacingCommand, self).__init__(qScore,
                                                      NotePosition(),
                                                      "set system spacing")
        self._new = newSpacing

src/d/r/DrumBurp-HEAD/src/Notation/AsciiExport.py   DrumBurp(Download)
                              EMPTY_NOTE, REPEAT_END, REPEAT_STARTER,
                              ALTERNATE_EXTENDER)
from Data.NotePosition import NotePosition
import time
 
        indices = range(0, kitSize)
        indices.reverse()
        position = NotePosition()
        staffString = self._getRepeatString(staff)
        for drumIndex in indices:

  1 | 2  Next