MuseScore/libmscore/property.h

149 lines
3.4 KiB
C
Raw Normal View History

2012-05-26 14:26:10 +02:00
//=============================================================================
// 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
//=============================================================================
#ifndef __PROPERTY_H__
#define __PROPERTY_H__
2013-01-11 18:10:18 +01:00
class XmlReader;
2012-05-26 14:26:10 +02:00
//------------------------------------------------------------------------
// Element Properties
// accessible through
// virtual QVariant Element::getProperty(int propertyId)
// virtual void Element::setProperty(int propertyId, const QVariant&)
//------------------------------------------------------------------------
enum P_ID {
P_SUBTYPE,
P_SELECTED,
P_COLOR,
P_VISIBLE,
P_SMALL,
P_SHOW_COURTESY,
P_LINE_TYPE,
P_PITCH,
P_TPC,
P_HEAD_TYPE,
2012-08-23 17:40:04 +02:00
P_HEAD_GROUP,
2012-05-26 14:26:10 +02:00
P_VELO_TYPE,
P_VELO_OFFSET,
P_ARTICULATION_ANCHOR,
P_DIRECTION,
P_STEM_DIRECTION,
P_NO_STEM,
P_SLUR_DIRECTION,
P_LEADING_SPACE,
P_TRAILING_SPACE,
2012-08-23 17:40:04 +02:00
P_DISTRIBUTE,
2012-05-26 14:26:10 +02:00
P_MIRROR_HEAD,
P_DOT_POSITION,
P_TUNING,
P_PAUSE,
P_BARLINE_SPAN,
P_USER_OFF,
P_FRET,
2012-08-23 17:40:04 +02:00
P_STRING,
2012-05-26 14:26:10 +02:00
P_GHOST,
P_TIMESIG_NOMINAL,
P_TIMESIG_ACTUAL,
P_NUMBER_TYPE,
P_BRACKET_TYPE,
P_NORMAL_NOTES,
P_ACTUAL_NOTES,
P_P1,
P_P2,
2012-08-23 17:40:04 +02:00
P_GROW_LEFT,
2012-05-26 14:26:10 +02:00
P_GROW_RIGHT,
P_BOX_HEIGHT,
P_BOX_WIDTH,
P_TOP_GAP,
P_BOTTOM_GAP,
P_LEFT_MARGIN,
P_RIGHT_MARGIN,
P_TOP_MARGIN,
P_BOTTOM_MARGIN,
2012-08-23 17:40:04 +02:00
P_LAYOUT_BREAK,
2012-05-26 14:26:10 +02:00
P_AUTOSCALE,
P_SIZE,
P_SCALE,
P_LOCK_ASPECT_RATIO,
P_SIZE_IS_SPATIUM,
P_TEXT_STYLE,
P_USER_MODIFIED,
P_BEAM_POS,
P_BEAM_MODE,
2012-08-23 17:40:04 +02:00
P_USER_LEN, // used for stems
2012-05-26 14:26:10 +02:00
P_SPACE, // used for spacer
2012-07-25 11:49:34 +02:00
P_TEMPO,
P_TEMPO_FOLLOW_TEXT,
2012-07-27 18:01:15 +02:00
P_ACCIDENTAL_BRACKET,
P_NUMERATOR_STRING,
P_DENOMINATOR_STRING,
P_SHOW_NATURALS,
2012-08-02 18:33:43 +02:00
P_BREAK_HINT,
2012-08-11 01:15:22 +02:00
P_FBPREFIX, // used for FiguredBassItem
2012-09-17 15:37:31 +02:00
P_FBDIGIT, // " "
2012-08-11 01:15:22 +02:00
P_FBSUFFIX, // " "
P_FBCONTINUATIONLINE, // " "
2012-08-14 14:58:43 +02:00
P_FBPARENTHESIS1, // " "
P_FBPARENTHESIS2, // " "
P_FBPARENTHESIS3, // " "
P_FBPARENTHESIS4, // " "
P_FBPARENTHESIS5, // " "
2012-09-17 15:37:31 +02:00
P_VOLTA_TYPE,
2012-09-17 17:35:49 +02:00
P_OTTAVA_TYPE,
2012-05-26 14:26:10 +02:00
2012-09-17 18:09:30 +02:00
P_TRILL_TYPE,
P_HAIRPIN_TYPE,
P_VELO_CHANGE,
P_DYNAMIC_RANGE,
P_PLACEMENT,
P_VELOCITY,
2012-09-17 18:09:30 +02:00
2012-05-26 14:26:10 +02:00
P_END
};
enum P_TYPE {
T_SUBTYPE,
T_BOOL,
T_INT,
T_REAL,
T_SREAL,
T_FRACTION,
T_POINT,
T_SIZE,
2012-07-27 18:01:15 +02:00
T_STRING,
2012-05-26 14:26:10 +02:00
T_SCALE,
T_COLOR,
T_DIRECTION, // enum Direction
T_DIRECTION_H, // enum DirectionH
T_LAYOUT_BREAK,
T_VALUE_TYPE,
T_BEAM_MODE,
T_PLACEMENT
2012-05-26 14:26:10 +02:00
};
2013-01-11 18:10:18 +01:00
extern QVariant getProperty(P_ID type, XmlReader& e);
2012-05-26 14:26:10 +02:00
extern P_TYPE propertyType(P_ID);
extern const char* propertyName(P_ID);
#endif