MIDI Control Listener setup dialog

Adds GUI elements to the global setup dialog to configure remote
controlling of LMMS via MIDI. The GUI is not yet fully functional,
though.

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
This commit is contained in:
Achim Settelmeier
2009-05-25 00:50:51 +02:00
committed by Tobias Doerffel
parent 57d4024c2a
commit 8d5b2c4813
4 changed files with 514 additions and 7 deletions

View File

@@ -32,15 +32,18 @@
#include "lmmsconfig.h"
#include "audio_device.h"
#include "midi_client.h"
#include "midi_control_listener.h"
class QComboBox;
class QLabel;
class QLineEdit;
class QSlider;
class QTableWidget;
class tabBar;
class groupBox;
class setupDialogMCL;
class setupDialog : public QDialog
{
@@ -57,7 +60,11 @@ public:
setupDialog( ConfigTabs _tab_to_open = GeneralSettings );
virtual ~setupDialog();
void mclAddKeyAction( int _key,
MidiControlListener::EventAction _action );
void mclAddControllerAction( int _controller,
MidiControlListener::EventAction _action );
protected slots:
virtual void accept( void );
@@ -106,8 +113,16 @@ private slots:
void toggleDisableChActInd( bool _disabled );
void toggleManualChPiano( bool _enabled );
void toggleMCLEnabled( bool _enabled );
void toggleMCLControlKey( bool _enabled );
void mclNewAction( void );
void mclDelAction( void );
private:
groupBox * setupMidiControlListener( QWidget * midi );
void mclUpdateActionTable( void );
tabBar * m_tabBar;
QSlider * m_bufSizeSlider;
@@ -162,7 +177,14 @@ private:
mswMap m_midiIfaceSetupWidgets;
trMap m_midiIfaceNames;
bool m_mclEnabled;
int m_mclChannel;
bool m_mclUseControlKey;
MidiControlListener::ActionMap m_mclActionMapKeys;
MidiControlListener::ActionMap m_mclActionMapControllers;
QList< QPair <char, int> > m_mclActionTableMap;
QTableWidget * m_mclActionTable;
} ;

View File

@@ -0,0 +1,61 @@
/*
* setup_dialog_mcl.h - dialog for setting up MIDI Control Listener
*
* Copyright (c) 2009 Achim Settelmeier <lmms/at/m1.sirlab.de>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public
* License along with this program (see COPYING); if not, write to the
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301 USA.
*
*/
#ifndef _SETUP_DIALOG_MCL_H
#define _SETUP_DIALOG_MCL_H
#include <QtGui/QDialog>
class setupDialog;
class setupDialogMCL : public QDialog
{
Q_OBJECT
public:
setupDialogMCL( setupDialog * _parent );
virtual ~setupDialogMCL( void );
protected slots:
virtual void accept( void );
private slots:
void clickedKeyBox( void );
void clickedControllerBox( void );
private:
setupDialog * m_parent;
bool m_keysActive; // true: configure key, false: configure controller
groupBox * m_actionKey_gb;
groupBox * m_actionController_gb;
QComboBox * m_actionsKey_box;
QComboBox * m_actionsController_box;
lcdSpinBoxModel * m_controllerSbModel;
} ;
#endif