MuseScore
3.4
Music composition and notation
libmscore
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
{
29
InstrumentNameType
_instrumentNameType
;
30
int
_layoutPos { 0 };
31
32
public
:
33
InstrumentName
(
Score
*);
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
Ms::Pid
Pid
Definition:
property.h:62
text.h
Ms::InstrumentName::type
virtual ElementType type() const override
Definition:
iname.h:35
Ms::InstrumentName::isEditable
virtual bool isEditable() const override
Definition:
iname.h:45
Ms::Score
Definition:
score.h:391
Ms::InstrumentName::clone
virtual InstrumentName * clone() const override
Definition:
iname.h:34
Ms::InstrumentNameType::LONG
Ms::TextBase
Definition:
textbase.h:217
Ms::InstrumentName::_instrumentNameType
InstrumentNameType _instrumentNameType
Definition:
iname.h:29
Ms
Definition:
aeolus.cpp:26
Ms::InstrumentName::setLayoutPos
void setLayoutPos(int val)
Definition:
iname.h:38
Ms::InstrumentName
Definition:
iname.h:28
Ms::InstrumentNameType
InstrumentNameType
Definition:
iname.h:20
Ms::ElementType::INSTRUMENT_NAME
Ms::InstrumentName::layoutPos
int layoutPos() const
Definition:
iname.h:37
Ms::ElementType
ElementType
Definition:
types.h:34
Ms::InstrumentName::instrumentNameType
InstrumentNameType instrumentNameType() const
Definition:
iname.h:41
Ms::InstrumentNameType::SHORT
Ms::propertyId
Pid propertyId(const QStringRef &s)
Definition:
property.cpp:347
Generated by
1.8.13