MuseScore  3.4
Music composition and notation
bracketItem.h
Go to the documentation of this file.
1 //=============================================================================
2 // MuseScore
3 // Music Composition & Notation
4 //
5 // Copyright (C) 2017 Werner Schweer
6 //
7 // This program is free software; you can redistribute it and/or modify
8 // it under the terms of the GNU General Public License version 2
9 // as published by the Free Software Foundation and appearing in
10 // the file LICENCE.GPL
11 //=============================================================================
12 
13 #ifndef __BRACKET_ITEM_H__
14 #define __BRACKET_ITEM_H__
15 
16 #include "scoreElement.h"
17 #include "mscore.h"
18 
19 namespace Ms {
20 
21 //---------------------------------------------------------
22 // BracketItem
23 //---------------------------------------------------------
24 
25 class BracketItem final : public ScoreElement {
27  int _column { 0 };
28  int _bracketSpan { 0 };
29  Staff* _staff { 0 };
30 
31  public:
34  virtual ElementType type() const override { return ElementType::BRACKET_ITEM; }
35  virtual QVariant getProperty(Pid) const override;
36  virtual bool setProperty(Pid, const QVariant&) override;
37  virtual QVariant propertyDefault(Pid id) const override;
38 
39 // bool selected() const { return _selected; }
40  int bracketSpan() const { return _bracketSpan; }
41  BracketType bracketType() const { return _bracketType; }
42 // void setSelected(bool v) { _selected = v; }
43  void setBracketSpan(int v) { _bracketSpan = v; }
45  Staff* staff() { return _staff; }
46  void setStaff(Staff*s ) { _staff = s; }
47  int column() const { return _column; }
48  void setColumn(int v) { _column = v; }
49  };
50 
51 }
52 #endif
53 
Definition: bracketItem.h:25
Global staff data not directly related to drawing.
Definition: staff.h:62
virtual ElementType type() const override
Definition: bracketItem.h:34
Pid
Definition: property.h:62
int bracketSpan() const
Definition: bracketItem.h:40
void setBracketSpan(int v)
Definition: bracketItem.h:43
int _bracketSpan
Definition: bracketItem.h:28
Definition: scoreElement.h:173
Staff * _staff
Definition: bracketItem.h:29
virtual QVariant getProperty(Pid) const override
Definition: bracketItem.cpp:24
int _column
Definition: bracketItem.h:27
int column() const
Definition: bracketItem.h:47
Definition: score.h:391
Staff * staff()
Definition: bracketItem.h:45
Definition: aeolus.cpp:26
virtual QVariant propertyDefault(Pid id) const override
Definition: bracketItem.cpp:67
void setStaff(Staff *s)
Definition: bracketItem.h:46
BracketItem(Score *s, BracketType a, int b)
Definition: bracketItem.h:33
virtual bool setProperty(Pid, const QVariant &) override
Definition: bracketItem.cpp:43
BracketType
Definition: mscore.h:107
BracketItem(Score *s)
Definition: bracketItem.h:32
ElementType
Definition: types.h:34
BracketType bracketType() const
Definition: bracketItem.h:41
BracketType _bracketType
Definition: bracketItem.h:26
void setBracketType(BracketType v)
Definition: bracketItem.h:44
void setColumn(int v)
Definition: bracketItem.h:48