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
21e57fbc
Commit
21e57fbc
authored
Jan 06, 2012
by
Ivan Ilin
Browse files
Options
Browse Files
Download
Plain Diff
git conflict fixes
parents
0e0a308d
dee67aa4
Changes
18
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
207 additions
and
130 deletions
+207
-130
sankore_fr.ts
resources/i18n/sankore_fr.ts
+3
-4
UBWidgetUniboardAPI.cpp
src/api/UBWidgetUniboardAPI.cpp
+16
-1
UBWidgetUniboardAPI.h
src/api/UBWidgetUniboardAPI.h
+13
-0
UBBoardController.cpp
src/board/UBBoardController.cpp
+1
-1
UBBoardView.cpp
src/board/UBBoardView.cpp
+86
-9
UBBoardView.h
src/board/UBBoardView.h
+1
-0
main.cpp
src/core/main.cpp
+66
-66
UBAbstractWidget.cpp
src/domain/UBAbstractWidget.cpp
+6
-4
UBAppleWidget.cpp
src/domain/UBAppleWidget.cpp
+0
-3
UBGraphicsProxyWidget.h
src/domain/UBGraphicsProxyWidget.h
+0
-1
UBGraphicsScene.cpp
src/domain/UBGraphicsScene.cpp
+10
-11
UBGraphicsScene.h
src/domain/UBGraphicsScene.h
+1
-1
UBGraphicsWidgetItem.cpp
src/domain/UBGraphicsWidgetItem.cpp
+1
-1
UBLibWebView.cpp
src/gui/UBLibWebView.cpp
+0
-1
UBRoutedMouseEventWebView.cpp
src/web/UBRoutedMouseEventWebView.cpp
+0
-1
UBRoutedMouseEventWebView.h
src/web/UBRoutedMouseEventWebView.h
+1
-1
UBWebController.cpp
src/web/UBWebController.cpp
+1
-24
UBWebController.h
src/web/UBWebController.h
+1
-1
No files found.
resources/i18n/sankore_fr.ts
View file @
21e57fbc
...
...
@@ -1111,9 +1111,9 @@
<
/message
>
<
message
numerus
=
"yes"
>
<
source
>
Are
you
sure
you
want
to
remove
%
n
page
(
s
)
from
the
selected
document
&
apos
;
%
1
&
apos
;?
<
/source
>
<
translation
type
=
"unfinished"
>
<
numerusform
><
/numerusform
>
<
numerusform
><
/numerusform
>
<
translation
>
<
numerusform
>
Ê
tes
-
vous
s
û
r
de
bien
vouloir
effacer
%
n
page
de
ce
document
&
apos
;
%
1
&
apos
;?
<
/numerusform
>
<
numerusform
>
Ê
tes
-
vous
s
û
r
de
bien
vouloir
effacer
%
n
pages
de
ce
document
&
apos
;
%
1
&
apos
;?
<
/numerusform
>
<
/translation
>
<
/message
>
<
/context
>
...
...
@@ -1204,7 +1204,6 @@
<
source
>%
1
pages
copied
<
/source
>
<
translation
type
=
"unfinished"
>
<
numerusform
><
/numerusform
>
<
numerusform
><
/numerusform
>
<
/translation
>
<
/message
>
<
/context
>
...
...
src/api/UBWidgetUniboardAPI.cpp
View file @
21e57fbc
...
...
@@ -294,7 +294,6 @@ int UBWidgetUniboardAPI::currentPageNumber()
return
UBApplication
::
boardController
->
activeSceneIndex
()
+
1
;
}
void
UBWidgetUniboardAPI
::
showMessage
(
const
QString
&
message
)
{
UBApplication
::
boardController
->
showMessage
(
message
,
false
);
...
...
@@ -429,6 +428,22 @@ void UBWidgetUniboardAPI::sendFileMetadata(QString metaData)
UBApplication
::
boardController
->
displayMetaData
(
qmMetaDatas
);
}
void
UBWidgetUniboardAPI
::
enableDropOnWidget
()
{
mGraphicsWidget
->
setAcceptDrops
(
true
);
}
QString
UBWidgetUniboardAPI
::
downloadUrl
(
QString
objectUrl
)
{
qDebug
()
<<
"UBWidgetUniboardAPI : "
<<
objectUrl
;
QUrl
widgetUrl
=
mGraphicsWidget
->
widgetWebView
()
->
widgetUrl
();
QString
destFileName
=
widgetUrl
.
toString
()
+
"/objects/"
+
QUuid
::
createUuid
().
toString
();
QFile
(
objectUrl
).
copy
(
destFileName
);
qDebug
()
<<
"destFileName : "
<<
destFileName
;
return
destFileName
.
remove
(
widgetUrl
.
toString
());
}
UBDocumentDatastoreAPI
::
UBDocumentDatastoreAPI
(
UBGraphicsW3CWidgetItem
*
graphicsWidget
)
:
UBW3CWebStorage
(
graphicsWidget
)
,
mGraphicsW3CWidget
(
graphicsWidget
)
...
...
src/api/UBWidgetUniboardAPI.h
View file @
21e57fbc
...
...
@@ -234,6 +234,19 @@ class UBWidgetUniboardAPI : public QObject
*/
void
sendFileMetadata
(
QString
metaData
);
// widget download
/**
* If the widget support a the drop of an object it will notify sankore about this.
*/
void
enableDropOnWidget
();
/**
* When an object is dropped on a widget, this one send us the informations to download it locally.
* this method download the object on the widget directory and return the path of the downloaded object
*/
QString
downloadUrl
(
QString
objectUrl
);
private
:
QString
uuid
();
...
...
src/board/UBBoardController.cpp
View file @
21e57fbc
...
...
@@ -1055,7 +1055,7 @@ void UBBoardController::downloadFinished(bool pSuccess, QUrl sourceUrl, QString
}
else
if
(
sourceUrl
.
toString
()
==
UBToolsManager
::
manager
()
->
mask
.
id
)
{
mActiveScene
->
addMask
();
mActiveScene
->
addMask
(
pPos
);
UBDrawingController
::
drawingController
()
->
setStylusTool
(
UBStylusTool
::
Selector
);
}
else
...
...
src/board/UBBoardView.cpp
View file @
21e57fbc
...
...
@@ -708,23 +708,100 @@ UBBoardView::drawItems (QPainter *painter, int numItems,
}
}
void
UBBoardView
::
dragEnterEvent
(
QDragEnterEvent
*
event
)
void
UBBoardView
::
dragEnterEvent
(
QDragEnterEvent
*
event
)
{
// TODO UB 4.x be smarter with drag accept code .... we cannot handle everything ...
event
->
acceptProposedAction
();
// TODO UB 4.x be smarter with drag accept code .... we cannot handle everything ...
event
->
acceptProposedAction
();
}
void
UBBoardView
::
dragMoveEvent
(
QDragMoveEvent
*
event
)
void
UBBoardView
::
dragMoveEvent
(
QDragMoveEvent
*
event
)
{
event
->
acceptProposedAction
();
QGraphicsItem
*
graphicsItemAtPos
=
itemAt
(
event
->
pos
().
x
(),
event
->
pos
().
y
());
UBGraphicsWidgetItem
*
graphicsWidget
=
dynamic_cast
<
UBGraphicsWidgetItem
*>
(
graphicsItemAtPos
);
if
(
graphicsWidget
&&
graphicsWidget
->
acceptDrops
()){
QPoint
newPoint
(
graphicsWidget
->
mapFromScene
(
mapToScene
(
event
->
pos
())).
toPoint
());
QDragMoveEvent
newEvent
(
newPoint
,
event
->
dropAction
(),
event
->
mimeData
(),
event
->
mouseButtons
(),
event
->
keyboardModifiers
());
QApplication
::
sendEvent
(
graphicsWidget
->
widgetWebView
(),
&
newEvent
);
return
;
}
event
->
acceptProposedAction
();
}
void
UBBoardView
::
dropEvent
(
QDropEvent
*
event
)
QList
<
QUrl
>
UBBoardView
::
processMimeData
(
const
QMimeData
*
pMimeData
)
{
QList
<
QUrl
>
result
;
if
(
pMimeData
->
hasHtml
())
{
QString
qsHtml
=
pMimeData
->
html
();
result
.
append
(
QUrl
(
UBApplication
::
urlFromHtml
(
qsHtml
)));
}
if
(
pMimeData
->
hasUrls
())
{
result
.
append
(
pMimeData
->
urls
());
return
result
;
}
if
(
pMimeData
->
hasImage
())
{
qWarning
()
<<
"Not supported yet"
;
}
if
(
pMimeData
->
hasText
())
{
if
(
""
!=
pMimeData
->
text
()){
// Sometimes, it is possible to have an URL as text. we check here if it is the case
QString
qsTmp
=
pMimeData
->
text
().
remove
(
QRegExp
(
"[
\\
0]"
));
if
(
qsTmp
.
startsWith
(
"http"
)){
result
.
append
(
QUrl
(
qsTmp
));
}
else
{
qWarning
()
<<
"what to do with this : "
<<
pMimeData
->
text
();
//mActiveScene->addText(pMimeData->text(), pPos);
}
}
else
{
#ifdef Q_WS_MACX
// With Safari, in 95% of the drops, the mime datas are hidden in Apple Web Archive pasteboard type.
// This is due to the way Safari is working so we have to dig into the pasteboard in order to retrieve
// the data.
QString
qsUrl
=
UBPlatformUtils
::
urlFromClipboard
();
if
(
""
!=
qsUrl
){
// We finally got the url of the dropped ressource! Let's import it!
result
.
append
(
QUrl
(
qsUrl
));
}
#endif
}
}
return
result
;
}
void
UBBoardView
::
dropEvent
(
QDropEvent
*
event
)
{
qDebug
()
<<
event
->
source
();
QGraphicsItem
*
graphicsItemAtPos
=
itemAt
(
event
->
pos
().
x
(),
event
->
pos
().
y
());
UBGraphicsWidgetItem
*
graphicsWidget
=
dynamic_cast
<
UBGraphicsWidgetItem
*>
(
graphicsItemAtPos
);
bool
acceptDrops
(
false
);
if
(
graphicsWidget
)
{
acceptDrops
=
graphicsWidget
->
acceptDrops
();
graphicsWidget
->
setAcceptDrops
(
true
);
}
if
(
graphicsWidget
&&
graphicsWidget
->
acceptDrops
()){
// A new event is build to avoid problem related to different way to pass the mime type
// A parsing is done to try to provide a mimeType with only urls.
QMimeData
mimeData
;
mimeData
.
setData
(
"Text"
,
processMimeData
(
event
->
mimeData
()).
at
(
0
).
toString
().
toAscii
());
QPoint
newPoint
(
graphicsWidget
->
mapFromScene
(
mapToScene
(
event
->
pos
())).
toPoint
());
QDropEvent
cleanedEvent
(
newPoint
,
event
->
dropAction
(),
&
mimeData
,
event
->
mouseButtons
(),
event
->
keyboardModifiers
());
QApplication
::
sendEvent
(
graphicsWidget
->
widgetWebView
(),
&
cleanedEvent
);
cleanedEvent
.
acceptProposedAction
();
event
->
acceptProposedAction
();
return
;
}
if
(
!
event
->
source
()
||
dynamic_cast
<
UBThumbnailWidget
*>
(
event
->
source
())
||
dynamic_cast
<
QWebView
*>
(
event
->
source
()))
{
mController
->
processMimeData
(
event
->
mimeData
(),
mapToScene
(
event
->
pos
()));
...
...
src/board/UBBoardView.h
View file @
21e57fbc
...
...
@@ -86,6 +86,7 @@ class UBBoardView : public QGraphicsView
return
(
ok
&&
(
itemLayerType
>=
mStartLayer
&&
itemLayerType
<=
mEndLayer
));
}
QList
<
QUrl
>
processMimeData
(
const
QMimeData
*
pMimeData
);
UBBoardController
*
mController
;
...
...
src/core/main.cpp
View file @
21e57fbc
...
...
@@ -33,112 +33,112 @@
*/
void
ub_message_output
(
QtMsgType
type
,
const
char
*
msg
)
{
// We must temporarily remove the handler to avoid the infinite recursion of
// ub_message_output -> qt_message_output -> ub_message_output -> qt_message_output ...
QtMsgHandler
previousHandler
=
qInstallMsgHandler
(
0
);
// We must temporarily remove the handler to avoid the infinite recursion of
// ub_message_output -> qt_message_output -> ub_message_output -> qt_message_output ...
QtMsgHandler
previousHandler
=
qInstallMsgHandler
(
0
);
#if defined(QT_NO_DEBUG)
// Suppress qDebug output in release builds
if
(
type
!=
QtDebugMsg
)
{
qt_message_output
(
type
,
msg
);
}
// Suppress qDebug output in release builds
if
(
type
!=
QtDebugMsg
)
{
qt_message_output
(
type
,
msg
);
}
#else
// Default output in debug builds
qt_message_output
(
type
,
msg
);
// Default output in debug builds
qt_message_output
(
type
,
msg
);
#endif
if
(
UBApplication
::
app
()
&&
UBApplication
::
app
()
->
isVerbose
())
{
QString
logFileNamePath
=
UBSettings
::
uniboardDataDirectory
()
+
"/log/uniboard.log"
;
QFile
logFile
(
logFileNamePath
);
if
(
UBApplication
::
app
()
&&
UBApplication
::
app
()
->
isVerbose
())
{
QString
logFileNamePath
=
UBSettings
::
uniboardDataDirectory
()
+
"/log/uniboard.log"
;
QFile
logFile
(
logFileNamePath
);
if
(
logFile
.
exists
()
&&
logFile
.
size
()
>
10000000
)
logFile
.
remove
();
if
(
logFile
.
exists
()
&&
logFile
.
size
()
>
10000000
)
logFile
.
remove
();
if
(
logFile
.
open
(
QIODevice
::
Append
|
QIODevice
::
Text
))
{
QTextStream
out
(
&
logFile
);
out
<<
QDateTime
::
currentDateTime
().
toString
(
Qt
::
ISODate
)
<<
" "
<<
msg
<<
"
\n
"
;
logFile
.
close
();
}
}
if
(
logFile
.
open
(
QIODevice
::
Append
|
QIODevice
::
Text
))
{
QTextStream
out
(
&
logFile
);
out
<<
QDateTime
::
currentDateTime
().
toString
(
Qt
::
ISODate
)
<<
" "
<<
msg
<<
"
\n
"
;
logFile
.
close
();
}
}
qInstallMsgHandler
(
previousHandler
);
qInstallMsgHandler
(
previousHandler
);
}
int
main
(
int
argc
,
char
*
argv
[])
{
// Uncomment next section to have memory leaks information
// tracing in VC++ debug mode under Windows
/*
// Uncomment next section to have memory leaks information
// tracing in VC++ debug mode under Windows
/*
#if defined(_MSC_VER) && defined(_DEBUG)
_CrtSetDbgFlag ( _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF );
#endif
*/
Q_INIT_RESOURCE
(
sankore
);
Q_INIT_RESOURCE
(
sankore
);
qInstallMsgHandler
(
ub_message_output
);
qInstallMsgHandler
(
ub_message_output
);
#if defined(Q_WS_X11)
qDebug
()
<<
"Setting GraphicsSystem to raster"
;
QApplication
::
setGraphicsSystem
(
"raster"
);
qDebug
()
<<
"Setting GraphicsSystem to raster"
;
QApplication
::
setGraphicsSystem
(
"raster"
);
#endif
UBApplication
app
(
"Sankore"
,
argc
,
argv
);
//BUGFIX:
//when importing a sankore file that contains a non standard character
//the codecForLocale or the codecForCString is used to convert the file path
//into a const char*. This is why in french windows setup the codec name shouldn't be
//set to UTF-8. For example, setting UTF-8, will convert "Hati" into "Ha-ti.
UBApplication
app
(
"Sankore"
,
argc
,
argv
);
//BUGFIX:
//when importing a sankore file that contains a non standard character
//the codecForLocale or the codecForCString is used to convert the file path
//into a const char*. This is why in french windows setup the codec name shouldn't be
//set to UTF-8. For example, setting UTF-8, will convert "Hati" into "Ha-ti.
QTextCodec
::
setCodecForTr
(
QTextCodec
::
codecForName
(
"UTF-8"
));
QTextCodec
::
setCodecForTr
(
QTextCodec
::
codecForName
(
"UTF-8"
));
//QTextCodec::setCodecForLocale(QTextCodec::codecForName("UTF-8"));
QTextCodec
::
setCodecForCStrings
(
QTextCodec
::
codecForName
(
"UTF-8"
));
QStringList
args
=
app
.
arguments
();
QStringList
args
=
app
.
arguments
();
QString
dumpPath
=
UBSettings
::
uniboardDataDirectory
()
+
"/log"
;
QDir
logDir
(
dumpPath
);
if
(
!
logDir
.
exists
())
logDir
.
mkdir
(
dumpPath
);
QString
dumpPath
=
UBSettings
::
uniboardDataDirectory
()
+
"/log"
;
QDir
logDir
(
dumpPath
);
if
(
!
logDir
.
exists
())
logDir
.
mkdir
(
dumpPath
);
QString
fileToOpen
;
QString
fileToOpen
;
if
(
args
.
size
()
>
1
)
{
// On Windows/Linux first argument is the file that has been double clicked.
// On Mac OSX we use FileOpen QEvent to manage opening file in current instance. So we will never
// have file to open as a parameter on OSX.
if
(
args
.
size
()
>
1
)
{
// On Windows/Linux first argument is the file that has been double clicked.
// On Mac OSX we use FileOpen QEvent to manage opening file in current instance. So we will never
// have file to open as a parameter on OSX.
QFile
f
(
args
[
1
]);
QFile
f
(
args
[
1
]);
if
(
f
.
exists
())
{
fileToOpen
+=
args
[
1
];
if
(
f
.
exists
())
{
fileToOpen
+=
args
[
1
];
if
(
app
.
sendMessage
(
UBSettings
::
appPingMessage
,
20000
))
{
app
.
sendMessage
(
fileToOpen
,
1000000
);
return
0
;
}
}
}
if
(
app
.
sendMessage
(
UBSettings
::
appPingMessage
,
20000
))
{
app
.
sendMessage
(
fileToOpen
,
1000000
);
return
0
;
}
}
}
app
.
initialize
(
false
);
app
.
initialize
(
false
);
QObject
::
connect
(
&
app
,
SIGNAL
(
messageReceived
(
const
QString
&
)),
&
app
,
SLOT
(
handleOpenMessage
(
const
QString
&
)));
QObject
::
connect
(
&
app
,
SIGNAL
(
messageReceived
(
const
QString
&
)),
&
app
,
SLOT
(
handleOpenMessage
(
const
QString
&
)));
int
result
=
app
.
exec
(
fileToOpen
);
int
result
=
app
.
exec
(
fileToOpen
);
app
.
cleanup
(
);
app
.
cleanup
()
;
qDebug
()
<<
"application is quitting"
;
qDebug
()
<<
"application is quitting"
;
return
result
;
return
result
;
}
src/domain/UBAbstractWidget.cpp
View file @
21e57fbc
...
...
@@ -26,8 +26,6 @@
#include "network/UBNetworkAccessManager.h"
#include "api/UBWidgetUniboardAPI.h"
#include "web/UBWebPage.h"
#include "web/UBWebKitUtils.h"
#include "web/UBWebController.h"
...
...
@@ -49,9 +47,15 @@ UBAbstractWidget::UBAbstractWidget(const QUrl& pWidgetUrl, QWidget *parent)
,
mIsFrozen
(
false
)
,
mIsTakingSnapshot
(
false
)
{
setAcceptDrops
(
true
);
setPage
(
new
UBWebPage
(
this
));
QWebView
::
settings
()
->
setAttribute
(
QWebSettings
::
JavaEnabled
,
true
);
QWebView
::
settings
()
->
setAttribute
(
QWebSettings
::
PluginsEnabled
,
true
);
QWebView
::
settings
()
->
setAttribute
(
QWebSettings
::
LocalStorageDatabaseEnabled
,
true
);
QWebView
::
settings
()
->
setAttribute
(
QWebSettings
::
OfflineWebApplicationCacheEnabled
,
true
);
QWebView
::
settings
()
->
setAttribute
(
QWebSettings
::
OfflineStorageDatabaseEnabled
,
true
);
QWebView
::
settings
()
->
setAttribute
(
QWebSettings
::
JavascriptCanAccessClipboard
,
true
);
QWebView
::
settings
()
->
setAttribute
(
QWebSettings
::
DnsPrefetchEnabled
,
true
);
QWebView
::
page
()
->
setNetworkAccessManager
(
UBNetworkAccessManager
::
defaultAccessManager
());
...
...
@@ -312,7 +316,6 @@ void UBAbstractWidget::mousePressEvent(QMouseEvent *event)
event
->
accept
();
return
;
}
UBRoutedMouseEventWebView
::
mousePressEvent
(
event
);
mMouseIsPressed
=
true
;
}
...
...
@@ -353,7 +356,6 @@ void UBAbstractWidget::mouseReleaseEvent(QMouseEvent *event)
mFirstReleaseAfterMove
=
true
;
}
QWebView
*
UBAbstractWidget
::
createWindow
(
QWebPage
::
WebWindowType
type
)
{
if
(
type
==
QWebPage
::
WebBrowserWindow
)
...
...
src/domain/UBAppleWidget.cpp
View file @
21e57fbc
...
...
@@ -15,11 +15,8 @@
#include "UBAppleWidget.h"
#include <QtNetwork>
#include "api/UBWidgetUniboardAPI.h"
#include "web/UBWebKitUtils.h"
#include "network/UBNetworkAccessManager.h"
...
...
src/domain/UBGraphicsProxyWidget.h
View file @
21e57fbc
...
...
@@ -53,7 +53,6 @@ class UBGraphicsProxyWidget: public QGraphicsProxyWidget, public UBItem, public
virtual
QVariant
itemChange
(
GraphicsItemChange
change
,
const
QVariant
&
value
);
// UBGraphicsItemDelegate* mDelegate;
};
#endif
/* UBGRAPHICSPROXYWIDGET_H_ */
src/domain/UBGraphicsScene.cpp
View file @
21e57fbc
...
...
@@ -1763,8 +1763,8 @@ void UBGraphicsScene::addCache()
UBApplication
::
boardController
->
notifyPageChanged
();
}
void
UBGraphicsScene
::
addMask
()
{
void
UBGraphicsScene
::
addMask
(
const
QPointF
&
center
)
{
UBGraphicsCurtainItem
*
curtain
=
new
UBGraphicsCurtainItem
();
// mem : owned and destroyed by the scene
mTools
<<
curtain
;
QGraphicsView
*
view
;
...
...
@@ -1774,17 +1774,16 @@ void UBGraphicsScene::addMask()
else
view
=
(
QGraphicsView
*
)
UBApplication
::
boardController
->
controlView
();
QPolygonF
polygon
=
view
->
mapToScene
(
view
->
rect
());
// curtain->setZValue(toolLayerStart + toolOffsetCurtain);
// curtain->setZValue(toolLayerStart + toolOffsetCurtain);
UBGraphicsItem
::
assignZValue
(
curtain
,
toolLayerStart
+
toolOffsetCurtain
);
QRectF
rect
=
UBApplication
::
boardController
->
activeScene
()
->
normalizedSceneRect
();
rect
.
setSize
(
QSizeF
(
rect
.
width
()
/
2
,
rect
.
height
()
/
2
));
QPointF
origin
=
center
.
isNull
()
?
rect
.
bottomRight
()
:
center
;
curtain
->
setRect
(
rect
.
translated
(
origin
-
rect
.
topLeft
()
/
2
));
QRectF
rect
=
polygon
.
boundingRect
();
qreal
xScale
=
view
->
matrix
().
m11
();
qreal
yScale
=
view
->
matrix
().
m22
();
rect
.
adjust
(
120
/
xScale
,
80
/
yScale
,
-
120
/
xScale
,
-
80
/
yScale
);
curtain
->
setRect
(
rect
);
addItem
(
curtain
);
addItem
(
curtain
);
curtain
->
setVisible
(
true
);
curtain
->
setSelected
(
true
);
...
...
src/domain/UBGraphicsScene.h
View file @
21e57fbc
...
...
@@ -175,7 +175,7 @@ class UBGraphicsScene: public UBCoreGraphicsScene, public UBItem
void
addTriangle
(
QPointF
center
);
void
addMagnifier
(
UBMagnifierParams
params
);
void
addMask
();
void
addMask
(
const
QPointF
&
center
=
QPointF
()
);
void
addCache
();
class
SceneViewState
...
...
src/domain/UBGraphicsWidgetItem.cpp
View file @
21e57fbc
...
...
@@ -34,6 +34,7 @@ UBGraphicsWidgetItem::UBGraphicsWidgetItem(QGraphicsItem *parent, int widgetType
,
mShouldMoveWidget
(
false
)
,
mUniboardAPI
(
0
)
{
setAcceptDrops
(
false
);
UBGraphicsWidgetItemDelegate
*
delegate
=
new
UBGraphicsWidgetItemDelegate
(
this
,
widgetType
);
delegate
->
init
();
setDelegate
(
delegate
);
...
...
@@ -366,7 +367,6 @@ UBItem* UBGraphicsW3CWidgetItem::deepCopy() const
UBGraphicsW3CWidgetItem
*
copy
=
new
UBGraphicsW3CWidgetItem
(
mWebKitWidget
->
widgetUrl
(),
parentItem
());
copy
->
setPos
(
this
->
pos
());
// copy->setZValue(this->zValue());
UBGraphicsItem
::
assignZValue
(
copy
,
this
->
zValue
());
copy
->
setTransform
(
this
->
transform
());
copy
->
setFlag
(
QGraphicsItem
::
ItemIsMovable
,
true
);
...
...
src/gui/UBLibWebView.cpp
View file @
21e57fbc
...
...
@@ -29,7 +29,6 @@ UBLibWebView::UBLibWebView(QWidget* parent, const char* name):QWidget(parent)
mpWebSettings
=
QWebSettings
::
globalSettings
();
mpWebSettings
->
setAttribute
(
QWebSettings
::
JavaEnabled
,
true
);
mpWebSettings
->
setAttribute
(
QWebSettings
::
PluginsEnabled
,
true
);
mpWebSettings
->
setAttribute
(
QWebSettings
::
JavaEnabled
,
true
);
mpWebSettings
->
setAttribute
(
QWebSettings
::
LocalStorageDatabaseEnabled
,
true
);
mpWebSettings
->
setAttribute
(
QWebSettings
::
OfflineWebApplicationCacheEnabled
,
true
);
mpWebSettings
->
setAttribute
(
QWebSettings
::
OfflineStorageDatabaseEnabled
,
true
);
...
...
src/web/UBRoutedMouseEventWebView.cpp
View file @
21e57fbc
...
...
@@ -93,4 +93,3 @@ void UBRoutedMouseEventWebView::wheelEvent(QWheelEvent* ev)
p
->
event
(
ev
);
}
}
src/web/UBRoutedMouseEventWebView.h
View file @
21e57fbc
...
...
@@ -31,6 +31,7 @@ class UBRoutedMouseEventWebView : public QWebView
public
:
UBRoutedMouseEventWebView
(
QWidget
*
parent
=
0
);
virtual
~
UBRoutedMouseEventWebView
();
protected
:
virtual
void
mouseMoveEvent
(
QMouseEvent
*
ev
);
virtual
void
mousePressEvent
(
QMouseEvent
*
ev
);
...
...
@@ -38,7 +39,6 @@ class UBRoutedMouseEventWebView : public QWebView
virtual
void
mouseReleaseEvent
(
QMouseEvent
*
ev
);
virtual
void
contextMenuEvent
(
QContextMenuEvent
*
ev
);
virtual
void
wheelEvent
(
QWheelEvent
*
ev
);
};
#endif
/* UBROUTEDMOUSEEVENTWEBVIEW_H_ */
src/web/UBWebController.cpp
View file @
21e57fbc
...
...
@@ -59,7 +59,6 @@ UBWebController::UBWebController(UBMainWindow* mainWindow)
,
mBrowserWidget
(
0
)
,
mTrapFlashController
(
0
)
,
mToolsCurrentPalette
(
0
)
// , mKeyboardCurrentPalette(0)
,
mToolsPalettePositionned
(
false
)
,
mDownloadViewIsVisible
(
false
)
{
...
...
@@ -117,7 +116,6 @@ void UBWebController::webBrowserInstance()
{
mCurrentWebBrowser
=
&
mWebBrowserList
[
WebBrowser
];
mToolsCurrentPalette
=
&
mToolsPaletteList
[
WebBrowser
];
// mKeyboardCurrentPalette = &mKeyboardPaletteList[WebBrowser];
mToolsPalettePositionned
=
mToolsPalettePositionnedList
[
WebBrowser
];
if
(
!
(
*
mCurrentWebBrowser
))
{
...
...
@@ -196,8 +194,6 @@ void UBWebController::tutorialWebInstance()
else
{
mCurrentWebBrowser
=
&
mWebBrowserList
[
Tutorial
];
// mToolsCurrentPalette = &mToolsPaletteList[Tutorial];
// mKeyboardCurrentPalette = &mKeyboardPaletteList[Tutorial];
mToolsPalettePositionned
=
&
mToolsPalettePositionnedList
[
Tutorial
];
if
(
!
(
*
mCurrentWebBrowser
))
{
...
...
@@ -255,7 +251,6 @@ void UBWebController::paraschoolWebInstance()
else
{
mCurrentWebBrowser
=
&
mWebBrowserList
[
Paraschool
];
mToolsCurrentPalette
=
&
mToolsPaletteList
[
Paraschool
];
// mKeyboardCurrentPalette = &mKeyboardPaletteList[Paraschool];
mToolsPalettePositionned
=
&
mToolsPalettePositionnedList
[
Paraschool
];
if
(
!
(
*
mCurrentWebBrowser
)){
(
*
mCurrentWebBrowser
)
=
new
WBBrowserWindow
(
mMainWindow
->
centralWidget
(),
mMainWindow
,
true
);
...
...
@@ -434,7 +429,6 @@ void UBWebController::setupPalettes()
{
(
*
mToolsCurrentPalette
)
=
new
UBWebToolsPalette
((
*
mCurrentWebBrowser
),
false
);
// (*mKeyboardCurrentPalette) = UBKeyboardPalette::create(*mCurrentWebBrowser);
#ifndef Q_WS_WIN
if
(
UBPlatformUtils
::
hasVirtualKeyboard
()
&&
UBApplication
::
boardController
->
paletteManager
()
->
mKeyboardPalette
)
connect
(
UBApplication
::
boardController
->
paletteManager
()
->
mKeyboardPalette
,
SIGNAL
(
closed
()),
...
...
@@ -449,14 +443,10 @@ void UBWebController::setupPalettes()
connect
(
mMainWindow
->
actionWebShowHideOnDisplay
,
SIGNAL
(
toggled
(
bool
)),
this
,
SLOT
(
toogleMirroring
(
bool
)));
connect
(
mMainWindow
->
actionWebTrap
,
SIGNAL
(
toggled
(
bool
)),
this
,
SLOT
(
toggleWebTrap
(
bool
)));
#ifndef Q_WS_MACX
connect
(
mMainWindow
->
actionVirtualKeyboard
,
SIGNAL
(
toggled
(
bool
)),
this
,
SLOT
(
showKeyboard
(
bool
)));
#endif
(
*
mToolsCurrentPalette
)
->
hide
();
(
*
mToolsCurrentPalette
)
->
adjustSizeAndPosition
();
// (*mKeyboardCurrentPalette)->adjustSizeAndPosition();
if
(
controlView
()){
int
left
=
controlView
()
->
width
()
-
20
-
(
*
mToolsCurrentPalette
)
->
width
();
int
top
=
(
controlView
()
->
height
()
-
(
*
mToolsCurrentPalette
)
->
height
())
/
2
;
...
...
@@ -479,15 +469,6 @@ void UBWebController::toggleWebTrap(bool checked)
}
}
// void UBWebController::showKeyboard(bool checked)
// {
// if (mKeyboardCurrentPalette
// && (*mKeyboardCurrentPalette))
// {
// (*mKeyboardCurrentPalette)->setVisible(checked);
// }
// }
void
UBWebController
::
toggleWebToolsPalette
(
bool
checked
)
{
(
*
mToolsCurrentPalette
)
->
setVisible
(
checked
);
...
...
@@ -662,8 +643,6 @@ void UBWebController::captureEduMedia()
{
QWebElementCollection
objects
=
webView
->
page
()
->
currentFrame
()
->
findAllElements
(
"object"
);
bool
found
=
false
;
foreach
(
QWebElement
object
,
objects
)
{
foreach
(
QWebElement
param
,
object
.
findAll
(
"param"
))
...
...
@@ -675,8 +654,6 @@ void UBWebController::captureEduMedia()
QString
langValue
;
QString
hostValue
;
found
=
true
;
QStringList
flashVars
=
value
.
split
(
"&"
);
foreach
(
QString
flashVar
,
flashVars
)
...
...
src/web/UBWebController.h
View file @
21e57fbc
...
...
@@ -29,7 +29,6 @@ class UBMainWindow;
class
UBWebToolsPalette
;
class
WBWebView
;
class
UBServerXMLHttpRequest
;
//class UBKeyboardPalette;
class
UBWebController
:
public
QObject
{
...
...
@@ -127,6 +126,7 @@ class UBWebController : public QObject
void
activePageChanged
();
void
trapFlash
();
void
toggleWebTrap
(
bool
checked
);
void
onOEmbedParsed
(
QVector
<
sOEmbedContent
>
contents
);
// void showKeyboard(bool checked);
...
...
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