summaryrefslogtreecommitdiff
path: root/muse2/muse/instruments/minstrument.h
diff options
context:
space:
mode:
authorFlorian Jung <flo@windfisch.org>2012-01-02 21:26:08 +0000
committerFlorian Jung <flo@windfisch.org>2012-01-02 21:26:08 +0000
commit952e6deeb8eae2e72fa12054699c7740e4d7eea1 (patch)
treec75310aecde8c21a5b467bcd4c162ea63656e8b6 /muse2/muse/instruments/minstrument.h
parent14ed268100ece710a009c287fa4d61d7254f7aa1 (diff)
added drummap page to instrument editor
adapted dlist to be reusable added dtor to patch_drummap_mapping_t changed affected_patches from list to single entry TODO: maybe move dlist and stuff out of midiedit still TODO: offer a way to re-tie drumlist-ordering to the instrument
Diffstat (limited to 'muse2/muse/instruments/minstrument.h')
-rw-r--r--muse2/muse/instruments/minstrument.h18
1 files changed, 11 insertions, 7 deletions
diff --git a/muse2/muse/instruments/minstrument.h b/muse2/muse/instruments/minstrument.h
index 9a65598b..f793a7b6 100644
--- a/muse2/muse/instruments/minstrument.h
+++ b/muse2/muse/instruments/minstrument.h
@@ -27,8 +27,7 @@
#include "globaldefs.h"
#include <list>
#include <vector>
-
-class QString;
+#include <QString>
namespace MusEGui {
class PopupMenu;
@@ -101,21 +100,26 @@ struct patch_collection_t
first_hbank=h1;
last_hbank=h2;
}
-
+
+ QString to_string();
};
struct patch_drummap_mapping_t
{
- std::list<patch_collection_t> affected_patches;
+ patch_collection_t affected_patches;
DrumMap* drummap;
- patch_drummap_mapping_t(const std::list<patch_collection_t>& a, DrumMap* d)
+ patch_drummap_mapping_t(const patch_collection_t& a, DrumMap* d)
{
affected_patches=a;
drummap=d;
}
+ patch_drummap_mapping_t(const patch_drummap_mapping_t& that);
patch_drummap_mapping_t();
+ ~patch_drummap_mapping_t();
+
+ patch_drummap_mapping_t& operator=(const patch_drummap_mapping_t& that);
};
//---------------------------------------------------------
@@ -143,8 +147,7 @@ class MidiInstrument {
QString _name;
QString _filePath;
- void clear_delete_patch_drummap_mapping();
-
+ void writeDrummaps(int level, Xml& xml) const;
void readDrummaps(Xml& xml);
patch_drummap_mapping_t readDrummapsEntry(Xml& xml);
patch_collection_t readDrummapsEntryPatchCollection(Xml& xml);
@@ -195,6 +198,7 @@ class MidiInstrument {
void write(int level, Xml&);
PatchGroupList* groups() { return &pg; }
+ std::list<patch_drummap_mapping_t>* get_patch_drummap_mapping() { return &patch_drummap_mapping; }
};
//---------------------------------------------------------