47 #include <QtDeclarative/QDeclarativeEngine> 48 #include <QtDeclarative/QDeclarativeComponent> 49 #include <QtDeclarative/private/qdeclarativedebughelper_p.h> 50 #include "QtDeclarative/private/qdeclarativeinspectorservice_p.h" 52 #include <QtGui/QVBoxLayout> 53 #include <QtGui/QMouseEvent> 54 #include <QtGui/QWidget> 61 m_showAppOnTop(false),
62 m_designModeBehavior(false),
63 m_animationPaused(false),
64 m_slowDownFactor(1.0),
80 foreach (
const QString &s, importList) {
196 switch (event->
type()) {
226 if (
wheelEvent(static_cast<QWheelEvent*>(event)))
272 switch (event->
key()) {
322 for (
int i = 0; i < itemCount; ++i) {
326 selectedObjects << obj;
371 ds >> qml >> parentId >> imports >> filename;
384 int debugId, newParent;
385 ds >> debugId >> newParent;
394 for (
int i = 0; i < itemCount; ++i) {
432 foreach (
QObject *
object, objects) {
The QColor class provides colors based on RGB, HSV or CMYK values.
void animationPausedChangeRequested(bool paused)
AbstractViewInspector(QObject *parent=0)
The QKeyEvent class describes a key event.
static void setAnimationSlowDownFactor(qreal factor)
static QObject * objectForId(int)
Returns the object for unique id.
bool showAppOnTop() const
void clear()
Removes all items from the hash.
QString idStringForObject(QObject *obj) const
virtual void setDesignModeBehavior(bool value)
void setShowAppOnTop(bool appOnTop)
The QWheelEvent class contains parameters that describe a wheel event.
QHash< int, QString > m_stringIdForObjectId
The QByteArray class provides an array of bytes.
bool designModeBehavior() const
void setAnimationSpeed(qreal factor)
virtual void reloadView()=0
void sendColorChanged(const QColor &color)
void sendAnimationPaused(bool paused)
void setData(const QByteArray &, const QUrl &baseUrl)
Sets the QDeclarativeComponent to use the given QML data.
static QDeclarativeInspectorService * instance()
AbstractTool * m_currentTool
The QString class provides a Unicode character string.
void changeToSingleSelectTool()
void sendMessage(const QByteArray &message)
The QObject class is the base class of all Qt objects.
void animationPausedChanged(bool paused)
virtual bool event(QEvent *)
This virtual function receives events to an object and should return true if the event e was recogniz...
void setAnimationPaused(bool paused)
virtual void reparentQmlObject(QObject *object, QObject *newParent)=0
virtual bool keyReleaseEvent(QKeyEvent *keyEvent)
virtual QObject * create(QDeclarativeContext *context=0)
Create an object instance from this component.
virtual bool mousePressEvent(QMouseEvent *event)
const T value(const Key &key) const
Returns the value associated with the key.
bool animationPaused() const
void clearComponentCache()
iterator insert(const Key &key, const T &value)
Inserts a new item with the key and a value of value.
void sendAnimationSpeed(qreal slowDownFactor)
int key() const
Returns the code of the key that was pressed or released.
qreal slowDownFactor() const
void sendDesignModeBehavior(bool inDesignMode)
The QDeclarativeComponent class encapsulates a QML component definition.
void createQmlObject(const QString &qml, QObject *parent, const QStringList &importList, const QString &filename=QString())
bool m_designModeBehavior
static bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
Creates a connection of the given type from the signal in the sender object to the method in the rece...
The QStringList class provides a list of strings.
Q_CORE_EXPORT void qWarning(const char *,...)
QDeclarativeInspectorService * m_debugService
virtual bool mouseMoveEvent(QMouseEvent *event)
virtual QWidget * viewWidget() const =0
void changeToMarqueeSelectTool()
QByteArray toLatin1() const Q_REQUIRED_RESULT
Returns a Latin-1 representation of the string as a QByteArray.
static qreal component(const QPointF &point, unsigned int i)
void handleMessage(const QByteArray &message)
virtual bool keyPressEvent(QKeyEvent *event)
virtual bool leaveEvent(QEvent *)
virtual bool eventFilter(QObject *, QEvent *)
Filters events if this object has been installed as an event filter for the watched object...
virtual void changeCurrentObjects(const QList< QObject *> &objects)=0
The QMouseEvent class contains parameters that describe a mouse event.
virtual bool mouseDoubleClickEvent(QMouseEvent *event)
bool eventFilter(QObject *, QEvent *)
Filters events if this object has been installed as an event filter for the watched object...
static int idForObject(QObject *)
Returns a unique id for object.
void sendShowAppOnTop(bool showAppOnTop)
Qt::MouseButtons buttons() const
Returns the button state when the event was generated.
void sendCurrentObjects(const QList< QObject *> &)
void designModeBehaviorChanged(bool inDesignMode)
virtual bool wheelEvent(QWheelEvent *event)
void sendCurrentTool(Constants::DesignTool toolId)
QObject * parent() const
Returns a pointer to the parent object.
int length() const
This function is identical to count().
The QDeclarativeContext class defines a context within a QML engine.
virtual bool mouseReleaseEvent(QMouseEvent *event)
virtual QDeclarativeEngine * declarativeEngine() const =0
static QUrl fromLocalFile(const QString &localfile)
Returns a QUrl representation of localFile, interpreted as a local file.
void showAppOnTopChanged(bool showAppOnTop)
The QDataStream class provides serialization of binary data to a QIODevice.
static QDeclarativeContext * contextForObject(const QObject *)
Returns the QDeclarativeContext for the object, or 0 if no context has been set.
void changeToColorPickerTool()
void clearComponentCache()
Clears the engine's internal component cache.
virtual void changeTool(InspectorProtocol::Tool tool)=0
The QEvent class is the base class of all event classes.
Type type() const
Returns the event type.
void animationSpeedChanged(qreal factor)
The QLatin1Char class provides an 8-bit ASCII/Latin-1 character.
The QList class is a template class that provides lists.
void animationSpeedChangeRequested(qreal factor)