| 
									
										
										
										
											2010-07-29 12:15:55 +02:00
										 |  |  | /**************************************************************************
 | 
					
						
							|  |  |  | ** | 
					
						
							|  |  |  | ** This file is part of Qt Creator | 
					
						
							|  |  |  | ** | 
					
						
							| 
									
										
										
										
											2011-01-11 16:28:15 +01:00
										 |  |  | ** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies). | 
					
						
							| 
									
										
										
										
											2010-07-29 12:15:55 +02:00
										 |  |  | ** | 
					
						
							|  |  |  | ** Contact: Nokia Corporation (qt-info@nokia.com) | 
					
						
							|  |  |  | ** | 
					
						
							| 
									
										
										
										
											2010-12-17 16:01:08 +01:00
										 |  |  | ** No Commercial Usage | 
					
						
							| 
									
										
										
										
											2010-07-29 12:15:55 +02:00
										 |  |  | ** | 
					
						
							| 
									
										
										
										
											2010-12-17 16:01:08 +01:00
										 |  |  | ** This file contains pre-release code and may not be distributed. | 
					
						
							|  |  |  | ** You may use this file in accordance with the terms and conditions | 
					
						
							|  |  |  | ** contained in the Technology Preview License Agreement accompanying | 
					
						
							|  |  |  | ** this package. | 
					
						
							| 
									
										
										
										
											2010-07-29 12:15:55 +02:00
										 |  |  | ** | 
					
						
							|  |  |  | ** GNU Lesser General Public License Usage | 
					
						
							|  |  |  | ** | 
					
						
							|  |  |  | ** Alternatively, this file may be used under the terms of the GNU Lesser | 
					
						
							|  |  |  | ** General Public License version 2.1 as published by the Free Software | 
					
						
							|  |  |  | ** Foundation and appearing in the file LICENSE.LGPL included in the | 
					
						
							|  |  |  | ** packaging of this file.  Please review the following information to | 
					
						
							|  |  |  | ** ensure the GNU Lesser General Public License version 2.1 requirements | 
					
						
							|  |  |  | ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
 | 
					
						
							|  |  |  | ** | 
					
						
							| 
									
										
										
										
											2010-12-17 16:01:08 +01:00
										 |  |  | ** In addition, as a special exception, Nokia gives you certain additional | 
					
						
							|  |  |  | ** rights.  These rights are described in the Nokia Qt LGPL Exception | 
					
						
							|  |  |  | ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. | 
					
						
							|  |  |  | ** | 
					
						
							|  |  |  | ** If you have questions regarding the use of this file, please contact | 
					
						
							|  |  |  | ** Nokia at qt-info@nokia.com. | 
					
						
							| 
									
										
										
										
											2010-07-29 12:15:55 +02:00
										 |  |  | ** | 
					
						
							|  |  |  | **************************************************************************/ | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-09-14 13:39:32 +02:00
										 |  |  | #ifndef QDECLARATIVEVIEWOBSERVER_H
 | 
					
						
							|  |  |  | #define QDECLARATIVEVIEWOBSERVER_H
 | 
					
						
							| 
									
										
										
										
											2010-07-29 12:15:55 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  | #include "qmljsdebugger_global.h"
 | 
					
						
							| 
									
										
										
										
											2010-09-16 16:43:22 +02:00
										 |  |  | #include "qmlobserverconstants.h"
 | 
					
						
							| 
									
										
										
										
											2010-07-29 12:15:55 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-01-24 12:30:21 +01:00
										 |  |  | #include <QtCore/QScopedPointer>
 | 
					
						
							| 
									
										
										
										
											2011-01-12 11:10:50 +01:00
										 |  |  | #include <QtDeclarative/QDeclarativeView>
 | 
					
						
							| 
									
										
										
										
											2011-01-24 12:30:21 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  | QT_FORWARD_DECLARE_CLASS(QDeclarativeItem) | 
					
						
							|  |  |  | QT_FORWARD_DECLARE_CLASS(QMouseEvent) | 
					
						
							|  |  |  | QT_FORWARD_DECLARE_CLASS(QToolBar) | 
					
						
							| 
									
										
										
										
											2010-07-29 12:15:55 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-09-22 09:59:18 +02:00
										 |  |  | namespace QmlJSDebugger { | 
					
						
							| 
									
										
										
										
											2010-07-29 12:15:55 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  | class CrumblePath; | 
					
						
							| 
									
										
										
										
											2010-09-14 13:39:32 +02:00
										 |  |  | class QDeclarativeViewObserverPrivate; | 
					
						
							| 
									
										
										
										
											2010-07-29 12:15:55 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-09-14 13:39:32 +02:00
										 |  |  | class QMLJSDEBUGGER_EXPORT QDeclarativeViewObserver : public QObject | 
					
						
							| 
									
										
										
										
											2010-07-29 12:15:55 +02:00
										 |  |  | { | 
					
						
							|  |  |  |     Q_OBJECT | 
					
						
							|  |  |  | public: | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-09-14 13:39:32 +02:00
										 |  |  |     explicit QDeclarativeViewObserver(QDeclarativeView *view, QObject *parent = 0); | 
					
						
							|  |  |  |     ~QDeclarativeViewObserver(); | 
					
						
							| 
									
										
										
										
											2010-07-29 12:15:55 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  |     void setSelectedItems(QList<QGraphicsItem *> items); | 
					
						
							|  |  |  |     QList<QGraphicsItem *> selectedItems(); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-09-14 13:39:32 +02:00
										 |  |  |     QDeclarativeView *declarativeView(); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-02-22 14:23:57 +01:00
										 |  |  |     QToolBar *toolBar() const; | 
					
						
							| 
									
										
										
										
											2010-07-29 12:15:55 +02:00
										 |  |  |     static QString idStringForObject(QObject *obj); | 
					
						
							|  |  |  |     QRectF adjustToScreenBoundaries(const QRectF &boundingRectInSceneSpace); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-11-23 10:07:09 +01:00
										 |  |  |     bool showAppOnTop() const; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-07-29 12:15:55 +02:00
										 |  |  | public Q_SLOTS: | 
					
						
							|  |  |  |     void setDesignModeBehavior(bool value); | 
					
						
							| 
									
										
										
										
											2010-07-30 12:56:25 +02:00
										 |  |  |     bool designModeBehavior(); | 
					
						
							| 
									
										
										
										
											2010-07-29 12:15:55 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-11-23 10:07:09 +01:00
										 |  |  |     void setShowAppOnTop(bool appOnTop); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-07-29 12:15:55 +02:00
										 |  |  |     void changeAnimationSpeed(qreal slowdownFactor); | 
					
						
							|  |  |  |     void continueExecution(qreal slowdownFactor = 1.0f); | 
					
						
							|  |  |  |     void pauseExecution(); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-09-16 16:20:12 +02:00
										 |  |  |     void setObserverContext(int contextIndex); | 
					
						
							| 
									
										
										
										
											2010-07-30 16:09:17 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-07-29 12:15:55 +02:00
										 |  |  | Q_SIGNALS: | 
					
						
							|  |  |  |     void designModeBehaviorChanged(bool inDesignMode); | 
					
						
							| 
									
										
										
										
											2010-11-23 10:07:09 +01:00
										 |  |  |     void showAppOnTopChanged(bool showAppOnTop); | 
					
						
							| 
									
										
										
										
											2010-07-29 12:15:55 +02:00
										 |  |  |     void reloadRequested(); | 
					
						
							|  |  |  |     void marqueeSelectToolActivated(); | 
					
						
							|  |  |  |     void selectToolActivated(); | 
					
						
							|  |  |  |     void zoomToolActivated(); | 
					
						
							|  |  |  |     void colorPickerActivated(); | 
					
						
							|  |  |  |     void selectedColorChanged(const QColor &color); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     void executionStarted(qreal slowdownFactor); | 
					
						
							|  |  |  |     void executionPaused(); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-07-30 16:09:17 +02:00
										 |  |  |     void inspectorContextCleared(); | 
					
						
							|  |  |  |     void inspectorContextPushed(const QString &contextTitle); | 
					
						
							|  |  |  |     void inspectorContextPopped(); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-07-29 12:15:55 +02:00
										 |  |  | protected: | 
					
						
							| 
									
										
										
										
											2010-09-14 13:39:32 +02:00
										 |  |  |     bool eventFilter(QObject *obj, QEvent *event); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     bool leaveEvent(QEvent *); | 
					
						
							|  |  |  |     bool mousePressEvent(QMouseEvent *event); | 
					
						
							|  |  |  |     bool mouseMoveEvent(QMouseEvent *event); | 
					
						
							|  |  |  |     bool mouseReleaseEvent(QMouseEvent *event); | 
					
						
							|  |  |  |     bool keyPressEvent(QKeyEvent *event); | 
					
						
							|  |  |  |     bool keyReleaseEvent(QKeyEvent *keyEvent); | 
					
						
							|  |  |  |     bool mouseDoubleClickEvent(QMouseEvent *event); | 
					
						
							|  |  |  |     bool wheelEvent(QWheelEvent *event); | 
					
						
							| 
									
										
										
										
											2010-07-29 12:15:55 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-07-30 17:43:21 +02:00
										 |  |  |     void setSelectedItemsForTools(QList<QGraphicsItem *> items); | 
					
						
							| 
									
										
										
										
											2010-08-06 14:03:13 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-07-29 12:15:55 +02:00
										 |  |  | private: | 
					
						
							| 
									
										
										
										
											2010-09-14 13:39:32 +02:00
										 |  |  |     Q_DISABLE_COPY(QDeclarativeViewObserver) | 
					
						
							| 
									
										
										
										
											2010-07-30 12:56:25 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-09-14 13:39:32 +02:00
										 |  |  |     inline QDeclarativeViewObserverPrivate *d_func() { return data.data(); } | 
					
						
							|  |  |  |     QScopedPointer<QDeclarativeViewObserverPrivate> data; | 
					
						
							|  |  |  |     friend class QDeclarativeViewObserverPrivate; | 
					
						
							| 
									
										
										
										
											2011-02-09 17:34:03 +01:00
										 |  |  |     friend class AbstractLiveEditTool; | 
					
						
							| 
									
										
										
										
											2010-07-29 12:15:55 +02:00
										 |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-09-22 09:59:18 +02:00
										 |  |  | } //namespace QmlJSDebugger
 | 
					
						
							| 
									
										
										
										
											2010-07-29 12:15:55 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-09-14 13:39:32 +02:00
										 |  |  | #endif // QDECLARATIVEVIEWOBSERVER_H
 |