MuseScore Plugins
3.2.3
Plugins API for MuseScore
Toggle main menu visibility
Loading...
Searching...
No Matches
libmscore
layoutbreak.h
1
//=============================================================================
2
// MuseScore
3
// Music Composition & Notation
4
//
5
// Copyright (C) 2002-2011 Werner Schweer
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 __LAYOUTBREAK_H__
14
#define __LAYOUTBREAK_H__
15
16
#include "element.h"
17
18
namespace
Ms
{
19
20
// layout break subtypes:
21
22
//---------------------------------------------------------
23
// @@ LayoutBreak
25
//---------------------------------------------------------
26
27
class
LayoutBreak final :
public
Element {
28
Q_GADGET
29
public
:
30
enum
Type
{
32
PAGE
,
LINE
,
SECTION
,
NOBREAK
34
};
35
private
:
36
Q_ENUM(
Type
)
37
38
qreal lw;
39
QPainterPath path;
40
QPainterPath path2;
41
qreal _pause;
42
bool
_startWithLongNames;
43
bool
_startWithMeasureOne;
44
Type
_layoutBreakType;
45
46
virtual
void
draw(QPainter*)
const override
;
47
void
layout0();
48
virtual
void
spatiumChanged(qreal oldValue, qreal newValue)
override
;
49
50
public
:
51
LayoutBreak
(Score* = 0);
52
LayoutBreak
(
const
LayoutBreak
&);
53
virtual
LayoutBreak
* clone()
const override
{
return
new
LayoutBreak
(*
this
); }
54
55
virtual
ElementType
type()
const override
{
return
ElementType::LAYOUT_BREAK
; }
56
57
void
setLayoutBreakType(
Type
);
58
Type
layoutBreakType()
const
{
return
_layoutBreakType; }
59
60
virtual
bool
acceptDrop(EditData&)
const override
;
61
virtual
Element* drop(EditData&)
override
;
62
virtual
void
write(XmlWriter&)
const override
;
63
virtual
void
read(XmlReader&)
override
;
64
65
MeasureBase* measure()
const
{
return
(MeasureBase*)parent(); }
66
qreal pause()
const
{
return
_pause; }
67
void
setPause(qreal v) { _pause = v; }
68
bool
startWithLongNames()
const
{
return
_startWithLongNames; }
69
void
setStartWithLongNames(
bool
v) { _startWithLongNames = v; }
70
bool
startWithMeasureOne()
const
{
return
_startWithMeasureOne; }
71
void
setStartWithMeasureOne(
bool
v) { _startWithMeasureOne = v; }
72
73
bool
isPageBreak()
const
{
return
_layoutBreakType ==
PAGE
; }
74
bool
isLineBreak()
const
{
return
_layoutBreakType ==
LINE
; }
75
bool
isSectionBreak()
const
{
return
_layoutBreakType ==
SECTION
; }
76
bool
isNoBreak()
const
{
return
_layoutBreakType ==
NOBREAK
; }
77
78
virtual
QVariant getProperty(Pid propertyId)
const override
;
79
virtual
bool
setProperty(Pid propertyId,
const
QVariant&)
override
;
80
virtual
QVariant propertyDefault(Pid)
const override
;
81
virtual
Pid propertyId(
const
QStringRef& xmlName)
const override
;
82
};
83
84
85
}
// namespace Ms
86
87
#endif
Ms::LayoutBreak
symbols for line break, page break etc.
Definition
layoutbreak.h:27
Ms::LayoutBreak::Type
Type
Definition
layoutbreak.h:30
Ms::LayoutBreak::LINE
@ LINE
Definition
layoutbreak.h:32
Ms::LayoutBreak::PAGE
@ PAGE
Definition
layoutbreak.h:32
Ms::LayoutBreak::SECTION
@ SECTION
Definition
layoutbreak.h:32
Ms::LayoutBreak::NOBREAK
@ NOBREAK
Definition
layoutbreak.h:32
Ms
Definition
cursor.cpp:29
Ms::ElementType
ElementType
Definition
types.h:34
Ms::ElementType::LAYOUT_BREAK
@ LAYOUT_BREAK
Definition
types.h:98
Generated by
1.17.0