2012-05-26 14:26:10 +02:00
|
|
|
//=============================================================================
|
|
|
|
// MuseScore
|
|
|
|
// Music Composition & Notation
|
|
|
|
//
|
|
|
|
// Copyright (C) 2011 Werner Schweer
|
|
|
|
//
|
|
|
|
// This program is free software; you can redistribute it and/or modify
|
|
|
|
// it under the terms of the GNU General Public License version 2
|
|
|
|
// as published by the Free Software Foundation and appearing in
|
|
|
|
// the file LICENCE.GPL
|
|
|
|
//=============================================================================
|
|
|
|
|
|
|
|
#ifndef __INAME_H__
|
|
|
|
#define __INAME_H__
|
|
|
|
|
|
|
|
#include "text.h"
|
|
|
|
|
2013-05-13 18:49:17 +02:00
|
|
|
namespace Ms {
|
|
|
|
|
2014-05-21 17:57:56 +02:00
|
|
|
enum class InstrumentNameType : char {
|
|
|
|
LONG, SHORT
|
2012-05-26 14:26:10 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
//---------------------------------------------------------
|
|
|
|
// InstrumentName
|
|
|
|
//---------------------------------------------------------
|
|
|
|
|
2017-12-27 11:51:00 +01:00
|
|
|
class InstrumentName final : public TextBase {
|
2013-03-05 20:23:59 +01:00
|
|
|
InstrumentNameType _instrumentNameType;
|
2016-12-30 10:58:53 +01:00
|
|
|
int _layoutPos { 0 };
|
2012-05-26 14:26:10 +02:00
|
|
|
|
|
|
|
public:
|
|
|
|
InstrumentName(Score*);
|
2015-01-19 12:37:17 +01:00
|
|
|
virtual InstrumentName* clone() const override { return new InstrumentName(*this); }
|
2017-01-18 14:16:33 +01:00
|
|
|
virtual ElementType type() const override { return ElementType::INSTRUMENT_NAME; }
|
2015-01-19 12:37:17 +01:00
|
|
|
|
2012-05-26 14:26:10 +02:00
|
|
|
int layoutPos() const { return _layoutPos; }
|
|
|
|
void setLayoutPos(int val) { _layoutPos = val; }
|
|
|
|
|
2013-03-05 20:23:59 +01:00
|
|
|
QString instrumentNameTypeName() const;
|
|
|
|
InstrumentNameType instrumentNameType() const { return _instrumentNameType; }
|
|
|
|
void setInstrumentNameType(InstrumentNameType v);
|
|
|
|
void setInstrumentNameType(const QString& s);
|
2016-12-30 10:58:53 +01:00
|
|
|
|
2018-12-27 19:52:23 +01:00
|
|
|
virtual bool isEditable() const override { return false; }
|
2018-03-27 15:36:00 +02:00
|
|
|
virtual QVariant getProperty(Pid propertyId) const override;
|
|
|
|
virtual bool setProperty(Pid propertyId, const QVariant&) override;
|
|
|
|
virtual QVariant propertyDefault(Pid) const override;
|
2012-05-26 14:26:10 +02:00
|
|
|
};
|
|
|
|
|
2013-05-13 18:49:17 +02:00
|
|
|
|
|
|
|
} // namespace Ms
|
2012-05-26 14:26:10 +02:00
|
|
|
#endif
|
|
|
|
|