Commit 9107f0c5 authored by Kai Koehne's avatar Kai Koehne

QmlJSDebugger: Change namespace from QmlObserver to QmlJSDebugger

The library not only contains the observer part, but also the javascript
debugger. Reflect this in the namespace.
parent b4dd2080
......@@ -37,7 +37,7 @@
#include <QGraphicsItem>
#include <QDeclarativeItem>
namespace QmlObserver {
namespace QmlJSDebugger {
AbstractFormEditorTool::AbstractFormEditorTool(QDeclarativeViewObserver *editorView)
: QObject(editorView), m_observer(editorView)
......
......@@ -45,7 +45,7 @@ class QWheelEvent;
class QDeclarativeView;
QT_END_NAMESPACE
namespace QmlObserver {
namespace QmlJSDebugger {
class QDeclarativeViewObserver;
......
......@@ -8,7 +8,7 @@
#include <QDebug>
namespace QmlObserver {
namespace QmlJSDebugger {
const qreal AnimDelta = 0.025f;
const int AnimInterval = 30;
......@@ -238,4 +238,4 @@ void BoundingRectHighlighter::refresh()
}
} // namespace QmlObserver
} // namespace QmlJSDebugger
......@@ -12,7 +12,7 @@ QT_FORWARD_DECLARE_CLASS(QWidget);
QT_FORWARD_DECLARE_CLASS(QStyleOptionGraphicsItem);
QT_FORWARD_DECLARE_CLASS(QTimer);
namespace QmlObserver {
namespace QmlJSDebugger {
class QDeclarativeViewObserver;
class BoundingBox;
......@@ -73,6 +73,6 @@ public:
int type() const;
};
} // namespace QmlObserver
} // namespace QmlJSDebugger
#endif // BOUNDINGRECTHIGHLIGHTER_H
......@@ -9,7 +9,7 @@
#include <QApplication>
#include <QPalette>
namespace QmlObserver {
namespace QmlJSDebugger {
ColorPickerTool::ColorPickerTool(QDeclarativeViewObserver *view) :
AbstractFormEditorTool(view)
......@@ -86,4 +86,4 @@ void ColorPickerTool::pickColor(const QPoint &pos)
emit selectedColorChanged(m_selectedColor);
}
} // namespace QmlObserver
} // namespace QmlJSDebugger
......@@ -7,7 +7,7 @@
QT_FORWARD_DECLARE_CLASS(QPoint);
namespace QmlObserver {
namespace QmlJSDebugger {
class ColorPickerTool : public AbstractFormEditorTool
{
......@@ -48,6 +48,6 @@ private:
};
} // namespace QmlObserver
} // namespace QmlJSDebugger
#endif // COLORPICKERTOOL_H
......@@ -32,7 +32,7 @@
#include <QGraphicsScene>
namespace QmlObserver {
namespace QmlJSDebugger {
LayerItem::LayerItem(QGraphicsScene* scene)
: QGraphicsObject()
......@@ -75,4 +75,4 @@ QList<QGraphicsItem*> LayerItem::findAllChildItems(const QGraphicsItem *item) co
return itemList;
}
} // namespace QmlObserver
} // namespace QmlJSDebugger
......@@ -33,7 +33,7 @@
#include <QGraphicsObject>
#include <QWeakPointer>
namespace QmlObserver {
namespace QmlJSDebugger {
class FormEditorScene;
......
......@@ -8,7 +8,7 @@
#include <QDebug>
namespace QmlObserver {
namespace QmlJSDebugger {
QmlToolbar::QmlToolbar(QWidget *parent)
: QToolBar(parent)
......
......@@ -5,7 +5,7 @@
#include <QIcon>
#include "qmlobserverconstants.h"
namespace QmlObserver {
namespace QmlJSDebugger {
class ToolBarColorBox;
......
......@@ -32,7 +32,7 @@
#include <QDebug>
namespace QmlObserver {
namespace QmlJSDebugger {
RubberBandSelectionManipulator::RubberBandSelectionManipulator(QGraphicsObject *layerItem, QDeclarativeViewObserver *editorView)
: m_selectionRectangleElement(layerItem),
......
......@@ -33,7 +33,7 @@
#include "selectionrectangle.h"
namespace QmlObserver {
namespace QmlJSDebugger {
class QDeclarativeViewObserver;
......
......@@ -36,7 +36,7 @@
#include <QGraphicsScene>
#include <QDebug>
namespace QmlObserver {
namespace QmlJSDebugger {
SelectionIndicator::SelectionIndicator(QDeclarativeViewObserver *editorView, QGraphicsObject *layerItem)
: m_layerItem(layerItem), m_view(editorView)
......@@ -123,5 +123,5 @@ void SelectionIndicator::setItems(const QList<QWeakPointer<QGraphicsObject> > &i
}
}
} //namespace QmlObserver
} //namespace QmlJSDebugger
......@@ -34,7 +34,7 @@
#include <QGraphicsPolygonItem>
#include <QGraphicsObject>
namespace QmlObserver {
namespace QmlJSDebugger {
class QDeclarativeViewObserver;
......
......@@ -36,7 +36,7 @@
#include <cmath>
#include <QGraphicsScene>
namespace QmlObserver {
namespace QmlJSDebugger {
class SelectionRectShape : public QGraphicsRectItem
{
......
......@@ -34,7 +34,7 @@
#include <QGraphicsRectItem>
#include <QGraphicsObject>
namespace QmlObserver {
namespace QmlJSDebugger {
class SelectionRectangle
{
......
......@@ -46,7 +46,7 @@
#include <QDebug>
namespace QmlObserver {
namespace QmlJSDebugger {
SelectionTool::SelectionTool(QDeclarativeViewObserver *editorView)
: AbstractFormEditorTool(editorView),
......
......@@ -45,7 +45,7 @@ QT_FORWARD_DECLARE_CLASS(QGraphicsItem);
QT_FORWARD_DECLARE_CLASS(QMouseEvent);
QT_FORWARD_DECLARE_CLASS(QKeyEvent);
namespace QmlObserver {
namespace QmlJSDebugger {
class SelectionTool : public AbstractFormEditorTool
{
......
......@@ -32,7 +32,7 @@
#include "qdeclarativeviewobserver_p.h"
#include <QtDebug>
namespace QmlObserver {
namespace QmlJSDebugger {
SingleSelectionManipulator::SingleSelectionManipulator(QDeclarativeViewObserver *editorView)
: m_editorView(editorView),
......
......@@ -35,7 +35,7 @@
QT_FORWARD_DECLARE_CLASS(QGraphicsItem);
namespace QmlObserver {
namespace QmlJSDebugger {
class QDeclarativeViewObserver;
......
......@@ -12,7 +12,7 @@
#include <QDebug>
namespace QmlObserver {
namespace QmlJSDebugger {
const qreal MaxOpacity = 0.5f;
......@@ -317,4 +317,4 @@ int SubcomponentEditorTool::contextIndex() const
}
} // namespace QmlObserver
} // namespace QmlJSDebugger
......@@ -9,7 +9,7 @@ QT_FORWARD_DECLARE_CLASS(QGraphicsObject)
QT_FORWARD_DECLARE_CLASS(QPoint)
QT_FORWARD_DECLARE_CLASS(QTimer)
namespace QmlObserver {
namespace QmlJSDebugger {
class SubcomponentMaskLayerItem;
......@@ -78,6 +78,6 @@ private:
QTimer *m_animTimer;
};
} // namespace QmlObserver
} // namespace QmlJSDebugger
#endif // SUBCOMPONENTEDITORTOOL_H
......@@ -3,7 +3,7 @@
#include "qdeclarativeviewobserver.h"
#include <QPolygonF>
namespace QmlObserver {
namespace QmlJSDebugger {
SubcomponentMaskLayerItem::SubcomponentMaskLayerItem(QDeclarativeViewObserver *observer, QGraphicsItem *parentItem) :
QGraphicsPolygonItem(parentItem),
......@@ -77,4 +77,4 @@ QGraphicsItem *SubcomponentMaskLayerItem::currentItem() const
return m_currentItem;
}
} // namespace QmlObserver
} // namespace QmlJSDebugger
......@@ -3,7 +3,7 @@
#include <QGraphicsPolygonItem>
namespace QmlObserver {
namespace QmlJSDebugger {
class QDeclarativeViewObserver;
......@@ -24,6 +24,6 @@ private:
QRectF m_itemPolyRect;
};
} // namespace QmlObserver
} // namespace QmlJSDebugger
#endif // SUBCOMPONENTMASKLAYERITEM_H
......@@ -14,7 +14,7 @@
#include <QDebug>
namespace QmlObserver {
namespace QmlJSDebugger {
ToolBarColorBox::ToolBarColorBox(QWidget *parent) :
QLabel(parent)
......@@ -93,4 +93,4 @@ void ToolBarColorBox::copyColorToClipboard()
}
} // namespace QmlObserver
} // namespace QmlJSDebugger
......@@ -8,7 +8,7 @@
QT_FORWARD_DECLARE_CLASS(QContextMenuEvent);
QT_FORWARD_DECLARE_CLASS(QAction);
namespace QmlObserver {
namespace QmlJSDebugger {
class ToolBarColorBox : public QLabel
{
......@@ -36,6 +36,6 @@ private:
};
} // namespace QmlObserver
} // namespace QmlJSDebugger
#endif // ToolBarColorBox_H
......@@ -10,7 +10,7 @@
#include <QDebug>
namespace QmlObserver {
namespace QmlJSDebugger {
ZoomTool::ZoomTool(QDeclarativeViewObserver *view) :
AbstractFormEditorTool(view),
......@@ -284,4 +284,4 @@ qreal ZoomTool::nextZoomScale(ZoomDirection direction) const
return 1.0f;
}
} // namespace QmlObserver
} // namespace QmlJSDebugger
......@@ -6,7 +6,7 @@
QT_FORWARD_DECLARE_CLASS(QAction);
namespace QmlObserver {
namespace QmlJSDebugger {
class ZoomTool : public AbstractFormEditorTool
{
......@@ -60,6 +60,6 @@ private:
};
} // namespace QmlObserver
} // namespace QmlJSDebugger
#endif // ZOOMTOOL_H
......@@ -64,7 +64,7 @@
QT_FORWARD_DECLARE_CLASS(QScriptContext);
namespace QmlObserver {
namespace QmlJSDebugger {
class JSAgentWatchData;
......@@ -137,6 +137,6 @@ private:
Q_DISABLE_COPY(JSDebuggerAgent)
};
} // namespace QmlObserver
} // namespace QmlJSDebugger
#endif
......@@ -54,7 +54,7 @@ QT_FORWARD_DECLARE_CLASS(QDeclarativeContext)
QT_FORWARD_DECLARE_CLASS(QDeclarativeWatcher)
QT_FORWARD_DECLARE_CLASS(QDataStream)
namespace QmlObserver {
namespace QmlJSDebugger {
class QMLJSDEBUGGER_EXPORT QDeclarativeObserverService : public QDeclarativeDebugService
{
......@@ -66,7 +66,7 @@ public:
void setDesignModeBehavior(bool inDesignMode);
void setCurrentObjects(QList<QObject*> items);
void setAnimationSpeed(qreal slowdownFactor);
void setCurrentTool(QmlObserver::Constants::DesignTool toolId);
void setCurrentTool(QmlJSDebugger::Constants::DesignTool toolId);
void reloaded();
QString idStringForObject(QObject *obj) const;
......@@ -105,6 +105,6 @@ private:
QHash<int, QString> m_stringIdForObjectId;
};
} // namespace QmlObserver
} // namespace QmlJSDebugger
#endif // QDECLARATIVEDESIGNDEBUGSERVER_H
......@@ -39,7 +39,7 @@ QT_FORWARD_DECLARE_CLASS(QDeclarativeItem);
QT_FORWARD_DECLARE_CLASS(QMouseEvent);
QT_FORWARD_DECLARE_CLASS(QToolBar);
namespace QmlObserver {
namespace QmlJSDebugger {
class CrumblePath;
class QDeclarativeViewObserverPrivate;
......@@ -124,6 +124,6 @@ private:
};
} //namespace QmlObserver
} //namespace QmlJSDebugger
#endif // QDECLARATIVEVIEWOBSERVER_H
#ifndef QMLOBSERVERCONSTANTS_H
#define QMLOBSERVERCONSTANTS_H
namespace QmlObserver {
namespace QmlJSDebugger {
namespace Constants {
enum DesignTool {
......@@ -34,6 +34,6 @@ enum GraphicsItemTypes {
} // namespace Constants
} // namespace QmlObserver
} // namespace QmlJSDebugger
#endif // QMLOBSERVERCONSTANTS_H
......@@ -50,7 +50,7 @@
#include <QtCore/QDateTime>
#include <QtScript/qscriptvalueiterator.h>
namespace QmlObserver {
namespace QmlJSDebugger {
class JSDebuggerAgent::SetupExecEnv {
JSDebuggerAgent* agent;
......@@ -510,4 +510,4 @@ void JSDebuggerAgent::enabledChanged(bool on)
QDeclarativeDebugService::enabledChanged(on);
}
} // namespace QmlObserver
} // namespace QmlJSDebugger
......@@ -46,7 +46,7 @@
#include <QDebug>
namespace QmlObserver {
namespace QmlJSDebugger {
Q_GLOBAL_STATIC(QDeclarativeObserverService, serviceInstance)
......@@ -174,7 +174,7 @@ void QDeclarativeObserverService::setCurrentObjects(QList<QObject*> objects)
sendMessage(message);
}
void QDeclarativeObserverService::setCurrentTool(QmlObserver::Constants::DesignTool toolId)
void QDeclarativeObserverService::setCurrentTool(QmlJSDebugger::Constants::DesignTool toolId)
{
QByteArray message;
QDataStream ds(&message, QIODevice::WriteOnly);
......@@ -236,4 +236,4 @@ QString QDeclarativeObserverService::idStringForObject(QObject *obj) const
return idString;
}
} // namespace QmlObserver
} // namespace QmlJSDebugger
......@@ -52,7 +52,7 @@
#include <private/qdeclarativeengine_p.h>
#include <private/qabstractanimation_p.h>
namespace QmlObserver {
namespace QmlJSDebugger {
const int SceneChangeUpdateInterval = 5000;
......@@ -799,6 +799,6 @@ void QDeclarativeViewObserver::setDebugMode(bool isDebugMode)
data->jsDebuggerAgent = new JSDebuggerAgent(QDeclarativeEnginePrivate::getScriptEngine(data->view->engine()));
}
} //namespace QmlObserver
} //namespace QmlJSDebugger
#include <moc_qdeclarativeviewobserver.cpp>
......@@ -37,7 +37,7 @@
#include "qdeclarativeviewobserver.h"
#include "qdeclarativeobserverservice.h"
namespace QmlObserver {
namespace QmlJSDebugger {
class JSDebuggerAgent;
class QDeclarativeViewObserver;
......@@ -136,6 +136,6 @@ public:
static QDeclarativeViewObserverPrivate *get(QDeclarativeViewObserver *v) { return v->d_func(); }
};
} // namespace QmlObserver
} // namespace QmlJSDebugger
#endif // QDECLARATIVEDESIGNVIEW_P_H
......@@ -51,7 +51,7 @@ QmlApplicationViewer::QmlApplicationViewer(QWidget *parent) :
connect(engine(), SIGNAL(quit()), SLOT(close()));
setResizeMode(QDeclarativeView::SizeRootObjectToView);
#ifdef QMLOBSERVER
new QmlObserver::QDeclarativeViewObserver(this, parent);
new QmlJSDebugger::QDeclarativeViewObserver(this, parent);
#endif
}
......
......@@ -614,7 +614,7 @@ QDeclarativeViewer::QDeclarativeViewer(QWidget *parent, Qt::WindowFlags flags)
}
canvas = new QDeclarativeView(this);
observer = new QmlObserver::QDeclarativeViewObserver(canvas, this);
observer = new QmlJSDebugger::QDeclarativeViewObserver(canvas, this);
if (!(flags & Qt::FramelessWindowHint)) {
m_crumblePathWidget = new Utils::CrumblePath(canvas);
#ifndef Q_WS_MAC
......@@ -794,10 +794,10 @@ void QDeclarativeViewer::createMenu()
designModeBehaviorAction->setShortcut(QKeySequence("Ctrl+D"));
designModeBehaviorAction->setCheckable(true);
designModeBehaviorAction->setChecked(observer->designModeBehavior());
designModeBehaviorAction->setEnabled(QmlObserver::QDeclarativeObserverService::hasDebuggingClient());
designModeBehaviorAction->setEnabled(QmlJSDebugger::QDeclarativeObserverService::hasDebuggingClient());
connect(designModeBehaviorAction, SIGNAL(triggered(bool)), this, SLOT(setDesignModeBehavior(bool)));
connect(observer, SIGNAL(designModeBehaviorChanged(bool)), designModeBehaviorAction, SLOT(setChecked(bool)));
connect(QmlObserver::QDeclarativeObserverService::instance(), SIGNAL(debuggingClientChanged(bool)), designModeBehaviorAction, SLOT(setEnabled(bool)));
connect(QmlJSDebugger::QDeclarativeObserverService::instance(), SIGNAL(debuggingClientChanged(bool)), designModeBehaviorAction, SLOT(setEnabled(bool)));
QAction *proxyAction = new QAction(tr("HTTP &Proxy..."), this);
connect(proxyAction, SIGNAL(triggered()), this, SLOT(showProxySettings()));
......
......@@ -49,7 +49,7 @@
#include "loggerwidget.h"
namespace QmlObserver {
namespace QmlJSDebugger {
class QDeclarativeViewObserver;
}
namespace Utils {
......@@ -168,7 +168,7 @@ private:
LoggerWidget *loggerWindow;
QDeclarativeView *canvas;
QmlObserver::QDeclarativeViewObserver *observer;
QmlJSDebugger::QDeclarativeViewObserver *observer;
QSize initialSize;
QString currentFileOrUrl;
QTimer recordTimer;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment