QML Inspector: Renamed Design Mode to Observer Mode

This commit is contained in:
Lasse Holmstedt
2010-08-24 16:30:24 +02:00
parent fe55ba5cd2
commit 290835300d
8 changed files with 14 additions and 14 deletions

View File

@@ -8,11 +8,9 @@
<file>images/pause.png</file> <file>images/pause.png</file>
<file>images/from-qml.png</file> <file>images/from-qml.png</file>
<file>images/to-qml.png</file> <file>images/to-qml.png</file>
<file>images/designmode.png</file>
<file>images/color-picker-hicontrast.png</file> <file>images/color-picker-hicontrast.png</file>
<file>images/zoom.png</file> <file>images/zoom.png</file>
<file>images/color-picker-24.png</file> <file>images/color-picker-24.png</file>
<file>images/designmode-24.png</file>
<file>images/from-qml-24.png</file> <file>images/from-qml-24.png</file>
<file>images/pause-24.png</file> <file>images/pause-24.png</file>
<file>images/play-24.png</file> <file>images/play-24.png</file>
@@ -20,5 +18,7 @@
<file>images/zoom-24.png</file> <file>images/zoom-24.png</file>
<file>images/select-24.png</file> <file>images/select-24.png</file>
<file>images/select-marquee-24.png</file> <file>images/select-marquee-24.png</file>
<file>images/observermode.png</file>
<file>images/observermode-24.png</file>
</qresource> </qresource>
</RCC> </RCC>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 3.5 KiB

View File

@@ -15,7 +15,7 @@ QmlToolbar::QmlToolbar(QWidget *parent) :
m_isRunning(false), m_isRunning(false),
ui(new Ui) ui(new Ui)
{ {
ui->designmode = new QAction(QIcon(QLatin1String(":/qml/images/designmode-24.png")), tr("Design Mode"), this); ui->designmode = new QAction(QIcon(QLatin1String(":/qml/images/observermode-24.png")), tr("Observer Mode"), this);
ui->play = new QAction(QIcon(QLatin1String(":/qml/images/play-24.png")), tr("Play"), this); ui->play = new QAction(QIcon(QLatin1String(":/qml/images/play-24.png")), tr("Play"), this);
ui->pause = new QAction(QIcon(QLatin1String(":/qml/images/pause-24.png")), tr("Pause"), this); ui->pause = new QAction(QIcon(QLatin1String(":/qml/images/pause-24.png")), tr("Pause"), this);
ui->select = new QAction(QIcon(QLatin1String(":/qml/images/select-24.png")), tr("Select"), this); ui->select = new QAction(QIcon(QLatin1String(":/qml/images/select-24.png")), tr("Select"), this);

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 3.5 KiB

View File

@@ -58,7 +58,7 @@ static QToolButton *createToolButton(QAction *action)
QmlInspectorToolbar::QmlInspectorToolbar(QObject *parent) : QmlInspectorToolbar::QmlInspectorToolbar(QObject *parent) :
QObject(parent), QObject(parent),
m_designmodeAction(0), m_observerModeAction(0),
m_reloadAction(0), m_reloadAction(0),
m_playAction(0), m_playAction(0),
m_selectAction(0), m_selectAction(0),
@@ -88,7 +88,7 @@ QmlInspectorToolbar::QmlInspectorToolbar(QObject *parent) :
void QmlInspectorToolbar::setEnabled(bool value) void QmlInspectorToolbar::setEnabled(bool value)
{ {
m_designmodeAction->setEnabled(value); m_observerModeAction->setEnabled(value);
//m_toQmlAction->setEnabled(value); //m_toQmlAction->setEnabled(value);
m_fromQmlAction->setEnabled(value); m_fromQmlAction->setEnabled(value);
@@ -107,7 +107,7 @@ void QmlInspectorToolbar::enable()
{ {
setEnabled(true); setEnabled(true);
m_emitSignals = false; m_emitSignals = false;
m_designmodeAction->setChecked(false); m_observerModeAction->setChecked(false);
setAnimationSpeed(1.0f); setAnimationSpeed(1.0f);
activateDesignModeOnClick(); activateDesignModeOnClick();
m_emitSignals = true; m_emitSignals = true;
@@ -176,7 +176,7 @@ void QmlInspectorToolbar::setAnimationSpeed(qreal slowdownFactor)
void QmlInspectorToolbar::setDesignModeBehavior(bool inDesignMode) void QmlInspectorToolbar::setDesignModeBehavior(bool inDesignMode)
{ {
m_emitSignals = false; m_emitSignals = false;
m_designmodeAction->setChecked(inDesignMode); m_observerModeAction->setChecked(inDesignMode);
activateDesignModeOnClick(); activateDesignModeOnClick();
m_emitSignals = true; m_emitSignals = true;
} }
@@ -187,7 +187,7 @@ void QmlInspectorToolbar::createActions(const Core::Context &context)
Core::ActionManager *am = core->actionManager(); Core::ActionManager *am = core->actionManager();
m_fromQmlAction = new QAction(QIcon(QLatin1String(":/qml/images/from-qml-small.png")), tr("Apply Changes to Document"), this); m_fromQmlAction = new QAction(QIcon(QLatin1String(":/qml/images/from-qml-small.png")), tr("Apply Changes to Document"), this);
m_designmodeAction = new QAction(QIcon(QLatin1String(":/qml/images/designmode.png")), tr("Design Mode"), this); m_observerModeAction = new QAction(QIcon(QLatin1String(":/qml/images/observermode.png")), tr("Observer Mode"), this);
m_reloadAction = new QAction(QIcon(QLatin1String(":/qml/images/reload.png")), tr("Reload"), this); m_reloadAction = new QAction(QIcon(QLatin1String(":/qml/images/reload.png")), tr("Reload"), this);
m_playAction = new QAction(m_playIcon, tr("Play animations"), this); m_playAction = new QAction(m_playIcon, tr("Play animations"), this);
@@ -197,8 +197,8 @@ void QmlInspectorToolbar::createActions(const Core::Context &context)
m_colorPickerAction = new QAction(QIcon(QLatin1String(":/qml/images/color-picker-small.png")), tr("Color Picker"), this); m_colorPickerAction = new QAction(QIcon(QLatin1String(":/qml/images/color-picker-small.png")), tr("Color Picker"), this);
m_toQmlAction = new QAction(QIcon(QLatin1String(":/qml/images/to-qml-small.png")), tr("Live Preview Changes in QML Viewer"), this); m_toQmlAction = new QAction(QIcon(QLatin1String(":/qml/images/to-qml-small.png")), tr("Live Preview Changes in QML Viewer"), this);
m_designmodeAction->setCheckable(true); m_observerModeAction->setCheckable(true);
m_designmodeAction->setChecked(false); m_observerModeAction->setChecked(false);
m_selectAction->setCheckable(true); m_selectAction->setCheckable(true);
m_selectMarqueeAction->setCheckable(true); m_selectMarqueeAction->setCheckable(true);
m_zoomAction->setCheckable(true); m_zoomAction->setCheckable(true);
@@ -207,7 +207,7 @@ void QmlInspectorToolbar::createActions(const Core::Context &context)
m_fromQmlAction->setCheckable(true); m_fromQmlAction->setCheckable(true);
m_fromQmlAction->setChecked(true); m_fromQmlAction->setChecked(true);
am->registerAction(m_designmodeAction, QmlJSInspector::Constants::DESIGNMODE_ACTION, context); am->registerAction(m_observerModeAction, QmlJSInspector::Constants::DESIGNMODE_ACTION, context);
am->registerAction(m_reloadAction, QmlJSInspector::Constants::RELOAD_ACTION, context); am->registerAction(m_reloadAction, QmlJSInspector::Constants::RELOAD_ACTION, context);
am->registerAction(m_playAction, QmlJSInspector::Constants::PLAY_ACTION, context); am->registerAction(m_playAction, QmlJSInspector::Constants::PLAY_ACTION, context);
am->registerAction(m_selectAction, QmlJSInspector::Constants::SELECT_ACTION, context); am->registerAction(m_selectAction, QmlJSInspector::Constants::SELECT_ACTION, context);
@@ -288,7 +288,7 @@ void QmlInspectorToolbar::createActions(const Core::Context &context)
setEnabled(false); setEnabled(false);
connect(m_designmodeAction, SIGNAL(triggered()), SLOT(activateDesignModeOnClick())); connect(m_observerModeAction, SIGNAL(triggered()), SLOT(activateDesignModeOnClick()));
connect(m_reloadAction, SIGNAL(triggered()), SIGNAL(reloadSelected())); connect(m_reloadAction, SIGNAL(triggered()), SIGNAL(reloadSelected()));
connect(m_colorPickerAction, SIGNAL(triggered()), SLOT(activateColorPickerOnClick())); connect(m_colorPickerAction, SIGNAL(triggered()), SLOT(activateColorPickerOnClick()));
@@ -341,7 +341,7 @@ void QmlInspectorToolbar::changeToTenthAnimSpeed()
void QmlInspectorToolbar::activateDesignModeOnClick() void QmlInspectorToolbar::activateDesignModeOnClick()
{ {
bool checked = m_designmodeAction->isChecked(); bool checked = m_observerModeAction->isChecked();
m_reloadAction->setEnabled(true); m_reloadAction->setEnabled(true);
m_playAction->setEnabled(checked); m_playAction->setEnabled(checked);

View File

@@ -118,7 +118,7 @@ private slots:
void updatePauseAction(); void updatePauseAction();
private: private:
QAction *m_designmodeAction; QAction *m_observerModeAction;
QAction *m_reloadAction; QAction *m_reloadAction;
QAction *m_playAction; QAction *m_playAction;
QAction *m_selectAction; QAction *m_selectAction;