MuseScore  3.4
Music composition and notation
excerptsdialog.h
Go to the documentation of this file.
1 //=============================================================================
2 // MuseScore
3 // Linux Music Score Editor
4 //
5 // Copyright (C) 2008-2009 Werner Schweer and 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 //
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
14 //
15 // You should have received a copy of the GNU General Public License
16 // along with this program; if not, write to the Free Software
17 // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18 //=============================================================================
19 
20 #ifndef __EXCERPTSDIALOG_H__
21 #define __EXCERPTSDIALOG_H__
22 
23 #include "ui_excerptsdialog.h"
24 #include "libmscore/excerpt.h"
25 
26 namespace Ms {
27 
28 class MasterScore;
29 class Excerpt;
30 class Part;
31 class Staff;
32 
33 //---------------------------------------------------------
34 // ExcerptItem
35 //---------------------------------------------------------
36 
37 class ExcerptItem : public QListWidgetItem {
39 
40  public:
41  ExcerptItem(Excerpt*, QListWidget* parent = 0);
42  Excerpt* excerpt() { return _excerpt; }
43  };
44 
45 //---------------------------------------------------------
46 // PartItem
47 //---------------------------------------------------------
48 
49 class PartItem : public QTreeWidgetItem {
51 
52  public:
53  PartItem(Part*, QTreeWidget* parent = 0);
54  Part* part() const { return _part; }
55  };
56 
57 //---------------------------------------------------------
58 // ScorePartsItem
59 //---------------------------------------------------------
60 
61 class InstrumentItem : public QListWidgetItem {
63 
64  public:
65  InstrumentItem(PartItem*, QListWidget* parent = 0);
66  PartItem* partItem() const { return _partItem; }
67  };
68 
69 //---------------------------------------------------------
70 // StaffListItem
71 //---------------------------------------------------------
72 
73 class StaffItem : public QTreeWidgetItem {
74  Staff* _staff { 0 };
75 
76  public:
77  StaffItem();
78  StaffItem(PartItem* li);
79 
80  Staff* staff() const { return _staff; }
81  void setStaff(Staff* s) { _staff = s; }
82  void setData(int column, int role, const QVariant& value) override;
83  };
84 
85 //---------------------------------------------------------
86 // ExcerptsDialog
87 //---------------------------------------------------------
88 
89 class ExcerptsDialog : public QDialog, private Ui::ExcerptsDialog {
90  Q_OBJECT
92 
93  QString createName(const QString&);
94 
95  virtual void accept();
96 
97  private slots:
98  void deleteClicked();
99  void singlePartClicked();
100  void allPartsClicked();
101  void moveUpClicked();
102  void moveDownClicked();
103  void excerptChanged(QListWidgetItem* cur, QListWidgetItem* prev);
104  void partDoubleClicked(QTreeWidgetItem*, int);
105  void partClicked(QTreeWidgetItem*, int);
106  void createExcerptClicked(QListWidgetItem*);
107  void titleChanged(const QString&);
108  ExcerptItem* isInPartsList(Excerpt* e);
109 
110  QMultiMap<int, int> mapTracks();
111  void assignTracks(QMultiMap<int, int> );
112 
113  void doubleClickedInstrument(QTreeWidgetItem*);
114  void addButtonClicked();
115  void removeButtonClicked();
116 
117  public:
118  ExcerptsDialog(MasterScore*, QWidget* parent = 0);
119  };
120 
121 
122 } // namespace Ms
123 #endif
124 
ExcerptItem(Excerpt *, QListWidget *parent=0)
Definition: excerptsdialog.cpp:33
Definition: excerptsdialog.h:89
Global staff data not directly related to drawing.
Definition: staff.h:62
Definition: excerptsdialog.h:37
Excerpt * excerpt()
Definition: excerptsdialog.h:42
Definition: excerptsdialog.h:73
Definition: excerptsdialog.h:61
Definition: score.h:1227
void setStaff(Staff *s)
Definition: excerptsdialog.h:81
Part * _part
Definition: excerptsdialog.h:50
Staff * staff() const
Definition: excerptsdialog.h:80
Definition: aeolus.cpp:26
Part * part() const
Definition: excerptsdialog.h:54
Definition: excerptsdialog.h:49
MasterScore * score
Definition: excerptsdialog.h:91
Definition: excerpt.h:34
PartItem * _partItem
Definition: excerptsdialog.h:62
PartItem * partItem() const
Definition: excerptsdialog.h:66
Definition: part.h:47
Excerpt * _excerpt
Definition: excerptsdialog.h:38