Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 88edfd82fa
Fetching contributors…

Cannot retrieve contributors at this time

file 51 lines (44 sloc) 1.551 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
//=============================================================================
// MuseScore
// Music Composition & Notation
// $Id:$
//
// 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
//=============================================================================

#include "score.h"
#include "iname.h"

//---------------------------------------------------------
// InstrumentName
//---------------------------------------------------------

InstrumentName::InstrumentName(Score* s)
   : Text(s)
      {
      _subtype = INSTRUMENT_NAME_SHORT;
      _layoutPos = 0;
      }

//---------------------------------------------------------
// subtypeName
//---------------------------------------------------------

QString InstrumentName::subtypeName() const
      {
      if (subtype() == INSTRUMENT_NAME_SHORT)
            return QString("short");
      return QString("long");
      }

//---------------------------------------------------------
// setSubtype
//---------------------------------------------------------

void InstrumentName::setSubtype(const QString& s)
      {
      if (s == "short")
            _subtype = INSTRUMENT_NAME_SHORT;
      if (s == "long")
            _subtype = INSTRUMENT_NAME_LONG;
      else
            qDebug("InstrumentName::setSubtype: unknown <%s>", qPrintable(s));
      }
Something went wrong with that request. Please try again.