Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
OpenBoard
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lifo
Nicolas Ollinger
OpenBoard
Commits
f4fffe47
Commit
f4fffe47
authored
13 years ago
by
Ivan Ilyin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
unstable but fresh changes multiple selection and grouping
parent
eb83f272
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
19 additions
and
27 deletions
+19
-27
UBBoardView.cpp
src/board/UBBoardView.cpp
+2
-3
UBBoardView.h
src/board/UBBoardView.h
+1
-0
UBGraphicsItemDelegate.h
src/domain/UBGraphicsItemDelegate.h
+1
-1
UBGraphicsScene.cpp
src/domain/UBGraphicsScene.cpp
+0
-1
UBGraphicsWidgetItem.cpp
src/domain/UBGraphicsWidgetItem.cpp
+6
-0
UBGraphicsWidgetItem.h
src/domain/UBGraphicsWidgetItem.h
+2
-0
ubgraphicsgroupcontaineritem.cpp
src/domain/ubgraphicsgroupcontaineritem.cpp
+6
-0
ubgraphicsgroupcontaineritem.h
src/domain/ubgraphicsgroupcontaineritem.h
+1
-1
ubgraphicsgroupcontaineritemdelegate.cpp
src/domain/ubgraphicsgroupcontaineritemdelegate.cpp
+0
-17
ubgraphicsgroupcontaineritemdelegate.h
src/domain/ubgraphicsgroupcontaineritemdelegate.h
+0
-4
No files found.
src/board/UBBoardView.cpp
View file @
f4fffe47
...
...
@@ -516,8 +516,6 @@ void UBBoardView::mousePressEvent (QMouseEvent *event)
}
}
QSet
<
QGraphicsItem
*>
mJustSelectedItems
;
void
UBBoardView
::
mouseMoveEvent
(
QMouseEvent
*
event
)
{
...
...
@@ -563,7 +561,8 @@ UBBoardView::mouseMoveEvent (QMouseEvent *event)
||
item
->
type
()
==
UBGraphicsPixmapItem
::
Type
||
item
->
type
()
==
UBGraphicsVideoItem
::
Type
||
item
->
type
()
==
UBGraphicsAudioItem
::
Type
||
item
->
type
()
==
UBGraphicsSvgItem
::
Type
)
{
||
item
->
type
()
==
UBGraphicsSvgItem
::
Type
||
item
->
type
()
==
UBGraphicsTextItem
::
Type
)
{
if
(
!
mJustSelectedItems
.
contains
(
item
))
{
item
->
setSelected
(
true
);
...
...
This diff is collapsed.
Click to expand it.
src/board/UBBoardView.h
View file @
f4fffe47
...
...
@@ -125,6 +125,7 @@ class UBBoardView : public QGraphicsView
QMouseEvent
*
suspendedMousePressEvent
;
UBRubberBand
*
mUBRubberBand
;
QSet
<
QGraphicsItem
*>
mJustSelectedItems
;
private
slots
:
...
...
This diff is collapsed.
Click to expand it.
src/domain/UBGraphicsItemDelegate.h
View file @
f4fffe47
...
...
@@ -4,7 +4,7 @@
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* This progra
scene
m is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
...
...
This diff is collapsed.
Click to expand it.
src/domain/UBGraphicsScene.cpp
View file @
f4fffe47
...
...
@@ -1784,7 +1784,6 @@ QGraphicsItem* UBGraphicsScene::scaleToFitDocumentSize(QGraphicsItem* item, bool
return
item
;
}
void
UBGraphicsScene
::
addRuler
(
QPointF
center
)
{
UBGraphicsRuler
*
ruler
=
new
UBGraphicsRuler
();
// mem : owned and destroyed by the scene
...
...
This diff is collapsed.
Click to expand it.
src/domain/UBGraphicsWidgetItem.cpp
View file @
f4fffe47
...
...
@@ -91,6 +91,12 @@ void UBGraphicsWidgetItem::hoverLeaveEvent(QGraphicsSceneHoverEvent *event)
mDelegate
->
hoverLeaveEvent
(
event
);
UBGraphicsProxyWidget
::
hoverLeaveEvent
(
event
);
}
void
UBGraphicsWidgetItem
::
hoverMoveEvent
(
QGraphicsSceneHoverEvent
*
event
)
{
qDebug
()
<<
"hover move catched"
;
UBGraphicsProxyWidget
::
hoverMoveEvent
(
event
);
}
bool
UBGraphicsWidgetItem
::
eventFilter
(
QObject
*
obj
,
QEvent
*
event
)
{
...
...
This diff is collapsed.
Click to expand it.
src/domain/UBGraphicsWidgetItem.h
View file @
f4fffe47
...
...
@@ -87,6 +87,8 @@ class UBGraphicsWidgetItem : public UBGraphicsProxyWidget
virtual
void
hoverEnterEvent
(
QGraphicsSceneHoverEvent
*
event
);
virtual
void
hoverLeaveEvent
(
QGraphicsSceneHoverEvent
*
event
);
virtual
void
hoverMoveEvent
(
QGraphicsSceneHoverEvent
*
event
);
virtual
bool
eventFilter
(
QObject
*
obj
,
QEvent
*
event
);
...
...
This diff is collapsed.
Click to expand it.
src/domain/ubgraphicsgroupcontaineritem.cpp
View file @
f4fffe47
...
...
@@ -63,6 +63,12 @@ void UBGraphicsGroupContainerItem::destroy() {
mDelegate
->
remove
(
true
);
}
void
UBGraphicsGroupContainerItem
::
hoverMoveEvent
(
QGraphicsSceneHoverEvent
*
event
)
{
qDebug
()
<<
"hover move group"
;
QGraphicsItemGroup
::
hoverMoveEvent
(
event
);
}
void
UBGraphicsGroupContainerItem
::
mousePressEvent
(
QGraphicsSceneMouseEvent
*
event
)
{
if
(
mDelegate
->
mousePressEvent
(
event
))
{
...
...
This diff is collapsed.
Click to expand it.
src/domain/ubgraphicsgroupcontaineritem.h
View file @
f4fffe47
...
...
@@ -26,7 +26,7 @@ public:
protected
:
virtual
void
hoverMoveEvent
(
QGraphicsSceneHoverEvent
*
event
);
virtual
void
mousePressEvent
(
QGraphicsSceneMouseEvent
*
event
);
virtual
void
mouseMoveEvent
(
QGraphicsSceneMouseEvent
*
event
);
virtual
void
mouseReleaseEvent
(
QGraphicsSceneMouseEvent
*
event
);
...
...
This diff is collapsed.
Click to expand it.
src/domain/ubgraphicsgroupcontaineritemdelegate.cpp
View file @
f4fffe47
...
...
@@ -44,21 +44,4 @@ void UBGraphicsGroupContainerItemDelegate::decorateMenu(QMenu *menu)
void
UBGraphicsGroupContainerItemDelegate
::
buildButtons
()
{
UBGraphicsItemDelegate
::
buildButtons
();
mDestroyGroupButton
=
new
DelegateButton
(
":/images/font.svg"
,
mDelegated
,
mFrame
,
Qt
::
TopLeftSection
);
mButtons
<<
mDestroyGroupButton
;
connect
(
mDestroyGroupButton
,
SIGNAL
(
clicked
()),
(
UBGraphicsGroupContainerItemDelegate
*
)
this
,
SLOT
(
destroyGroup
()));
}
void
UBGraphicsGroupContainerItemDelegate
::
destroyGroup
()
{
qDebug
()
<<
"got an event"
;
foreach
(
QGraphicsItem
*
item
,
delegated
()
->
childItems
())
{
delegated
()
->
removeFromGroup
(
item
);
item
->
setFlag
(
QGraphicsItem
::
ItemIsSelectable
,
true
);
}
remove
(
true
);
}
This diff is collapsed.
Click to expand it.
src/domain/ubgraphicsgroupcontaineritemdelegate.h
View file @
f4fffe47
...
...
@@ -17,10 +17,6 @@ protected:
virtual
void
decorateMenu
(
QMenu
*
menu
);
virtual
void
buildButtons
();
private
slots
:
void
destroyGroup
();
private
:
DelegateButton
*
mDestroyGroupButton
;
};
...
...
This diff is collapsed.
Click to expand it.
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