MuseScore  3.4
Music composition and notation
prefsdialog.h
Go to the documentation of this file.
1 //=============================================================================
2 // MusE Score
3 // Linux Music Score Editor
4 //
5 // Copyright (C) 2002-2016 Werner Schweer and others
6 //
7 // This program is free software; you can redistribute it and/or modify
8 // it under the terms of the GNU General Public License version 2.
9 //
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
14 //
15 // You should have received a copy of the GNU General Public License
16 // along with this program; if not, write to the Free Software
17 // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18 //=============================================================================
19 
20 #ifndef __PREFSDIALOG_H__
21 #define __PREFSDIALOG_H__
22 
23 #include "ui_prefsdialog.h"
24 #include "preferences.h"
25 #include "abstractdialog.h"
26 #include "preferenceslistwidget.h"
27 
28 namespace Ms {
29 
30 class Shortcut;
31 
32 //---------------------------------------------------------
33 // PreferenceDialog
34 //---------------------------------------------------------
35 
36 class PreferenceDialog : public AbstractDialog, private Ui::PrefsDialogBase {
37  Q_OBJECT
38 
39  QMap<QString, Shortcut*> localShortcuts;
41  QButtonGroup* recordButtons;
43 
44  virtual void hideEvent(QHideEvent*);
45  void apply();
46  void updateSCListView();
47  void setUseMidiOutput(bool);
48  void updateValues(bool useDefaultValues = false);
49 
50  private slots:
51  void buttonBoxClicked(QAbstractButton*);
52  void updateBgView(bool);
53  void updateFgView(bool);
54  void selectFgWallpaper();
55  void selectBgWallpaper();
56  void selectDefaultStyle();
57  void selectPartStyle();
58  void selectInstrumentList1();
59  void selectInstrumentList2();
60  void selectStartWith();
61  void resetShortcutClicked();
64  void clearShortcutClicked();
65  void defineShortcutClicked();
66  void portaudioApiActivated(int idx);
67  void resetAllValues();
69  void recordButtonClicked(int);
71  void exclusiveAudioDriver(bool on);
72  void nonExclusiveJackDriver(bool on);
73  void selectScoresDirectory();
74  void selectStylesDirectory();
77  void selectImagesDirectory();
79  void printShortcutsClicked();
80  void filterShortcutsTextChanged(const QString &);
81  void filterAdvancedPreferences(const QString&);
83  void restartAudioEngine();
84 
85  void changeSoundfontPaths();
87 
88  signals:
89  void preferencesChanged();
90  void mixerPreferencesChanged(bool showMidiControls);
91 
92  protected:
93  virtual void retranslate() { retranslateUi(this); updateValues(); }
94 
95  public:
96  PreferenceDialog(QWidget* parent);
98  void start();
99  void updateRemote();
100  };
101 
102 //---------------------------------------------------------
103 // ShortcutItem
104 //---------------------------------------------------------
105 
106 class ShortcutItem : public QTreeWidgetItem {
107 
108  bool operator<(const QTreeWidgetItem&) const;
109 
110  public:
111  ShortcutItem() : QTreeWidgetItem() {}
112  };
113 
114 } // namespace Ms
115 #endif
116 
void selectImagesDirectory()
Definition: prefsdialog.cpp:1313
void apply()
Definition: prefsdialog.cpp:918
ShortcutItem()
Definition: prefsdialog.h:111
void updateFgView(bool)
Definition: prefsdialog.cpp:855
void selectScoresDirectory()
Definition: prefsdialog.cpp:1249
void updateBgView(bool)
Definition: prefsdialog.cpp:877
void start()
Definition: prefsdialog.cpp:245
virtual void retranslate()
Definition: prefsdialog.h:93
void selectPluginsDirectory()
Definition: prefsdialog.cpp:1297
QButtonGroup * recordButtons
Definition: prefsdialog.h:41
Definition: prefsdialog.h:36
void selectStartWith()
Definition: prefsdialog.cpp:837
void selectInstrumentList2()
Definition: prefsdialog.cpp:819
void styleFileButtonClicked()
Definition: prefsdialog.cpp:1165
Definition: prefsdialog.h:106
~PreferenceDialog()
Definition: prefsdialog.cpp:255
void filterAdvancedPreferences(const QString &)
Definition: prefsdialog.cpp:722
void resetShortcutClicked()
Definition: prefsdialog.cpp:651
Definition: abstractdialog.h:29
void defineShortcutClicked()
Definition: prefsdialog.cpp:1369
void midiRemoteControlClearClicked()
Definition: prefsdialog.cpp:1177
void clearShortcutClicked()
Definition: prefsdialog.cpp:687
void nonExclusiveJackDriver(bool on)
Definition: prefsdialog.cpp:1235
void updateValues(bool useDefaultValues=false)
Definition: prefsdialog.cpp:332
void resetAdvancedPreferenceToDefault()
Definition: prefsdialog.cpp:739
void resetAllValues()
Definition: prefsdialog.cpp:1148
void exclusiveAudioDriver(bool on)
Definition: prefsdialog.cpp:1190
Definition: aeolus.cpp:26
QMap< QString, Shortcut * > localShortcuts
Definition: prefsdialog.h:39
void mixerPreferencesChanged(bool showMidiControls)
void selectBgWallpaper()
Definition: prefsdialog.cpp:766
void selectFgWallpaper()
Definition: prefsdialog.cpp:753
void saveShortcutListClicked()
Definition: prefsdialog.cpp:667
virtual void hideEvent(QHideEvent *)
Definition: prefsdialog.cpp:264
void selectTemplatesDirectory()
Definition: prefsdialog.cpp:1281
void portaudioApiActivated(int idx)
Definition: prefsdialog.cpp:596
void setUseMidiOutput(bool)
void selectPartStyle()
Definition: prefsdialog.cpp:790
void updateSCListView()
Definition: prefsdialog.cpp:615
void selectDefaultStyle()
Definition: prefsdialog.cpp:779
void updateTranslationClicked()
Definition: prefsdialog.cpp:1358
void loadShortcutListClicked()
Definition: prefsdialog.cpp:674
void restartAudioEngine()
Definition: prefsdialog.cpp:1466
void buttonBoxClicked(QAbstractButton *)
Definition: prefsdialog.cpp:897
void printShortcutsClicked()
Definition: prefsdialog.cpp:1394
void recordButtonClicked(int)
Definition: prefsdialog.cpp:274
void updateRemote()
Definition: prefsdialog.cpp:286
void changeSoundfontPaths()
Definition: prefsdialog.cpp:1329
void selectStylesDirectory()
Definition: prefsdialog.cpp:1265
Definition: preferenceslistwidget.h:147
void selectExtensionsDirectory()
Definition: prefsdialog.cpp:1342
void filterShortcutsTextChanged(const QString &)
Definition: prefsdialog.cpp:705
PreferencesListWidget * advancedWidget
Definition: prefsdialog.h:42
void selectInstrumentList1()
Definition: prefsdialog.cpp:801
PreferenceDialog(QWidget *parent)
Definition: prefsdialog.cpp:60
bool shortcutsChanged
Definition: prefsdialog.h:40