Commit 832f6889 authored by Kai Koehne's avatar Kai Koehne

QmlJSDebugger: Replace namespace QmlViewer with QmlObserver

parent c7b3e3c8
......@@ -37,7 +37,7 @@
#include <QGraphicsItem>
#include <QDeclarativeItem>
namespace QmlViewer {
namespace QmlObserver {
AbstractFormEditorTool::AbstractFormEditorTool(QDeclarativeViewObserver *editorView)
: QObject(editorView), m_observer(editorView)
......
......@@ -45,7 +45,7 @@ class QWheelEvent;
class QDeclarativeView;
QT_END_NAMESPACE
namespace QmlViewer {
namespace QmlObserver {
class QDeclarativeViewObserver;
......
......@@ -8,7 +8,7 @@
#include <QDebug>
namespace QmlViewer {
namespace QmlObserver {
const qreal AnimDelta = 0.025f;
const int AnimInterval = 30;
......@@ -238,4 +238,4 @@ void BoundingRectHighlighter::refresh()
}
} // namespace QmlViewer
} // namespace QmlObserver
......@@ -12,7 +12,7 @@ QT_FORWARD_DECLARE_CLASS(QWidget);
QT_FORWARD_DECLARE_CLASS(QStyleOptionGraphicsItem);
QT_FORWARD_DECLARE_CLASS(QTimer);
namespace QmlViewer {
namespace QmlObserver {
class QDeclarativeViewObserver;
class BoundingBox;
......@@ -73,6 +73,6 @@ public:
int type() const;
};
} // namespace QmlViewer
} // namespace QmlObserver
#endif // BOUNDINGRECTHIGHLIGHTER_H
......@@ -9,7 +9,7 @@
#include <QApplication>
#include <QPalette>
namespace QmlViewer {
namespace QmlObserver {
ColorPickerTool::ColorPickerTool(QDeclarativeViewObserver *view) :
AbstractFormEditorTool(view)
......@@ -86,4 +86,4 @@ void ColorPickerTool::pickColor(const QPoint &pos)
emit selectedColorChanged(m_selectedColor);
}
} // namespace QmlViewer
} // namespace QmlObserver
......@@ -7,7 +7,7 @@
QT_FORWARD_DECLARE_CLASS(QPoint);
namespace QmlViewer {
namespace QmlObserver {
class ColorPickerTool : public AbstractFormEditorTool
{
......@@ -48,6 +48,6 @@ private:
};
} // namespace QmlViewer
} // namespace QmlObserver
#endif // COLORPICKERTOOL_H
......@@ -32,7 +32,7 @@
#include <QGraphicsScene>
namespace QmlViewer {
namespace QmlObserver {
LayerItem::LayerItem(QGraphicsScene* scene)
: QGraphicsObject()
......@@ -75,4 +75,4 @@ QList<QGraphicsItem*> LayerItem::findAllChildItems(const QGraphicsItem *item) co
return itemList;
}
} // namespace QmlViewer
} // namespace QmlObserver
......@@ -33,7 +33,7 @@
#include <QGraphicsObject>
#include <QWeakPointer>
namespace QmlViewer {
namespace QmlObserver {
class FormEditorScene;
......
......@@ -8,7 +8,7 @@
#include <QDebug>
namespace QmlViewer {
namespace QmlObserver {
QmlToolbar::QmlToolbar(QWidget *parent)
: QToolBar(parent)
......
......@@ -5,7 +5,7 @@
#include <QIcon>
#include "qmlviewerconstants.h"
namespace QmlViewer {
namespace QmlObserver {
class ToolBarColorBox;
......
......@@ -32,7 +32,7 @@
#include <QDebug>
namespace QmlViewer {
namespace QmlObserver {
RubberBandSelectionManipulator::RubberBandSelectionManipulator(QGraphicsObject *layerItem, QDeclarativeViewObserver *editorView)
: m_selectionRectangleElement(layerItem),
......
......@@ -33,7 +33,7 @@
#include "selectionrectangle.h"
namespace QmlViewer {
namespace QmlObserver {
class QDeclarativeViewObserver;
......
......@@ -36,7 +36,7 @@
#include <QGraphicsScene>
#include <QDebug>
namespace QmlViewer {
namespace QmlObserver {
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 QmlViewer
} //namespace QmlObserver
......@@ -34,7 +34,7 @@
#include <QGraphicsPolygonItem>
#include <QGraphicsObject>
namespace QmlViewer {
namespace QmlObserver {
class QDeclarativeViewObserver;
......
......@@ -36,7 +36,7 @@
#include <cmath>
#include <QGraphicsScene>
namespace QmlViewer {
namespace QmlObserver {
class SelectionRectShape : public QGraphicsRectItem
{
......
......@@ -34,7 +34,7 @@
#include <QGraphicsRectItem>
#include <QGraphicsObject>
namespace QmlViewer {
namespace QmlObserver {
class SelectionRectangle
{
......
......@@ -46,7 +46,7 @@
#include <QDebug>
namespace QmlViewer {
namespace QmlObserver {
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 QmlViewer {
namespace QmlObserver {
class SelectionTool : public AbstractFormEditorTool
{
......
......@@ -32,7 +32,7 @@
#include "qdeclarativeviewobserver_p.h"
#include <QtDebug>
namespace QmlViewer {
namespace QmlObserver {
SingleSelectionManipulator::SingleSelectionManipulator(QDeclarativeViewObserver *editorView)
: m_editorView(editorView),
......
......@@ -35,7 +35,7 @@
QT_FORWARD_DECLARE_CLASS(QGraphicsItem);
namespace QmlViewer {
namespace QmlObserver {
class QDeclarativeViewObserver;
......
......@@ -12,7 +12,7 @@
#include <QDebug>
namespace QmlViewer {
namespace QmlObserver {
const qreal MaxOpacity = 0.5f;
......@@ -317,4 +317,4 @@ int SubcomponentEditorTool::contextIndex() const
}
} // namespace QmlViewer
} // namespace QmlObserver
......@@ -9,7 +9,7 @@ QT_FORWARD_DECLARE_CLASS(QGraphicsObject)
QT_FORWARD_DECLARE_CLASS(QPoint)
QT_FORWARD_DECLARE_CLASS(QTimer)
namespace QmlViewer {
namespace QmlObserver {
class SubcomponentMaskLayerItem;
......@@ -78,6 +78,6 @@ private:
QTimer *m_animTimer;
};
} // namespace QmlViewer
} // namespace QmlObserver
#endif // SUBCOMPONENTEDITORTOOL_H
......@@ -3,7 +3,7 @@
#include "qdeclarativeviewobserver.h"
#include <QPolygonF>
namespace QmlViewer {
namespace QmlObserver {
SubcomponentMaskLayerItem::SubcomponentMaskLayerItem(QDeclarativeViewObserver *observer, QGraphicsItem *parentItem) :
QGraphicsPolygonItem(parentItem),
......@@ -77,4 +77,4 @@ QGraphicsItem *SubcomponentMaskLayerItem::currentItem() const
return m_currentItem;
}
} // namespace QmlViewer
} // namespace QmlObserver
......@@ -3,7 +3,7 @@
#include <QGraphicsPolygonItem>
namespace QmlViewer {
namespace QmlObserver {
class QDeclarativeViewObserver;
......@@ -24,6 +24,6 @@ private:
QRectF m_itemPolyRect;
};
} // namespace QmlViewer
} // namespace QmlObserver
#endif // SUBCOMPONENTMASKLAYERITEM_H
......@@ -14,7 +14,7 @@
#include <QDebug>
namespace QmlViewer {
namespace QmlObserver {
ToolBarColorBox::ToolBarColorBox(QWidget *parent) :
QLabel(parent)
......@@ -93,4 +93,4 @@ void ToolBarColorBox::copyColorToClipboard()
}
} // namespace QmlViewer
} // namespace QmlObserver
......@@ -8,7 +8,7 @@
QT_FORWARD_DECLARE_CLASS(QContextMenuEvent);
QT_FORWARD_DECLARE_CLASS(QAction);
namespace QmlViewer {
namespace QmlObserver {
class ToolBarColorBox : public QLabel
{
......@@ -36,6 +36,6 @@ private:
};
} // namespace QmlViewer
} // namespace QmlObserver
#endif // ToolBarColorBox_H
......@@ -10,7 +10,7 @@
#include <QDebug>
namespace QmlViewer {
namespace QmlObserver {
ZoomTool::ZoomTool(QDeclarativeViewObserver *view) :
AbstractFormEditorTool(view),
......@@ -284,4 +284,4 @@ qreal ZoomTool::nextZoomScale(ZoomDirection direction) const
return 1.0f;
}
} // namespace QmlViewer
} // namespace QmlObserver
......@@ -6,7 +6,7 @@
QT_FORWARD_DECLARE_CLASS(QAction);
namespace QmlViewer {
namespace QmlObserver {
class ZoomTool : public AbstractFormEditorTool
{
......@@ -60,6 +60,6 @@ private:
};
} // namespace QmlViewer
} // namespace QmlObserver
#endif // ZOOMTOOL_H
......@@ -66,7 +66,7 @@ public:
void setDesignModeBehavior(bool inDesignMode);
void setCurrentObjects(QList<QObject*> items);
void setAnimationSpeed(qreal slowdownFactor);
void setCurrentTool(QmlViewer::Constants::DesignTool toolId);
void setCurrentTool(QmlObserver::Constants::DesignTool toolId);
void reloaded();
QString idStringForObject(QObject *obj) const;
......
......@@ -39,7 +39,7 @@ QT_FORWARD_DECLARE_CLASS(QDeclarativeItem);
QT_FORWARD_DECLARE_CLASS(QMouseEvent);
QT_FORWARD_DECLARE_CLASS(QToolBar);
namespace QmlViewer {
namespace QmlObserver {
class CrumblePath;
class QDeclarativeViewObserverPrivate;
......@@ -124,6 +124,6 @@ private:
};
} //namespace QmlViewer
} //namespace QmlObserver
#endif // QDECLARATIVEVIEWOBSERVER_H
#ifndef QMLVIEWERCONSTANTS_H
#define QMLVIEWERCONSTANTS_H
namespace QmlViewer {
namespace QmlObserver {
namespace Constants {
enum DesignTool {
......@@ -34,6 +34,6 @@ enum GraphicsItemTypes {
} // namespace Constants
} // namespace QmlViewer
} // namespace QmlObserver
#endif // QMLVIEWERCONSTANTS_H
......@@ -172,7 +172,7 @@ void QDeclarativeObserverService::setCurrentObjects(QList<QObject*> objects)
sendMessage(message);
}
void QDeclarativeObserverService::setCurrentTool(QmlViewer::Constants::DesignTool toolId)
void QDeclarativeObserverService::setCurrentTool(QmlObserver::Constants::DesignTool toolId)
{
QByteArray message;
QDataStream ds(&message, QIODevice::WriteOnly);
......
......@@ -52,7 +52,7 @@
#include <private/qdeclarativeengine_p.h>
#include <private/qabstractanimation_p.h>
namespace QmlViewer {
namespace QmlObserver {
const int SceneChangeUpdateInterval = 5000;
......@@ -799,6 +799,6 @@ void QDeclarativeViewObserver::setDebugMode(bool isDebugMode)
data->jsDebuggerAgent = new JSDebuggerAgent(QDeclarativeEnginePrivate::getScriptEngine(data->view->engine()));
}
} //namespace QmlViewer
} //namespace QmlObserver
#include <moc_qdeclarativeviewobserver.cpp>
......@@ -39,7 +39,7 @@
QT_FORWARD_DECLARE_CLASS(JSDebuggerAgent)
namespace QmlViewer {
namespace QmlObserver {
class QDeclarativeViewObserver;
class SelectionTool;
......@@ -138,6 +138,6 @@ public:
static QDeclarativeViewObserverPrivate *get(QDeclarativeViewObserver *v) { return v->d_func(); }
};
} // namespace QmlViewer
} // namespace QmlObserver
#endif // QDECLARATIVEDESIGNVIEW_P_H
......@@ -51,7 +51,7 @@ QmlApplicationViewer::QmlApplicationViewer(QWidget *parent) :
connect(engine(), SIGNAL(quit()), SLOT(close()));
setResizeMode(QDeclarativeView::SizeRootObjectToView);
#ifdef QMLINSPECTOR
new QmlViewer::QDeclarativeViewObserver(this, parent);
new QmlObserver::QDeclarativeViewObserver(this, parent);
#endif
}
......
......@@ -341,4 +341,4 @@ void CrumblePath::paintEvent(QPaintEvent *event)
QWidget::paintEvent(event);
}
} // namespace QmlViewer
} // namespace Utils
......@@ -72,6 +72,6 @@ private:
QScopedPointer<CrumblePathPrivate> d;
};
} // namespace QmlViewer
} // namespace Utils
#endif // CRUMBLEPATH_H
......@@ -614,7 +614,7 @@ QDeclarativeViewer::QDeclarativeViewer(QWidget *parent, Qt::WindowFlags flags)
}
canvas = new QDeclarativeView(this);
observer = new QmlViewer::QDeclarativeViewObserver(canvas, this);
observer = new QmlObserver::QDeclarativeViewObserver(canvas, this);
if (!(flags & Qt::FramelessWindowHint)) {
m_crumblePathWidget = new Utils::CrumblePath(canvas);
#ifndef Q_WS_MAC
......
......@@ -49,7 +49,7 @@
#include "loggerwidget.h"
namespace QmlViewer {
namespace QmlObserver {
class QDeclarativeViewObserver;
}
namespace Utils {
......@@ -168,7 +168,7 @@ private:
LoggerWidget *loggerWindow;
QDeclarativeView *canvas;
QmlViewer::QDeclarativeViewObserver *observer;
QmlObserver::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