QObject(parent)
{
m_date = date;
+ m_lastevent = QDateTime::currentDateTime();
m_homeTeam = hometeam;
m_awayTeam = awayteam;
return i;
}
-void Match::setScore(int home, int away)
+void Match::setScore(int home, int away, bool notifyWatchers)
{
bool changed = false;
int oldhomescore = m_homeScore;
}
if (changed) {
- emit scoreChanged(oldhomescore, oldawayscore,
- home, away);
+ m_lastevent = QDateTime::currentDateTime();
+ if(notifyWatchers) {
+ emit scoreChanged(oldhomescore, oldawayscore,
+ home, away);
+ }
}
}
-void Match::setState(MatchState state) {
+void Match::setState(MatchState state, bool notifyWatchers) {
if (m_state != state) {
m_state = state;
- emit stateChanged(state);
+ m_lastevent = QDateTime::currentDateTime();
+ if (notifyWatchers) {
+ emit stateChanged(state);
+ }
}
}