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
94407ff1
Commit
94407ff1
authored
Jul 22, 2013
by
Didier Clerc
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'OEFUniboard' of github.com:stayonshadow/PrivateBoard into OEFUniboard
parents
e08b1f56
1a3c8da4
Changes
15
Show whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
104 additions
and
94 deletions
+104
-94
OpenBoard.pro
OpenBoard.pro
+1
-1
buildDebianPackage.sh
buildDebianPackage.sh
+8
-0
release.macx.sh
release.macx.sh
+8
-3
release.win7.vc9.bat
release.win7.vc9.bat
+4
-0
UBBoardView.cpp
src/board/UBBoardView.cpp
+29
-15
UBBoardView.h
src/board/UBBoardView.h
+0
-1
UBDisplayManager.cpp
src/core/UBDisplayManager.cpp
+4
-1
UBGraphicsDelegateFrame.cpp
src/domain/UBGraphicsDelegateFrame.cpp
+0
-3
UBGraphicsItemDelegate.cpp
src/domain/UBGraphicsItemDelegate.cpp
+7
-16
UBGraphicsItemDelegate.h
src/domain/UBGraphicsItemDelegate.h
+0
-2
UBGraphicsMediaItemDelegate.cpp
src/domain/UBGraphicsMediaItemDelegate.cpp
+38
-50
UBGraphicsMediaItemDelegate.h
src/domain/UBGraphicsMediaItemDelegate.h
+1
-1
UBGraphicsCompass.cpp
src/tools/UBGraphicsCompass.cpp
+3
-0
UBGraphicsProtractor.cpp
src/tools/UBGraphicsProtractor.cpp
+0
-1
UBGraphicsRuler.cpp
src/tools/UBGraphicsRuler.cpp
+1
-0
No files found.
OpenBoard.pro
View file @
94407ff1
...
...
@@ -11,7 +11,7 @@ CONFIG += debug_and_release \
VERSION_MAJ
=
0
VERSION_MIN
=
08
VERSION_TYPE
=
b
#
a
=
alpha
,
b
=
beta
,
r
=
release
,
other
=>
error
VERSION_PATCH
=
0
1
VERSION_PATCH
=
0
2
VERSION
=
"$${VERSION_MAJ}.$${VERSION_MIN}.$${VERSION_TYPE}.$${VERSION_PATCH}"
VERSION
=
$$
replace
(
VERSION
,
"\\.r"
,
""
)
...
...
buildDebianPackage.sh
View file @
94407ff1
...
...
@@ -132,6 +132,14 @@ buildImporter(){
IMPORTER_NAME
=
"OpenBoardImporter"
checkDir
$IMPORTER_DIR
cd
${
IMPORTER_DIR
}
rm
moc_
*
rm
-rf
debug release
rm
*
.o
git reset
--hard
git pull
$QMAKE_PATH
${
IMPORTER_NAME
}
.pro
make clean
make
-j4
...
...
release.macx.sh
View file @
94407ff1
...
...
@@ -90,6 +90,12 @@ function addImporter {
fi
cd
${
importerDir
}
git reset
--hard
git pull
rm
-rf
${
importerName
}
.app
rm
moc_
*
rm
MakeFile
*
rm
*
.o
$QMAKE
${
importerName
}
.pro
make
-j4
$MACDEPLOYQT
${
importerName
}
.app
...
...
@@ -218,7 +224,7 @@ notify "Creating dmg ..."
umount
"
$VOLUME
"
2> /dev/null
$DMGUTIL
--open
--volume
=
"
$APPLICATION_NAME
"
"
$DMG
"
cp
*
.pdf
"
$VOLUME
"
#
cp *.pdf "$VOLUME"
cp
-R
"
$APP
"
"
$VOLUME
"
ln
-s
/Applications
"
$VOLUME
"
...
...
@@ -226,8 +232,7 @@ $DMGUTIL --set --iconsize=96 --toolbar=false --icon=resources/macx/OpenBoard.icn
$DMGUTIL
--set
--x
=
20
--y
=
60
--width
=
580
--height
=
440
"
$VOLUME
"
$DMGUTIL
--set
--x
=
180
--y
=
120
"
$VOLUME
/
`
basename
\"
$APP
\"
`
"
$DMGUTIL
--set
--x
=
400
--y
=
120
"
$VOLUME
/Applications"
$DMGUTIL
--set
--x
=
180
--y
=
280
"
$VOLUME
/ReleaseNotes.pdf"
$DMGUTIL
--set
--x
=
400
--y
=
280
"
$VOLUME
/JournalDesModifications.pdf"
#$DMGUTIL --set --x=180 --y=280 "$VOLUME/ReleaseNotes.pdf"
$DMGUTIL
--close
--volume
=
"
$APPLICATION_NAME
"
"
$DMG
"
...
...
release.win7.vc9.bat
View file @
94407ff1
...
...
@@ -44,6 +44,10 @@ IF NOT EXIST "%IMPORTER_PATH%" GOTO EXIT_WITH_ERROR
set HOME_DIR="%cd%"
cd %IMPORTER_PATH%
IF EXIST "release" (del "release\*.*" /Q)
IF EXIST "debug" (del "debug\*.*" /Q)
IF EXIST "MakeFile" (del "MakeFile*" /Q)
IF EXIST "MakeFile" (del "MakeFile*" /Q)
IF EXIST "%IMPORTER_NAME%.exe" (del "%IMPORTER_NAME%.exe" /Q)
"%QT_BIN%\qmake.exe" %IMPORTER_NAME%.pro
nmake release
cd %HOME_DIR%
...
...
src/board/UBBoardView.cpp
View file @
94407ff1
...
...
@@ -349,18 +349,17 @@ void UBBoardView::tabletEvent (QTabletEvent * event)
}
}
// if event are not Pen events, we drop the tablet stuff and route everything through mouse event
if
(
currentTool
!=
UBStylusTool
::
Pen
&&
currentTool
!=
UBStylusTool
::
Line
&&
currentTool
!=
UBStylusTool
::
Marker
&&
!
mMarkerPressureSensitive
){
event
->
setAccepted
(
false
);
return
;
}
QPointF
scenePos
=
viewportTransform
().
inverted
().
map
(
tabletPos
);
qreal
pressure
=
1.0
;
if
(((
currentTool
==
UBStylusTool
::
Pen
||
currentTool
==
UBStylusTool
::
Line
)
&&
mPenPressureSensitive
)
||
(
currentTool
==
UBStylusTool
::
Marker
&&
mMarkerPressureSensitive
))
if
(((
currentTool
==
UBStylusTool
::
Pen
||
currentTool
==
UBStylusTool
::
Line
)
&&
mPenPressureSensitive
)
||
(
currentTool
==
UBStylusTool
::
Marker
&&
mMarkerPressureSensitive
))
pressure
=
event
->
pressure
();
else
{
//Explanation: rerouting to mouse event
event
->
setAccepted
(
false
);
return
;
}
bool
acceptEvent
=
true
;
#ifdef Q_WS_MAC
...
...
@@ -534,18 +533,28 @@ Here we determines cases when items should to get mouse press event at pressing
case
UBGraphicsTriangle
:
:
Type
:
case
UBGraphicsCompass
:
:
Type
:
case
UBGraphicsCache
:
:
Type
:
return
true
;
case
UBGraphicsDelegateFrame
:
:
Type
:
if
(
currentTool
==
UBStylusTool
::
Play
)
return
false
;
return
true
;
case
UBGraphicsPixmapItem
:
:
Type
:
case
UBGraphicsSvgItem
:
:
Type
:
if
(
currentTool
==
UBStylusTool
::
Play
)
return
true
;
if
(
item
->
isSelected
())
return
true
;
else
return
false
;
case
DelegateButton
:
:
Type
:
return
true
;
case
UBGraphicsMediaItem
:
:
Type
:
return
false
;
case
UBGraphicsSvgItem
:
:
Type
:
case
UBGraphicsPixmapItem
:
:
Type
:
case
UBGraphicsTextItem
:
:
Type
:
if
(
currentTool
==
UBStylusTool
::
Play
)
return
fals
e
;
return
tru
e
;
if
((
currentTool
==
UBStylusTool
::
Selector
)
&&
item
->
isSelected
())
return
true
;
if
((
currentTool
==
UBStylusTool
::
Selector
)
&&
item
->
parentItem
()
&&
item
->
parentItem
()
->
isSelected
())
...
...
@@ -553,8 +562,13 @@ Here we determines cases when items should to get mouse press event at pressing
if
(
currentTool
!=
UBStylusTool
::
Selector
)
return
false
;
break
;
case
UBGraphicsGroupContainerItem
:
:
Type
:
case
UBGraphicsItemType
:
:
StrokeItemType
:
if
(
currentTool
==
UBStylusTool
::
Play
)
return
true
;
break
;
// Groups shouldn't reacts on any presses and moves for Play tool.
case
UBGraphicsGroupContainerItem
:
:
Type
:
if
(
currentTool
==
UBStylusTool
::
Play
)
{
movingItem
=
NULL
;
...
...
@@ -594,6 +608,7 @@ bool UBBoardView::itemShouldReceiveSuspendedMousePressEvent(QGraphicsItem *item)
case
QGraphicsWebView
:
:
Type
:
return
false
;
case
UBGraphicsPixmapItem
:
:
Type
:
case
UBGraphicsSvgItem
:
:
Type
:
case
UBGraphicsTextItem
:
:
Type
:
case
UBGraphicsWidgetItem
:
:
Type
:
if
(
currentTool
==
UBStylusTool
::
Selector
&&
!
item
->
isSelected
()
&&
item
->
parentItem
())
...
...
@@ -644,6 +659,8 @@ bool UBBoardView::itemShouldBeMoved(QGraphicsItem *item)
case
UBGraphicsSvgItem
:
:
Type
:
case
UBGraphicsPixmapItem
:
:
Type
:
if
(
currentTool
==
UBStylusTool
::
Play
||
!
item
->
isSelected
())
return
true
;
if
(
item
->
isSelected
())
return
false
;
case
UBGraphicsMediaItem
:
:
Type
:
...
...
@@ -943,9 +960,6 @@ void UBBoardView::mousePressEvent (QMouseEvent *event)
mMouseDownPos
=
event
->
pos
();
movingItem
=
scene
()
->
itemAt
(
this
->
mapToScene
(
event
->
posF
().
toPoint
()));
if
(
!
movingItem
)
emit
clickOnBoard
();
if
(
event
->
button
()
==
Qt
::
LeftButton
&&
isInteractive
())
{
int
currentTool
=
(
UBStylusTool
::
Enum
)
UBDrawingController
::
drawingController
()
->
stylusTool
();
...
...
src/board/UBBoardView.h
View file @
94407ff1
...
...
@@ -63,7 +63,6 @@ public:
signals
:
void
resized
(
QResizeEvent
*
event
);
void
shown
();
void
clickOnBoard
();
void
mouseReleased
();
protected
:
...
...
src/core/UBDisplayManager.cpp
View file @
94407ff1
...
...
@@ -29,6 +29,7 @@
#include "core/UBSettings.h"
#include "board/UBBoardView.h"
#include "board/UBBoardController.h"
#include "gui/UBBlackoutWidget.h"
...
...
@@ -277,7 +278,6 @@ void UBDisplayManager::blackout()
}
}
void
UBDisplayManager
::
unBlackout
()
{
while
(
!
mBlackoutWidgets
.
isEmpty
())
...
...
@@ -287,6 +287,9 @@ void UBDisplayManager::unBlackout()
}
UBPlatformUtils
::
fadeDisplayIn
();
UBApplication
::
boardController
->
freezeW3CWidgets
(
false
);
}
...
...
src/domain/UBGraphicsDelegateFrame.cpp
View file @
94407ff1
...
...
@@ -237,9 +237,6 @@ void UBGraphicsDelegateFrame::mousePressEvent(QGraphicsSceneMouseEvent *event)
mCurrentTool
=
toolFromPos
(
event
->
pos
());
setCursorFromAngle
(
QString
::
number
((
int
)
mAngle
%
360
));
event
->
accept
();
// if (moving())
// prepareFramesToMove(getLinkedFrames());
}
void
UBGraphicsDelegateFrame
::
setCursorFromAngle
(
QString
angle
)
...
...
src/domain/UBGraphicsItemDelegate.cpp
View file @
94407ff1
...
...
@@ -1120,8 +1120,7 @@ void MediaTimer::addPoint(QPolygon &a, const QPoint &p)
a
.
setPoint
(
n
,
p
);
}
void
MediaTimer
::
paint
(
QPainter
*
p
,
const
QStyleOptionGraphicsItem
*
option
,
QWidget
*
widget
)
void
MediaTimer
::
paint
(
QPainter
*
p
,
const
QStyleOptionGraphicsItem
*
option
,
QWidget
*
widget
)
{
Q_UNUSED
(
option
);
Q_UNUSED
(
widget
);
...
...
@@ -1300,10 +1299,6 @@ QPainterPath DelegateMediaControl::shape() const
void
DelegateMediaControl
::
positionHandles
()
{
QRectF
selfRect
=
rect
();
selfRect
.
setHeight
(
parentItem
()
->
boundingRect
().
height
());
setRect
(
selfRect
);
QTime
tTotal
;
tTotal
=
tTotal
.
addMSecs
(
mTotalTimeInMs
);
mLCDTimerArea
.
setHeight
(
parentItem
()
->
boundingRect
().
height
());
...
...
@@ -1312,12 +1307,11 @@ void DelegateMediaControl::positionHandles()
mDisplayFormat
=
"ss"
;
if
(
tTotal
.
minute
()
>
0
)
{
//Explanation at least the second and minutes are diplayed
mDisplayFormat
=
"mm:"
+
mDisplayFormat
;
digitsCount
+=
3
;
timerWidth
+=
mLCDTimerArea
.
height
()
*
0.5
;
}
timerWidth
+=
mLCDTimerArea
.
height
();
if
(
tTotal
.
hour
()
>
0
)
{
...
...
@@ -1330,10 +1324,6 @@ void DelegateMediaControl::positionHandles()
mLCDTimerArea
.
setWidth
(
timerWidth
);
lcdTimer
->
setRect
(
mLCDTimerArea
);
// not the best solution, but it works.
lcdTimer
->
positionHandles
();
mLCDTimerArea
=
lcdTimer
->
rect
();
// -------------------------------------
lcdTimer
->
setPos
(
rect
().
width
()
-
mLCDTimerArea
.
width
(),
0
);
...
...
@@ -1348,6 +1338,7 @@ void DelegateMediaControl::update()
QTime
tCurrent
;
tCurrent
=
tCurrent
.
addMSecs
(
mCurrentTimeInMs
<
0
?
0
:
mCurrentTimeInMs
);
lcdTimer
->
display
(
tCurrent
.
toString
(
mDisplayFormat
));
QGraphicsRectItem
::
update
();
...
...
src/domain/UBGraphicsItemDelegate.h
View file @
94407ff1
...
...
@@ -174,7 +174,6 @@ class DelegateMediaControl: public QObject, public QGraphicsRectItem
void
positionHandles
();
void
updateTicker
(
qint64
time
);
void
totalTimeChanged
(
qint64
newTotalTime
);
QSizeF
lcdAreaSize
()
{
return
mLCDTimerArea
.
size
();}
signals
:
void
used
();
...
...
@@ -286,7 +285,6 @@ class UBGraphicsItemDelegate : public QObject
UBGraphicsFlags
ubflags
()
const
{
return
mFlags
;}
bool
testUBFlags
(
UBGraphicsFlags
pf
)
const
{
return
mFlags
&
pf
;}
void
setUBFlags
(
UBGraphicsFlags
pf
);
// void addUBFlags(UBGraphicsFlags pf) {setUBFlags(ubflags() | pf);}
void
setUBFlag
(
UBGraphicsFlags
pf
,
bool
set
=
true
);
signals
:
...
...
src/domain/UBGraphicsMediaItemDelegate.cpp
View file @
94407ff1
...
...
@@ -44,6 +44,7 @@ UBGraphicsMediaItemDelegate::UBGraphicsMediaItemDelegate(UBGraphicsMediaItem* pD
|
GF_RESPECT_RATIO
|
GF_TOOLBAR_USED
|
GF_SHOW_CONTENT_SOURCE
)
,
mPlayPauseButton
(
NULL
)
,
mMedia
(
pMedia
)
,
mToolBarShowTimer
(
NULL
)
,
m_iToolBarShowingInterval
(
5000
)
...
...
@@ -73,6 +74,7 @@ bool UBGraphicsMediaItemDelegate::mousePressEvent(QGraphicsSceneMouseEvent *even
{
Q_UNUSED
(
event
);
mToolBarItem
->
show
();
positionHandles
();
if
(
mToolBarShowTimer
)
mToolBarShowTimer
->
start
();
...
...
@@ -87,6 +89,7 @@ void UBGraphicsMediaItemDelegate::hideToolBar()
void
UBGraphicsMediaItemDelegate
::
buildButtons
()
{
if
(
!
mPlayPauseButton
){
mPlayPauseButton
=
new
DelegateButton
(
":/images/play.svg"
,
mDelegated
,
mToolBarItem
,
Qt
::
TitleBarArea
);
connect
(
mPlayPauseButton
,
SIGNAL
(
clicked
(
bool
)),
this
,
SLOT
(
togglePlayPause
()));
...
...
@@ -107,7 +110,7 @@ void UBGraphicsMediaItemDelegate::buildButtons()
mToolBarButtons
<<
mPlayPauseButton
<<
mStopButton
<<
mMuteButton
;
mToolBarItem
->
setItemsOnToolBar
(
QList
<
QGraphicsItem
*>
()
<<
mPlayPauseButton
<<
mStopButton
<<
mMediaControl
<<
mMuteButton
);
mToolBarItem
->
setItemsOnToolBar
(
QList
<
QGraphicsItem
*>
()
<<
mPlayPauseButton
<<
mStopButton
<<
mMediaControl
<<
mMuteButton
);
mToolBarItem
->
setVisibleOnBoard
(
true
);
mToolBarItem
->
setShifting
(
false
);
...
...
@@ -119,20 +122,17 @@ void UBGraphicsMediaItemDelegate::buildButtons()
connect
(
mMuteButton
,
SIGNAL
(
clicked
(
bool
)),
mToolBarShowTimer
,
SLOT
(
start
()));
}
// UBGraphicsMediaItem *audioItem = dynamic_cast<UBGraphicsMediaItem*>(mDelegated);
// if (audioItem)
// {
// if (audioItem->getMediaType() == UBGraphicsMediaItem::mediaType_Audio)
// {
positionHandles
();
// }
// }
}
}
UBGraphicsMediaItemDelegate
::~
UBGraphicsMediaItemDelegate
()
{
if
(
mToolBarShowTimer
)
if
(
mToolBarShowTimer
)
{
delete
mToolBarShowTimer
;
mToolBarShowTimer
=
NULL
;
}
}
void
UBGraphicsMediaItemDelegate
::
positionHandles
()
...
...
@@ -144,32 +144,20 @@ void UBGraphicsMediaItemDelegate::positionHandles()
{
QRectF
toolBarRect
=
mToolBarItem
->
rect
();
mToolBarItem
->
setPos
(
0
,
delegated
()
->
boundingRect
().
height
()
-
mToolBarItem
->
rect
().
height
());
mToolBarItem
->
setPos
(
0
,
mediaItem
->
boundingRect
().
height
()
-
mToolBarItem
->
rect
().
height
());
toolBarRect
.
setWidth
(
delegated
()
->
boundingRect
().
width
());
toolBarRect
.
setWidth
(
mediaItem
->
boundingRect
().
width
());
mToolBarItem
->
show
();
mToolBarItem
->
setRect
(
toolBarRect
);
}
int
toolBarMinimumWidth
=
0
;
int
mediaItemWidth
=
mToolBarItem
->
boundingRect
().
width
();
int
toolBarButtonsWidth
=
0
;
foreach
(
DelegateButton
*
button
,
mToolBarButtons
)
{
mediaItemWidth
-=
button
->
boundingRect
().
width
()
+
mToolBarItem
->
getElementsPadding
();
toolBarMinimumWidth
+=
button
->
boundingRect
().
width
()
+
mToolBarItem
->
getElementsPadding
();
}
toolBarMinimumWidth
+=
mToolBarItem
->
boundingRect
().
height
();
QWidget
*
pAudioWidget
=
delegated
()
->
widget
();
if
(
pAudioWidget
)
{
pAudioWidget
->
setMinimumSize
(
toolBarMinimumWidth
+
(
int
)
mMediaControl
->
lcdAreaSize
().
width
()
+
(
int
)
mMediaControl
->
rect
().
height
(),
26
);
}
toolBarButtonsWidth
+=
button
->
boundingRect
().
width
()
+
mToolBarItem
->
getElementsPadding
();
QRectF
mediaItemRect
=
mMediaControl
->
rect
();
mediaItemRect
.
setWidth
(
mediaItemWidth
);
mediaItemRect
.
setWidth
(
mediaItem
->
boundingRect
().
width
()
-
toolBarButtons
Width
);
mediaItemRect
.
setHeight
(
mToolBarItem
->
boundingRect
().
height
());
mMediaControl
->
setRect
(
mediaItemRect
);
...
...
src/domain/UBGraphicsMediaItemDelegate.h
View file @
94407ff1
src/tools/UBGraphicsCompass.cpp
View file @
94407ff1
...
...
@@ -122,6 +122,9 @@ void UBGraphicsCompass::paint(QPainter *painter, const QStyleOptionGraphicsItem
Q_UNUSED
(
styleOption
);
Q_UNUSED
(
widget
);
painter
->
setBrush
(
edgeFillColor
());
mAntiScaleRatio
=
1
/
(
UBApplication
::
boardController
->
systemScaleFactor
()
*
UBApplication
::
boardController
->
currentZoom
());
QTransform
antiScaleTransform
;
antiScaleTransform
.
scale
(
mAntiScaleRatio
,
mAntiScaleRatio
);
...
...
src/tools/UBGraphicsProtractor.cpp
View file @
94407ff1
...
...
@@ -488,7 +488,6 @@ void UBGraphicsProtractor::paintButtons(QPainter *painter)
void
UBGraphicsProtractor
::
paintAngleMarker
(
QPainter
*
painter
)
{
painter
->
save
();
painter
->
translate
(
rect
().
center
());
painter
->
rotate
(
-
mStartAngle
);
painter
->
translate
(
-
rect
().
center
().
x
(),
-
rect
().
center
().
y
());
...
...
src/tools/UBGraphicsRuler.cpp
View file @
94407ff1
...
...
@@ -121,6 +121,7 @@ void UBGraphicsRuler::paint(QPainter *painter, const QStyleOptionGraphicsItem *s
painter
->
setPen
(
drawColor
());
painter
->
setBrush
(
edgeFillColor
());
painter
->
setRenderHint
(
QPainter
::
Antialiasing
,
true
);
painter
->
drawRoundedRect
(
rect
(),
sRoundingRadius
,
sRoundingRadius
);
fillBackground
(
painter
);
...
...
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