2012-05-26 14:26:10 +02:00
|
|
|
//=============================================================================
|
|
|
|
// MuseScore
|
|
|
|
// Music Composition & Notation
|
|
|
|
//
|
|
|
|
// Copyright (C) 2002-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 __INSTRCHANGE_H__
|
|
|
|
#define __INSTRCHANGE_H__
|
|
|
|
|
|
|
|
#include "text.h"
|
|
|
|
#include "instrument.h"
|
|
|
|
|
2013-05-13 18:49:17 +02:00
|
|
|
namespace Ms {
|
|
|
|
|
2012-05-26 14:26:10 +02:00
|
|
|
//---------------------------------------------------------
|
2012-07-25 11:49:34 +02:00
|
|
|
// @@ InstrumentChange
|
2012-05-26 14:26:10 +02:00
|
|
|
//---------------------------------------------------------
|
|
|
|
|
|
|
|
class InstrumentChange : public Text {
|
2012-05-28 11:29:21 +02:00
|
|
|
Q_OBJECT
|
|
|
|
|
2012-05-26 14:26:10 +02:00
|
|
|
Instrument _instrument;
|
|
|
|
|
|
|
|
public:
|
|
|
|
InstrumentChange(Score*);
|
|
|
|
virtual InstrumentChange* clone() const { return new InstrumentChange(*this); }
|
2014-05-22 19:49:51 +02:00
|
|
|
virtual ElementType type() const { return ElementType::INSTRUMENT_CHANGE; }
|
2012-05-26 14:26:10 +02:00
|
|
|
virtual void write(Xml& xml) const;
|
2013-01-11 18:10:18 +01:00
|
|
|
virtual void read(XmlReader&);
|
2012-05-26 14:26:10 +02:00
|
|
|
|
|
|
|
Instrument instrument() const { return _instrument; }
|
|
|
|
void setInstrument(const Instrument& i) { _instrument = i; }
|
2014-02-12 21:59:52 +01:00
|
|
|
Segment* segment() const { return (Segment*)parent(); }
|
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
|