1
1
/***************************************************************************
2
* Copyright (C) 2011-2012 by Tomasz Bojczuk *
2
* Copyright (C) 2011-2014 by Tomasz Bojczuk *
3
3
* tomaszbojczuk@gmail.com *
5
5
* This program is free software; you can redistribute it and/or modify *
49
53
void setStatusMessage(QString msg, int time);
50
54
void setStatusMessage(QString msg);
51
55
void setMessageBg (QColor bg);
52
57
/** Returns font size used in status message label in pixels.
53
58
* Its size depends on whole window size and is used for fonts' sizes
54
59
* of others widgets. */
55
60
int getFontSize() {return m_statFontSize; }
56
61
QString statusMessage() { return m_statusText; }
57
62
QWidget *innerWidget;
58
64
/** Returns point of bottomLeft examResults.*/
59
65
QPoint relatedPoint();
80
86
TnoteName *noteName;
81
87
TfingerBoard *guitar;
83
89
TexamView *examResults;
85
QCheckBox *autoRepeatChB, *expertAnswChB;
91
TnootkaLabel *nootLabel; // displays Nootka logo
92
TanimedChBox *autoRepeatChB, *expertAnswChB, *correctChB;
86
93
TpitchView *pitchView;
87
94
TprogressWidget *progress;
90
97
QAction *settingsAct, *levelCreatorAct, *startExamAct, *aboutAct, *analyseAct;
91
98
void clearAfterExam(TexamExecutor::Estate examState = TexamExecutor::e_finished);
100
void updateSize(QSize newS); /** Updates position and sizes of the widgets. */
102
/* Invokes TnoteName::resize(). Also does the same for TexamView (examResults) and TprogressWidget.
103
* Font size is calculated from m_statFontSize + m_extraFontOffset */
104
void setWidgetsFont();
93
106
void resizeEvent(QResizeEvent *event);
94
107
bool event(QEvent *event);
100
113
void restoreMessage();
101
void hintsStateChanged(bool enable);
102
114
void showSupportDialog();
116
/** Checks is score not too width and places pitchView under when it is.
117
* Or opposite - moves pitchView.
118
* Also avoid collision score and note name. */
119
void fixPitchViewPos();
121
/** In first attempt it tries to increase window size if there is screen space in spare.
122
* If not, Invokes TnoteName::resize() with smallest font size to decrease it.
123
* Also does the same for TexamView (examResults) and TprogressWidget */
124
void fixNoteNameSize();
126
/** This slot is invoked when clef is changed by clicking score.
127
* It adjust ambitus to score possibilities if clef is differ than default
128
* or to instrument scale if clef backs to default */
129
void adjustAmbitus();
107
QString m_statusText, m_prevMsg;
133
TroundedLabel *m_statLab;
134
QString m_statusText, m_prevMsg;
108
136
/** Keeps true when statusMesage is locked by temporary message
109
137
* and stops any status messages in this time.*/
111
QColor m_prevBg, m_curBG;
114
QCheckBox *m_hintsChB;
115
/** Keeps true when Dialog windows is opened, to avoid opening another file. */
116
bool m_levelCreatorExist;
139
QColor m_prevBg, m_curBG;
140
QPixmap m_bgPixmap, m_rosettePixmap;
141
int m_statFontSize, m_extraFontOffset;
142
bool m_levelCreatorExist; /** Keeps true when Dialog windows is opened, to avoid opening another file. */
145
QWidget *m_pitchContainer;
146
QVBoxLayout *m_rightLay, *m_scoreLay;
119
149
void createActions();
120
/** it sets icon and status text in startExamAct. */
121
void setStartExamActParams();
122
/** Updates position and sizes of the widgets. */
150
void setStartExamActParams(); /** it sets icon and status text in startExamAct. */