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
0ba0dcc7
Commit
0ba0dcc7
authored
May 31, 2012
by
Ilia Ryabokon
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of github.com:Sankore/Sankore-3.1
parents
356a4929
9ac508f9
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
82 additions
and
19 deletions
+82
-19
Sankore_3.1.pro
Sankore_3.1.pro
+4
-2
Subdirs.pro
Subdirs.pro
+33
-0
UBCFFAdaptor.pro
plugins/cffadaptor/UBCFFAdaptor.pro
+10
-3
postScript_mac.sh
plugins/cffadaptor/postScript_mac.sh
+5
-0
UBBoardPaletteManager.cpp
src/board/UBBoardPaletteManager.cpp
+9
-0
UBBoardPaletteManager.h
src/board/UBBoardPaletteManager.h
+4
-0
UBDocumentController.cpp
src/document/UBDocumentController.cpp
+3
-0
UBGraphicsDelegateFrame.cpp
src/domain/UBGraphicsDelegateFrame.cpp
+3
-3
UBGraphicsMediaItem.cpp
src/domain/UBGraphicsMediaItem.cpp
+3
-8
UBPlatformUtils_mac.mm
src/frameworks/UBPlatformUtils_mac.mm
+7
-2
UBWebController.cpp
src/web/UBWebController.cpp
+1
-1
No files found.
Sankore_3.1.pro
View file @
0ba0dcc7
...
...
@@ -3,6 +3,7 @@ TEMPLATE = app
THIRD_PARTY_PATH
=../
Sankore
-
ThirdParty
CONFIG
-=
flat
CONFIG
+=
debug_and_release
\
no_include_pwd
...
...
@@ -133,8 +134,9 @@ win32 {
macx {
LIBS += -framework Foundation
LIBS += -lcrypto
LIBS += -framework AppKit
LIBS += -framework WebKit
#commented because Sankore crashes on Java Script. It seems to backends dependencies.
#LIBS += -framework AppKit
#LIBS += -framework WebKit
CONFIG(release, debug|release):CONFIG += x86
...
...
Subdirs.pro
0 → 100644
View file @
0ba0dcc7
TEMPLATE
=
subdirs
CONFIG
+=
recursive
CONFIG
+=
debug_and_release
win32
:
SUB_DIR
=
win32
macx
:
SUB_DIR
=
macx
linux
-
g
++:
SUB_DIR
=
linux
linux
-
g
++-
32
:
SUB_DIR
=
linux
linux
-
g
++-
64
:
SUB_DIR
=
linux
BUILD_DIR
=
build
/
$$
SUB_DIR
CONFIG
(
debug
,
debug
|
release
)
:
BUILD_DIR
=
$$
BUILD_DIR
/
debug
CONFIG
(
release
,
debug
|
release
)
{
BUILD_DIR
=
$$
BUILD_DIR
/
release
CONFIG
+=
warn_off
}
SANKORE_DIR
=
$$
PWD
SANKORE_PRO
=
$$
SANKORE_DIR
/
Sankore_3
.
1
.
pro
THIRD_PARTY_DIR
=
$$
PWD
/
Sankore
-
ThirdParty
SANKORE_PLUGINS_DIR
=
$$
SANKORE_DIR
/
plugins
PLUGIN_CFF_ADAPTOR_DIR
=
$$
SANKORE_PLUGINS_DIR
/
cffadaptor
PLUGIN_CFF_ADAPTOR_PRO
=
$$
PLUGIN_CFF_ADAPTOR_DIR
/
UBCFFAdaptor
.
pro
if
(
exists
(
$$
PLUGIN_CFF_ADAPTOR_DIR
)){
SUBDIRS
+=
$$
PLUGIN_CFF_ADAPTOR_PRO
$$
SANKORE_PRO
.
depends
=
$$
PLUGIN_CFF_ADAPTOR_PRO
}
SUBDIRS
+=
$$
SANKORE_PRO
recurse_target
=
$$
SANKORE_PRO
plugins/cffadaptor/UBCFFAdaptor.pro
View file @
0ba0dcc7
...
...
@@ -16,7 +16,7 @@ linux-g++-64: SUB_DIR = linux
THIRD_PARTY_PATH
=
..
/../../
Sankore
-
ThirdParty
QUAZIP_DIR
=
"$$PWD/../../../Sankore-ThirdParty/quazip/quazip-0.3"
BUILD_DIR
=
$$
PWD
/
build
/
$$
SUB_DIR
BUILD_DIR
=
build
/
$$
SUB_DIR
CONFIG
(
debug
,
debug
|
release
)
:
BUILD_DIR
=
$$
BUILD_DIR
/
debug
CONFIG
(
release
,
debug
|
release
)
{
BUILD_DIR
=
$$
BUILD_DIR
/
release
...
...
@@ -31,12 +31,19 @@ OBJECTS_DIR = $$BUILD_DIR/objects
MOC_DIR
=
$$
BUILD_DIR
/
moc
DESTDIR
=
$$
BUILD_DIR
/
lib
RCC_DIR
=
$$
BUILD_DIR
/
rcc
SANKORE_DIR
=
..
/..
win32
:
{
QMAKE_POST_LINK
+=
copy
$$
replace
(
DESTDIR
,
/,
\\
)
\\
CFF_Adaptor
.
dll
" $$replace(SANKORE_DIR,/,\\)\\CFF_Adaptor.dll /y"
}
macx
:
{
QMAKE_POST_LINK
+=
bash
postScript_mac
.
sh
"$$DESTDIR"
"$$SANKORE_DIR/$$BUILD_DIR/product/Open-Sankore.app/Contents/MacOS"
}
LIBS
+=
"-L$$THIRD_PARTY_PATH/quazip/lib/$$SUB_DIR"
"-lquazip"
QT
+=
xml
xmlpatterns
core
QT
+=
gui
QT
+=
svg
QT
+=
svg
DEFINES
+=
UBCFFADAPTOR_LIBRARY
...
...
@@ -59,4 +66,4 @@ HEADERS +=\
src
/
UBCFFConstants
.
h
RESOURCES
+=
\
resources
/
resources
.
qrc
resources
/
resources
.
qrc
\ No newline at end of file
plugins/cffadaptor/postScript_mac.sh
0 → 100644
View file @
0ba0dcc7
#!/bin/bash
SOURCE
=
$1
DESTINATION
=
$2
mkdir
-p
$DESTINATION
cp
-R
$SOURCE
/
$DESTINATION
\ No newline at end of file
src/board/UBBoardPaletteManager.cpp
View file @
0ba0dcc7
...
...
@@ -29,6 +29,7 @@
#include "gui/UBKeyboardPalette.h"
#include "gui/UBToolWidget.h"
#include "gui/UBZoomPalette.h"
#include "gui/UBWebToolsPalette.h"
#include "gui/UBActionPalette.h"
#include "gui/UBFavoriteToolPalette.h"
#include "gui/UBDockTeacherGuideWidget.h"
...
...
@@ -73,6 +74,7 @@ UBBoardPaletteManager::UBBoardPaletteManager(QWidget* container, UBBoardControll
,
mRightPalette
(
NULL
)
,
mBackgroundsPalette
(
0
)
,
mToolsPalette
(
0
)
,
mWebToolsCurrentPalette
(
0
)
,
mAddItemPalette
(
0
)
,
mErasePalette
(
NULL
)
,
mPagePalette
(
NULL
)
...
...
@@ -683,6 +685,8 @@ void UBBoardPaletteManager::changeMode(eUBDockPaletteWidgetMode newMode, bool is
if
(
!
isInit
)
containerResized
();
if
(
mWebToolsCurrentPalette
)
mWebToolsCurrentPalette
->
hide
();
}
break
;
...
...
@@ -723,6 +727,9 @@ void UBBoardPaletteManager::changeMode(eUBDockPaletteWidgetMode newMode, bool is
if
(
!
isInit
)
UBApplication
::
applicationController
->
uninotesController
()
->
TransparentWidgetResized
();
if
(
mWebToolsCurrentPalette
)
mWebToolsCurrentPalette
->
hide
();
}
break
;
...
...
@@ -764,6 +771,8 @@ void UBBoardPaletteManager::changeMode(eUBDockPaletteWidgetMode newMode, bool is
else
mKeyboardPalette
->
setParent
(
UBApplication
::
documentController
->
controlView
());
}
if
(
mWebToolsCurrentPalette
)
mWebToolsCurrentPalette
->
hide
();
}
break
;
...
...
src/board/UBBoardPaletteManager.h
View file @
0ba0dcc7
...
...
@@ -30,6 +30,7 @@
#include "gui/UBFeaturesWidget.h"
class
UBWebToolsPalette
;
class
UBStylusPalette
;
class
UBClockPalette
;
class
UBPageNumberPalette
;
...
...
@@ -66,6 +67,9 @@ class UBBoardPaletteManager : public QObject
UBKeyboardPalette
*
mKeyboardPalette
;
void
setCurrentWebToolsPalette
(
UBWebToolsPalette
*
palette
)
{
mWebToolsCurrentPalette
=
palette
;}
UBWebToolsPalette
*
mWebToolsCurrentPalette
;
void
processPalettersWidget
(
UBDockPalette
*
paletter
,
eUBDockPaletteWidgetMode
mode
);
void
changeMode
(
eUBDockPaletteWidgetMode
newMode
,
bool
isInit
=
false
);
void
startDownloads
();
...
...
src/document/UBDocumentController.cpp
View file @
0ba0dcc7
...
...
@@ -122,6 +122,9 @@ UBDocumentProxyTreeItem* UBDocumentController::findDocument(UBDocumentProxy* pro
void
UBDocumentController
::
selectDocument
(
UBDocumentProxy
*
proxy
,
bool
setAsCurrentDocument
)
{
if
(
!
proxy
)
return
;
QTreeWidgetItemIterator
it
(
mDocumentUI
->
documentTreeWidget
);
mDocumentUI
->
documentTreeWidget
->
clearSelection
();
...
...
src/domain/UBGraphicsDelegateFrame.cpp
View file @
0ba0dcc7
...
...
@@ -249,6 +249,9 @@ bool UBGraphicsDelegateFrame::canResizeBottomRight(qreal width, qreal height, qr
void
UBGraphicsDelegateFrame
::
mouseMoveEvent
(
QGraphicsSceneMouseEvent
*
event
)
{
if
(
mDelegate
->
delegated
()
->
data
(
UBGraphicsItemData
::
ItemLocked
).
toBool
())
return
;
QLineF
move
(
mStartingPoint
,
event
->
scenePos
());
qreal
moveX
=
move
.
length
()
*
cos
((
move
.
angle
()
-
mAngle
)
*
PI
/
180
);
qreal
moveY
=
-
move
.
length
()
*
sin
((
move
.
angle
()
-
mAngle
)
*
PI
/
180
);
...
...
@@ -390,9 +393,6 @@ void UBGraphicsDelegateFrame::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
QSizeF
newSize
=
resizableItem
->
size
()
+
incVector
;
if
(
!
(
mDelegate
->
getToolBarItem
()
->
isVisibleOnBoard
()
&&
(
newSize
.
width
()
<
mDelegate
->
getToolBarItem
()
->
minWidth
()
/
mDelegate
->
antiScaleRatio
()
||
newSize
.
height
()
<
mDelegate
->
getToolBarItem
()
->
minWidth
()
/
mDelegate
->
antiScaleRatio
()
*
3
/
4
)))
resizableItem
->
resize
(
newSize
);
}
}
...
...
src/domain/UBGraphicsMediaItem.cpp
View file @
0ba0dcc7
...
...
@@ -223,14 +223,6 @@ UBItem* UBGraphicsMediaItem::deepCopy() const
void
UBGraphicsMediaItem
::
mousePressEvent
(
QGraphicsSceneMouseEvent
*
event
)
{
// QDrag* mDrag = new QDrag(event->widget());
// QMimeData* pMime = new QMimeData();
// mDrag->setMimeData(pMime);
// mDrag->start();
// UBApplication::boardController->activeScene()->setActiveItem(this);
if
(
mDelegate
)
{
mDelegate
->
mousePressEvent
(
event
);
...
...
@@ -279,6 +271,9 @@ void UBGraphicsMediaItem::mousePressEvent(QGraphicsSceneMouseEvent *event)
void
UBGraphicsMediaItem
::
mouseMoveEvent
(
QGraphicsSceneMouseEvent
*
event
)
{
if
(
data
(
UBGraphicsItemData
::
ItemLocked
).
toBool
())
return
;
if
(
mShouldMove
&&
(
event
->
buttons
()
&
Qt
::
LeftButton
))
{
QPointF
offset
=
event
->
scenePos
()
-
mMousePressPos
;
...
...
src/frameworks/UBPlatformUtils_mac.mm
View file @
0ba0dcc7
...
...
@@ -10,8 +10,12 @@
#import <Foundation/NSAutoreleasePool.h>
#import <Carbon/Carbon.h>
#import <APELite.h>
/*
// commented because Sankore crashes on Java Script. It seems to backends dependencies.
#import <WebKit/WebKit.h>
#import <AppKit/AppKit.h>
*/
NSString* bundleShortVersion(NSBundle *bundle)
...
...
@@ -543,13 +547,14 @@ void UBPlatformUtils::destroyKeyboardLayouts()
QString UBPlatformUtils::urlFromClipboard()
{
QString qsRet;
/*
// commented because Sankore crashes on Java Script. It seems to backends dependencies.
NSPasteboard* pPasteboard = [NSPasteboard pasteboardWithName:@"Apple CFPasteboard drag"];
WebArchive* pArchive = [[WebArchive alloc] initWithData:[pPasteboard dataForType:@"com.apple.webarchive"]];
qsRet = [[[[pArchive mainResource] URL] absoluteString] UTF8String];
[pArchive release];
*/
return qsRet;
}
src/web/UBWebController.cpp
View file @
0ba0dcc7
...
...
@@ -424,7 +424,7 @@ void UBWebController::setupPalettes()
if
(
!
(
*
mToolsCurrentPalette
))
{
(
*
mToolsCurrentPalette
)
=
new
UBWebToolsPalette
(
UBApplication
::
mainWindow
,
false
);
UBApplication
::
boardController
->
paletteManager
()
->
setCurrentWebToolsPalette
(
*
mToolsCurrentPalette
);
#ifndef Q_WS_WIN
if
(
UBPlatformUtils
::
hasVirtualKeyboard
()
&&
UBApplication
::
boardController
->
paletteManager
()
->
mKeyboardPalette
)
connect
(
UBApplication
::
boardController
->
paletteManager
()
->
mKeyboardPalette
,
SIGNAL
(
closed
()),
...
...
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