1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
2 
3 /*
4     Rosegarden
5     A MIDI and audio sequencer and musical notation editor.
6     Copyright 2000-2021 the Rosegarden development team.
7 
8     Other copyrights also apply to some parts of this work.  Please
9     see the AUTHORS file and individual file headers for details.
10 
11     This program is free software; you can redistribute it and/or
12     modify it under the terms of the GNU General Public License as
13     published by the Free Software Foundation; either version 2 of the
14     License, or (at your option) any later version.  See the file
15     COPYING included with this distribution for more information.
16 */
17 
18 #ifndef RG_MIDICONFIGURATIONPAGE_H
19 #define RG_MIDICONFIGURATIONPAGE_H
20 
21 #include "TabbedConfigurationPage.h"
22 
23 #include <QString>
24 #include <QCheckBox>
25 
26 class QComboBox;
27 class QPushButton;
28 class QSpinBox;
29 class QWidget;
30 
31 
32 namespace Rosegarden
33 {
34 
35 
36 class RosegardenDocument;
37 class LineEdit;
38 
39 
40 class MIDIConfigurationPage : public TabbedConfigurationPage
41 {
42     Q_OBJECT
43 
44 public:
45     MIDIConfigurationPage(QWidget *parent);
46 
47     void apply() override;
48 
49     // Info for ConfigureDialog.
iconLabel()50     static QString iconLabel()  { return tr("MIDI"); }
title()51     static QString title()  { return tr("MIDI Settings"); }
iconName()52     static QString iconName()  { return "configure-midi"; }
53 
54 private slots:
55 
56     void slotLoadSoundFontClicked(bool isChecked);
57     void slotPathToLoadChoose();
58     void slotSoundFontChoose();
59 
60 private:
61 
62     // *** General tab
63 
64     /// Base octave number for MIDI pitch display.
65     QSpinBox *m_baseOctaveNumber;
66 
67     QCheckBox *m_useDefaultStudio;
68     QCheckBox *m_externalControllerPort;
69     QComboBox *m_controllerType;
70     QCheckBox *m_allowResetAllControllers;
71     QCheckBox *m_sendProgramChangesWhenLooping;
72     QCheckBox *m_sendControlChangesWhenLooping;
73     QCheckBox *m_acceptTransportCCs;
74     /// Timer value at the beginning to detect changes.
75     QString m_originalTimingSource;
76     QComboBox *m_sequencerTimingSource;
77 
78     QCheckBox *m_loadSoundFont;
79     LineEdit *m_pathToLoadCommand;
80     QPushButton *m_pathToLoadChoose;
81     LineEdit *m_soundFont;
82     QPushButton *m_soundFontChoose;
83 
84 
85     // *** MIDI Sync tab
86 
87     QComboBox *m_midiClock;
88     QComboBox *m_midiMachineControlMode;
89     QComboBox *m_midiTimeCodeMode;
90     QCheckBox *m_autoConnectSyncOut;
91 
92     void updateWidgets();
93 
94 };
95 
96 
97 }
98 
99 #endif
100