Make getNoteBounds a separate function

This commit is contained in:
allejok96
2022-06-11 21:56:14 +02:00
parent 89a7c390e6
commit 308b4650b6
5 changed files with 42 additions and 70 deletions

View File

@@ -26,6 +26,7 @@
#ifndef NOTE_H
#define NOTE_H
#include <optional>
#include <QVector>
#include "volume.h"
@@ -244,14 +245,18 @@ private:
};
typedef QVector<Note *> NoteVector;
class NoteVector: public QVector<Note*>
struct NoteBounds
{
public:
bool getBounds(TimePos& start, TimePos& end, int& lower, int& upper) const;
bool transpose(int semitones) const;
TimePos start;
TimePos end;
int lowest;
int highest;
};
std::optional<NoteBounds> getNoteBounds(const NoteVector& notes);
#endif