forked from qt-creator/qt-creator
QmlJSInspector: Fix naming of QmlInspectorToolBar
Add a 'Js' to make it align with the other classes of the plugin. Change-Id: If9514d7ed3a2244a60e7ebc72256ddfc25695c68 Reviewed-on: http://codereview.qt.nokia.com/817 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Christiaan Janssen <christiaan.janssen@nokia.com>
This commit is contained in:
committed by
Christiaan Janssen
parent
3e02f2a4d9
commit
bff9e2618b
@@ -32,7 +32,7 @@
|
||||
|
||||
#include "qmljsinspectorconstants.h"
|
||||
#include "qmljsinspector.h"
|
||||
#include "qmlinspectortoolbar.h"
|
||||
#include "qmljsinspectortoolbar.h"
|
||||
#include "qmljsclientproxy.h"
|
||||
#include "qmljslivetextpreview.h"
|
||||
#include "qmljsprivateapi.h"
|
||||
@@ -157,7 +157,7 @@ InspectorUi::InspectorUi(QObject *parent)
|
||||
, m_cursorPositionChangedExternally(false)
|
||||
{
|
||||
m_instance = this;
|
||||
m_toolBar = new QmlInspectorToolBar(this);
|
||||
m_toolBar = new QmlJsInspectorToolBar(this);
|
||||
}
|
||||
|
||||
InspectorUi::~InspectorUi()
|
||||
|
||||
@@ -66,7 +66,7 @@ class ModelManagerInterface;
|
||||
namespace QmlJSInspector {
|
||||
namespace Internal {
|
||||
|
||||
class QmlInspectorToolBar;
|
||||
class QmlJsInspectorToolBar;
|
||||
class QmlJSPropertyInspector;
|
||||
class ClientProxy;
|
||||
class InspectorSettings;
|
||||
@@ -153,7 +153,7 @@ private:
|
||||
|
||||
private:
|
||||
bool m_listeningToEditorManager;
|
||||
QmlInspectorToolBar *m_toolBar;
|
||||
QmlJsInspectorToolBar *m_toolBar;
|
||||
ContextCrumblePath *m_crumblePath;
|
||||
QLineEdit *m_filterExp;
|
||||
QmlJSPropertyInspector *m_propertyInspector;
|
||||
|
||||
@@ -13,7 +13,7 @@ qmljsinspectorconstants.h \
|
||||
qmljsinspectorplugin.h \
|
||||
qmljsclientproxy.h \
|
||||
qmljsinspector.h \
|
||||
qmlinspectortoolbar.h \
|
||||
qmljsinspectortoolbar.h \
|
||||
qmljslivetextpreview.h \
|
||||
qmljstoolbarcolorbox.h \
|
||||
qmljsinspectorclient.h \
|
||||
@@ -25,7 +25,7 @@ SOURCES += \
|
||||
qmljsinspectorplugin.cpp \
|
||||
qmljsclientproxy.cpp \
|
||||
qmljsinspector.cpp \
|
||||
qmlinspectortoolbar.cpp \
|
||||
qmljsinspectortoolbar.cpp \
|
||||
qmljslivetextpreview.cpp \
|
||||
qmljstoolbarcolorbox.cpp \
|
||||
qmljsinspectorclient.cpp \
|
||||
|
||||
@@ -30,26 +30,23 @@
|
||||
**
|
||||
**************************************************************************/
|
||||
|
||||
#include "qmljsinspectorconstants.h"
|
||||
#include "qmljsinspectorplugin.h"
|
||||
#include "qmljsinspector.h"
|
||||
#include "qmljsclientproxy.h"
|
||||
#include "qmlinspectortoolbar.h"
|
||||
|
||||
#include "qmljsclientproxy.h"
|
||||
#include "qmljsinspector.h"
|
||||
#include "qmljsinspectorconstants.h"
|
||||
#include "qmljsinspectortoolbar.h"
|
||||
|
||||
#include <coreplugin/coreconstants.h>
|
||||
#include <coreplugin/icontext.h>
|
||||
#include <coreplugin/icore.h>
|
||||
#include <coreplugin/imode.h>
|
||||
#include <coreplugin/modemanager.h>
|
||||
#include <debugger/debuggerconstants.h>
|
||||
#include <debugger/qml/qmladapter.h>
|
||||
|
||||
#include <qmlprojectmanager/qmlproject.h>
|
||||
#include <qmljseditor/qmljseditorconstants.h>
|
||||
|
||||
#include <extensionsystem/pluginmanager.h>
|
||||
|
||||
#include <coreplugin/icore.h>
|
||||
#include <coreplugin/icontext.h>
|
||||
#include <coreplugin/imode.h>
|
||||
#include <coreplugin/coreconstants.h>
|
||||
#include <coreplugin/modemanager.h>
|
||||
|
||||
#include <qmljseditor/qmljseditorconstants.h>
|
||||
#include <qmlprojectmanager/qmlproject.h>
|
||||
#include <utils/qtcassert.h>
|
||||
|
||||
#include <QtCore/QStringList>
|
||||
|
||||
@@ -30,7 +30,8 @@
|
||||
**
|
||||
**************************************************************************/
|
||||
|
||||
#include "qmlinspectortoolbar.h"
|
||||
#include "qmljsinspectortoolbar.h"
|
||||
|
||||
#include "qmljsinspectorconstants.h"
|
||||
#include "qmljstoolbarcolorbox.h"
|
||||
|
||||
@@ -63,7 +64,7 @@ static QToolButton *toolButton(QAction *action)
|
||||
return button;
|
||||
}
|
||||
|
||||
QmlInspectorToolBar::QmlInspectorToolBar(QObject *parent) :
|
||||
QmlJsInspectorToolBar::QmlJsInspectorToolBar(QObject *parent) :
|
||||
QObject(parent),
|
||||
m_fromQmlAction(0),
|
||||
m_playAction(0),
|
||||
@@ -84,7 +85,7 @@ QmlInspectorToolBar::QmlInspectorToolBar(QObject *parent) :
|
||||
{
|
||||
}
|
||||
|
||||
void QmlInspectorToolBar::setEnabled(bool value)
|
||||
void QmlJsInspectorToolBar::setEnabled(bool value)
|
||||
{
|
||||
m_fromQmlAction->setEnabled(value);
|
||||
m_showAppOnTopAction->setEnabled(value);
|
||||
@@ -95,7 +96,7 @@ void QmlInspectorToolBar::setEnabled(bool value)
|
||||
m_colorBox->setEnabled(value);
|
||||
}
|
||||
|
||||
void QmlInspectorToolBar::enable()
|
||||
void QmlJsInspectorToolBar::enable()
|
||||
{
|
||||
setEnabled(true);
|
||||
m_emitSignals = false;
|
||||
@@ -106,7 +107,7 @@ void QmlInspectorToolBar::enable()
|
||||
m_emitSignals = true;
|
||||
}
|
||||
|
||||
void QmlInspectorToolBar::disable()
|
||||
void QmlJsInspectorToolBar::disable()
|
||||
{
|
||||
setAnimationSpeed(1.0f);
|
||||
m_designModeActive = false;
|
||||
@@ -114,22 +115,22 @@ void QmlInspectorToolBar::disable()
|
||||
setEnabled(false);
|
||||
}
|
||||
|
||||
void QmlInspectorToolBar::activateColorPicker()
|
||||
void QmlJsInspectorToolBar::activateColorPicker()
|
||||
{
|
||||
updateDesignModeActions(ColorPickerMode);
|
||||
}
|
||||
|
||||
void QmlInspectorToolBar::activateSelectTool()
|
||||
void QmlJsInspectorToolBar::activateSelectTool()
|
||||
{
|
||||
updateDesignModeActions(SelectionToolMode);
|
||||
}
|
||||
|
||||
void QmlInspectorToolBar::activateZoomTool()
|
||||
void QmlJsInspectorToolBar::activateZoomTool()
|
||||
{
|
||||
updateDesignModeActions(ZoomMode);
|
||||
}
|
||||
|
||||
void QmlInspectorToolBar::setAnimationSpeed(qreal slowDownFactor)
|
||||
void QmlJsInspectorToolBar::setAnimationSpeed(qreal slowDownFactor)
|
||||
{
|
||||
if (m_animationSpeed == slowDownFactor)
|
||||
return;
|
||||
@@ -147,7 +148,7 @@ void QmlInspectorToolBar::setAnimationSpeed(qreal slowDownFactor)
|
||||
m_emitSignals = true;
|
||||
}
|
||||
|
||||
void QmlInspectorToolBar::setAnimationPaused(bool paused)
|
||||
void QmlJsInspectorToolBar::setAnimationPaused(bool paused)
|
||||
{
|
||||
if (m_paused == paused)
|
||||
return;
|
||||
@@ -156,7 +157,7 @@ void QmlInspectorToolBar::setAnimationPaused(bool paused)
|
||||
updatePlayAction();
|
||||
}
|
||||
|
||||
void QmlInspectorToolBar::setDesignModeBehavior(bool inDesignMode)
|
||||
void QmlJsInspectorToolBar::setDesignModeBehavior(bool inDesignMode)
|
||||
{
|
||||
m_emitSignals = false;
|
||||
m_designModeActive = inDesignMode;
|
||||
@@ -164,14 +165,14 @@ void QmlInspectorToolBar::setDesignModeBehavior(bool inDesignMode)
|
||||
m_emitSignals = true;
|
||||
}
|
||||
|
||||
void QmlInspectorToolBar::setShowAppOnTop(bool showAppOnTop)
|
||||
void QmlJsInspectorToolBar::setShowAppOnTop(bool showAppOnTop)
|
||||
{
|
||||
m_emitSignals = false;
|
||||
m_showAppOnTopAction->setChecked(showAppOnTop);
|
||||
m_emitSignals = true;
|
||||
}
|
||||
|
||||
void QmlInspectorToolBar::createActions()
|
||||
void QmlJsInspectorToolBar::createActions()
|
||||
{
|
||||
Core::Context context(Debugger::Constants::C_QMLDEBUGGER);
|
||||
Core::ICore *core = Core::ICore::instance();
|
||||
@@ -293,12 +294,12 @@ void QmlInspectorToolBar::createActions()
|
||||
this, SLOT(activeDebugLanguagesChanged(Debugger::DebuggerLanguages)));
|
||||
}
|
||||
|
||||
QWidget *QmlInspectorToolBar::widget() const
|
||||
QWidget *QmlJsInspectorToolBar::widget() const
|
||||
{
|
||||
return m_barWidget;
|
||||
}
|
||||
|
||||
void QmlInspectorToolBar::changeAnimationSpeed()
|
||||
void QmlJsInspectorToolBar::changeAnimationSpeed()
|
||||
{
|
||||
QAction *action = static_cast<QAction*>(sender());
|
||||
|
||||
@@ -308,19 +309,19 @@ void QmlInspectorToolBar::changeAnimationSpeed()
|
||||
updatePlayAction();
|
||||
}
|
||||
|
||||
void QmlInspectorToolBar::activatePlayOnClick()
|
||||
void QmlJsInspectorToolBar::activatePlayOnClick()
|
||||
{
|
||||
m_paused = !m_paused;
|
||||
emit animationPausedChanged(m_paused);
|
||||
updatePlayAction();
|
||||
}
|
||||
|
||||
void QmlInspectorToolBar::updatePlayAction()
|
||||
void QmlJsInspectorToolBar::updatePlayAction()
|
||||
{
|
||||
m_playAction->setIcon(m_paused ? m_playIcon : m_pauseIcon);
|
||||
}
|
||||
|
||||
void QmlInspectorToolBar::colorPickerTriggered(bool checked)
|
||||
void QmlJsInspectorToolBar::colorPickerTriggered(bool checked)
|
||||
{
|
||||
updateDesignModeActions(ColorPickerMode);
|
||||
|
||||
@@ -333,7 +334,7 @@ void QmlInspectorToolBar::colorPickerTriggered(bool checked)
|
||||
emit colorPickerSelected();
|
||||
}
|
||||
|
||||
void QmlInspectorToolBar::selectToolTriggered(bool checked)
|
||||
void QmlJsInspectorToolBar::selectToolTriggered(bool checked)
|
||||
{
|
||||
updateDesignModeActions(SelectionToolMode);
|
||||
|
||||
@@ -346,7 +347,7 @@ void QmlInspectorToolBar::selectToolTriggered(bool checked)
|
||||
emit selectToolSelected();
|
||||
}
|
||||
|
||||
void QmlInspectorToolBar::zoomToolTriggered(bool checked)
|
||||
void QmlJsInspectorToolBar::zoomToolTriggered(bool checked)
|
||||
{
|
||||
updateDesignModeActions(ZoomMode);
|
||||
|
||||
@@ -359,29 +360,29 @@ void QmlInspectorToolBar::zoomToolTriggered(bool checked)
|
||||
emit zoomToolSelected();
|
||||
}
|
||||
|
||||
void QmlInspectorToolBar::showAppOnTopClick()
|
||||
void QmlJsInspectorToolBar::showAppOnTopClick()
|
||||
{
|
||||
if (m_emitSignals)
|
||||
emit showAppOnTopSelected(m_showAppOnTopAction->isChecked());
|
||||
}
|
||||
|
||||
void QmlInspectorToolBar::setSelectedColor(const QColor &color)
|
||||
void QmlJsInspectorToolBar::setSelectedColor(const QColor &color)
|
||||
{
|
||||
m_colorBox->setColor(color);
|
||||
}
|
||||
|
||||
void QmlInspectorToolBar::activateFromQml()
|
||||
void QmlJsInspectorToolBar::activateFromQml()
|
||||
{
|
||||
if (m_emitSignals)
|
||||
emit applyChangesFromQmlFileTriggered(m_fromQmlAction->isChecked());
|
||||
}
|
||||
|
||||
void QmlInspectorToolBar::activeDebugLanguagesChanged(Debugger::DebuggerLanguages languages)
|
||||
void QmlJsInspectorToolBar::activeDebugLanguagesChanged(Debugger::DebuggerLanguages languages)
|
||||
{
|
||||
m_operateByInstructionButton->setVisible(languages & Debugger::CppLanguage);
|
||||
}
|
||||
|
||||
void QmlInspectorToolBar::updateDesignModeActions(DesignTool activeTool)
|
||||
void QmlJsInspectorToolBar::updateDesignModeActions(DesignTool activeTool)
|
||||
{
|
||||
m_activeTool = activeTool;
|
||||
m_selectAction->setChecked(m_designModeActive && (m_activeTool == SelectionToolMode));
|
||||
@@ -30,8 +30,8 @@
|
||||
**
|
||||
**************************************************************************/
|
||||
|
||||
#ifndef QMLINSPECTORTOOLBAR_H
|
||||
#define QMLINSPECTORTOOLBAR_H
|
||||
#ifndef QMLJSINSPECTORTOOLBAR_H
|
||||
#define QMLJSINSPECTORTOOLBAR_H
|
||||
|
||||
#include <debugger/debuggerconstants.h>
|
||||
|
||||
@@ -55,7 +55,7 @@ class ToolBarColorBox;
|
||||
|
||||
namespace Internal {
|
||||
|
||||
class QmlInspectorToolBar : public QObject
|
||||
class QmlJsInspectorToolBar : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
@@ -70,7 +70,7 @@ public:
|
||||
ZoomMode = 6
|
||||
};
|
||||
|
||||
explicit QmlInspectorToolBar(QObject *parent = 0);
|
||||
explicit QmlJsInspectorToolBar(QObject *parent = 0);
|
||||
void createActions();
|
||||
QWidget *widget() const;
|
||||
|
||||
@@ -154,4 +154,4 @@ private:
|
||||
} // namespace Internal
|
||||
} // namespace QmlJSInspector
|
||||
|
||||
#endif // QMLINSPECTORTOOLBAR_H
|
||||
#endif // QMLJSINSPECTORTOOLBAR_H
|
||||
Reference in New Issue
Block a user