Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
F
flatpak-qt-creator
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Marco Bubke
flatpak-qt-creator
Commits
6fc26463
Commit
6fc26463
authored
Mar 24, 2010
by
Kai Koehne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
QmlDesigner: Cleanup of NodeInstanceView
Reviewed-by: Marco Bubke
parent
12ef2e84
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
48 deletions
+10
-48
src/plugins/qmldesigner/components/stateseditor/stateseditorview.cpp
.../qmldesigner/components/stateseditor/stateseditorview.cpp
+0
-2
src/plugins/qmldesigner/core/include/nodeinstanceview.h
src/plugins/qmldesigner/core/include/nodeinstanceview.h
+10
-32
src/plugins/qmldesigner/core/instances/nodeinstanceview.cpp
src/plugins/qmldesigner/core/instances/nodeinstanceview.cpp
+0
-14
No files found.
src/plugins/qmldesigner/components/stateseditor/stateseditorview.cpp
View file @
6fc26463
...
...
@@ -401,7 +401,6 @@ QPixmap StatesEditorView::renderState(int i)
return
QPixmap
();
Q_ASSERT
(
i
>=
0
&&
i
<
m_modelStates
.
size
());
nodeInstanceView
()
->
setBlockChangeSignal
(
true
);
QmlModelState
oldState
=
currentState
();
setCurrentStateSilent
(
i
);
...
...
@@ -430,7 +429,6 @@ QPixmap StatesEditorView::renderState(int i)
nodeInstanceView
()
->
render
(
&
painter
,
pixmap
.
rect
(),
nodeInstanceView
()
->
sceneRect
());
setCurrentState
(
m_modelStates
.
indexOf
(
oldState
));
nodeInstanceView
()
->
setBlockChangeSignal
(
false
);
Q_ASSERT
(
oldState
==
currentState
());
...
...
src/plugins/qmldesigner/core/include/nodeinstanceview.h
View file @
6fc26463
...
...
@@ -27,25 +27,20 @@
**
**************************************************************************/
#ifndef
ABSTRACT
NODEINSTANCEVIEW_H
#define
ABSTRACT
NODEINSTANCEVIEW_H
#ifndef NODEINSTANCEVIEW_H
#define NODEINSTANCEVIEW_H
#include "corelib_global.h"
#include "abstractview.h"
#include <QtGui/QWidget>
#include <QtCore/QHash>
#include <QtScript/QScriptEngine>
#include <QWeakPointer>
#include <QtCore/QHash>
#include <modelnode.h>
#include <nodeinstance.h>
QT_BEGIN_NAMESPACE
#include <QHash>
#include <QWeakPointer>
class
QDeclarativeEngine
;
class
QGraphicsScene
;
class
QGraphicsView
;
QT_END_NAMESPACE
namespace
QmlDesigner
{
...
...
@@ -61,6 +56,7 @@ class CORESHARED_EXPORT NodeInstanceView : public AbstractView
friend
class
NodeInstance
;
friend
class
Internal
::
ObjectNodeInstance
;
friend
class
Internal
::
QmlStateNodeInstance
;
public:
typedef
QWeakPointer
<
NodeInstanceView
>
Pointer
;
...
...
@@ -79,21 +75,9 @@ public:
void
bindingPropertiesChanged
(
const
QList
<
BindingProperty
>&
propertyList
,
PropertyChangeFlags
propertyChange
);
void
nodeReparented
(
const
ModelNode
&
node
,
const
NodeAbstractProperty
&
newPropertyParent
,
const
NodeAbstractProperty
&
oldPropertyParent
,
AbstractView
::
PropertyChangeFlags
propertyChange
);
void
rootNodeTypeChanged
(
const
QString
&
type
,
int
majorVersion
,
int
minorVersion
);
void
fileUrlChanged
(
const
QUrl
&
oldUrl
,
const
QUrl
&
newUrl
);
void
nodeIdChanged
(
const
ModelNode
&
node
,
const
QString
&
newId
,
const
QString
&
oldId
);
void
modelStateAboutToBeRemoved
(
const
ModelState
&
modelState
);
void
modelStateAdded
(
const
ModelState
&
modelState
);
void
nodeStatesAboutToBeRemoved
(
const
QList
<
ModelNode
>
&
nodeStateList
);
void
nodeStatesAdded
(
const
QList
<
ModelNode
>
&
nodeStateList
);
void
nodeOrderChanged
(
const
NodeListProperty
&
listProperty
,
const
ModelNode
&
movedNode
,
int
oldIndex
);
NodeInstance
rootNodeInstance
()
const
;
NodeInstance
viewNodeInstance
()
const
;
void
selectedNodesChanged
(
const
QList
<
ModelNode
>
&
selectedNodeList
,
const
QList
<
ModelNode
>
&
lastSelectedNodeList
);
QList
<
NodeInstance
>
instances
()
const
;
...
...
@@ -103,13 +87,9 @@ public:
NodeInstance
instanceForObject
(
QObject
*
object
);
bool
hasInstanceForObject
(
QObject
*
object
);
void
anchorsChanged
(
const
ModelNode
&
nodeState
);
void
render
(
QPainter
*
painter
,
const
QRectF
&
target
=
QRectF
(),
const
QRectF
&
source
=
QRect
(),
Qt
::
AspectRatioMode
aspectRatioMode
=
Qt
::
KeepAspectRatio
);
QRectF
boundingRect
()
const
;
QRectF
sceneRect
()
const
;
void
setBlockChangeSignal
(
bool
block
);
void
notifyPropertyChange
(
const
ModelNode
&
modelNode
,
const
QString
&
propertyName
);
...
...
@@ -123,13 +103,12 @@ public:
void
activateState
(
const
NodeInstance
&
instance
);
void
activateBaseState
();
signals:
void
instanceRemoved
(
const
NodeInstance
&
nodeInstance
);
private
slots
:
void
emitParentChanged
(
QObject
*
child
);
private:
// functions
NodeInstance
rootNodeInstance
()
const
;
NodeInstance
loadNode
(
const
ModelNode
&
rootNode
,
QObject
*
objectToBeWrapped
=
0
);
void
loadModel
(
Model
*
model
);
void
loadNodes
(
const
QList
<
ModelNode
>
&
nodeList
);
...
...
@@ -164,10 +143,9 @@ private: //variables
QWeakPointer
<
QmlModelView
>
m_qmlModelView
;
bool
m_blockChangeSignal
;
bool
m_blockStatePropertyChanges
;
};
}
}
// namespace NodeInstanceView
#endif //
ABSTRACT
NODEINSTANCEVIEW_H
#endif // NODEINSTANCEVIEW_H
src/plugins/qmldesigner/core/instances/nodeinstanceview.cpp
View file @
6fc26463
...
...
@@ -92,7 +92,6 @@ NodeInstanceView::NodeInstanceView(QObject *parent)
:
AbstractView
(
parent
),
m_graphicsView
(
new
QGraphicsView
),
m_engine
(
new
QDeclarativeEngine
(
this
)),
m_blockChangeSignal
(
false
),
m_blockStatePropertyChanges
(
false
)
{
m_graphicsView
->
setAttribute
(
Qt
::
WA_DontShowOnScreen
,
true
);
...
...
@@ -550,7 +549,6 @@ void NodeInstanceView::removeInstanceNodeRelationship(const ModelNode &node)
NodeInstance
instance
=
instanceForNode
(
node
);
m_objectInstanceHash
.
remove
(
instanceForNode
(
node
).
internalObject
());
m_nodeInstanceHash
.
remove
(
node
);
emit
instanceRemoved
(
instance
);
instance
.
makeInvalid
();
}
...
...
@@ -655,13 +653,6 @@ void NodeInstanceView::render(QPainter * painter, const QRectF &target, const QR
}
}
QRectF
NodeInstanceView
::
boundingRect
()
const
{
if
(
m_graphicsView
)
return
m_graphicsView
->
scene
()
->
itemsBoundingRect
();
return
QRectF
();
}
QRectF
NodeInstanceView
::
sceneRect
()
const
{
if
(
m_graphicsView
)
...
...
@@ -670,9 +661,4 @@ QRectF NodeInstanceView::sceneRect() const
return
QRectF
();
}
void
NodeInstanceView
::
setBlockChangeSignal
(
bool
block
)
{
m_blockChangeSignal
=
block
;
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment