MuseScore  3.4
Music composition and notation
editstaff.h
Go to the documentation of this file.
1 //=============================================================================
2 // MuseScore
3 // Linux Music Score Editor
4 //
5 // Copyright (C) 2002-2010 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 __EDITSTAFF_H__
21 #define __EDITSTAFF_H__
22 
23 #include "ui_editstaff.h"
24 #include "ui_selectinstr.h"
25 #include "libmscore/instrument.h"
26 #include "libmscore/stafftype.h"
27 
28 namespace Ms {
29 
30 class Staff;
31 class InstrumentTemplate;
32 
33 //---------------------------------------------------------
34 // EditStaff
35 // edit staff and part properties
36 //---------------------------------------------------------
37 
38 class EditStaff : public QDialog, private Ui::EditStaffBase {
39  Q_OBJECT
40 
46 
47  virtual void hideEvent(QHideEvent*);
48  void apply();
49  void setStaff(Staff*, const Fraction& tick);
50  void updateInterval(const Interval&);
51  void updateStaffType();
52  void updateInstrument();
54 
55  protected:
56  QString midiCodeToStr(int midiCode);
57 
58  private slots:
59  void bboxClicked(QAbstractButton* button);
60  void editStringDataClicked();
61  void showInstrumentDialog();
62  void showStaffTypeDialog();
63  void minPitchAClicked();
64  void maxPitchAClicked();
65  void minPitchPClicked();
66  void maxPitchPClicked();
67  void lineDistanceChanged();
68  void numOfLinesChanged();
69  void showClefChanged();
70  void showTimeSigChanged();
71  void showBarlinesChanged();
72  void gotoNextStaff();
73  void gotoPreviousStaff();
74 
75  signals:
76  void instrumentChanged();
77 
78  public:
79  EditStaff(Staff*, const Fraction& tick, QWidget* parent = 0);
80  };
81 
82 
83 } // namespace Ms
84 #endif
85 
void updateInterval(const Interval &)
Definition: editstaff.cpp:207
void updateNextPreviousButtons()
Definition: editstaff.cpp:240
void showBarlinesChanged()
Definition: editstaff.cpp:485
void showStaffTypeDialog()
Definition: editstaff.cpp:585
Global staff data not directly related to drawing.
Definition: staff.h:62
Staff * staff
Definition: editstaff.h:41
void bboxClicked(QAbstractButton *button)
Definition: editstaff.cpp:278
void apply()
Definition: editstaff.cpp:306
void numOfLinesChanged()
Definition: editstaff.cpp:470
Definition: instrument.h:250
Instrument instrument
Definition: editstaff.h:43
int _maxPitchP
Definition: editstaff.h:44
void showInstrumentDialog()
Definition: editstaff.cpp:494
int _minPitchA
Definition: editstaff.h:44
void showTimeSigChanged()
Definition: editstaff.cpp:480
void showClefChanged()
Definition: editstaff.cpp:475
void gotoPreviousStaff()
Definition: editstaff.cpp:265
void setStaff(Staff *, const Fraction &tick)
Definition: editstaff.cpp:90
Definition: editstaff.h:38
void editStringDataClicked()
Definition: editstaff.cpp:508
int _minPitchP
Definition: editstaff.h:44
void lineDistanceChanged()
Definition: editstaff.cpp:461
Fraction _tickStart
Definition: editstaff.h:45
void maxPitchAClicked()
Definition: editstaff.cpp:424
int _maxPitchA
Definition: editstaff.h:44
void updateStaffType()
Definition: editstaff.cpp:154
QString midiCodeToStr(int midiCode)
Definition: editstaff.cpp:576
Definition: interval.h:22
void minPitchPClicked()
Definition: editstaff.cpp:435
void instrumentChanged()
Definition: aeolus.cpp:26
EditStaff(Staff *, const Fraction &tick, QWidget *parent=0)
Definition: editstaff.cpp:46
virtual void hideEvent(QHideEvent *)
Definition: editstaff.cpp:144
void updateInstrument()
Definition: editstaff.cpp:169
Fraction _tickEnd
Definition: editstaff.h:45
void minPitchAClicked()
Definition: editstaff.cpp:413
Definition: fraction.h:46
void maxPitchPClicked()
Definition: editstaff.cpp:446
void gotoNextStaff()
Definition: editstaff.cpp:252
Staff * orgStaff
Definition: editstaff.h:42