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
92c44dc0
Commit
92c44dc0
authored
Aug 14, 2012
by
Aleksei Kanash
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed some merge errors.
Fixed SANKORE-902 - undo and redo works fine for deleted Media Items.
parent
41d8e4e4
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
16 deletions
+5
-16
UBGraphicsItemDelegate.cpp
src/domain/UBGraphicsItemDelegate.cpp
+0
-6
UBGraphicsItemDelegate.h
src/domain/UBGraphicsItemDelegate.h
+1
-1
UBGraphicsMediaItemDelegate.cpp
src/domain/UBGraphicsMediaItemDelegate.cpp
+4
-9
No files found.
src/domain/UBGraphicsItemDelegate.cpp
View file @
92c44dc0
...
...
@@ -1190,8 +1190,6 @@ void DelegateMediaControl::positionHandles()
mLCDTimerArea
.
setHeight
(
parentItem
()
->
boundingRect
().
height
());
lcdTimer
->
setRect
(
mLCDTimerArea
);
lcdTimer
->
setPos
(
mSeecArea
.
width
()
-
mLCDTimerArea
.
width
(),
0
);
//lcdTimer->setRect(mLCDTimerArea);
//lcdTimer->setPos(mSeecArea.width()-mLCDTimerArea.width(),0);
mSeecArea
.
setWidth
(
rect
().
width
()
-
mLCDTimerArea
.
width
());
...
...
@@ -1200,8 +1198,6 @@ void DelegateMediaControl::positionHandles()
setRect
(
selfRect
);
lcdTimer
->
setPos
(
rect
().
width
()
-
mLCDTimerArea
.
width
(),
0
);
//lcdTimer->setPos(rect().width() - mLCDTimerArea.width(), 0);
}
void
DelegateMediaControl
::
update
()
...
...
@@ -1209,7 +1205,6 @@ void DelegateMediaControl::update()
QTime
t
;
t
=
t
.
addMSecs
(
mCurrentTimeInMs
<
0
?
0
:
mCurrentTimeInMs
);
lcdTimer
->
display
(
t
.
toString
(
"m:ss"
));
//lcdTimer->display(t.toString("m:ss"));
QGraphicsRectItem
::
update
();
}
...
...
@@ -1262,7 +1257,6 @@ void DelegateMediaControl::seekToMousePos(QPointF mousePos)
minX
=
frameWidth
;
length
=
mSeecArea
.
width
()
-
lcdTimer
->
rect
().
width
();
length
=
mSeecArea
.
width
()
/*- lcdTimer->rect().width()*/
;
qreal
mouseX
=
mousePos
.
x
();
if
(
mouseX
>=
(
mSeecArea
.
width
()
-
mSeecArea
.
height
()
/
2
))
...
...
src/domain/UBGraphicsItemDelegate.h
View file @
92c44dc0
...
...
@@ -284,7 +284,7 @@ class UBGraphicsItemDelegate : public QObject
qreal
mAntiScaleRatio
;
QList
<
DelegateButton
*>
mButtons
;
QList
<
DelegateButton
*>
mToolBarButtons
;
UBGraphicsToolBarItem
*
mToolBarItem
;
protected
slots
:
...
...
src/domain/UBGraphicsMediaItemDelegate.cpp
View file @
92c44dc0
...
...
@@ -94,7 +94,7 @@ void UBGraphicsMediaItemDelegate::buildButtons()
connect
(
mMuteButton
,
SIGNAL
(
clicked
(
bool
)),
delegated
(),
SLOT
(
toggleMute
()));
connect
(
mMuteButton
,
SIGNAL
(
clicked
(
bool
)),
this
,
SLOT
(
toggleMute
()));
// for changing button image
mButtons
<<
mPlayPauseButton
<<
mStopButton
<<
mMuteButton
;
m
ToolBar
Buttons
<<
mPlayPauseButton
<<
mStopButton
<<
mMuteButton
;
mToolBarItem
->
setItemsOnToolBar
(
QList
<
QGraphicsItem
*>
()
<<
mPlayPauseButton
<<
mStopButton
<<
mMediaControl
<<
mMuteButton
);
mToolBarItem
->
setVisibleOnBoard
(
true
);
...
...
@@ -156,13 +156,10 @@ void UBGraphicsMediaItemDelegate::positionHandles()
int
toolBarMinimumWidth
=
0
;
int
mediaItemWidth
=
mToolBarItem
->
boundingRect
().
width
();
foreach
(
DelegateButton
*
button
,
mButtons
)
foreach
(
DelegateButton
*
button
,
m
ToolBar
Buttons
)
{
if
(
button
->
getSection
()
==
Qt
::
TitleBarArea
)
{
mediaItemWidth
-=
button
->
boundingRect
().
width
()
+
mToolBarItem
->
getElementsPadding
();
toolBarMinimumWidth
+=
button
->
boundingRect
().
width
()
+
mToolBarItem
->
getElementsPadding
();
}
mediaItemWidth
-=
button
->
boundingRect
().
width
()
+
mToolBarItem
->
getElementsPadding
();
toolBarMinimumWidth
+=
button
->
boundingRect
().
width
()
+
mToolBarItem
->
getElementsPadding
();
}
toolBarMinimumWidth
+=
mToolBarItem
->
boundingRect
().
height
();
...
...
@@ -196,8 +193,6 @@ void UBGraphicsMediaItemDelegate::remove(bool canUndo)
QGraphicsScene
*
scene
=
mDelegated
->
scene
();
scene
->
removeItem
(
mMediaControl
);
UBGraphicsItemDelegate
::
remove
(
canUndo
);
}
...
...
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