MuseScore/mscore/prefsdialog.h

116 lines
3.5 KiB
C
Raw Normal View History

2012-05-26 14:49:10 +02:00
//=============================================================================
// MusE Score
// Linux Music Score Editor
// $Id:$
//
2016-06-30 15:34:02 +02:00
// Copyright (C) 2002-2016 Werner Schweer and others
2012-05-26 14:49:10 +02:00
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License version 2.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
//=============================================================================
#ifndef __PREFSDIALOG_H__
#define __PREFSDIALOG_H__
#include "ui_prefsdialog.h"
#include "preferences.h"
2016-06-30 15:34:02 +02:00
#include "abstractdialog.h"
#include "preferenceslistwidget.h"
2012-05-26 14:49:10 +02:00
2013-05-13 18:49:17 +02:00
namespace Ms {
2012-05-26 14:49:10 +02:00
class Shortcut;
//---------------------------------------------------------
// PreferenceDialog
//---------------------------------------------------------
2016-06-30 15:34:02 +02:00
class PreferenceDialog : public AbstractDialog, private Ui::PrefsDialogBase {
2012-05-26 14:49:10 +02:00
Q_OBJECT
QMap<QString, Shortcut*> localShortcuts;
bool shortcutsChanged;
QButtonGroup* recordButtons;
PreferencesListWidget* advancedWidget;
2012-05-26 14:49:10 +02:00
virtual void hideEvent(QHideEvent*);
2012-05-26 14:49:10 +02:00
void apply();
void updateSCListView();
void setUseMidiOutput(bool);
void updateValues(bool useDefaultValues = false);
2012-05-26 14:49:10 +02:00
private slots:
void buttonBoxClicked(QAbstractButton*);
void updateBgView(bool);
void updateFgView(bool);
2012-05-26 14:49:10 +02:00
void selectFgWallpaper();
void selectBgWallpaper();
void selectDefaultStyle();
void selectPartStyle();
void selectInstrumentList1();
void selectInstrumentList2();
2012-05-26 14:49:10 +02:00
void selectStartWith();
void resetShortcutClicked();
void saveShortcutListClicked();
void loadShortcutListClicked();
2012-05-26 14:49:10 +02:00
void clearShortcutClicked();
void defineShortcutClicked();
void portaudioApiActivated(int idx);
void resetAllValues();
void styleFileButtonClicked();
void recordButtonClicked(int);
void midiRemoteControlClearClicked();
2013-04-05 14:19:18 +02:00
void exclusiveAudioDriver(bool on);
void nonExclusiveJackDriver(bool on);
2012-05-26 14:49:10 +02:00
void selectScoresDirectory();
void selectStylesDirectory();
void selectTemplatesDirectory();
void selectPluginsDirectory();
void selectImagesDirectory();
2012-08-20 09:58:23 +02:00
void printShortcutsClicked();
2015-04-10 17:19:52 +02:00
void filterShortcutsTextChanged(const QString &);
void filterAdvancedPreferences(const QString&);
void resetAdvancedPreferenceToDefault();
2012-05-26 14:49:10 +02:00
void changeSoundfontPaths();
void updateTranslationClicked();
2012-05-26 14:49:10 +02:00
signals:
void preferencesChanged();
void mixerPreferencesChanged(bool showMidiControls);
2012-05-26 14:49:10 +02:00
2016-06-30 15:34:02 +02:00
protected:
virtual void retranslate() { retranslateUi(this); updateValues(); }
2012-05-26 14:49:10 +02:00
public:
PreferenceDialog(QWidget* parent);
~PreferenceDialog();
void start();
2012-05-26 14:49:10 +02:00
void updateRemote();
};
//---------------------------------------------------------
// ShortcutItem
//---------------------------------------------------------
class ShortcutItem : public QTreeWidgetItem {
bool operator<(const QTreeWidgetItem&) const;
public:
ShortcutItem() : QTreeWidgetItem() {}
};
2013-05-13 18:49:17 +02:00
} // namespace Ms
2012-05-26 14:49:10 +02:00
#endif