hydrogen 1.2.6
MidiTable.h
Go to the documentation of this file.
1/*
2 * Hydrogen
3 * Copyright(c) 2002-2008 by Alex >Comix< Cominu [comix@users.sourceforge.net]
4 * Copyright(c) 2008-2025 The hydrogen development team [hydrogen-devel@lists.sourceforge.net]
5 *
6 * http://www.hydrogen-music.org
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
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.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program. If not, see https://www.gnu.org/licenses
20 *
21 */
22
23#ifndef MIDI_TABLE_H
24#define MIDI_TABLE_H
25
26#include <memory>
27
28#include <core/Object.h>
29#include <core/MidiAction.h>
30
31#include <QtGui>
32#include <QtWidgets>
33
35class MidiTable : public QTableWidget, public H2Core::Object<MidiTable>
36{
38 Q_OBJECT
39 public:
40 explicit MidiTable( QWidget* pParent );
41 ~MidiTable();
42
43 void setupMidiTable();
44 void saveMidiTable();
45
46signals:
48 void changed();
49
50private slots:
51 void updateTable();
52 void midiSensePressed( int );
53 void sendChanged();
54
55private:
56 void insertNewRow( std::shared_ptr<Action> pAction, QString eventString, int eventParameter );
57 void updateRow( int nRow );
58 virtual void paintEvent( QPaintEvent* ev ) override;
59
71
72};
73
74#endif
#define H2_OBJECT(name)
Definition Object.h:227
void saveMidiTable()
int m_nColumn3Width
Definition MidiTable.h:67
int m_nColumn5Width
Definition MidiTable.h:69
int m_nColumn1Width
Definition MidiTable.h:65
QTimer * m_pUpdateTimer
Definition MidiTable.h:62
int m_nRowHeight
Definition MidiTable.h:63
void setupMidiTable()
void changed()
Identicates a user action changing the content of the table.
int m_nColumn6Width
Definition MidiTable.h:70
void insertNewRow(std::shared_ptr< Action > pAction, QString eventString, int eventParameter)
int m_nColumn2Width
Definition MidiTable.h:66
MidiTable(QWidget *pParent)
Definition MidiTable.cpp:38
void updateRow(int nRow)
int m_nColumn4Width
Definition MidiTable.h:68
void midiSensePressed(int)
Definition MidiTable.cpp:70
int m_nRowCount
Definition MidiTable.h:60
int m_nCurrentMidiAutosenseRow
Definition MidiTable.h:61
void sendChanged()
void updateTable()
virtual void paintEvent(QPaintEvent *ev) override
int m_nColumn0Width
Definition MidiTable.h:64