1 //=============================================================================
2 //  MuseScore
3 //  Music Composition & Notation
4 //
5 //  Copyright (C) 2019 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 __WORKSPACECOMBOBOX_H__
21 #define __WORKSPACECOMBOBOX_H__
22 
23 namespace Ms {
24 
25 class MuseScore;
26 
27 //---------------------------------------------------------
28 //   WorkspaceComboBox
29 //---------------------------------------------------------
30 
31 class WorkspaceComboBox : public QComboBox {
32       Q_OBJECT
33 
34       MuseScore* _mscore;
35 
36       bool blockUpdateWorkspaces = false;
37 
38       void changeEvent(QEvent* event) override;
39 
40    private slots:
41       void workspaceSelected(int idx);
42       void updateWorkspaces();
43 
44    public:
45       WorkspaceComboBox(MuseScore*, QWidget* parent = nullptr);
46 
47       void retranslate();
48       };
49 
50 } // namespace Ms
51 
52 #endif
53