From 608a114a0519eee2ddff243b9e4cc289e9b58a7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oliver=20Gro=C3=9F?= Date: Wed, 11 Apr 2012 15:06:51 +0200 Subject: [PATCH] [qcross] save paused state to savegames --- qcross/ccrossfieldwidget.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/qcross/ccrossfieldwidget.cpp b/qcross/ccrossfieldwidget.cpp index 23493be..3b72020 100644 --- a/qcross/ccrossfieldwidget.cpp +++ b/qcross/ccrossfieldwidget.cpp @@ -153,6 +153,10 @@ namespace qcross { updateTimeDisplay(); emit timeChanged(m_Time); + // paused + stream >> m_Paused; qDebug("m_Paused = %i", int(m_Paused)); + setDisabled(m_Paused); + // messages int messageCount; stream >> messageCount; qDebug("messageCount = %i", messageCount); @@ -193,6 +197,9 @@ namespace qcross { // time(out) stream << m_Time; + // paused state + stream << m_Paused; + // messages // actually we should dump the message queue // for now only dump last displayed @@ -469,14 +476,12 @@ namespace qcross { } void CCrossFieldWidget::paintEvent(QPaintEvent *) { - QPainter painter(this); - if (!m_Picture) { -/* painter.drawText(originX, originY, m_BoxSize, m_BoxSize, - Qt::AlignVCenter | Qt::AlignCenter, QString::number(m_Picture->rowNumbers(i)[m_Picture->rowNumbers(i).size() - j]));*/ return; } + QPainter painter(this); + int originX = m_OffsetX + m_HeaderWidth; int originY = m_OffsetY + m_HeaderHeight;