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 __SYNTHCONTROL_H__ 21 #define __SYNTHCONTROL_H__ 22 23 #include "ui_synthcontrol.h" 24 #include "enableplayforwidget.h" 25 26 namespace Ms { 27 28 class Score; 29 30 //--------------------------------------------------------- 31 // SynthControl 32 //--------------------------------------------------------- 33 34 class SynthControl : public QWidget, Ui::SynthControl { 35 Q_OBJECT 36 37 Score* _score; 38 EnablePlayForWidget* enablePlay; 39 bool _dirty { false }; 40 41 virtual void closeEvent(QCloseEvent*); 42 virtual void showEvent(QShowEvent*); 43 virtual bool eventFilter(QObject*, QEvent*); 44 virtual void keyPressEvent(QKeyEvent*) override; 45 void updateGui(); 46 void readSettings(); 47 void updateExpressivePatches(); 48 void updateMixer(); 49 void setAllUserBankController(bool val); 50 51 private slots: 52 void gainChanged(double, int); 53 void masterTuningChanged(double); 54 void changeMasterTuning(); 55 void effectAChanged(int); 56 void effectBChanged(int); 57 void loadButtonClicked(); 58 void saveButtonClicked(); 59 void storeButtonClicked(); 60 void recallButtonClicked(); 61 void dynamicsMethodChanged(int); 62 void ccToUseChanged(int); 63 void switchExprButtonClicked(); 64 void switchNonExprButtonClicked(); 65 void resetExprButtonClicked(); 66 void setDirty(); 67 68 signals: 69 void soundFontChanged(); 70 void closed(bool); 71 72 protected: 73 virtual void changeEvent(QEvent *event); retranslate()74 void retranslate() { retranslateUi(this); } 75 76 public slots: 77 void setGain(float); 78 79 public: 80 SynthControl(QWidget* parent); 81 void setMeter(float, float, float, float); 82 void stop(); 83 void setScore(Score* s); 84 void writeSettings(); 85 }; 86 } 87 88 #endif 89 90