MuseScore/libmscore/iname.h

55 lines
1.7 KiB
C
Raw Normal View History

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 {
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 {
InstrumentNameType _instrumentNameType;
2016-12-30 10:58:53 +01:00
int _layoutPos { 0 };
2012-05-26 14:26:10 +02:00
public:
InstrumentName(Score*);
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; }
2012-05-26 14:26:10 +02:00
int layoutPos() const { return _layoutPos; }
void setLayoutPos(int val) { _layoutPos = val; }
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
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