Skip to content
GitLab
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
96cb6d00
Commit
96cb6d00
authored
Jul 09, 2010
by
Thomas Hartmann
Browse files
QmlDesigner: keep context widget inside the text editor
parent
74610a91
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/plugins/qmldesigner/components/propertyeditor/contextpanewidget.cpp
View file @
96cb6d00
...
...
@@ -178,13 +178,17 @@ void ContextPaneWidget::mouseReleaseEvent(QMouseEvent *event)
void
ContextPaneWidget
::
mouseMoveEvent
(
QMouseEvent
*
event
)
{
if
(
event
->
buttons
()
&&
Qt
::
LeftButton
)
{
if
(
pos
().
x
()
<
10
&&
event
->
pos
().
x
()
<
-
20
)
return
;
if
(
m_oldPos
!=
QPoint
(
-
1
,
-
1
))
{
QPoint
diff
=
event
->
globalPos
()
-
m_oldPos
;
move
(
pos
()
+
diff
);
if
(
m_bauhausColorDialog
)
m_bauhausColorDialog
->
move
(
m_bauhausColorDialog
->
pos
()
+
diff
);
m_xPos
=
pos
().
x
();
if
(
m_bauhausColorDialog
)
{
QPoint
newPos
=
pos
()
+
diff
;
if
(
newPos
.
x
()
>
0
&&
newPos
.
y
()
>
0
&&
(
newPos
.
x
()
+
width
())
<
parentWidget
()
->
width
()
&&
(
newPos
.
y
()
+
height
())
<
parentWidget
()
->
height
())
{
m_bauhausColorDialog
->
move
(
m_bauhausColorDialog
->
pos
()
+
diff
);
move
(
newPos
);
}
}
}
else
{
m_opacityEffect
=
new
QGraphicsOpacityEffect
;
setGraphicsEffect
(
m_opacityEffect
);
...
...
src/plugins/qmldesigner/qmlcontextpane.h
View file @
96cb6d00
...
...
@@ -28,7 +28,7 @@ class QmlContextPane : public QmlJS::IContextPane
public:
QmlContextPane
(
QObject
*
parent
=
0
);
~
QmlContextPane
();
void
apply
(
TextEditor
::
BaseTextEditorEditable
*
editor
,
QmlJS
::
Document
::
Ptr
doc
,
QmlJS
::
AST
::
Node
*
node
,
bool
update
);
void
apply
(
TextEditor
::
BaseTextEditorEditable
*
editor
,
QmlJS
::
Document
::
Ptr
doc
,
const
QmlJS
::
Snapshot
&
snapshot
,
QmlJS
::
AST
::
Node
*
node
,
bool
update
);
void
setProperty
(
const
QString
&
propertyName
,
const
QVariant
&
value
);
void
removeProperty
(
const
QString
&
propertyName
);
void
setEnabled
(
bool
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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