1
//---------------------------------------------------------------------------------------
2
// LenMus Phonascus: The teacher of music
3
// Copyright (c) 2002-2012 LenMus project
5
// This program is free software; you can redistribute it and/or modify it under the
6
// terms of the GNU General Public License as published by the Free Software Foundation,
7
// either version 3 of the License, or (at your option) any later version.
9
// This program is distributed in the hope that it will be useful, but WITHOUT ANY
10
// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
11
// PARTICULAR PURPOSE. See the GNU General Public License for more details.
13
// You should have received a copy of the GNU General Public License along with this
14
// program. If not, see <http://www.gnu.org/licenses/>.
16
// For any comment, suggestion or feature request, please contact the manager of
17
// the project at cecilios@users.sourceforge.net
19
//---------------------------------------------------------------------------------------
21
#ifndef __LENMUS_TONALITY_CONSTRAINS_H__ //to avoid nested includes
22
#define __LENMUS_TONALITY_CONSTRAINS_H__
25
#include "lenmus_standard_header.h"
26
#include "lenmus_generators.h"
27
#include "lenmus_constrains.h"
30
#include <wx/wxprec.h>
37
class TonalityConstrains : public ExerciseOptions
40
TonalityConstrains(wxString sSection, ApplicationScope& appScope);
41
~TonalityConstrains() {}
43
inline KeyConstrains* GetKeyConstrains() { return &m_oValidKeys; }
45
inline bool UseMajorMinorButtons() { return m_fUseMajorMinorButtons; }
47
inline void UseMajorMinorButtons(bool fValue) { m_fUseMajorMinorButtons = fValue; }
49
inline bool IsValidKey(EKeySignature nKey) {
50
return m_oValidKeys.IsValid(nKey);
53
inline void SetSection(wxString sSection) {
54
m_sSection = sSection;
63
bool m_fUseMajorMinorButtons;
64
KeyConstrains m_oValidKeys; //allowed key signatures
70
#endif // __LENMUS_TONALITY_CONSTRAINS_H__