4
4
// $Id: editinstrument.h,v 1.1.1.1.2.4 2009/05/31 05:12:12 terminator356 Exp $
6
6
// (C) Copyright 2003 Werner Schweer (ws@seh.de)
8
// This program is free software; you can redistribute it and/or
9
// modify it under the terms of the GNU General Public License
10
// as published by the Free Software Foundation; version 2 of
11
// the License, or (at your option) any later version.
13
// This program is distributed in the hope that it will be useful,
14
// but WITHOUT ANY WARRANTY; without even the implied warranty of
15
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
// GNU General Public License for more details.
18
// You should have received a copy of the GNU General Public License
19
// along with this program; if not, write to the Free Software
20
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
7
22
//=========================================================
9
24
#ifndef __EDITINSTRUMENT_H__
24
41
class EditInstrument : public QMainWindow, public Ui::EditInstrumentBase {
27
MidiInstrument workingInstrument;
44
MusECore::MidiInstrument workingInstrument;
28
45
QListWidgetItem* oldMidiInstrument;
29
46
QTreeWidgetItem* oldPatchItem;
30
47
void closeEvent(QCloseEvent*);
31
int checkDirty(MidiInstrument*, bool isClose = false);
32
bool fileSave(MidiInstrument*, const QString&);
48
int checkDirty(MusECore::MidiInstrument*, bool isClose = false);
49
bool fileSave(MusECore::MidiInstrument*, const QString&);
34
void updateInstrument(MidiInstrument*);
35
void updatePatch(MidiInstrument*, Patch*);
36
void updatePatchGroup(MidiInstrument*, PatchGroup*);
51
void updateInstrument(MusECore::MidiInstrument*);
52
void updatePatch(MusECore::MidiInstrument*, MusECore::Patch*);
53
void updatePatchGroup(MusECore::MidiInstrument*, MusECore::PatchGroup*);
37
54
void changeInstrument();
38
QTreeWidgetItem* addControllerToView(MidiController* mctrl);
55
QTreeWidgetItem* addControllerToView(MusECore::MidiController* mctrl);
39
56
QString getPatchItemText(int);
40
57
void enableDefaultControls(bool, bool);
41
58
void setDefaultPatchName(int);