Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Marco Bubke
flatpak-qt-creator
Commits
acb36acf
Commit
acb36acf
authored
Feb 02, 2011
by
Marco Bubke
Browse files
QmlDesigner.FormEditor: Change to component for double click
parent
3a3d9c14
Changes
4
Hide whitespace changes
Inline
Side-by-side
src/plugins/qmldesigner/components/formeditor/abstractformeditortool.cpp
View file @
acb36acf
...
...
@@ -35,6 +35,8 @@
#include "formeditorview.h"
#include "formeditorview.h"
#include <coreplugin/editormanager/editormanager.h>
#include <QtDebug>
#include <QGraphicsSceneDragDropEvent>
#include <nodemetainfo.h>
...
...
@@ -192,5 +194,15 @@ void AbstractFormEditorTool::dragMoveEvent(QGraphicsSceneDragDropEvent * /* even
Q_ASSERT
(
false
);
}
void
AbstractFormEditorTool
::
mouseDoubleClickEvent
(
const
QList
<
QGraphicsItem
*>
&
itemList
,
QGraphicsSceneMouseEvent
*
event
)
{
FormEditorItem
*
formEditorItem
=
topFormEditorItem
(
itemList
);
if
(
formEditorItem
)
{
ModelNode
doubleClickNode
=
formEditorItem
->
qmlItemNode
().
modelNode
();
if
(
doubleClickNode
.
metaInfo
().
isComponent
())
{
Core
::
EditorManager
::
instance
()
->
openEditor
(
doubleClickNode
.
metaInfo
().
componentFileName
());
event
->
accept
();
}
}
}
}
src/plugins/qmldesigner/components/formeditor/abstractformeditortool.h
View file @
acb36acf
...
...
@@ -59,7 +59,7 @@ public:
virtual
void
mouseReleaseEvent
(
const
QList
<
QGraphicsItem
*>
&
itemList
,
QGraphicsSceneMouseEvent
*
event
)
=
0
;
virtual
void
mouseDoubleClickEvent
(
const
QList
<
QGraphicsItem
*>
&
itemList
,
QGraphicsSceneMouseEvent
*
event
)
=
0
;
QGraphicsSceneMouseEvent
*
event
);
virtual
void
hoverMoveEvent
(
const
QList
<
QGraphicsItem
*>
&
itemList
,
QGraphicsSceneMouseEvent
*
event
)
=
0
;
...
...
src/plugins/qmldesigner/components/formeditor/movetool.cpp
View file @
acb36acf
...
...
@@ -40,6 +40,8 @@
#include "resizehandleitem.h"
#include "nodemetainfo.h"
#include <QApplication>
#include <QGraphicsSceneMouseEvent>
#include <QAction>
...
...
@@ -218,10 +220,9 @@ void MoveTool::mouseReleaseEvent(const QList<QGraphicsItem*> &/*itemList*/,
}
}
void
MoveTool
::
mouseDoubleClickEvent
(
const
QList
<
QGraphicsItem
*>
&
/*itemList*/
,
QGraphicsSceneMouseEvent
*
/*event*/
)
void
MoveTool
::
mouseDoubleClickEvent
(
const
QList
<
QGraphicsItem
*>
&
itemList
,
QGraphicsSceneMouseEvent
*
event
)
{
AbstractFormEditorTool
::
mouseDoubleClickEvent
(
itemList
,
event
);
}
void
MoveTool
::
itemsAboutToRemoved
(
const
QList
<
FormEditorItem
*>
&
removedItemList
)
...
...
src/plugins/qmldesigner/components/formeditor/selectiontool.cpp
View file @
acb36acf
...
...
@@ -36,6 +36,7 @@
#include "formeditorview.h"
#include "resizehandleitem.h"
#include "nodemetainfo.h"
#include <QApplication>
...
...
@@ -197,10 +198,9 @@ void SelectionTool::mouseReleaseEvent(const QList<QGraphicsItem*> &/*itemList*/,
}
void
SelectionTool
::
mouseDoubleClickEvent
(
const
QList
<
QGraphicsItem
*>
&
/*itemList*/
,
QGraphicsSceneMouseEvent
*
/*event*/
)
void
SelectionTool
::
mouseDoubleClickEvent
(
const
QList
<
QGraphicsItem
*>
&
itemList
,
QGraphicsSceneMouseEvent
*
event
)
{
AbstractFormEditorTool
::
mouseDoubleClickEvent
(
itemList
,
event
);
}
void
SelectionTool
::
keyPressEvent
(
QKeyEvent
*
event
)
...
...
Write
Preview
Supports
Markdown
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