SetupDialog.h 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219
  1. /*
  2. * SetupDialog.h - dialog for setting up LMMS
  3. *
  4. * Copyright (c) 2005-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
  5. *
  6. * This file is part of LMMS - https://lmms.io
  7. *
  8. * This program is free software; you can redistribute it and/or
  9. * modify it under the terms of the GNU General Public
  10. * License as published by the Free Software Foundation; either
  11. * version 2 of the License, or (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 GNU
  16. * General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU General Public
  19. * License along with this program (see COPYING); if not, write to the
  20. * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  21. * Boston, MA 02110-1301 USA.
  22. *
  23. */
  24. #ifndef SETUP_DIALOG_H
  25. #define SETUP_DIALOG_H
  26. #include <QDialog>
  27. #include <QtCore/QMap>
  28. #include "LedCheckbox.h"
  29. #include "lmmsconfig.h"
  30. #include "AudioDevice.h"
  31. #include "MidiClient.h"
  32. #include "MidiSetupWidget.h"
  33. #include "AudioDeviceSetupWidget.h"
  34. class QComboBox;
  35. class QLabel;
  36. class QLineEdit;
  37. class QSlider;
  38. class TabBar;
  39. class SetupDialog : public QDialog
  40. {
  41. Q_OBJECT
  42. public:
  43. enum ConfigTabs
  44. {
  45. GeneralSettings,
  46. PathSettings,
  47. PerformanceSettings,
  48. AudioSettings,
  49. MidiSettings
  50. } ;
  51. SetupDialog( ConfigTabs _tab_to_open = GeneralSettings );
  52. virtual ~SetupDialog();
  53. protected slots:
  54. virtual void accept();
  55. private slots:
  56. // general settings widget
  57. void setBufferSize( int _value );
  58. void resetBufSize();
  59. void displayBufSizeHelp();
  60. // path settings widget
  61. void setWorkingDir( const QString & _wd );
  62. void setVSTDir( const QString & _vd );
  63. void setGIGDir( const QString & _gd );
  64. void setSF2Dir( const QString & _sfd );
  65. void setArtworkDir( const QString & _ad );
  66. void setLADSPADir( const QString & _ld );
  67. void setSTKDir( const QString & _sd );
  68. void setDefaultSoundfont( const QString & _sf );
  69. void setBackgroundArtwork( const QString & _ba );
  70. // performance settings widget
  71. void setAutoSaveInterval( int time );
  72. void resetAutoSave();
  73. void displaySaveIntervalHelp();
  74. // audio settings widget
  75. void audioInterfaceChanged( const QString & _driver );
  76. void displayAudioHelp();
  77. // MIDI settings widget
  78. void midiInterfaceChanged( const QString & _driver );
  79. void displayMIDIHelp();
  80. void toggleToolTips( bool _enabled );
  81. void toggleWarnAfterSetup( bool _enabled );
  82. void toggleDisplaydBFS( bool _enabled );
  83. void toggleMMPZ( bool _enabled );
  84. void toggleDisableBackup( bool _enabled );
  85. void toggleOpenLastProject( bool _enabled );
  86. void toggleHQAudioDev( bool _enabled );
  87. void openWorkingDir();
  88. void openVSTDir();
  89. void openGIGDir();
  90. void openSF2Dir();
  91. void openArtworkDir();
  92. void openLADSPADir();
  93. void openSTKDir();
  94. void openDefaultSoundfont();
  95. void openBackgroundArtwork();
  96. void toggleSmoothScroll( bool _enabled );
  97. void toggleAutoSave( bool _enabled );
  98. void toggleRunningAutoSave( bool _enabled );
  99. void toggleOneInstrumentTrackWindow( bool _enabled );
  100. void toggleCompactTrackButtons( bool _enabled );
  101. void toggleSyncVSTPlugins( bool _enabled );
  102. void toggleAnimateAFP( bool _enabled );
  103. void toggleNoteLabels( bool en );
  104. void toggleDisplayWaveform( bool en );
  105. void toggleDisableAutoquit( bool en );
  106. void vstEmbedMethodChanged();
  107. void toggleVSTAlwaysOnTop( bool en );
  108. void setLanguage( int lang );
  109. private:
  110. TabBar * m_tabBar;
  111. QSlider * m_bufSizeSlider;
  112. QLabel * m_bufSizeLbl;
  113. int m_bufferSize;
  114. bool m_toolTips;
  115. bool m_warnAfterSetup;
  116. bool m_displaydBFS;
  117. bool m_MMPZ;
  118. bool m_disableBackup;
  119. bool m_openLastProject;
  120. bool m_NaNHandler;
  121. bool m_hqAudioDev;
  122. QString m_lang;
  123. QStringList m_languages;
  124. QLineEdit * m_wdLineEdit;
  125. QLineEdit * m_vdLineEdit;
  126. QLineEdit * m_adLineEdit;
  127. QLineEdit * m_ladLineEdit;
  128. QLineEdit * m_gigLineEdit;
  129. QLineEdit * m_sf2LineEdit;
  130. #ifdef LMMS_HAVE_FLUIDSYNTH
  131. QLineEdit * m_sfLineEdit;
  132. #endif
  133. #ifdef LMMS_HAVE_STK
  134. QLineEdit * m_stkLineEdit;
  135. #endif
  136. QLineEdit * m_baLineEdit;
  137. QString m_workingDir;
  138. QString m_vstDir;
  139. QString m_artworkDir;
  140. QString m_ladDir;
  141. QString m_gigDir;
  142. QString m_sf2Dir;
  143. #ifdef LMMS_HAVE_FLUIDSYNTH
  144. QString m_defaultSoundfont;
  145. #endif
  146. #ifdef LMMS_HAVE_STK
  147. QString m_stkDir;
  148. #endif
  149. QString m_backgroundArtwork;
  150. bool m_smoothScroll;
  151. bool m_enableAutoSave;
  152. bool m_enableRunningAutoSave;
  153. int m_saveInterval;
  154. QSlider * m_saveIntervalSlider;
  155. QLabel * m_saveIntervalLbl;
  156. LedCheckBox * m_autoSave;
  157. LedCheckBox * m_runningAutoSave;
  158. bool m_oneInstrumentTrackWindow;
  159. bool m_compactTrackButtons;
  160. bool m_syncVSTPlugins;
  161. bool m_animateAFP;
  162. bool m_printNoteLabels;
  163. bool m_displayWaveform;
  164. bool m_disableAutoQuit;
  165. typedef QMap<QString, AudioDeviceSetupWidget *> AswMap;
  166. typedef QMap<QString, MidiSetupWidget *> MswMap;
  167. typedef QMap<QString, QString> trMap;
  168. QComboBox * m_audioInterfaces;
  169. AswMap m_audioIfaceSetupWidgets;
  170. trMap m_audioIfaceNames;
  171. QComboBox * m_midiInterfaces;
  172. MswMap m_midiIfaceSetupWidgets;
  173. trMap m_midiIfaceNames;
  174. QComboBox* m_vstEmbedComboBox;
  175. QString m_vstEmbedMethod;
  176. LedCheckBox * m_vstAlwaysOnTopCheckBox;
  177. bool m_vstAlwaysOnTop;
  178. } ;
  179. #endif