![]() |
Mixxx
|
00001 /*************************************************************************** 00002 dlgprefmidibindings.h - description 00003 ------------------- 00004 begin : Sat Jun 21 2008 00005 copyright : (C) 2008 by Tom Care 00006 email : psyc0de@gmail.com 00007 ***************************************************************************/ 00008 00009 /*************************************************************************** 00010 * * 00011 * This program is free software; you can redistribute it and/or modify * 00012 * it under the terms of the GNU General Public License as published by * 00013 * the Free Software Foundation; either version 2 of the License, or * 00014 * (at your option) any later version. * 00015 * * 00016 ***************************************************************************/ 00017 #ifndef DLGPREFMIDIBINDINGS_H_ 00018 #define DLGPREFMIDIBINDINGS_H_ 00019 00020 #include <QtGui> 00021 #include "ui_dlgprefmidibindingsdlg.h" 00022 #include "dlgmidilearning.h" 00023 #include "configobject.h" 00024 00025 //Forward declarations 00026 class MidiChannelDelegate; 00027 class MidiStatusDelegate; 00028 class MidiNoDelegate; 00029 class MidiOptionDelegate; 00030 class ControlGroupDelegate; 00031 class ControlValueDelegate; 00032 class MidiDevice; 00033 class MidiDeviceManager; 00034 00035 class DlgPrefMidiBindings : public QWidget, public Ui::DlgPrefMidiBindingsDlg { 00036 Q_OBJECT 00037 public: 00038 DlgPrefMidiBindings(QWidget *parent, MidiDevice* midiDevice, 00039 MidiDeviceManager* midiDeviceManager, 00040 ConfigObject<ConfigValue> *pConfig); 00041 ~DlgPrefMidiBindings(); 00042 00043 00044 public slots: 00045 void slotUpdate(); 00046 void slotApply(); 00047 void slotShowMidiLearnDialog(); 00048 void slotLoadMidiMapping(const QString &name); 00049 void slotExportXML(); 00050 void slotDeviceState(int state); 00051 00052 //Input bindings 00053 void slotClearAllInputBindings(); 00054 void slotRemoveInputBinding(); 00055 void slotAddInputBinding(); 00056 00057 //Output bindings 00058 void slotAddOutputBinding(); 00059 void slotClearAllOutputBindings(); 00060 void slotRemoveOutputBinding(); 00061 00062 //Mark that we need to apply the settings. 00063 void slotDirty (); 00064 00065 signals: 00066 void deviceStateChanged(DlgPrefMidiBindings*, bool); 00067 00068 private: 00069 void setRowBackground(int row, QColor color); 00070 void savePreset(QString path); 00071 void enumeratePresets(); 00072 void enumerateOutputDevices(); 00073 00074 void enableDevice(); 00075 void disableDevice(); 00076 00077 bool m_bDirty; 00078 int currentGroupRow; 00079 MidiChannelDelegate* m_pMidiChannelDelegate; 00080 MidiStatusDelegate* m_pMidiStatusDelegate; 00081 MidiNoDelegate* m_pMidiNoDelegate; 00082 MidiOptionDelegate* m_pMidiOptionDelegate; 00083 ControlGroupDelegate* m_pControlGroupDelegate; 00084 ControlValueDelegate* m_pControlValueDelegate; 00085 QAction* m_deleteMIDIInputRowAction; 00086 ConfigObject<ConfigValue> *m_pConfig; 00087 MidiDevice* m_pMidiDevice; 00088 MidiDeviceManager* m_pMidiDeviceManager; 00089 DlgMidiLearning* m_pDlgMidiLearning; 00090 }; 00091 00092 #endif /*DLGPREFMIDIBINDINGS_H_*/