LMMS
Loading...
Searching...
No Matches
MidiSetupWidget.h
Go to the documentation of this file.
1/*
2 * MidiSetupWidget - class for configuring midi sources in the settings window
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
25#ifndef LMMS_GUI_MIDI_SETUP_WIDGET_H
26#define LMMS_GUI_MIDI_SETUP_WIDGET_H
27
28#include <QGroupBox>
29
30class QLineEdit;
31
32namespace lmms::gui
33{
34
35
36class MidiSetupWidget : public QGroupBox
37{
38 Q_OBJECT
39 MidiSetupWidget( const QString & caption, const QString & configSection,
40 const QString & devName, QWidget * parent );
41public:
42 // create a widget with editors for all of @MidiClientType's fields
43 template <typename MidiClientType> static MidiSetupWidget* create( QWidget * parent )
44 {
45 QString configSection = MidiClientType::configSection();
46 QString dev = MidiClientType::probeDevice();
47 return new MidiSetupWidget(MidiClientType::name(), configSection, dev, parent);
48 }
49
50 void saveSettings();
51
52 void show();
53private:
55 QLineEdit *m_device;
56
57};
58
59
60} // namespace lmms::gui
61
62#endif // LMMS_GUI_MIDI_SETUP_WIDGET_H
static MidiSetupWidget * create(QWidget *parent)
Definition MidiSetupWidget.h:43
void show()
Definition MidiSetupWidget.cpp:64
MidiSetupWidget(const QString &caption, const QString &configSection, const QString &devName, QWidget *parent)
Definition MidiSetupWidget.cpp:37
void saveSettings()
Definition MidiSetupWidget.cpp:55
QString m_configSection
Definition MidiSetupWidget.h:54
QLineEdit * m_device
Definition MidiSetupWidget.h:55
static uintptr_t parent
Definition pugl.h:1644
Definition AudioPortAudio.cpp:223