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)
7
// (C) Copyright 2012 Tim E. Real (terminator356 on users dot sourceforge dot net)
8
9
// This program is free software; you can redistribute it and/or
9
10
// modify it under the terms of the GNU General Public License
44
52
MusECore::MidiInstrument workingInstrument;
45
53
QListWidgetItem* oldMidiInstrument;
46
54
QTreeWidgetItem* oldPatchItem;
58
QScrollBar* dlist_vscroll;
59
QGridLayout* dlist_grid;
60
QStringListModel* patch_coll_model;
47
64
void closeEvent(QCloseEvent*);
48
65
int checkDirty(MusECore::MidiInstrument*, bool isClose = false);
49
66
bool fileSave(MusECore::MidiInstrument*, const QString&);
51
68
void updateInstrument(MusECore::MidiInstrument*);
52
69
void updatePatch(MusECore::MidiInstrument*, MusECore::Patch*);
53
70
void updatePatchGroup(MusECore::MidiInstrument*, MusECore::PatchGroup*);
71
void updateSysex(MusECore::MidiInstrument*, MusECore::SysEx*);
54
72
void changeInstrument();
55
73
QTreeWidgetItem* addControllerToView(MusECore::MidiController* mctrl);
56
74
QString getPatchItemText(int);
57
75
void enableDefaultControls(bool, bool);
76
void enableNonCtrlControls(bool);
58
77
void setDefaultPatchName(int);
59
78
int getDefaultPatchNumber();
60
79
void setDefaultPatchNumbers(int);
67
86
virtual void fileOpen();
68
87
virtual void fileSave();
69
88
virtual void fileSaveAs();
70
virtual void fileExit();
89
virtual void fileClose();
71
90
virtual void helpWhatsThis();
72
91
void instrumentChanged();
73
92
void tabChanged(QWidget*);
83
102
void deleteControllerClicked();
84
103
void newControllerClicked();
85
104
void addControllerClicked();
105
void ctrlPopupTriggered(QAction*);
86
106
void ctrlTypeChanged(int);
87
107
void ctrlNameReturn();
88
void ctrlHNumChanged(int);
89
void ctrlLNumChanged(int);
108
void ctrlNumChanged();
90
109
void ctrlMinChanged(int);
91
110
void ctrlMaxChanged(int);
92
111
void ctrlDefaultChanged(int);
93
//void sysexChanged(); DELETETHIS?
94
//void deleteSysexClicked();
95
//void newSysexClicked();
112
void ctrlShowInMidiChanged(int);
113
void ctrlShowInDrumChanged(int);
114
void sysexChanged(QListWidgetItem*, QListWidgetItem*);
115
void deleteSysexClicked();
116
void newSysexClicked();
96
117
void ctrlNullParamHChanged(int);
97
118
void ctrlNullParamLChanged(int);
120
void patchCollectionSpinboxChanged(int);
121
void patchCollectionCheckboxChanged(bool);
122
void patchActivated(const QModelIndex&);
123
void addPatchCollection();
124
void delPatchCollection();
125
void copyPatchCollection();
126
void patchCollectionUp();
127
void patchCollectionDown();
128
void repopulatePatchCollections();
129
void storePatchCollection();
130
void fetchPatchCollection();
133
enum TabType { Patches=0, DrumMaps=1, Controllers=2, Sysex=3 };
100
135
EditInstrument(QWidget* parent = 0, Qt::WFlags fl = Qt::Window);
136
void findInstrument(const QString& find_instrument);
137
void showTab(TabType);
103
140
} // namespace MusEGui