MuseScore  3.4
Music composition and notation
iname.h
Go to the documentation of this file.
1 //=============================================================================
2 // MuseScore
3 // Music Composition & Notation
4 //
5 // Copyright (C) 2011 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 __INAME_H__
14 #define __INAME_H__
15 
16 #include "text.h"
17 
18 namespace Ms {
19 
20 enum class InstrumentNameType : char {
21  LONG, SHORT
22  };
23 
24 //---------------------------------------------------------
25 // InstrumentName
26 //---------------------------------------------------------
27 
28 class InstrumentName final : public TextBase {
30  int _layoutPos { 0 };
31 
32  public:
34  virtual InstrumentName* clone() const override { return new InstrumentName(*this); }
35  virtual ElementType type() const override { return ElementType::INSTRUMENT_NAME; }
36 
37  int layoutPos() const { return _layoutPos; }
38  void setLayoutPos(int val) { _layoutPos = val; }
39 
40  QString instrumentNameTypeName() const;
41  InstrumentNameType instrumentNameType() const { return _instrumentNameType; }
42  void setInstrumentNameType(InstrumentNameType v);
43  void setInstrumentNameType(const QString& s);
44 
45  virtual bool isEditable() const override { return false; }
46  virtual QVariant getProperty(Pid propertyId) const override;
47  virtual bool setProperty(Pid propertyId, const QVariant&) override;
48  virtual QVariant propertyDefault(Pid) const override;
49  };
50 
51 
52 } // namespace Ms
53 #endif
54 
Pid
Definition: property.h:62
virtual ElementType type() const override
Definition: iname.h:35
virtual bool isEditable() const override
Definition: iname.h:45
Definition: score.h:391
virtual InstrumentName * clone() const override
Definition: iname.h:34
Definition: textbase.h:217
InstrumentNameType _instrumentNameType
Definition: iname.h:29
Definition: aeolus.cpp:26
void setLayoutPos(int val)
Definition: iname.h:38
Definition: iname.h:28
InstrumentNameType
Definition: iname.h:20
int layoutPos() const
Definition: iname.h:37
ElementType
Definition: types.h:34
InstrumentNameType instrumentNameType() const
Definition: iname.h:41
Pid propertyId(const QStringRef &s)
Definition: property.cpp:347