Made 0.4.12 release
[lmms/mlankhorst.git] / include / setup_dialog.h
blobfb1c58e875e67586ad5390ae2d92aa9ab6a2674e
1 /*
2 * setup_dialog.h - dialog for setting up LMMS
4 * Copyright (c) 2005-2011 Tobias Doerffel <tobydox/at/users.sourceforge.net>
6 * This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
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.
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.
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.
25 #ifndef _SETUP_DIALOG_H
26 #define _SETUP_DIALOG_H
28 #include <QtGui/QDialog>
29 #include <QtCore/QMap>
31 #include "lmmsconfig.h"
32 #include "AudioDevice.h"
33 #include "MidiClient.h"
36 class QComboBox;
37 class QLabel;
38 class QLineEdit;
39 class QSlider;
41 class tabBar;
44 class setupDialog : public QDialog
46 Q_OBJECT
47 public:
48 enum ConfigTabs
50 GeneralSettings,
51 PathSettings,
52 PerformanceSettings,
53 AudioSettings,
54 MidiSettings
55 } ;
57 setupDialog( ConfigTabs _tab_to_open = GeneralSettings );
58 virtual ~setupDialog();
61 protected slots:
62 virtual void accept();
65 private slots:
66 // general settings widget
67 void setBufferSize( int _value );
68 void resetBufSize();
69 void displayBufSizeHelp();
71 // path settings widget
72 void setWorkingDir( const QString & _wd );
73 void setVSTDir( const QString & _vd );
74 void setArtworkDir( const QString & _ad );
75 void setFLDir( const QString & _fd );
76 void setLADSPADir( const QString & _ld );
77 void setSTKDir( const QString & _sd );
78 void setDefaultSoundfont( const QString & _sf );
79 void setBackgroundArtwork( const QString & _ba );
81 // audio settings widget
82 void audioInterfaceChanged( const QString & _driver );
83 void displayAudioHelp();
85 // MIDI settings widget
86 void midiInterfaceChanged( const QString & _driver );
87 void displayMIDIHelp();
90 void toggleToolTips( bool _enabled );
91 void toggleWarnAfterSetup( bool _enabled );
92 void toggleDisplaydBV( bool _enabled );
93 void toggleMMPZ( bool _enabled );
94 void toggleHQAudioDev( bool _enabled );
96 void openWorkingDir();
97 void openVSTDir();
98 void openArtworkDir();
99 void openFLDir();
100 void openLADSPADir();
101 void openSTKDir();
102 void openDefaultSoundfont();
103 void openBackgroundArtwork();
105 void toggleDisableChActInd( bool _disabled );
106 void toggleManualChPiano( bool _enabled );
107 void toggleSmoothScroll( bool _enabled );
108 void toggleOneInstrumentTrackWindow( bool _enabled );
111 private:
112 tabBar * m_tabBar;
114 QSlider * m_bufSizeSlider;
115 QLabel * m_bufSizeLbl;
116 int m_bufferSize;
118 bool m_toolTips;
119 bool m_warnAfterSetup;
120 bool m_displaydBV;
121 bool m_MMPZ;
122 bool m_hqAudioDev;
125 QLineEdit * m_wdLineEdit;
126 QLineEdit * m_vdLineEdit;
127 QLineEdit * m_adLineEdit;
128 QLineEdit * m_fdLineEdit;
129 QLineEdit * m_ladLineEdit;
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;
138 QString m_workingDir;
139 QString m_vstDir;
140 QString m_artworkDir;
141 QString m_flDir;
142 QString m_ladDir;
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;
151 bool m_disableChActInd;
152 bool m_manualChPiano;
153 bool m_smoothScroll;
154 bool m_oneInstrumentTrackWindow;
156 typedef QMap<QString, AudioDevice::setupWidget *> AswMap;
157 typedef QMap<QString, MidiClient::setupWidget *> MswMap;
158 typedef QMap<QString, QString> trMap;
160 QComboBox * m_audioInterfaces;
161 AswMap m_audioIfaceSetupWidgets;
162 trMap m_audioIfaceNames;
164 QComboBox * m_midiInterfaces;
165 MswMap m_midiIfaceSetupWidgets;
166 trMap m_midiIfaceNames;
172 #endif