MuseScore  3.4
Music composition and notation
editdrumset.h
Go to the documentation of this file.
1 //=============================================================================
2 // MuseScore
3 // Linux Music Score Editor
4 //
5 // Copyright (C) 2002-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 __EDITDRUMSET_H__
21 #define __EDITDRUMSET_H__
22 
23 #include "ui_editdrumset.h"
24 #include "libmscore/drumset.h"
25 
26 namespace Ms {
27 
28 //---------------------------------------------------------
29 // EditDrumset
30 //---------------------------------------------------------
31 
32 class EditDrumset : public QDialog, private Ui::EditDrumsetBase {
33  Q_OBJECT
34 
36 
37  void apply();
38  void updatePitchesList();
39  void refreshPitchesList();
40  void updateExample();
41 
42  virtual void hideEvent(QHideEvent*);
43 
45  void setCustomNoteheadsGUIEnabled(bool enabled);
46 
47  void setEnabledPitchControls(bool enable);
48  void fillNoteheadsComboboxes(bool customGroup, int pitch);
49 private slots:
50  void bboxClicked(QAbstractButton* button);
51  void itemChanged(QTreeWidgetItem* current, QTreeWidgetItem* previous);
52  void nameChanged(const QString&);
53  void shortcutChanged();
54  void valueChanged();
55  void load();
56  void save();
57  void customGboxToggled(bool);
58  void customQuarterChanged(int);
59 
60  public:
61  EditDrumset(const Drumset* ds, QWidget* parent = 0);
62  const Drumset* drumset() const { return &nDrumset; }
63  };
64 
65 
66 class EditDrumsetTreeWidgetItem : public QTreeWidgetItem {
67  public:
68  EditDrumsetTreeWidgetItem(QTreeWidget * parent)
69  : QTreeWidgetItem(parent) {};
70  virtual bool operator<(const QTreeWidgetItem & other) const;
71 };
72 
73 
74 } // namespace Ms
75 #endif
76 
const Drumset * drumset() const
Definition: editdrumset.h:62
void updateExample()
Definition: editdrumset.cpp:518
void fillCustomNoteheadsDataFromComboboxes(int pitch)
Definition: editdrumset.cpp:383
void nameChanged(const QString &)
Definition: editdrumset.cpp:295
void setEnabledPitchControls(bool enable)
Definition: editdrumset.cpp:275
void fillNoteheadsComboboxes(bool customGroup, int pitch)
Definition: editdrumset.cpp:392
void load()
Definition: editdrumset.cpp:556
void customQuarterChanged(int)
Definition: editdrumset.cpp:629
void valueChanged()
Definition: editdrumset.cpp:487
Definition: drumset.h:68
Drumset nDrumset
Definition: editdrumset.h:35
void customGboxToggled(bool)
Definition: editdrumset.cpp:225
void itemChanged(QTreeWidgetItem *current, QTreeWidgetItem *previous)
Definition: editdrumset.cpp:415
void refreshPitchesList()
Definition: editdrumset.cpp:259
Definition: aeolus.cpp:26
Definition: editdrumset.h:66
Definition: editdrumset.h:32
EditDrumset(const Drumset *ds, QWidget *parent=0)
Definition: editdrumset.cpp:107
void setCustomNoteheadsGUIEnabled(bool enabled)
Definition: editdrumset.cpp:476
void updatePitchesList()
Definition: editdrumset.cpp:237
EditDrumsetTreeWidgetItem(QTreeWidget *parent)
Definition: editdrumset.h:68
void bboxClicked(QAbstractButton *button)
Definition: editdrumset.cpp:350
void shortcutChanged()
Definition: editdrumset.cpp:315
void apply()
Definition: editdrumset.cpp:375
void save()
Definition: editdrumset.cpp:593
virtual void hideEvent(QHideEvent *)
Definition: editdrumset.cpp:620