| 
									
										
										
										
											2010-07-08 14:00:33 +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-08 14:00:33 +02:00
										 |  |  | ** | 
					
						
							|  |  |  | ** Contact: Nokia Corporation (qt-info@nokia.com) | 
					
						
							|  |  |  | ** | 
					
						
							| 
									
										
										
										
											2010-12-17 16:01:08 +01:00
										 |  |  | ** No Commercial Usage | 
					
						
							| 
									
										
										
										
											2010-07-08 14:00:33 +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-08 14:00:33 +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-08 14:00:33 +02:00
										 |  |  | ** | 
					
						
							|  |  |  | **************************************************************************/ | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-09-27 10:46:08 +02:00
										 |  |  | #ifndef QDECLARATIVEVIEWOBSERVER_P_H
 | 
					
						
							|  |  |  | #define QDECLARATIVEVIEWOBSERVER_P_H
 | 
					
						
							| 
									
										
										
										
											2010-07-08 14:00:33 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-01-24 12:30:21 +01:00
										 |  |  | #include <QtCore/QWeakPointer>
 | 
					
						
							|  |  |  | #include <QtCore/QPointF>
 | 
					
						
							| 
									
										
										
										
											2010-07-08 14:00:33 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-09-14 13:39:32 +02:00
										 |  |  | #include "qdeclarativeviewobserver.h"
 | 
					
						
							| 
									
										
										
										
											2010-09-16 12:29:06 +02:00
										 |  |  | #include "qdeclarativeobserverservice.h"
 | 
					
						
							| 
									
										
										
										
											2010-07-30 12:56:25 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-09-22 09:59:18 +02:00
										 |  |  | namespace QmlJSDebugger { | 
					
						
							| 
									
										
										
										
											2010-07-08 14:00:33 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-09-16 16:39:09 +02:00
										 |  |  | class JSDebuggerAgent; | 
					
						
							| 
									
										
										
										
											2010-09-14 13:39:32 +02:00
										 |  |  | class QDeclarativeViewObserver; | 
					
						
							| 
									
										
										
										
											2011-02-09 16:59:43 +01:00
										 |  |  | class LiveSelectionTool; | 
					
						
							| 
									
										
										
										
											2010-07-29 12:15:55 +02:00
										 |  |  | class ZoomTool; | 
					
						
							|  |  |  | class ColorPickerTool; | 
					
						
							| 
									
										
										
										
											2011-02-09 16:59:43 +01:00
										 |  |  | class LiveLayerItem; | 
					
						
							| 
									
										
										
										
											2010-07-29 12:15:55 +02:00
										 |  |  | class BoundingRectHighlighter; | 
					
						
							|  |  |  | class SubcomponentEditorTool; | 
					
						
							| 
									
										
										
										
											2011-02-22 14:23:57 +01:00
										 |  |  | class QmlToolBar; | 
					
						
							| 
									
										
										
										
											2010-07-29 12:15:55 +02:00
										 |  |  | class CrumblePath; | 
					
						
							| 
									
										
										
										
											2011-02-09 16:59:43 +01:00
										 |  |  | class AbstractLiveEditTool; | 
					
						
							| 
									
										
										
										
											2010-07-09 16:33:09 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-01-12 12:27:12 +01:00
										 |  |  | class QDeclarativeViewObserverPrivate : public QObject | 
					
						
							| 
									
										
										
										
											2010-07-08 14:00:33 +02:00
										 |  |  | { | 
					
						
							| 
									
										
										
										
											2011-01-12 12:27:12 +01:00
										 |  |  |     Q_OBJECT | 
					
						
							| 
									
										
										
										
											2010-07-08 14:00:33 +02:00
										 |  |  | public: | 
					
						
							| 
									
										
										
										
											2010-07-30 12:56:25 +02:00
										 |  |  |     enum ContextFlags { | 
					
						
							|  |  |  |         IgnoreContext, | 
					
						
							|  |  |  |         ContextSensitive | 
					
						
							|  |  |  |     }; | 
					
						
							| 
									
										
										
										
											2010-08-06 17:49:07 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-09-14 13:39:32 +02:00
										 |  |  |     QDeclarativeViewObserverPrivate(QDeclarativeViewObserver *); | 
					
						
							|  |  |  |     ~QDeclarativeViewObserverPrivate(); | 
					
						
							| 
									
										
										
										
											2010-07-29 12:15:55 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-09-14 13:39:32 +02:00
										 |  |  |     QDeclarativeView *view; | 
					
						
							|  |  |  |     QDeclarativeViewObserver *q; | 
					
						
							| 
									
										
										
										
											2010-09-16 12:29:06 +02:00
										 |  |  |     QDeclarativeObserverService *debugService; | 
					
						
							| 
									
										
										
										
											2010-11-11 16:50:45 +01:00
										 |  |  |     QWeakPointer<QWidget> viewport; | 
					
						
							| 
									
										
										
										
											2010-09-01 13:42:24 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-07-29 12:15:55 +02:00
										 |  |  |     QPointF cursorPos; | 
					
						
							|  |  |  |     QList<QWeakPointer<QGraphicsObject> > currentSelection; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     Constants::DesignTool currentToolMode; | 
					
						
							| 
									
										
										
										
											2011-02-09 16:59:43 +01:00
										 |  |  |     AbstractLiveEditTool *currentTool; | 
					
						
							| 
									
										
										
										
											2010-07-08 14:00:33 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-02-09 16:59:43 +01:00
										 |  |  |     LiveSelectionTool *selectionTool; | 
					
						
							| 
									
										
										
										
											2010-07-29 12:15:55 +02:00
										 |  |  |     ZoomTool *zoomTool; | 
					
						
							|  |  |  |     ColorPickerTool *colorPickerTool; | 
					
						
							|  |  |  |     SubcomponentEditorTool *subcomponentEditorTool; | 
					
						
							| 
									
										
										
										
											2011-02-09 16:59:43 +01:00
										 |  |  |     LiveLayerItem *manipulatorLayer; | 
					
						
							| 
									
										
										
										
											2010-07-08 14:00:33 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-07-29 12:15:55 +02:00
										 |  |  |     BoundingRectHighlighter *boundingRectHighlighter; | 
					
						
							| 
									
										
										
										
											2010-07-08 14:00:33 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-07-29 12:15:55 +02:00
										 |  |  |     bool designModeBehavior; | 
					
						
							| 
									
										
										
										
											2010-11-23 10:07:09 +01:00
										 |  |  |     bool showAppOnTop; | 
					
						
							| 
									
										
										
										
											2010-07-08 14:00:33 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-07-29 12:15:55 +02:00
										 |  |  |     bool executionPaused; | 
					
						
							|  |  |  |     qreal slowdownFactor; | 
					
						
							| 
									
										
										
										
											2010-07-09 16:33:09 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-02-22 14:23:57 +01:00
										 |  |  |     QmlToolBar *toolBar; | 
					
						
							| 
									
										
										
										
											2010-07-08 14:00:33 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-11-11 16:50:45 +01:00
										 |  |  |     void setViewport(QWidget *widget); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-07-30 12:56:25 +02:00
										 |  |  |     void clearEditorItems(); | 
					
						
							| 
									
										
										
										
											2011-02-22 14:11:39 +01:00
										 |  |  |     void createToolBox(); | 
					
						
							| 
									
										
										
										
											2010-07-30 12:56:25 +02:00
										 |  |  |     void changeToSelectTool(); | 
					
						
							|  |  |  |     QList<QGraphicsItem*> filterForCurrentContext(QList<QGraphicsItem*> &itemlist) const; | 
					
						
							|  |  |  |     QList<QGraphicsItem*> filterForSelection(QList<QGraphicsItem*> &itemlist) const; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     QList<QGraphicsItem*> selectableItems(const QPoint &pos) const; | 
					
						
							|  |  |  |     QList<QGraphicsItem*> selectableItems(const QPointF &scenePos) const; | 
					
						
							|  |  |  |     QList<QGraphicsItem*> selectableItems(const QRectF &sceneRect, Qt::ItemSelectionMode selectionMode) const; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-07-30 17:43:21 +02:00
										 |  |  |     void setSelectedItemsForTools(QList<QGraphicsItem *> items); | 
					
						
							| 
									
										
										
										
											2010-07-30 12:56:25 +02:00
										 |  |  |     void setSelectedItems(QList<QGraphicsItem *> items); | 
					
						
							|  |  |  |     QList<QGraphicsItem *> selectedItems(); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     void changeTool(Constants::DesignTool tool, | 
					
						
							|  |  |  |                     Constants::ToolFlags flags = Constants::NoToolFlags); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     void clearHighlight(); | 
					
						
							| 
									
										
										
										
											2010-08-04 18:53:01 +02:00
										 |  |  |     void highlight(QList<QGraphicsObject *> item, ContextFlags flags = ContextSensitive); | 
					
						
							|  |  |  |     void highlight(QGraphicsObject *item, ContextFlags flags = ContextSensitive); | 
					
						
							| 
									
										
										
										
											2010-07-30 12:56:25 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  |     bool mouseInsideContextItem() const; | 
					
						
							|  |  |  |     bool isEditorItem(QGraphicsItem *item) const; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     QGraphicsItem *currentRootItem() const; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-26 17:11:17 +02:00
										 |  |  |     void enterContext(QGraphicsItem *itemToEnter); | 
					
						
							| 
									
										
										
										
											2010-07-30 12:56:25 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-01-12 12:27:12 +01:00
										 |  |  | public slots: | 
					
						
							| 
									
										
										
										
											2010-07-30 12:56:25 +02:00
										 |  |  |     void _q_reloadView(); | 
					
						
							|  |  |  |     void _q_onStatusChanged(QDeclarativeView::Status status); | 
					
						
							|  |  |  |     void _q_onCurrentObjectsChanged(QList<QObject*> objects); | 
					
						
							|  |  |  |     void _q_applyChangesFromClient(); | 
					
						
							|  |  |  |     void _q_createQmlObject(const QString &qml, QObject *parent, | 
					
						
							|  |  |  |                             const QStringList &imports, const QString &filename = QString()); | 
					
						
							| 
									
										
										
										
											2010-08-26 17:38:31 +02:00
										 |  |  |     void _q_reparentQmlObject(QObject *, QObject *); | 
					
						
							| 
									
										
										
										
											2010-07-30 12:56:25 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  |     void _q_changeToSingleSelectTool(); | 
					
						
							|  |  |  |     void _q_changeToMarqueeSelectTool(); | 
					
						
							|  |  |  |     void _q_changeToZoomTool(); | 
					
						
							|  |  |  |     void _q_changeToColorPickerTool(); | 
					
						
							| 
									
										
										
										
											2010-08-03 10:17:09 +02:00
										 |  |  |     void _q_changeContextPathIndex(int index); | 
					
						
							| 
									
										
										
										
											2010-08-03 14:07:30 +02:00
										 |  |  |     void _q_clearComponentCache(); | 
					
						
							| 
									
										
										
										
											2010-10-22 12:41:39 +02:00
										 |  |  |     void _q_removeFromSelection(QObject *); | 
					
						
							| 
									
										
										
										
											2010-07-30 12:56:25 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-01-12 12:27:12 +01:00
										 |  |  | public: | 
					
						
							| 
									
										
										
										
											2010-09-14 13:39:32 +02:00
										 |  |  |     static QDeclarativeViewObserverPrivate *get(QDeclarativeViewObserver *v) { return v->d_func(); } | 
					
						
							| 
									
										
										
										
											2010-07-08 14:00:33 +02:00
										 |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-09-22 09:59:18 +02:00
										 |  |  | } // namespace QmlJSDebugger
 | 
					
						
							| 
									
										
										
										
											2010-07-08 14:00:33 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-09-27 10:46:08 +02:00
										 |  |  | #endif // QDECLARATIVEVIEWOBSERVER_P_H
 |