From 697833587b7975ffee9796db42e466ca36d6bf1c Mon Sep 17 00:00:00 2001 From: Yohann Dedy Date: Tue, 6 Sep 2016 01:07:29 +0200 Subject: [PATCH] minor change - presetTable (QTableWidget) changed to presetList (QListWidget) --- notes | 3 +++ src/mainwindow.cpp | 15 ++++----------- src/mainwindow.h | 2 +- 3 files changed, 8 insertions(+), 12 deletions(-) create mode 100644 notes diff --git a/notes b/notes new file mode 100644 index 0000000..b4ce1a8 --- /dev/null +++ b/notes @@ -0,0 +1,3 @@ + // Liste des types de commandes 0x00 à 0x7F + // {"Controller","PitchBend","MonoAftertouch","Prg-Change","PolyAftertouch","Note-On","Note-Off","free","RPN0_MSB","RPN0_LSB","RPN1_MSB","RPN1_LSB","free","free","RPN127_MSB","RPN127_LSB","NRPN0_MSB","NRPN0_LSB","NRPN1_MSB XG_Multi/GS","NRPN1_LSB XG_Multi/GS","NRPN8_MSB","NRPN8_LSB","NRPN9_MSB","NRPN9_LSB","NRPN10_MSB","NRPN10_LSB","NRPN20_MSB XG Drum Instr. Cutoff","NRPN20_LSB","XG Drum Instr. Cutoff","NRPN21_MSB XG Drum Instr. Resonance","NRPN21_LSB","XG Drum Instr. Resonance","NRPN22_MSB XG Drum Instr. EG Attack","NRPN22_LSB XG Drum Instr. EG Attack","NRPN23_MSB","XG Drum Instr. EG Decay","NRPN23_LSB","XG Drum Instr. EG Decay","NRPN24_MSB XG/GS Drum Instr. Pitch Coarse","NRPN24_LSB XG/GS Drum Instr. Pitch Coarse","NRPN25_MSB XG Drum Instr. Pitch Fine","NRPN25_LSB XG Drum Instr. Pitch Fine","NRPN26_MSB XG/GS Drum Instr. Level","NRPN26_LSB XG/GS Drum Instr. Coarse","NRPN28_MSB XG/GS Drum Instr. Panorama","NRPN28_LSB XG/GS Drum Instr. Panorama","NRPN29_MSB XG/GS Drum Instr. Reverb Send","NRPN29_LSB","XG/GS","Drum Instr. Reverb Send","NRPN30_MSB XG/GS Drum Instr. Chorus Send","NRPN30_LSB","XG/GS","Drum Instr. Chorus Send","NRPN31_MSB XG/GS Drum Instr.Variation/Delay Send","NRPN31_LSB","XG/GS","Drum Instr. Variation/Delay Send","NRPN32_MSB","NRPN32_LSB","NRPN33_MSB","NRPN33_LSB","NRPN99_MSB","NRPN99_LSB","NRPN100_MSB","NRPN100_LSB","NRPN102_MSB","NRPN102_LSB","NRPN120_MSB EMU ABS","NRPN120_LSB EMU ABS","NRPN127_MSB SB AWE 32/64","NRPN127_LSB SB AWE 32/64","free","free","XG-DRUM (SetupNr=Chn) Pitch Coarse","XG-DRUM (SetupNr=Chn) Pitch Fine","XG-DRUM (SetupNr=Chn) Level","XG-DRUM (SetupNr=Chn) Alternate Group","XG-DRUM (SetupNr=Chn) Panorama","XG-DRUM (SetupNr=Chn) Reverb Send","XG-DRUM (SetupNr=Chn) Chorus Send","XG-DRUM (SetupNr=Chn) Variation Send","XG-DRUM (SetupNr=Chn) Key Assign","XG-DRUM (SetupNr=Chn) Rcv Note off","XG-DRUM (SetupNr=Chn) Rcv Note On","XG-DRUM (SetupNr=Chn) Cutoff Freq.","XG-DRUM (SetupNr=Chn) Resonance","XG-DRUM (SetupNr=Chn) EG Attack Rate","XG-DRUM (SetupNr=Chn) EG Decay1 Rate","XG-DRUM (SetupNr=Chn) EG Decay2 Rate","XG Multipart","XG AD","XG-Effect","XG-Effect 2Byte","XG-Reverb Type","XG-Chorus Type","XG-Variation Type","XG-EQ","XG-Insertion1","XG-Insertion2","XG-Insertion 1 Type","XG-Insertion 2 Type","free","free","free","free","GS - Effect","MC303_Global","MC303_Channel","free","Strings","free","free","free","free","free","free","free","free","free","free","free","free","free","free","free","free","free","free","free","free","free","free","free","free","free","free","No-Event"} + diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index ec13c51..6a78532 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -7,7 +7,7 @@ mainWindow::mainWindow(QWidget *parent) : QMainWindow(parent), _settingsWindow(new settingsWindow(this)), - _presetsTable(new QTableWidget), + _presetsList(new QListWidget), _presetSettingsTable(new QTableWidget), _menuBar(new QMenuBar), _midiMessage(new QMidiMessage), @@ -35,18 +35,11 @@ mainWindow::mainWindow(QWidget *parent) : mainLayout->addWidget(_menuBar); // Table - - _presetsTable->setRowCount(128); - _presetsTable->setColumnCount(1); - - for(int i=0; i<_presetsTable->rowCount(); i++){ + for(int i=0; i<128; i++){ QString defaultCelString = QString("Preset #%1").arg(i+1); - QTableWidgetItem *celContent = new QTableWidgetItem(defaultCelString); - _presetsTable->setItem(i, 0, celContent); + _presetsList->addItem(defaultCelString); } - _presetsTable->horizontalHeader()->setVisible(false); - QStringList settingsList; settingsList << "Channel" << "Description"<< "Type" << "Parameter"; _presetSettingsTable->setRowCount(16); @@ -54,7 +47,7 @@ mainWindow::mainWindow(QWidget *parent) : _presetSettingsTable->setHorizontalHeaderLabels(settingsList); - tableLayout->addWidget(_presetsTable); + tableLayout->addWidget(_presetsList); tableLayout->addWidget(_presetSettingsTable); mainLayout->addLayout(tableLayout); diff --git a/src/mainwindow.h b/src/mainwindow.h index 442012b..2281690 100644 --- a/src/mainwindow.h +++ b/src/mainwindow.h @@ -31,7 +31,7 @@ public: mainWindow(QWidget *parent = 0); settingsWindow* _settingsWindow; - QTableWidget* _presetsTable; + QListWidget* _presetsList; QTableWidget* _presetSettingsTable; QMenuBar* _menuBar;