~keithsalisbury/mixxx/mixxx

« back to all changes in this revision

Viewing changes to mixxx/src/midi/midiinputmappingtablemodel.h

  • Committer: Keith Salisbury
  • Date: 2012-05-06 13:44:20 UTC
  • mfrom: (2994.1.100 mixxx-trunk)
  • Revision ID: keithsalisbury@gmail.com-20120506134420-8k1dqq10aqmx0ecq
merge with trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
 
2
 
#ifndef _MIDIINPUTMAPPINGTABLEMODEL_H_
3
 
#define _MIDIINPUTMAPPINGTABLEMODEL_H_
4
 
 
5
 
#include "midimapping.h" //gives typedef for MidiInputMapping
6
 
 
7
 
enum MidiInputTableIndices {
8
 
    MIDIINPUTTABLEINDEX_MIDISTATUS = 0,
9
 
    MIDIINPUTTABLEINDEX_MIDINO,
10
 
    MIDIINPUTTABLEINDEX_MIDICHANNEL,
11
 
    MIDIINPUTTABLEINDEX_CONTROLOBJECTGROUP,
12
 
    MIDIINPUTTABLEINDEX_CONTROLOBJECTVALUE,
13
 
    MIDIINPUTTABLEINDEX_MIDIOPTION,
14
 
    MIDIINPUTTABLEINDEX_CONTROLOBJECTDESCRIPTION,
15
 
    MIDIINPUTTABLEINDEX_NUMCOLS //Number of columns
16
 
};
17
 
 
18
 
class MidiInputMappingTableModel : public QAbstractTableModel
19
 
{
20
 
Q_OBJECT
21
 
public:
22
 
    MidiInputMappingTableModel(MidiMapping* mapping);
23
 
    ~MidiInputMappingTableModel();
24
 
    void setMapping(MidiMapping* mapping);
25
 
    QVariant data(const QModelIndex &index, int role) const;
26
 
    Qt::ItemFlags flags(const QModelIndex &index) const;
27
 
    bool setData(const QModelIndex &index, const QVariant &value,
28
 
                 int role = Qt::EditRole);
29
 
    int rowCount(const QModelIndex& parent=QModelIndex()) const;
30
 
    int columnCount(const QModelIndex& parent=QModelIndex()) const;
31
 
    QVariant headerData(int section, Qt::Orientation orientation, int role) const;
32
 
    bool removeRow(int row, const QModelIndex& parent=QModelIndex());
33
 
    bool removeRows(int row, int count, const QModelIndex& parent=QModelIndex());
34
 
 
35
 
public slots:
36
 
    void slotInputMappingChanged();
37
 
private:
38
 
    MidiMapping* m_pMapping;
39
 
    
40
 
};
41
 
 
42
 
#endif