QmlJSDebugger: Renamed "execution paused" to "animation paused"

The latter better describes what is paused, since expressions are
actually still executed.

Suggested by Kai.
This commit is contained in:
Thorbjørn Lindeijer
2011-03-22 10:37:14 +01:00
parent 0a813cd67c
commit a8bf2ba5e3
16 changed files with 52 additions and 52 deletions

View File

@@ -195,7 +195,7 @@ void QmlToolBar::setAnimationSpeed(qreal slowDownFactor)
m_emitSignals = true; m_emitSignals = true;
} }
void QmlToolBar::setExecutionPaused(bool paused) void QmlToolBar::setAnimationPaused(bool paused)
{ {
if (m_paused == paused) if (m_paused == paused)
return; return;
@@ -240,7 +240,7 @@ void QmlToolBar::setColorBoxColor(const QColor &color)
void QmlToolBar::activatePlayOnClick() void QmlToolBar::activatePlayOnClick()
{ {
m_paused = !m_paused; m_paused = !m_paused;
emit executionPausedChanged(m_paused); emit animationPausedChanged(m_paused);
updatePlayAction(); updatePlayAction();
} }

View File

@@ -62,11 +62,11 @@ public slots:
void activateZoom(); void activateZoom();
void setAnimationSpeed(qreal slowDownFactor); void setAnimationSpeed(qreal slowDownFactor);
void setExecutionPaused(bool paused); void setAnimationPaused(bool paused);
signals: signals:
void animationSpeedChanged(qreal factor); void animationSpeedChanged(qreal factor);
void executionPausedChanged(bool paused); void animationPausedChanged(bool paused);
void designModeBehaviorChanged(bool inDesignMode); void designModeBehaviorChanged(bool inDesignMode);
void colorPickerSelected(); void colorPickerSelected();

View File

@@ -66,7 +66,7 @@ public:
void setDesignModeBehavior(bool inDesignMode); void setDesignModeBehavior(bool inDesignMode);
void setCurrentObjects(QList<QObject*> items); void setCurrentObjects(QList<QObject*> items);
void setAnimationSpeed(qreal slowDownFactor); void setAnimationSpeed(qreal slowDownFactor);
void setExecutionPaused(bool paused); void setAnimationPaused(bool paused);
void setCurrentTool(QmlJSDebugger::Constants::DesignTool toolId); void setCurrentTool(QmlJSDebugger::Constants::DesignTool toolId);
void reloaded(); void reloaded();
void setShowAppOnTop(bool showAppOnTop); void setShowAppOnTop(bool showAppOnTop);

View File

@@ -74,7 +74,7 @@ public Q_SLOTS:
void setShowAppOnTop(bool appOnTop); void setShowAppOnTop(bool appOnTop);
void setAnimationSpeed(qreal factor); void setAnimationSpeed(qreal factor);
void setExecutionPaused(bool paused); void setAnimationPaused(bool paused);
void setObserverContext(int contextIndex); void setObserverContext(int contextIndex);
@@ -89,7 +89,7 @@ Q_SIGNALS:
void selectedColorChanged(const QColor &color); void selectedColorChanged(const QColor &color);
void animationSpeedChanged(qreal factor); void animationSpeedChanged(qreal factor);
void executionPausedChanged(bool paused); void animationPausedChanged(bool paused);
void inspectorContextCleared(); void inspectorContextCleared();
void inspectorContextPushed(const QString &contextTitle); void inspectorContextPushed(const QString &contextTitle);
@@ -111,7 +111,7 @@ protected:
private slots: private slots:
void animationSpeedChangeRequested(qreal factor); void animationSpeedChangeRequested(qreal factor);
void executionPausedChangeRequested(bool paused); void animationPausedChangeRequested(bool paused);
private: private:
Q_DISABLE_COPY(QDeclarativeViewObserver) Q_DISABLE_COPY(QDeclarativeViewObserver)

View File

@@ -49,7 +49,7 @@ class ObserverProtocol : public QObject
public: public:
enum Message { enum Message {
AnimationSpeedChanged = 0, AnimationSpeedChanged = 0,
ExecutionPausedChanged = 19, // highest value AnimationPausedChanged = 19, // highest value
ChangeTool = 1, ChangeTool = 1,
ClearComponentCache = 2, ClearComponentCache = 2,
ColorChanged = 3, ColorChanged = 3,
@@ -62,7 +62,7 @@ public:
Reload = 10, Reload = 10,
Reloaded = 11, Reloaded = 11,
SetAnimationSpeed = 12, SetAnimationSpeed = 12,
SetExecutionPaused = 18, SetAnimationPaused = 18,
SetContextPathIdx = 13, SetContextPathIdx = 13,
SetCurrentObjects = 14, SetCurrentObjects = 14,
SetDesignMode = 15, SetDesignMode = 15,

View File

@@ -100,7 +100,7 @@ void QDeclarativeObserverService::messageReceived(const QByteArray &message)
emit animationSpeedChangeRequested(speed); emit animationSpeedChangeRequested(speed);
break; break;
} }
case ObserverProtocol::SetExecutionPaused: { case ObserverProtocol::SetAnimationPaused: {
bool paused; bool paused;
ds >> paused; ds >> paused;
emit executionPauseChangeRequested(paused); emit executionPauseChangeRequested(paused);
@@ -239,12 +239,12 @@ void QDeclarativeObserverService::setAnimationSpeed(qreal slowDownFactor)
sendMessage(message); sendMessage(message);
} }
void QDeclarativeObserverService::setExecutionPaused(bool paused) void QDeclarativeObserverService::setAnimationPaused(bool paused)
{ {
QByteArray message; QByteArray message;
QDataStream ds(&message, QIODevice::WriteOnly); QDataStream ds(&message, QIODevice::WriteOnly);
ds << ObserverProtocol::ExecutionPausedChanged ds << ObserverProtocol::AnimationPausedChanged
<< paused; << paused;
sendMessage(message); sendMessage(message);

View File

@@ -105,7 +105,7 @@ QDeclarativeViewObserverPrivate::QDeclarativeViewObserverPrivate(QDeclarativeVie
q(q), q(q),
designModeBehavior(false), designModeBehavior(false),
showAppOnTop(false), showAppOnTop(false),
executionPaused(false), animationPaused(false),
slowDownFactor(1.0f), slowDownFactor(1.0f),
toolBox(0) toolBox(0)
{ {
@@ -149,7 +149,7 @@ QDeclarativeViewObserver::QDeclarativeViewObserver(QDeclarativeView *view, QObje
connect(data->debugService, SIGNAL(animationSpeedChangeRequested(qreal)), connect(data->debugService, SIGNAL(animationSpeedChangeRequested(qreal)),
SLOT(animationSpeedChangeRequested(qreal))); SLOT(animationSpeedChangeRequested(qreal)));
connect(data->debugService, SIGNAL(executionPauseChangeRequested(bool)), connect(data->debugService, SIGNAL(executionPauseChangeRequested(bool)),
SLOT(executionPausedChangeRequested(bool))); SLOT(animationPausedChangeRequested(bool)));
connect(data->debugService, SIGNAL(colorPickerToolRequested()), connect(data->debugService, SIGNAL(colorPickerToolRequested()),
data.data(), SLOT(_q_changeToColorPickerTool())); data.data(), SLOT(_q_changeToColorPickerTool()));
connect(data->debugService, SIGNAL(selectMarqueeToolRequested()), connect(data->debugService, SIGNAL(selectMarqueeToolRequested()),
@@ -386,7 +386,7 @@ bool QDeclarativeViewObserver::keyReleaseEvent(QKeyEvent *event)
data->subcomponentEditorTool->setCurrentItem(data->selectedItems().first()); data->subcomponentEditorTool->setCurrentItem(data->selectedItems().first());
break; break;
case Qt::Key_Space: case Qt::Key_Space:
setExecutionPaused(!data->executionPaused); setAnimationPaused(!data->animationPaused);
break; break;
default: default:
break; break;
@@ -765,13 +765,13 @@ void QDeclarativeViewObserver::setAnimationSpeed(qreal slowDownFactor)
data->debugService->setAnimationSpeed(slowDownFactor); data->debugService->setAnimationSpeed(slowDownFactor);
} }
void QDeclarativeViewObserver::setExecutionPaused(bool paused) void QDeclarativeViewObserver::setAnimationPaused(bool paused)
{ {
if (data->executionPaused == paused) if (data->animationPaused == paused)
return; return;
executionPausedChangeRequested(paused); animationPausedChangeRequested(paused);
data->debugService->setExecutionPaused(paused); data->debugService->setAnimationPaused(paused);
} }
void QDeclarativeViewObserver::animationSpeedChangeRequested(qreal factor) void QDeclarativeViewObserver::animationSpeedChangeRequested(qreal factor)
@@ -781,15 +781,15 @@ void QDeclarativeViewObserver::animationSpeedChangeRequested(qreal factor)
emit animationSpeedChanged(factor); emit animationSpeedChanged(factor);
} }
const float effectiveFactor = data->executionPaused ? 0 : factor; const float effectiveFactor = data->animationPaused ? 0 : factor;
QDeclarativeDebugHelper::setAnimationSlowDownFactor(effectiveFactor); QDeclarativeDebugHelper::setAnimationSlowDownFactor(effectiveFactor);
} }
void QDeclarativeViewObserver::executionPausedChangeRequested(bool paused) void QDeclarativeViewObserver::animationPausedChangeRequested(bool paused)
{ {
if (data->executionPaused != paused) { if (data->animationPaused != paused) {
data->executionPaused = paused; data->animationPaused = paused;
emit executionPausedChanged(paused); emit animationPausedChanged(paused);
} }
const float effectiveFactor = paused ? 0 : data->slowDownFactor; const float effectiveFactor = paused ? 0 : data->slowDownFactor;
@@ -918,7 +918,7 @@ void QDeclarativeViewObserverPrivate::createToolBox()
QObject::connect(toolBar, SIGNAL(designModeBehaviorChanged(bool)), QObject::connect(toolBar, SIGNAL(designModeBehaviorChanged(bool)),
q, SLOT(setDesignModeBehavior(bool))); q, SLOT(setDesignModeBehavior(bool)));
QObject::connect(toolBar, SIGNAL(animationSpeedChanged(qreal)), q, SLOT(setAnimationSpeed(qreal))); QObject::connect(toolBar, SIGNAL(animationSpeedChanged(qreal)), q, SLOT(setAnimationSpeed(qreal)));
QObject::connect(toolBar, SIGNAL(executionPausedChanged(bool)), q, SLOT(setExecutionPaused(bool))); QObject::connect(toolBar, SIGNAL(animationPausedChanged(bool)), q, SLOT(setAnimationPaused(bool)));
QObject::connect(toolBar, SIGNAL(colorPickerSelected()), this, SLOT(_q_changeToColorPickerTool())); QObject::connect(toolBar, SIGNAL(colorPickerSelected()), this, SLOT(_q_changeToColorPickerTool()));
QObject::connect(toolBar, SIGNAL(zoomToolSelected()), this, SLOT(_q_changeToZoomTool())); QObject::connect(toolBar, SIGNAL(zoomToolSelected()), this, SLOT(_q_changeToZoomTool()));
QObject::connect(toolBar, SIGNAL(selectToolSelected()), this, SLOT(_q_changeToSingleSelectTool())); QObject::connect(toolBar, SIGNAL(selectToolSelected()), this, SLOT(_q_changeToSingleSelectTool()));
@@ -929,7 +929,7 @@ void QDeclarativeViewObserverPrivate::createToolBox()
this, SLOT(_q_applyChangesFromClient())); this, SLOT(_q_applyChangesFromClient()));
QObject::connect(q, SIGNAL(animationSpeedChanged(qreal)), toolBar, SLOT(setAnimationSpeed(qreal))); QObject::connect(q, SIGNAL(animationSpeedChanged(qreal)), toolBar, SLOT(setAnimationSpeed(qreal)));
QObject::connect(q, SIGNAL(executionPausedChanged(bool)), toolBar, SLOT(setExecutionPaused(bool))); QObject::connect(q, SIGNAL(animationPausedChanged(bool)), toolBar, SLOT(setAnimationPaused(bool)));
QObject::connect(q, SIGNAL(selectToolActivated()), toolBar, SLOT(activateSelectTool())); QObject::connect(q, SIGNAL(selectToolActivated()), toolBar, SLOT(activateSelectTool()));

View File

@@ -88,7 +88,7 @@ public:
bool designModeBehavior; bool designModeBehavior;
bool showAppOnTop; bool showAppOnTop;
bool executionPaused; bool animationPaused;
qreal slowDownFactor; qreal slowDownFactor;
ToolBox *toolBox; ToolBox *toolBox;

View File

@@ -787,7 +787,7 @@ void QDeclarativeViewer::createMenu()
speedAction->setData(10.0f); speedAction->setData(10.0f);
playSpeedMenuActions->addAction(speedAction); playSpeedMenuActions->addAction(speedAction);
pauseAnimationsAction = playSpeedMenu->addAction(tr("Pause"), observer, SLOT(setExecutionPaused(bool))); pauseAnimationsAction = playSpeedMenu->addAction(tr("Pause"), observer, SLOT(setAnimationPaused(bool)));
pauseAnimationsAction->setCheckable(true); pauseAnimationsAction->setCheckable(true);
pauseAnimationsAction->setShortcut(QKeySequence("Ctrl+.")); pauseAnimationsAction->setShortcut(QKeySequence("Ctrl+."));
@@ -801,7 +801,7 @@ void QDeclarativeViewer::createMenu()
playSpeedAction->setMenu(playSpeedMenu); playSpeedAction->setMenu(playSpeedMenu);
connect(observer, SIGNAL(animationSpeedChanged(qreal)), SLOT(animationSpeedChanged(qreal))); connect(observer, SIGNAL(animationSpeedChanged(qreal)), SLOT(animationSpeedChanged(qreal)));
connect(observer, SIGNAL(executionPausedChanged(bool)), pauseAnimationsAction, SLOT(setChecked(bool))); connect(observer, SIGNAL(animationPausedChanged(bool)), pauseAnimationsAction, SLOT(setChecked(bool)));
showWarningsWindow = new QAction(tr("Show Warnings"), this); showWarningsWindow = new QAction(tr("Show Warnings"), this);
showWarningsWindow->setCheckable((true)); showWarningsWindow->setCheckable((true));
@@ -1080,12 +1080,12 @@ void QDeclarativeViewer::toggleRecording()
void QDeclarativeViewer::pauseAnimations() void QDeclarativeViewer::pauseAnimations()
{ {
observer->setExecutionPaused(true); observer->setAnimationPaused(true);
} }
void QDeclarativeViewer::stepAnimations() void QDeclarativeViewer::stepAnimations()
{ {
observer->setExecutionPaused(false); observer->setAnimationPaused(false);
QTimer::singleShot(m_stepSize, this, SLOT(pauseAnimations())); QTimer::singleShot(m_stepSize, this, SLOT(pauseAnimations()));
} }

View File

@@ -154,7 +154,7 @@ void QmlInspectorToolBar::setAnimationSpeed(qreal slowDownFactor)
m_emitSignals = true; m_emitSignals = true;
} }
void QmlInspectorToolBar::setExecutionPaused(bool paused) void QmlInspectorToolBar::setAnimationPaused(bool paused)
{ {
if (m_paused == paused) if (m_paused == paused)
return; return;
@@ -338,7 +338,7 @@ void QmlInspectorToolBar::activateDesignModeOnClick()
void QmlInspectorToolBar::activatePlayOnClick() void QmlInspectorToolBar::activatePlayOnClick()
{ {
m_paused = !m_paused; m_paused = !m_paused;
emit executionPausedChanged(m_paused); emit animationPausedChanged(m_paused);
updatePlayAction(); updatePlayAction();
} }

View File

@@ -87,7 +87,7 @@ public slots:
void activateZoomTool(); void activateZoomTool();
void setAnimationSpeed(qreal slowDownFactor); void setAnimationSpeed(qreal slowDownFactor);
void setExecutionPaused(bool paused); void setAnimationPaused(bool paused);
void setDesignModeBehavior(bool inDesignMode); void setDesignModeBehavior(bool inDesignMode);
void setShowAppOnTop(bool showAppOnTop); void setShowAppOnTop(bool showAppOnTop);
@@ -105,7 +105,7 @@ signals:
void showAppOnTopSelected(bool isChecked); void showAppOnTopSelected(bool isChecked);
void animationSpeedChanged(qreal slowdownFactor); void animationSpeedChanged(qreal slowdownFactor);
void executionPausedChanged(bool paused); void animationPausedChanged(bool paused);
private slots: private slots:
void activateDesignModeOnClick(); void activateDesignModeOnClick();

View File

@@ -86,8 +86,8 @@ void ClientProxy::connectToServer()
SIGNAL(selectMarqueeToolActivated())); SIGNAL(selectMarqueeToolActivated()));
connect(m_observerClient, SIGNAL(animationSpeedChanged(qreal)), connect(m_observerClient, SIGNAL(animationSpeedChanged(qreal)),
SIGNAL(animationSpeedChanged(qreal))); SIGNAL(animationSpeedChanged(qreal)));
connect(m_observerClient, SIGNAL(executionPausedChanged(bool)), connect(m_observerClient, SIGNAL(animationPausedChanged(bool)),
SIGNAL(executionPausedChanged(bool))); SIGNAL(animationPausedChanged(bool)));
connect(m_observerClient, SIGNAL(designModeBehaviorChanged(bool)), connect(m_observerClient, SIGNAL(designModeBehaviorChanged(bool)),
SIGNAL(designModeBehaviorChanged(bool))); SIGNAL(designModeBehaviorChanged(bool)));
connect(m_observerClient, SIGNAL(showAppOnTopChanged(bool)), connect(m_observerClient, SIGNAL(showAppOnTopChanged(bool)),
@@ -553,10 +553,10 @@ void ClientProxy::setAnimationSpeed(qreal slowDownFactor)
m_observerClient->setAnimationSpeed(slowDownFactor); m_observerClient->setAnimationSpeed(slowDownFactor);
} }
void ClientProxy::setExecutionPaused(bool paused) void ClientProxy::setAnimationPaused(bool paused)
{ {
if (isConnected()) if (isConnected())
m_observerClient->setExecutionPaused(paused); m_observerClient->setAnimationPaused(paused);
} }
void ClientProxy::changeToColorPickerTool() void ClientProxy::changeToColorPickerTool()

View File

@@ -107,7 +107,7 @@ signals:
void selectMarqueeToolActivated(); void selectMarqueeToolActivated();
void zoomToolActivated(); void zoomToolActivated();
void animationSpeedChanged(qreal slowDownFactor); void animationSpeedChanged(qreal slowDownFactor);
void executionPausedChanged(bool paused); void animationPausedChanged(bool paused);
void designModeBehaviorChanged(bool inDesignMode); void designModeBehaviorChanged(bool inDesignMode);
void showAppOnTopChanged(bool showAppOnTop); void showAppOnTopChanged(bool showAppOnTop);
void serverReloaded(); void serverReloaded();
@@ -122,7 +122,7 @@ public slots:
void setDesignModeBehavior(bool inDesignMode); void setDesignModeBehavior(bool inDesignMode);
void setAnimationSpeed(qreal slowDownFactor); void setAnimationSpeed(qreal slowDownFactor);
void setExecutionPaused(bool paused); void setAnimationPaused(bool paused);
void changeToColorPickerTool(); void changeToColorPickerTool();
void changeToZoomTool(); void changeToZoomTool();
void changeToSelectTool(); void changeToSelectTool();

View File

@@ -884,8 +884,8 @@ void InspectorUi::connectSignals()
m_toolBar, SLOT(setSelectedColor(QColor))); m_toolBar, SLOT(setSelectedColor(QColor)));
connect(m_clientProxy, SIGNAL(animationSpeedChanged(qreal)), connect(m_clientProxy, SIGNAL(animationSpeedChanged(qreal)),
m_toolBar, SLOT(setAnimationSpeed(qreal))); m_toolBar, SLOT(setAnimationSpeed(qreal)));
connect(m_clientProxy, SIGNAL(executionPausedChanged(bool)), connect(m_clientProxy, SIGNAL(animationPausedChanged(bool)),
m_toolBar, SLOT(setExecutionPaused(bool))); m_toolBar, SLOT(setAnimationPaused(bool)));
connect(m_toolBar, SIGNAL(applyChangesFromQmlFileTriggered(bool)), connect(m_toolBar, SIGNAL(applyChangesFromQmlFileTriggered(bool)),
this, SLOT(setApplyChangesToQmlObserver(bool))); this, SLOT(setApplyChangesToQmlObserver(bool)));
@@ -896,8 +896,8 @@ void InspectorUi::connectSignals()
m_clientProxy, SLOT(reloadQmlViewer())); m_clientProxy, SLOT(reloadQmlViewer()));
connect(m_toolBar, SIGNAL(animationSpeedChanged(qreal)), connect(m_toolBar, SIGNAL(animationSpeedChanged(qreal)),
m_clientProxy, SLOT(setAnimationSpeed(qreal))); m_clientProxy, SLOT(setAnimationSpeed(qreal)));
connect(m_toolBar, SIGNAL(executionPausedChanged(bool)), connect(m_toolBar, SIGNAL(animationPausedChanged(bool)),
m_clientProxy, SLOT(setExecutionPaused(bool))); m_clientProxy, SLOT(setAnimationPaused(bool)));
connect(m_toolBar, SIGNAL(colorPickerSelected()), connect(m_toolBar, SIGNAL(colorPickerSelected()),
m_clientProxy, SLOT(changeToColorPickerTool())); m_clientProxy, SLOT(changeToColorPickerTool()));
connect(m_toolBar, SIGNAL(zoomToolSelected()), connect(m_toolBar, SIGNAL(zoomToolSelected()),

View File

@@ -114,13 +114,13 @@ void QmlJSObserverClient::messageReceived(const QByteArray &message)
emit animationSpeedChanged(slowDownFactor); emit animationSpeedChanged(slowDownFactor);
break; break;
} }
case ObserverProtocol::ExecutionPausedChanged: { case ObserverProtocol::AnimationPausedChanged: {
bool paused; bool paused;
ds >> paused; ds >> paused;
log(LogReceive, type, paused ? QLatin1String("true") : QLatin1String("false")); log(LogReceive, type, paused ? QLatin1String("true") : QLatin1String("false"));
emit executionPausedChanged(paused); emit animationPausedChanged(paused);
break; break;
} }
case ObserverProtocol::SetDesignMode: { case ObserverProtocol::SetDesignMode: {
@@ -318,7 +318,7 @@ void QmlJSObserverClient::setAnimationSpeed(qreal slowDownFactor)
sendMessage(message); sendMessage(message);
} }
void QmlJSObserverClient::setExecutionPaused(bool paused) void QmlJSObserverClient::setAnimationPaused(bool paused)
{ {
if (!m_connection || !m_connection->isConnected()) if (!m_connection || !m_connection->isConnected())
return; return;
@@ -326,7 +326,7 @@ void QmlJSObserverClient::setExecutionPaused(bool paused)
QByteArray message; QByteArray message;
QDataStream ds(&message, QIODevice::WriteOnly); QDataStream ds(&message, QIODevice::WriteOnly);
ObserverProtocol::Message cmd = ObserverProtocol::SetExecutionPaused; ObserverProtocol::Message cmd = ObserverProtocol::SetAnimationPaused;
ds << cmd ds << cmd
<< paused; << paused;

View File

@@ -60,7 +60,7 @@ public:
void reloadViewer(); void reloadViewer();
void setDesignModeBehavior(bool inDesignMode); void setDesignModeBehavior(bool inDesignMode);
void setAnimationSpeed(qreal slowDownFactor); void setAnimationSpeed(qreal slowDownFactor);
void setExecutionPaused(bool paused); void setAnimationPaused(bool paused);
void changeToColorPickerTool(); void changeToColorPickerTool();
void changeToSelectTool(); void changeToSelectTool();
void changeToSelectMarqueeTool(); void changeToSelectMarqueeTool();
@@ -93,7 +93,7 @@ signals:
void selectMarqueeToolActivated(); void selectMarqueeToolActivated();
void zoomToolActivated(); void zoomToolActivated();
void animationSpeedChanged(qreal slowdownFactor); void animationSpeedChanged(qreal slowdownFactor);
void executionPausedChanged(bool paused); void animationPausedChanged(bool paused);
void designModeBehaviorChanged(bool inDesignMode); void designModeBehaviorChanged(bool inDesignMode);
void showAppOnTopChanged(bool showAppOnTop); void showAppOnTopChanged(bool showAppOnTop);
void reloaded(); // the server has reloadetd he document void reloaded(); // the server has reloadetd he document