MuseScore  3.4
Music composition and notation
stafftype.h
Go to the documentation of this file.
1 //=============================================================================
2 // MuseScore
3 // Music Composition & Notation
4 //
5 // Copyright (C) 2010-2015 Werner Schweer & others
6 //
7 // This program is free software; you can redistribute it and/or modify
8 // it under the terms of the GNU General Public License version 2
9 // as published by the Free Software Foundation and appearing in
10 // the file LICENCE.GPL
11 //=============================================================================
12 
13 #ifndef __STAFFTYPE_H__
14 #define __STAFFTYPE_H__
15 
16 #include "element.h"
17 #include "spatium.h"
18 #include "mscore.h"
19 #include "durationtype.h"
20 
21 namespace Ms {
22 
23 class Chord;
24 class ChordRest;
25 class Staff;
26 class XmlWriter;
27 
28 // all in spatium units
29 #define STAFFTYPE_TAB_DEFAULTSTEMLEN_UP 3.0
30 #define STAFFTYPE_TAB_DEFAULTSTEMDIST_UP 1.0
31 #define STAFFTYPE_TAB_DEFAULTSTEMPOSY_UP -STAFFTYPE_TAB_DEFAULTSTEMDIST_UP
32 #define STAFFTYPE_TAB_DEFAULTSTEMLEN_DN 3.0
33 #define STAFFTYPE_TAB_DEFAULTSTEMDIST_DN 1.0
34 #define STAFFTYPE_TAB_DEFAULTSTEMPOSY_DN STAFFTYPE_TAB_DEFAULTSTEMDIST_DN
35 #define STAFFTYPE_TAB_DEFAULTSTEMLEN_THRU 3.5
36 #define STAFFTYPE_TAB_DEFAULTSTEMPOSX 0.75
37 #define STAFFTYPE_TAB_DEFAULTDOTDIST_X 0.75
38 
39 // TAB STEM NOTATION
40 // the ratio between the length of a full stem and the length of a short stem
41 // (used for half note stems, in some TAB styles)
42 #define STAFFTYPE_TAB_SHORTSTEMRATIO 0.5
43 // metrics of slashes through half note stems
44 #define STAFFTYPE_TAB_SLASH_WIDTH 1.2 /* X width of half note slash */
45 #define STAFFTYPE_TAB_SLASH_SLANTY 0.8 /* the Y coord of the slash slant */
46 #define STAFFTYPE_TAB_SLASH_THICK 0.4 /* slash thickness */
47 #define STAFFTYPE_TAB_SLASH_DISPL 0.8 /* the total displacement between one slash and the next:
48  includes slash thickness and empty space between slashes*/
49 // the total height of a double slash
50 #define STAFFTYPE_TAB_SLASH_2TOTHEIGHT (STAFFTYPE_TAB_SLASH_THICK+STAFFTYPE_TAB_SLASH_DISPL+STAFFTYPE_TAB_SLASH_SLANTY)
51 // the initial Y coord for a double shash on an UP stem = topmost corner of topmost slash
52 #define STAFFTYPE_TAB_SLASH_2STARTY_UP ((STAFFTYPE_TAB_DEFAULTSTEMLEN_UP-STAFFTYPE_TAB_SLASH_2TOTHEIGHT)*0.5)
53 // the initial Y coord for a double shash on an DN stem = topmost corner of topmost slash
54 #define STAFFTYPE_TAB_SLASH_2STARTY_DN ((STAFFTYPE_TAB_DEFAULTSTEMLEN_UP+STAFFTYPE_TAB_SLASH_2TOTHEIGHT)*0.5)
55 // same for a 4-ple slash
56 #define STAFFTYPE_TAB_SLASH_4TOTHEIGHT (STAFFTYPE_TAB_SLASH_THICK+STAFFTYPE_TAB_SLASH_DISPL*3+STAFFTYPE_TAB_SLASH_SLANTY)
57 // the initial Y coord for a double shash on an UP stem = topmost corner of topmost slash
58 #define STAFFTYPE_TAB_SLASH_4STARTY_UP ((STAFFTYPE_TAB_DEFAULTSTEMLEN_UP-STAFFTYPE_TAB_SLASH_4TOTHEIGHT)*0.5)
59 // the initial Y coord for a double shash on an DN stem = topmost corner of topmost slash
60 #define STAFFTYPE_TAB_SLASH_4STARTY_DN ((STAFFTYPE_TAB_DEFAULTSTEMLEN_UP+STAFFTYPE_TAB_SLASH_4TOTHEIGHT)*0.5)
61 
62 // HISTORIC TAB BASS STRING NOTATION
63 // The following constants refer to the specifics of bass string notation in historic
64 // (Renaiss./Baroque French and Italian) tablatures.
65 
66 // how much to lower a bass string note with slashes with respect to line distance (in fraction of line distance)
67 #define STAFFTYPE_TAB_BASSSLASH_YOFFSET 0.33
68 // The following constants could ideially be customizeable values;
69 // they are currently constants to simplify implementation;
70 // Note that these constants do not constrain which strings of an instrument are
71 // physically frettable (which is defined in the instrument itself) but fix the
72 // number of bass strings for which the notation is able to express a fret number
73 // rather than simply a string ordinal.
74 #define NUM_OF_BASSSTRINGS_WITH_LETTER 4 // the max number of bass strings frettable with letter notation (French)
75 #define NUM_OF_BASSSTRINGS_WITH_NUMBER 2 // the max number of bass strings frettable with number notation (Italian)
76 
77 //---------------------------------------------------------
78 // TablatureFont
79 //---------------------------------------------------------
80 
81 #define NUM_OF_DIGITFRETS 100 // the max fret number which can be rendered with numbers
82 #define NUM_OF_LETTERFRETS 17 // the max fret number which can be rendered with letters
83 #define NUM_OF_BASSSTRING_SLASHES 5 // the max number of slashes supported for French bass strings notation
84  // (currently, only 3 slashes are used at most; another two are
85  // foreseen for future customizability)
86 
87 // default values for 'grid'-like beaming to use with value symbols in stemless TAB
88 static const qreal GRID_BEAM_DEF_WIDTH = 0.25; // all values in sp
89 static const qreal GRID_STEM_DEF_HEIGHT = 1.75;
90 static const qreal GRID_STEM_DEF_WIDTH = 0.125;
91 
93  QString family; // the family of the physical font to use
94  QString displayName; // the name to display to the user
95  qreal defPitch; // the default size of the font
96  qreal defYOffset; // the default Y displacement
97  QChar xChar; // the char to use for 'x'
98  QChar ghostChar; // the char to use for ghost notes
99  QString slashChar[NUM_OF_BASSSTRING_SLASHES];// the char used to draw one or more '/' symbols
100  QString displayDigit[NUM_OF_DIGITFRETS]; // the string to draw for digit frets
101  QChar displayLetter[NUM_OF_LETTERFRETS];// the char to use for letter frets
102 
103  bool read(XmlReader&);
104  };
105 
106 enum class TabVal : char {
107  VAL_LONGA = 0,
108  VAL_BREVIS,
110  VAL_MINIMA,
112  VAL_FUSA,
113  VAL_SEMIFUSA,
114  VAL_32,
115  VAL_64,
116  VAL_128,
117  VAL_256,
118  NUM_OF
119  };
120 
121 enum class TablatureMinimStyle : char {
122  NONE = 0, // do not draw half notes at all
123  SHORTER, // draw half notes with a shorter stem
124  SLASHED // draw half notes with stem with two slashes
125  };
126 
127 enum class TablatureSymbolRepeat : char {
128  NEVER = 0, // never repeat the same duration symbol
129  SYSTEM, // repeat at the beginning of a new system
130  MEASURE, // repeat at the beginning of a new measure
131  ALWAYS // always repeat
132  };
133 
135  QString family; // the family of the physical font to use
136  QString displayName; // the name to display to the user
137  qreal defPitch; // the default size of the font
138  qreal defYOffset; // the default Y displacement
139  qreal gridBeamWidth = GRID_BEAM_DEF_WIDTH; // the width of the 'grid'-style beam (in sp)
140  qreal gridStemHeight = GRID_STEM_DEF_HEIGHT; // the height of the 'grid'-style stem (in sp)
141  qreal gridStemWidth = GRID_STEM_DEF_WIDTH; // the width of the 'grid'-style stem (in sp)
142  // the note value with no beaming in 'grid'-style beaming
144  QChar displayDot; // the char to use to draw a dot
145  QChar displayValue[int(TabVal::NUM_OF)]; // the char to use to draw a duration value
146 
147  bool read(XmlReader&);
148  };
149 
150 // ready-made staff types
151 // keep in sync with the _presets initialization in StaffType::initStaffTypes()
152 
153 enum class StaffTypes : signed char {
154  STANDARD,
161  STAFF_TYPES,
162  // some useful shorthands:
165  };
166 
167 static const int STAFF_GROUP_NAME_MAX_LENGTH = 32;
168 
169 //---------------------------------------------------------
170 // StaffType
171 //---------------------------------------------------------
172 
173 class StaffType {
174  friend class TabDurationSymbol;
175 
177 
178  QString _xmlName; // the name used to reference this preset in instruments.xml
179  QString _name; // user visible name
180 
181  qreal _userMag { 1.0 }; // allowed 0.1 - 10.0
182  Spatium _yoffset { 0.0 };
183  bool _small { false };
184  int _lines = 5;
185  int _stepOffset = 0;
186  Spatium _lineDistance = Spatium(1);
187 
188  bool _showBarlines = true;
189  bool _showLedgerLines = true;
190  bool _stemless = false; // do not show stems
191 
192  bool _genClef = true; // create clef at beginning of system
193  bool _genTimesig = true; // whether time signature is shown or not
194  bool _genKeysig = true; // create key signature at beginning of system
195 
196  // Standard: configurable properties
198 
199  // TAB: configurable properties
200  qreal _durationFontSize = 15.0; // the size (in points) for the duration symbol font
201  qreal _durationFontUserY = 0.0; // the vertical offset (spatium units) for the duration symb. font
202  // user configurable
203  qreal _fretFontSize = 10.0; // the size (in points) for the fret marks font
204  qreal _fretFontUserY = 0.0; // additional vert. offset of fret marks with respect to
205  // the string line (spatium unit); user configurable
206  bool _genDurations = false; // whether duration symbols are drawn or not
207  bool _linesThrough = false; // whether lines for strings and stems may pass through fret marks or not
208  TablatureMinimStyle _minimStyle = TablatureMinimStyle::NONE; // how to draw minim stems (stem-and-beam durations only)
209  TablatureSymbolRepeat _symRepeat = TablatureSymbolRepeat::NEVER;// if and when to repeat the same duration symbol
210  bool _onLines = true; // whether fret marks are drawn on the string lines or between them
211  bool _showRests = false; // whether to draw rests or not
212  bool _stemsDown = true; // stems are drawn downward (stem-and-beam durations only)
213  bool _stemsThrough = true; // stems are drawn through the staff rather than beside it (stem-and-beam durations only)
214  bool _upsideDown = false; // whether lines are drawn with highest string at top (false) or at bottom (true)
215  bool _showTabFingering = false; // Allow fingering in tablature staff (true) or not (false)
216  bool _useNumbers = true; // true: use numbers ('0' - ...) for frets | false: use letters ('a' - ...)
217  bool _showBackTied = true; // whether back-tied notes are shown or not
218 
219  // TAB: internally managed variables
220  // Note: values in RASTER UNITS are independent from score scaling and
221  // must be multiplied by magS() to be used in contexts using sp units
222  mutable qreal _durationBoxH = 0.0;
223  qreal mutable _durationBoxY = 0.0; // the height and the y rect.coord. (relative to staff top line)
224  // of a box bounding all duration symbols (raster units) internally computed:
225  // depends upon _onString and the metrics of the duration font
226  QFont _durationFont; // font used to draw dur. symbols; cached for efficiency
227  int _durationFontIdx = 0; // the index of current dur. font in dur. font array
228  mutable qreal _durationYOffset = 0.0; // the vertical offset to draw duration symbols with respect to the
229  // string lines (raster units); internally computed: depends upon _onString and duration font
230  mutable qreal _durationGridYOffset = 0.0; // the vertical offset to draw the bottom of duration grid with respect to the
231  // string lines (raster units); internally computed: depends upon _onstring and duration font
232  mutable bool _durationMetricsValid = false; // whether duration font metrics are valid or not
233  mutable qreal _fretBoxH = 0.0;
234  mutable qreal _fretBoxY = 0.0; // the height and the y rect.coord. (relative to staff line)
235  // of a box bounding all fret characters (raster units) internally computed:
236  // depends upon _onString, _useNumbers and the metrics of the fret font
237  QFont _fretFont; // font used to draw fret marks; cached for efficiency
238  int _fretFontIdx = 0; // the index of current fret font in fret font array
239  mutable qreal _fretYOffset = 0.0; // the vertical offset to draw fret marks with respect to the string lines;
240  // (raster units); internally computed: depends upon _onString, _useNumbers
241  // and the metrics of the fret font
242  mutable bool _fretMetricsValid = false; // whether fret font metrics are valid or not
243  mutable qreal _refDPI = 0.0; // reference value used to last computed metrics and to see if they are still valid
244 
245  // the array of configured fonts
246  static QList<TablatureFretFont> _fretFonts;
247  static QList<TablatureDurationFont> _durationFonts;
248  static std::vector<StaffType> _presets;
249 
250  void setDurationMetrics() const;
251  void setFretMetrics() const;
252 
253  static bool readConfigFile(const QString& fileName);
254  static const char groupNames[STAFF_GROUP_MAX][STAFF_GROUP_NAME_MAX_LENGTH]; // used in UI
255  static const QString fileGroupNames[STAFF_GROUP_MAX]; // used in .msc? files
256 
257  public:
258  StaffType();
259  StaffType(StaffGroup sg, const QString& xml, const QString& name, int lines, int stpOff, qreal lineDist,
260  bool genClef, bool showBarLines, bool stemless, bool genTimeSig,
261  bool genKeySig, bool showLedgerLines);
262 
263  StaffType(StaffGroup sg, const QString& xml, const QString& name, int lines, int stpOff, qreal lineDist,
264  bool genClef, bool showBarLines, bool stemless, bool genTimesig,
265  const QString& durFontName, qreal durFontSize, qreal durFontUserY, qreal genDur,
266  const QString& fretFontName, qreal fretFontSize, qreal fretFontUserY, TablatureSymbolRepeat symRepeat,
267  bool linesThrough, TablatureMinimStyle minimStyle, bool onLines, bool showRests,
268  bool stemsDown, bool stemThrough, bool upsideDown, bool showTabFingering, bool useNumbers, bool showBackTied);
269 
270  virtual ~StaffType() {}
271  bool operator==(const StaffType&) const;
272  bool isSameStructure(const StaffType&) const;
273 
274  StaffGroup group() const { return _group; }
275  const QString& name() const { return _name; }
276  const QString& xmlName() const { return _xmlName; }
277  void setName(const QString& val) { _name = val; }
278  void setXmlName(const QString& val) { _xmlName = val; }
279  const char* groupName() const;
280  static const char* groupName(StaffGroup);
281 
282  void setLines(int val) { _lines = val; }
283  int lines() const { return _lines; }
284  void setStepOffset(int v) { _stepOffset = v; }
285  int stepOffset() const { return _stepOffset; }
286  void setLineDistance(const Spatium& val) { _lineDistance = val; }
287  Spatium lineDistance() const { return _lineDistance; }
288  void setGenClef(bool val) { _genClef = val; }
289  bool genClef() const { return _genClef; }
290  void setShowBarlines(bool val) { _showBarlines = val; }
291  bool showBarlines() const { return _showBarlines; }
292  qreal userMag() const { return _userMag; }
293  bool small() const { return _small; }
294  void setUserMag(qreal val) { _userMag = val; }
295  void setSmall(bool val) { _small = val; }
296  Spatium yoffset() const { return _yoffset; }
297  void setYoffset(Spatium val) { _yoffset = val; }
298  qreal spatium(Score*) const;
299 
300  void write(XmlWriter& xml) const;
301  void read(XmlReader&);
302 
303  void setStemless(bool val) { _stemless = val; }
304  bool stemless() const { return _stemless; }
305  bool genTimesig() const { return _genTimesig; }
306  void setGenTimesig(bool val) { _genTimesig = val; }
307  qreal doty1() const;
308  qreal doty2() const;
309 
310  // static function to deal with presets
311  static const StaffType* getDefaultPreset(StaffGroup grp);
312  static const StaffType* preset(StaffTypes idx);
313  static const StaffType* presetFromXmlName(QString& xmlName);
314 
315  void setGenKeysig(bool val) { _genKeysig = val; }
316  bool genKeysig() const { return _genKeysig; }
317  void setShowLedgerLines(bool val) { _showLedgerLines = val; }
318  bool showLedgerLines() const { return _showLedgerLines; }
319  void setNoteHeadScheme(NoteHeadScheme s) { _noteHeadScheme = s; }
320  NoteHeadScheme noteHeadScheme() const { return _noteHeadScheme; }
321 
322  QString fretString(int fret, int string, bool ghost) const; // returns a string with the text for fret
323  QString durationString(TDuration::DurationType type, int dots) const;
324 
325  // functions to cope with historic TAB's peculiarities, like upside-down, bass string notations
326  int physStringToVisual(int strg) const; // return the string in visual order from physical string
327  int visualStringToPhys(int line) const; // return the string in physical order from visual string
328  qreal physStringToYOffset(int strg) const; // return the string Y offset (in sp, chord-relative)
329  QString tabBassStringPrefix(int strg, bool* hasFret) const; // return a string with the prefix, if any, identifying a bass string
330  void drawInputStringMarks(QPainter* p, int string, int voice, QRectF rect) const;
331  int numOfTabLedgerLines(int string) const;
332 
333  // properties getters (some getters require updated metrics)
334  qreal durationBoxH() const;
335  qreal durationBoxY() const;
336 
337  const QFont& durationFont() const { return _durationFont; }
338  const QString durationFontName() const { return _durationFonts[_durationFontIdx].displayName; }
339  qreal durationFontSize() const { return _durationFontSize; }
340  qreal durationFontUserY() const { return _durationFontUserY; }
341  qreal durationFontYOffset() const { setDurationMetrics(); return _durationYOffset + _durationFontUserY * SPATIUM20; }
342  qreal durationGridYOffset() const { setDurationMetrics(); return _durationGridYOffset;}
343  qreal fretBoxH() const { setFretMetrics(); return _fretBoxH; }
344  qreal fretBoxY() const { setFretMetrics(); return _fretBoxY + _fretFontUserY * SPATIUM20; }
345 
346  // 2 methods to return the size of a box masking lines under a fret mark
347  qreal fretMaskH() const { return _lineDistance.val() * SPATIUM20; }
348  qreal fretMaskY() const { return (_onLines ? -0.5 : -1.0) * _lineDistance.val() * SPATIUM20; }
349 
350  const QFont& fretFont() const { return _fretFont; }
351  const QString fretFontName() const { return _fretFonts[_fretFontIdx].displayName; }
352  qreal fretFontSize() const { return _fretFontSize; }
353  qreal fretFontUserY() const { return _fretFontUserY; }
354  qreal fretFontYOffset() const { setFretMetrics(); return _fretYOffset + _fretFontUserY * SPATIUM20; }
355  bool genDurations() const { return _genDurations; }
356  bool linesThrough() const { return _linesThrough; }
357  TablatureMinimStyle minimStyle() const { return _minimStyle; }
358  TablatureSymbolRepeat symRepeat() const { return _symRepeat; }
359  bool onLines() const { return _onLines; }
360  bool showRests() const { return _showRests; }
361  bool stemsDown() const { return _stemsDown; }
362  bool stemThrough() const { return _stemsThrough; }
363  bool upsideDown() const { return _upsideDown; }
364  bool showTabFingering() const { return _showTabFingering; }
365  bool useNumbers() const { return _useNumbers; }
366  bool showBackTied() const { return _showBackTied; }
367 
368  // properties setters (setting some props invalidates metrics)
369  void setDurationFontName(const QString&);
370  void setDurationFontSize(qreal);
371  void setDurationFontUserY(qreal val) { _durationFontUserY = val; }
372  void setFretFontName(const QString&);
373  void setFretFontSize(qreal);
374  void setFretFontUserY(qreal val) { _fretFontUserY = val; }
375  void setGenDurations(bool val) { _genDurations = val; }
376  void setLinesThrough(bool val) { _linesThrough = val; }
377  void setMinimStyle(TablatureMinimStyle val) { _minimStyle = val; }
378  void setSymbolRepeat(TablatureSymbolRepeat val) { _symRepeat = val; }
379  void setOnLines(bool);
380  void setShowRests(bool val) { _showRests = val; }
381  void setStemsDown(bool val) { _stemsDown = val; }
382  void setStemsThrough(bool val) { _stemsThrough = val; }
383  void setUpsideDown(bool val) { _upsideDown = val; }
384  void setShowTabFingering (bool val) { _showTabFingering = val; }
385  void setUseNumbers(bool val) { _useNumbers = val; _fretMetricsValid = false; }
386  void setShowBackTied(bool val) { _showBackTied = val; }
387 
388  // utility functions for tab specially managed elements
389  QPointF chordStemPos(const Chord*) const;
390  qreal chordRestStemPosY(const ChordRest*) const;
391  qreal chordStemPosX(const Chord*) const { return STAFFTYPE_TAB_DEFAULTSTEMPOSX; }
392  QPointF chordStemPosBeam(const Chord*) const;
393  qreal chordStemLength(const Chord*) const;
394 
395  bool isTabStaff() const { return _group == StaffGroup::TAB; }
396  bool isDrumStaff() const { return _group == StaffGroup::PERCUSSION; }
397  // static functions for font config files
398  static QList<QString> fontNames(bool bDuration);
399  static bool fontData(bool bDuration, int nIdx, QString *pFamily, QString *pDisplayName, qreal * pSize, qreal *pYOff);
400 
401  static void initStaffTypes();
402  static const std::vector<StaffType>& presets() { return _presets; }
403  static QString scheme2userName(NoteHeadScheme ns);
404  static QString scheme2name(NoteHeadScheme ns);
405  static NoteHeadScheme name2scheme(QString name);
406  };
407 
408 //---------------------------------------------------------
409 // TabDurationSymbol
410 // Element used to draw duration symbols above tablatures
411 //---------------------------------------------------------
412 
413 enum class TabBeamGrid : char {
414  NONE = 0,
415  INITIAL,
416  MEDIALFINAL,
417  NUM_OF
418  };
419 
420 class TabDurationSymbol final : public Element {
421  qreal _beamLength; // if _grid==MEDIALFINAL, length of the beam toward previous grid element
422  int _beamLevel; // if _grid==MEDIALFINAL, the number of beams
423  TabBeamGrid _beamGrid; // value for special 'English' grid display
424  const StaffType* _tab;
425  QString _text;
426  bool _repeat;
427 
428  public:
430  TabDurationSymbol(Score* s, const StaffType* tab, TDuration::DurationType type, int dots);
432  virtual TabDurationSymbol* clone() const { return new TabDurationSymbol(*this); }
433  virtual void draw(QPainter*) const;
434  virtual bool isEditable() const { return false; }
435  virtual void layout();
437 
438  TabBeamGrid beamGrid() { return _beamGrid; }
439  void layout2(); // second step of layout: after horiz. pos. are defined, compute width of 'grid beams'
440  void setDuration(TDuration::DurationType type, int dots, const StaffType* tab) {
441  _tab = tab;
442  _text = tab->durationString(type, dots);
443  }
444  bool isRepeat() const { return _repeat; }
445  void setRepeat(bool val) { _repeat = val; }
446  };
447 
448 } // namespace Ms
449 #endif
QString _name
Definition: stafftype.h:179
QString slashChar[NUM_OF_BASSSTRING_SLASHES]
Definition: stafftype.h:99
QFont _durationFont
Definition: stafftype.h:226
bool linesThrough() const
Definition: stafftype.h:356
bool genClef() const
Definition: stafftype.h:289
Definition: xml.h:67
void setShowTabFingering(bool val)
Definition: stafftype.h:384
QChar xChar
Definition: stafftype.h:97
bool showTabFingering() const
Definition: stafftype.h:364
TablatureMinimStyle minimStyle() const
Definition: stafftype.h:357
#define NUM_OF_DIGITFRETS
Definition: stafftype.h:81
void setMinimStyle(TablatureMinimStyle val)
Definition: stafftype.h:377
void setUseNumbers(bool val)
Definition: stafftype.h:385
qreal fretMaskH() const
Definition: stafftype.h:347
DurationType
Definition: durationtype.h:30
bool stemless() const
Definition: stafftype.h:304
void setGenClef(bool val)
Definition: stafftype.h:288
static QList< TablatureFretFont > _fretFonts
Definition: stafftype.h:246
QChar displayLetter[NUM_OF_LETTERFRETS]
Definition: stafftype.h:101
Spatium lineDistance() const
Definition: stafftype.h:287
NoteHeadScheme
Definition: mscore.h:182
Base class of score layout elements.
Definition: element.h:158
Definition: stafftype.h:420
void setStepOffset(int v)
Definition: stafftype.h:284
TablatureMinimStyle
Definition: stafftype.h:121
qreal userMag() const
Definition: stafftype.h:292
bool _repeat
Definition: stafftype.h:426
StaffGroup
Definition: mscore.h:177
virtual ~StaffType()
Definition: stafftype.h:270
bool upsideDown() const
Definition: stafftype.h:363
QString displayName
Definition: stafftype.h:136
virtual bool isEditable() const
Definition: stafftype.h:434
bool isRepeat() const
Definition: stafftype.h:444
bool showBarlines() const
Definition: stafftype.h:291
void setXmlName(const QString &val)
Definition: stafftype.h:278
void setLinesThrough(bool val)
Definition: stafftype.h:376
void setShowLedgerLines(bool val)
Definition: stafftype.h:317
void setSmall(bool val)
Definition: stafftype.h:295
const QFont & durationFont() const
Definition: stafftype.h:337
bool showLedgerLines() const
Definition: stafftype.h:318
#define STAFFTYPE_TAB_DEFAULTSTEMPOSX
Definition: stafftype.h:36
Definition: score.h:391
bool useNumbers() const
Definition: stafftype.h:365
const StaffType * _tab
Definition: stafftype.h:424
const QFont & fretFont() const
Definition: stafftype.h:350
QChar ghostChar
Definition: stafftype.h:98
qreal defPitch
Definition: stafftype.h:137
void setUserMag(qreal val)
Definition: stafftype.h:294
constexpr qreal val() const
Definition: spatium.h:32
TablatureSymbolRepeat symRepeat() const
Definition: stafftype.h:358
bool isTabStaff() const
Definition: stafftype.h:395
bool genKeysig() const
Definition: stafftype.h:316
int lines() const
Definition: stafftype.h:283
bool onLines() const
Definition: stafftype.h:359
#define NUM_OF_LETTERFRETS
Definition: stafftype.h:82
Definition: stafftype.h:92
QString displayName
Definition: stafftype.h:94
const int STAFF_GROUP_MAX
Definition: mscore.h:180
void setName(const QString &val)
Definition: stafftype.h:277
virtual TabDurationSymbol * clone() const
Definition: stafftype.h:432
StaffTypes
Definition: stafftype.h:153
TabBeamGrid _beamGrid
Definition: stafftype.h:423
qreal defPitch
Definition: stafftype.h:95
int stepOffset() const
Definition: stafftype.h:285
qreal fretFontSize() const
Definition: stafftype.h:352
bool stemsDown() const
Definition: stafftype.h:361
qreal durationFontYOffset() const
Definition: stafftype.h:341
qreal durationGridYOffset() const
Definition: stafftype.h:342
const QString durationFontName() const
Definition: stafftype.h:338
QString family
Definition: stafftype.h:135
const QString & name() const
Definition: stafftype.h:275
int _beamLevel
Definition: stafftype.h:422
Definition: aeolus.cpp:26
TabVal
Definition: stafftype.h:106
bool isDrumStaff() const
Definition: stafftype.h:396
bool small() const
Definition: stafftype.h:293
qreal durationFontUserY() const
Definition: stafftype.h:340
Definition: spatium.h:25
void setUpsideDown(bool val)
Definition: stafftype.h:383
QString _text
Definition: stafftype.h:425
qreal fretMaskY() const
Definition: stafftype.h:348
Definition: stafftype.h:173
bool stemThrough() const
Definition: stafftype.h:362
Definition: xml.h:218
TablatureSymbolRepeat
Definition: stafftype.h:127
void setSymbolRepeat(TablatureSymbolRepeat val)
Definition: stafftype.h:378
void setFretFontUserY(qreal val)
Definition: stafftype.h:374
QString displayDigit[NUM_OF_DIGITFRETS]
Definition: stafftype.h:100
virtual ElementType type() const
Definition: stafftype.h:436
StaffGroup group() const
Definition: stafftype.h:274
void setShowBackTied(bool val)
Definition: stafftype.h:386
Definition: xmlwriter.h:26
QString family
Definition: stafftype.h:93
static std::vector< StaffType > _presets
Definition: stafftype.h:248
void setLines(int val)
Definition: stafftype.h:282
Graphic representation of a chord.
Definition: chord.h:55
Definition: chordrest.h:48
qreal chordStemPosX(const Chord *) const
Definition: stafftype.h:391
bool genTimesig() const
Definition: stafftype.h:305
void setNoteHeadScheme(NoteHeadScheme s)
Definition: stafftype.h:319
const QString fretFontName() const
Definition: stafftype.h:351
bool genDurations() const
Definition: stafftype.h:355
qreal fretFontUserY() const
Definition: stafftype.h:353
QChar displayDot
Definition: stafftype.h:144
QString _xmlName
Definition: stafftype.h:178
void setLineDistance(const Spatium &val)
Definition: stafftype.h:286
qreal durationFontSize() const
Definition: stafftype.h:339
void setRepeat(bool val)
Definition: stafftype.h:445
qreal defYOffset
Definition: stafftype.h:96
static QList< TablatureDurationFont > _durationFonts
Definition: stafftype.h:247
void setGenDurations(bool val)
Definition: stafftype.h:375
void setStemless(bool val)
Definition: stafftype.h:303
Definition: stafftype.h:134
QString durationString(TDuration::DurationType type, int dots) const
Definition: stafftype.cpp:676
void setGenTimesig(bool val)
Definition: stafftype.h:306
QFont _fretFont
Definition: stafftype.h:237
void setStemsDown(bool val)
Definition: stafftype.h:381
bool showBackTied() const
Definition: stafftype.h:366
ElementType
Definition: types.h:34
void setDuration(TDuration::DurationType type, int dots, const StaffType *tab)
Definition: stafftype.h:440
const QString & xmlName() const
Definition: stafftype.h:276
qreal defYOffset
Definition: stafftype.h:138
TabBeamGrid
Definition: stafftype.h:413
TabBeamGrid beamGrid()
Definition: stafftype.h:438
qreal fretFontYOffset() const
Definition: stafftype.h:354
bool showRests() const
Definition: stafftype.h:360
qreal _beamLength
Definition: stafftype.h:421
NoteHeadScheme noteHeadScheme() const
Definition: stafftype.h:320
bool read(XmlReader &)
Definition: stafftype.cpp:1046
static const std::vector< StaffType > & presets()
Definition: stafftype.h:402
void setStemsThrough(bool val)
Definition: stafftype.h:382
qreal fretBoxY() const
Definition: stafftype.h:344
void setGenKeysig(bool val)
Definition: stafftype.h:315
#define NUM_OF_BASSSTRING_SLASHES
Definition: stafftype.h:83
qreal fretBoxH() const
Definition: stafftype.h:343
void setShowBarlines(bool val)
Definition: stafftype.h:290
Spatium yoffset() const
Definition: stafftype.h:296
void setDurationFontUserY(qreal val)
Definition: stafftype.h:371
void setYoffset(Spatium val)
Definition: stafftype.h:297
void setShowRests(bool val)
Definition: stafftype.h:380