ControllerConnectionDialog.h 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. /*
  2. * ControllerConnectionDialog.h - dialog allowing the user to create and
  3. * modify links between controllers and models
  4. *
  5. * Copyright (c) 2008 Paul Giblock <drfaygo/at/gmail.com>
  6. *
  7. * This file is part of LMMS - https://lmms.io
  8. *
  9. * This program is free software; you can redistribute it and/or
  10. * modify it under the terms of the GNU General Public
  11. * License as published by the Free Software Foundation; either
  12. * version 2 of the License, or (at your option) any later version.
  13. *
  14. * This program is distributed in the hope that it will be useful,
  15. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  17. * General Public License for more details.
  18. *
  19. * You should have received a copy of the GNU General Public
  20. * License along with this program (see COPYING); if not, write to the
  21. * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  22. * Boston, MA 02110-1301 USA.
  23. *
  24. */
  25. #ifndef CONTROLLER_CONNECTION_DIALOG_H
  26. #define CONTROLLER_CONNECTION_DIALOG_H
  27. #include <QDialog>
  28. #include <QSortFilterProxyModel>
  29. #include <QStandardItemModel>
  30. #include "Controller.h"
  31. #include "AutomatableModel.h"
  32. class QLineEdit;
  33. class QListView;
  34. class QScrollArea;
  35. class AutoDetectMidiController;
  36. class ComboBox;
  37. class GroupBox;
  38. class TabWidget;
  39. class LcdSpinBox;
  40. class LedCheckBox;
  41. class MidiPortMenu;
  42. class ControllerConnectionDialog : public QDialog
  43. {
  44. Q_OBJECT
  45. public:
  46. ControllerConnectionDialog( QWidget * _parent,
  47. const AutomatableModel * _target_model );
  48. virtual ~ControllerConnectionDialog();
  49. Controller * chosenController()
  50. {
  51. return m_controller;
  52. }
  53. public slots:
  54. // void setSelection( const effectKey & _selection );
  55. void selectController();
  56. void midiToggled();
  57. void userToggled();
  58. void userSelected();
  59. void autoDetectToggled();
  60. void enableAutoDetect( QAction * _a );
  61. protected slots:
  62. void midiValueChanged();
  63. private:
  64. // Midi
  65. GroupBox * m_midiGroupBox;
  66. LcdSpinBox * m_midiChannelSpinBox;
  67. LcdSpinBox * m_midiControllerSpinBox;
  68. LedCheckBox * m_midiAutoDetectCheckBox;
  69. MidiPortMenu * m_readablePorts;
  70. BoolModel m_midiAutoDetect;
  71. // User
  72. GroupBox * m_userGroupBox;
  73. ComboBox * m_userController;
  74. // Mapping
  75. TabWidget * m_mappingBox;
  76. QLineEdit * m_mappingFunction;
  77. Controller * m_controller;
  78. const AutomatableModel * m_targetModel;
  79. // Temporary midiController
  80. AutoDetectMidiController * m_midiController;
  81. } ;
  82. #endif