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
544568bc
Commit
544568bc
authored
Apr 05, 2012
by
shibakaneki
Browse files
Options
Browse Files
Download
Plain Diff
merged
parents
f16c06f9
aad81050
Changes
18
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
2664 additions
and
34 deletions
+2664
-34
Sankore_3.1.pro
Sankore_3.1.pro
+7
-0
UBCFFAdaptor.pro
plugins/cffadaptor/UBCFFAdaptor.pro
+51
-0
soundOn.svg
plugins/cffadaptor/resources/images/soundOn.svg
+9
-0
resources.qrc
plugins/cffadaptor/resources/resources.qrc
+5
-0
UBCFFAdaptor.cpp
plugins/cffadaptor/src/UBCFFAdaptor.cpp
+1977
-0
UBCFFAdaptor.h
plugins/cffadaptor/src/UBCFFAdaptor.h
+146
-0
UBCFFAdaptor_global.h
plugins/cffadaptor/src/UBCFFAdaptor_global.h
+12
-0
UBCFFConstants.h
plugins/cffadaptor/src/UBCFFConstants.h
+378
-0
UBGlobals.h
plugins/cffadaptor/src/UBGlobals.h
+47
-0
languages.js
.../library/interactivities/Choisir.wgt/scripts/languages.js
+13
-13
script.js
...teractivities/associer_images.wgt/locales/fr/js/script.js
+2
-2
script.js
...teractivities/associer_sounds.wgt/locales/fr/js/script.js
+3
-3
script.js
...activities/categoriser_images.wgt/locales/fr/js/script.js
+3
-3
script.js
...eractivities/categoriser_text.wgt/locales/fr/js/script.js
+3
-3
script.js
...brary/interactivities/etudier.wgt/locales/fr/js/script.js
+3
-3
template2.js
...activities/ord-phrases.wgt/locales/fr/script/template2.js
+2
-2
template2.js
...ractivities/ord-words.wgt/locales/fr/scripts/template2.js
+2
-2
UBGraphicsItemDelegate.cpp
src/domain/UBGraphicsItemDelegate.cpp
+1
-3
No files found.
Sankore_3.1.pro
View file @
544568bc
...
...
@@ -35,6 +35,7 @@ QT += script
QT
+=
xmlpatterns
INCLUDEPATH
+=
src
INCLUDEPATH
+=
plugins
/
cffadaptor
/
src
include
(
$$
THIRD_PARTY_PATH
/
libs
.
pri
)
include
(
src
/
adaptors
/
adaptors
.
pri
)
...
...
@@ -109,6 +110,7 @@ RCC_DIR = $$BUILD_DIR/rcc
UI_DIR = $$BUILD_DIR/ui
win32 {
LIBS += "-Lplugins/cffadaptor/lib/win32" "-lCFF_Adaptor"
RC_FILE = resources/win/sankore.rc
CONFIG += qaxcontainer
exists(console):CONFIG += console
...
...
@@ -129,6 +131,7 @@ win32 {
}
macx {
LIBS += "-Lplugins/cffadaptor/lib/macx" "-lCFF_Adaptor"
LIBS += -framework Foundation
LIBS += -lcrypto
LIBS += -framework AppKit
...
...
@@ -326,6 +329,7 @@ macx {
}
linux-g++ {
LIBS += "-Lplugins/cffadaptor/lib/linux" "-lCFF_Adaptor"
LIBS += -lcrypto
QMAKE_CFLAGS += -fopenmp
QMAKE_CXXFLAGS += -fopenmp
...
...
@@ -341,6 +345,7 @@ linux-g++ {
}
linux-g++-32 {
LIBS += "-Lplugins/cffadaptor/lib/linux" "-lCFF_Adaptor"
LIBS += -lcrypto
QMAKE_CFLAGS += -fopenmp
QMAKE_CXXFLAGS += -fopenmp
...
...
@@ -356,6 +361,7 @@ linux-g++-32 {
}
linux-g++-64 {
LIBS += "-Lplugins/cffadaptor/lib/linux" "-lCFF_Adaptor"
LIBS += -lcrypto
QMAKE_CFLAGS += -fopenmp
QMAKE_CXXFLAGS += -fopenmp
...
...
@@ -371,6 +377,7 @@ linux-g++-64 {
}
RESOURCES += resources/sankore.qrc
RESOURCES += plugins/cffadaptor/resources/resources.qrc
# When adding a translation here, also add it in the macx part
TRANSLATIONS = resources/i18n/sankore_en.ts \
...
...
plugins/cffadaptor/UBCFFAdaptor.pro
0 → 100644
View file @
544568bc
#-------------------------------------------------
#
# Project created by QtCreator 2012-02-14T13:30:14
#
#-------------------------------------------------
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
THIRD_PARTY_PATH
=
..
/../../
Sankore
-
ThirdParty
QUAZIP_DIR
=
"$$PWD/../../../Sankore-ThirdParty/quazip/quazip-0.3"
INCLUDEPATH
+=
src
DEPENDPATH
+=
$$
THIRD_PARTY_PATH
/
quazip
/
INCLUDEPATH
+=
$$
THIRD_PARTY_PATH
/
quazip
/
include
(
$$
THIRD_PARTY_PATH
/
quazip
/
quazip
.
pri
)
LIBS
+=
"-L$$THIRD_PARTY_PATH/quazip/lib/$$SUB_DIR"
"-lquazip"
QT
+=
xml
xmlpatterns
core
QT
+=
gui
QT
+=
svg
TARGET
=
CFF_Adaptor
TEMPLATE
=
lib
win32
{
CONFIG
+=
dll
}
DEFINES
+=
UBCFFADAPTOR_LIBRARY
DEFINES
+=
NO_THIRD_PARTY_WARNINGS
SOURCES
+=
\
src
/
UBCFFAdaptor
.
cpp
HEADERS
+=
\
$$
PWD
/../../
src
/
globals
/
UBGlobals
.
h
\
src
/
UBCFFAdaptor
.
h
\
src
/
UBCFFAdaptor_global
.
h
\
src
/
UBCFFConstants
.
h
OBJECTS_DIR
=
$$
PWD
/
objects
MOC_DIR
=
$$
PWD
/
moc
DESTDIR
=
$$
PWD
/
lib
/
$$
SUB_DIR
RESOURCES
+=
\
resources
/
resources
.
qrc
plugins/cffadaptor/resources/images/soundOn.svg
0 → 100644
View file @
544568bc
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 13.0.2, SVG Export Plug-In . SVG Version: 6.00 Build 14948) -->
<svg
version=
"1.2"
baseProfile=
"tiny"
id=
"Layer_1"
xmlns=
"http://www.w3.org/2000/svg"
xmlns:xlink=
"http://www.w3.org/1999/xlink"
x=
"0px"
y=
"0px"
width=
"26px"
height=
"26px"
viewBox=
"0 0 26 26"
xml:space=
"preserve"
>
<circle
fill=
"#CCCCCC"
cx=
"13"
cy=
"13"
r=
"13"
/>
<circle
fill=
"#999999"
cx=
"13"
cy=
"13"
r=
"11"
/>
<rect
x=
"7"
y=
"9"
fill=
"#FFFFFF"
width=
"6"
height=
"8"
/>
<polygon
fill=
"#FFFFFF"
points=
"10,11 10,15 17,21 17,5 "
/>
</svg>
plugins/cffadaptor/resources/resources.qrc
0 → 100644
View file @
544568bc
<RCC>
<qresource prefix="/">
<file>images/soundOn.svg</file>
</qresource>
</RCC>
plugins/cffadaptor/src/UBCFFAdaptor.cpp
0 → 100644
View file @
544568bc
This diff is collapsed.
Click to expand it.
plugins/cffadaptor/src/UBCFFAdaptor.h
0 → 100644
View file @
544568bc
#ifndef UBCFFADAPTOR_H
#define UBCFFADAPTOR_H
#include "UBCFFAdaptor_global.h"
#include <QtCore>
class
QTransform
;
class
QDomDocument
;
class
QDomElement
;
class
QDomNode
;
class
QuaZipFile
;
class
UBCFFADAPTORSHARED_EXPORT
UBCFFAdaptor
{
class
UBToCFFConverter
;
public
:
UBCFFAdaptor
();
~
UBCFFAdaptor
();
bool
convertUBZToIWB
(
const
QString
&
from
,
const
QString
&
to
);
bool
deleteDir
(
const
QString
&
pDirPath
)
const
;
private
:
QString
uncompressZip
(
const
QString
&
zipFile
);
bool
compressZip
(
const
QString
&
source
,
const
QString
&
destination
);
bool
compressDir
(
const
QString
&
dirName
,
const
QString
&
parentDir
,
QuaZipFile
*
outZip
);
bool
compressFile
(
const
QString
&
fileName
,
const
QString
&
parentDir
,
QuaZipFile
*
outZip
);
QString
createNewTmpDir
();
bool
freeDir
(
const
QString
&
dir
);
void
freeTmpDirs
();
private
:
QStringList
tmpDirs
;
private
:
class
UBToCFFConverter
{
static
const
int
DEFAULT_LAYER
=
-
100000
;
public
:
UBToCFFConverter
(
const
QString
&
source
,
const
QString
&
destination
);
~
UBToCFFConverter
();
bool
isValid
()
const
;
QString
lastErrStr
()
const
{
return
errorStr
;}
bool
parse
();
private
:
void
fillNamespaces
();
bool
parseMetadata
();
bool
parseContent
();
QDomElement
parsePageset
(
const
QStringList
&
pageFileNames
);
QDomElement
parsePage
(
const
QString
&
pageFileName
);
QDomElement
parseSvgPageSection
(
const
QDomElement
&
element
);
void
writeQDomElementToXML
(
const
QDomNode
&
node
);
bool
writeExtendedIwbSection
();
QDomElement
parseGroupPageSection
(
const
QDomElement
&
element
);
bool
createBackground
(
const
QDomElement
&
element
,
QMultiMap
<
int
,
QDomElement
>
&
dstSvgList
);
QString
createBackgroundImage
(
const
QDomElement
&
element
,
QSize
size
);
bool
createPngFromSvg
(
QString
&
svgPath
,
QString
&
dstPath
,
QTransform
transformation
,
QSize
size
=
QSize
());
bool
parseSVGGGroup
(
const
QDomElement
&
element
,
QMultiMap
<
int
,
QDomElement
>
&
dstSvgList
);
bool
parseUBZImage
(
const
QDomElement
&
element
,
QMultiMap
<
int
,
QDomElement
>
&
dstSvgList
);
bool
parseUBZVideo
(
const
QDomElement
&
element
,
QMultiMap
<
int
,
QDomElement
>
&
dstSvgList
);
bool
parseUBZAudio
(
const
QDomElement
&
element
,
QMultiMap
<
int
,
QDomElement
>
&
dstSvgList
);
bool
parseForeignObject
(
const
QDomElement
&
element
,
QMultiMap
<
int
,
QDomElement
>
&
dstSvgList
);
bool
parseUBZText
(
const
QDomElement
&
element
,
QMultiMap
<
int
,
QDomElement
>
&
dstSvgList
);
bool
parseUBZPolygon
(
const
QDomElement
&
element
,
QMultiMap
<
int
,
QDomElement
>
&
dstSvgList
);
bool
parseUBZPolyline
(
const
QDomElement
&
element
,
QMultiMap
<
int
,
QDomElement
>
&
dstSvgList
);
bool
parseUBZLine
(
const
QDomElement
&
element
,
QMultiMap
<
int
,
QDomElement
>
&
dstSvgList
);
void
addSVGElementToResultModel
(
const
QDomElement
&
element
,
QMultiMap
<
int
,
QDomElement
>
&
dstList
,
int
layer
=
DEFAULT_LAYER
);
void
addIWBElementToResultModel
(
const
QDomElement
&
element
);
qreal
getAngleFromTransform
(
const
QTransform
&
tr
);
QString
getDstContentFolderName
(
const
QString
&
elementType
);
QString
getSrcContentFolderName
(
QString
href
);
QString
getFileNameFromPath
(
QString
sPath
);
QString
getExtentionFromFileName
(
const
QString
&
filename
);
QString
convertExtention
(
const
QString
&
ext
);
QString
getElementTypeFromUBZ
(
const
QDomElement
&
element
);
int
getElementLayer
(
const
QDomElement
&
element
);
bool
itIsSupportedFormat
(
const
QString
&
format
)
const
;
bool
itIsFormatToConvert
(
const
QString
&
format
)
const
;
bool
itIsSVGElementAttribute
(
const
QString
ItemType
,
const
QString
&
AttrName
);
bool
itIsIWBAttribute
(
const
QString
&
attribute
)
const
;
bool
itIsUBZAttributeToConvert
(
const
QString
&
attribute
)
const
;
bool
ibwAddLine
(
int
x1
,
int
y1
,
int
x2
,
int
y2
,
QString
color
=
QString
(),
int
width
=
1
,
bool
isBackground
=
false
);
QTransform
getTransformFromUBZ
(
const
QDomElement
&
ubzElement
);
void
setGeometryFromUBZ
(
const
QDomElement
&
ubzElement
,
QDomElement
&
iwbElement
);
void
setCoordinatesFromUBZ
(
const
QDomElement
&
ubzElement
,
QDomElement
&
iwbElement
);
bool
setContentFromUBZ
(
const
QDomElement
&
ubzElement
,
QDomElement
&
svgElement
);
void
setCFFTextFromUBZ
(
const
QDomElement
&
ubzElement
,
QDomElement
&
iwbElement
,
QDomElement
&
svgElement
);
void
setCFFTextFromHTMLTextNode
(
const
QDomElement
htmlTextNode
,
QDomElement
&
iwbElement
);
QString
ubzAttrNameToCFFAttrName
(
QString
cffAttrName
);
QString
ubzAttrValueToCFFAttrName
(
QString
cffAttrValue
);
bool
setCFFAttribute
(
const
QString
&
attributeName
,
const
QString
&
attributeValue
,
const
QDomElement
&
ubzElement
,
QDomElement
&
iwbElement
,
QDomElement
&
svgElement
);
bool
setCommonAttributesFromUBZ
(
const
QDomElement
&
ubzElement
,
QDomElement
&
iwbElement
,
QDomElement
&
svgElement
);
void
setViewBox
(
QRect
viewbox
);
QDomNode
findTextNode
(
const
QDomNode
&
node
);
QDomNode
findNodeByTagName
(
const
QDomNode
&
node
,
QString
tagName
);
QSize
getSVGDimentions
(
const
QString
&
element
);
inline
QRect
getViewboxRect
(
const
QString
&
element
)
const
;
inline
QString
rectToIWBAttr
(
const
QRect
&
rect
)
const
;
inline
QString
digitFileFormat
(
int
num
)
const
;
inline
bool
strToBool
(
const
QString
&
in
)
const
{
return
in
==
"true"
;}
QString
contentIWBFileName
()
const
;
private
:
QMap
<
QString
,
QString
>
iwbSVGItemsAttributes
;
QDomDocument
*
mDataModel
;
//model for reading indata
QXmlStreamWriter
*
mIWBContentWriter
;
//stream to write outdata
QSize
mSVGSize
;
//svg page size
QRect
mViewbox
;
//Main viewbox parameter for CFF
QString
sourcePath
;
// dir with unpacked source data (ubz)
QString
destinationPath
;
//dir with unpacked destination data (iwb)
QDomDocument
*
mDocumentToWrite
;
//document for saved QDomElements from mSvgElements and mExtendedElements
QMultiMap
<
int
,
QDomElement
>
mSvgElements
;
//Saving svg elements to have a sorted by z order list of elements to write;
QList
<
QDomElement
>
mExtendedElements
;
//Saving extended options of elements to be able to add them to the end of result iwb document;
mutable
QString
errorStr
;
// last error string message
public
:
operator
bool
()
const
{
return
isValid
();}
};
class
UBToUBZConverter
{
public
:
UBToUBZConverter
();
};
};
#endif // UBCFFADAPTOR_H
plugins/cffadaptor/src/UBCFFAdaptor_global.h
0 → 100644
View file @
544568bc
#ifndef UBCFFADAPTOR_GLOBAL_H
#define UBCFFADAPTOR_GLOBAL_H
#include <QtCore/qglobal.h>
#if defined(UBCFFADAPTOR_LIBRARY)
# define UBCFFADAPTORSHARED_EXPORT Q_DECL_EXPORT
#else
# define UBCFFADAPTORSHARED_EXPORT Q_DECL_IMPORT
#endif
#endif // UBCFFADAPTOR_GLOBAL_H
plugins/cffadaptor/src/UBCFFConstants.h
0 → 100644
View file @
544568bc
#ifndef UBCFFCONSTANTS_H
#define UBCFFCONSTANTS_H
#define PI 3.1415926535
const
int
DEFAULT_BACKGROUND_LAYER
=
-
20000002
;
const
int
DEFAULT_BACKGROUND_CROSS_LAYER
=
-
20000001
;
// Constant names. Use only them instead const char* in each function
// Constant fileNames;
const
QString
fMetadata
=
"metadata.rdf"
;
const
QString
fIWBContent
=
"content.xml"
;
const
QString
fIWBBackground
=
"background.png"
;
const
QString
sAudioElementImage
=
":images/soundOn.svg"
;
// Constant messages;
const
QString
noErrorMsg
=
"NoError"
;
// Tag names
const
QString
tDescription
=
"Description"
;
const
QString
tIWBRoot
=
"iwb"
;
const
QString
tIWBMeta
=
"meta"
;
const
QString
tUBZSize
=
"size"
;
const
QString
tSvg
=
"svg"
;
const
QString
tIWBPage
=
"page"
;
const
QString
tIWBPageSet
=
"pageset"
;
const
QString
tId
=
"id"
;
const
QString
tElement
=
"element"
;
const
QString
tUBZGroup
=
"group"
;
const
QString
tUBZG
=
"g"
;
const
QString
tUBZPolygon
=
"polygon"
;
const
QString
tUBZPolyline
=
"polyline"
;
const
QString
tUBZLine
=
"line"
;
const
QString
tUBZAudio
=
"audio"
;
const
QString
tUBZVideo
=
"video"
;
const
QString
tUBZImage
=
"image"
;
const
QString
tUBZForeignObject
=
"foreignObject"
;
const
QString
tUBZTextContent
=
"itemTextContent"
;
const
QString
tIWBA
=
"a"
;
const
QString
tIWBG
=
"g"
;
const
QString
tIWBSwitch
=
"switch"
;
const
QString
tIWBImage
=
"image"
;
const
QString
tIWBVideo
=
"video"
;
const
QString
tIWBAudio
=
"audio"
;
const
QString
tIWBText
=
"text"
;
const
QString
tIWBTextArea
=
"textarea"
;
const
QString
tIWBPolyLine
=
"polyline"
;
const
QString
tIWBPolygon
=
"polygon"
;
const
QString
tIWBFlash
=
"video"
;
const
QString
tIWBRect
=
"rect"
;
const
QString
tIWBLine
=
"line"
;
const
QString
tIWBTbreak
=
"tbreak"
;
const
QString
tIWBTspan
=
"tspan"
;
// Attributes names
const
QString
aIWBVersion
=
"version"
;
const
QString
aOwner
=
"owner"
;
const
QString
aDescription
=
"description"
;
const
QString
aCreator
=
"creator"
;
const
QString
aAbout
=
"about"
;
const
QString
aIWBViewBox
=
"viewbox"
;
const
QString
aUBZViewBox
=
"viewBox"
;
const
QString
aDarkBackground
=
"dark-background"
;
const
QString
aBackground
=
"background"
;
const
QString
aCrossedBackground
=
"crossed-background"
;
const
QString
aUBZType
=
"type"
;
const
QString
aUBZUuid
=
"uuid"
;
const
QString
aFill
=
"fill"
;
// IWB attribute contans color to fill
const
QString
aID
=
"id"
;
// ID of any svg element can be placed in to iwb section
const
QString
aRef
=
"ref"
;
// as reference for applying additional attributes
const
QString
aSVGHref
=
"xlink:href"
;
// reference to file
const
QString
aIWBHref
=
"ref"
;
// reference to element ID
const
QString
aUBZHref
=
"href"
;
const
QString
aSrc
=
"src"
;
const
QString
aSVGRequiredExtension
=
"requiredExtensions"
;
const
QString
aX
=
"x"
;
const
QString
aY
=
"y"
;
const
QString
aWidth
=
"width"
;
const
QString
aHeight
=
"height"
;
const
QString
aStroke
=
"stroke"
;
const
QString
aStrokeWidth
=
"stroke-width"
;
const
QString
aPoints
=
"points"
;
const
QString
aZLayer
=
"z-value"
;
const
QString
aLayer
=
"layer"
;
const
QString
aTransform
=
"transform"
;
const
QString
aLocked
=
"locked"
;
const
QString
aIWBName
=
"name"
;
const
QString
aIWBContent
=
"content"
;
// Attribute values
const
QString
avIWBVersionNo
=
"1.0"
;
const
QString
avUBZText
=
"text"
;
const
QString
avFalse
=
"false"
;
const
QString
avTrue
=
"true"
;
// Namespaces and prefixes
const
QString
svgRequiredExtensionPrefix
=
"http://www.imsglobal.org/iwb/"
;
const
QString
dcNS
=
"http://purl.org/dc/elements/1.1/"
;
const
QString
ubNS
=
"http://uniboard.mnemis.com/document"
;
const
QString
svgUBZNS
=
"http://www.imsglobal.org/xsd/iwb_v1p0"
;
const
QString
svgIWBNS
=
"http://www.w3.org/2000/svg"
;
const
QString
xlinkNS
=
"http://www.w3.org/1999/xlink"
;
const
QString
iwbNS
=
"http://www.becta.org.uk/iwb"
;
const
QString
xsiNS
=
"http://www.w3.org/2001/XMLSchema-instance"
;
const
QString
xsiShemaLocation
=
"\
http://www.imsglobal.org/xsd/iwb_v1p0 \
http://www.imsglobal.org/profile/iwb/iwbv1p0_v1p0.xsd \
http://www.w3.org/2000/svg http://www.imsglobal.org/profile/iwb/svgsubsetv1p0_v1p0.xsd \
http://www.w3.org/1999/xlink http://www.imsglobal.org/xsd/w3/1999/xlink.xsd"
;
const
QString
dcNSPrefix
=
"dc"
;
const
QString
ubNSPrefix
=
"ub"
;
const
QString
svgIWBNSPrefix
=
"svg"
;
const
QString
xlinkNSPrefix
=
"xlink"
;
const
QString
iwbNsPrefix
=
"iwb"
;
const
QString
xsiPrefix
=
"xsi"
;
const
QString
xsiSchemaLocationPrefix
=
"schemaLocation"
;
const
QString
avOwner
=
""
;
const
QString
avCreator
=
""
;
const
QString
avDescription
=
""
;
//constant symbols and words etc
const
QString
dimensionsDelimiter1
=
"x"
;
const
QString
dimensionsDelimiter2
=
" "
;
const
QString
pageAlias
=
"page"
;
const
QString
pageFileExtentionUBZ
=
"svg"
;
//content folder names
const
QString
cfImages
=
"images"
;
const
QString
cfVideos
=
"video"
;
const
QString
cfAudios
=
"audio"
;
const
QString
cfFlash
=
"flash"
;
//known file extentions
const
QString
feSvg
=
"svg"
;
const
QString
feWgt
=
"wgt"
;
const
QString
fePng
=
"png"
;
const
int
iCrossSize
=
32
;
const
int
iCrossWidth
=
1
;
// Image formats supported by CFF exclude wgt. Wgt is Sankore widget, which is considered as a .png preview.
const
QString
iwbElementImage
(
" \
wgt, \
jpeg, \
jpg, \
bmp, \
gif, \
wmf, \
emf, \
png, \
tif, \
tiff \
"
);
// Video formats supported by CFF
const
QString
iwbElementVideo
(
" \
mpg, \
mpeg, \
swf, \
"
);
// Audio formats supported by CFF
const
QString
iwbElementAudio
(
" \
mp3, \
wav \
"
);
const
QString
cffSupportedFileFormats
(
iwbElementImage
+
iwbElementVideo
+
iwbElementAudio
);
const
QString
ubzFormatsToConvert
(
"svg"
);
const
QString
iwbSVGImageAttributes
(
" \
id, \
xlink:href, \
x, \
y, \
height, \
width, \
fill-opacity, \
requiredExtentions, \
transform \
"
);
const
QString
iwbSVGAudioAttributes
(
" \
id, \
xlink:href, \
x, \
y, \
height, \
width, \
fill-opacity, \
requiredExtentions, \
transform \
"
);
const
QString
iwbSVGVideoAttributes
(
" \
id, \
xlink:href, \
x, \
y, \
height, \
width, \
fill-opacity, \
requiredExtentions, \
transform \
"
);
const
QString
iwbSVGRectAttributes
(
" \
id, \
x, \
y, \
height, \
width, \
fill, \
fill-opacity, \
stroke, \
stroke-dasharray, \
stroke-linecap, \
stroke-linejoin, \
stroke-opacity, \
stroke-width, \
transform \
"
);
const
QString
iwbSVGTextAttributes
(
" \
id, \
x, \
y, \
fill, \
font-family, \
font-size, \
font-style, \
font-weight, \
font-stretch, \
transform \
"
);
const
QString
iwbSVGTextAreaAttributes
(
" \
id, \
x, \
y, \
height, \
width, \
fill, \
font-family, \
font-size, \
font-style, \
font-weight, \
font-stretch, \
text-align, \
transform \
"
);
const
QString
iwbSVGTspanAttributes
(
" \
id, \
fill, \
font-family, \
font-size, \
font-style, \
font-weight, \
font-stretch, \
text-align, \
"
);
const
QString
iwbSVGLineAttributes
(
" \
id, \
x1, \
y1, \
x2, \
y2, \
stroke, \
stroke-dasharray, \
stroke-width, \
stroke-opacity, \
stroke-linecap, \
transform \
"
);
const
QString
iwbSVGPolyLineAttributes
(
" \
id, \
points, \
stroke, \
stroke-width, \
stroke-dasharray, \
stroke-opacity, \
stroke-linecap, \
transform \
"
);
const
QString
iwbSVGPolygonAttributes
(
" \
id, \
points, \
fill, \
fill-opacity, \
stroke, \
stroke-dasharray, \
stroke-width, \
stroke-linecap, \
stroke-linejoin, \
stroke-opacity, \
stroke-width, \
transform \
"
);
// 1 to 1 copy to SVG section
const
QString
iwbElementAttributes
(
" \
background, \
background-fill, \
background-posture, \
flip, \
freehand, \
highlight, \
highlight-fill, \
list-style-type, \
list-style-type-fill, \
locked, \
replicate, \
revealer, \
stroke-lineshape-start, \
stroke-lineshape-end \
"
);
// cannot be copied 1 to 1 to SVG section
const
QString
ubzElementAttributesToConvert
(
" \
xlink:href, \
src, \
transform \
"
);
// additional attributes. Have references in SVG section.
const
QString
svgElementAttributes
(
" \
points, \
fill, \
fill-opacity, \
stroke, \
stroke-dasharray, \
stroke-linecap, \
stroke-opacity, \
stroke-width, \
stroke_linejoin, \
requiredExtensions, \
viewbox, \
x, \
y, \
x1, \
y1, \
x2, \
y2, \
height, \
width, \
font-family, \
font-size, \
font-style, \
font-weight, \
font-stretch, \
text-align \
"
);
const
QString
ubzContentFolders
(
"audios,videos,images,widgets"
);
struct
UBItemLayerType
{
enum
Enum
{
FixedBackground
=
-
2000
,
Object
=
-
1000
,
Graphic
=
0
,
Tool
=
1000
,
Control
=
2000
};
};
#endif // UBCFFCONSTANTS_H
\ No newline at end of file
plugins/cffadaptor/src/UBGlobals.h
0 → 100644
View file @
544568bc
#ifndef UBGLOBALS_H
#define UBGLOBALS_H
#define DELETEPTR(ptr) if(NULL != ptr){ \
delete ptr; \
ptr = NULL; \
}
#ifdef Q_WS_WIN
#define WARNINGS_DISABLE __pragma(warning(push, 0));
#define WARNINGS_ENABLE __pragma(warning(pop));
#ifdef NO_THIRD_PARTY_WARNINGS
// disabling warning level to 0 and save old state
#define THIRD_PARTY_WARNINGS_DISABLE WARNINGS_DISABLE
#else
// just save old state (needs for not empty define)
#define THIRD_PARTY_WARNINGS_DISABLE __pragma(warning(push));
#endif //#ifdef NO_THIRD_PARTY_WARNINGS
// anyway on WIN
#define THIRD_PARTY_WARNINGS_ENABLE WARNINGS_ENABLE
#else //#ifdef Q_WS_WIN
#define WARNINGS_DISABLE _Pragma("GCC diagnostic push"); \
_Pragma("GCC diagnostic ignored \"-Wunused-parameter\""); \
_Pragma("GCC diagnostic ignored \"-Wunused-variable\""); \
_Pragma("GCC diagnostic ignored \"-Wsign-compare\"");
#define WARNINGS_ENABLE _Pragma("GCC diagnostic pop");
#ifdef NO_THIRD_PARTY_WARNINGS
//disabling some warnings
#define THIRD_PARTY_WARNINGS_DISABLE WARNINGS_DISABLE
#define THIRD_PARTY_WARNINGS_ENABLE WARNINGS_ENABLE
#else
// just save old state (needs for not empty define)
#define THIRD_PARTY_WARNINGS_ENABLE WARNINGS_ENABLE
#endif //#ifdef NO_THIRD_PARTY_WARNINGS
#endif //#ifdef Q_WS_WIN
#endif // UBGLOBALS_H
resources/library/interactivities/Choisir.wgt/scripts/languages.js
View file @
544568bc
...
...
@@ -49,23 +49,23 @@ var sankoreLang = {
"edit"
:
"Modifier"
,
"display"
:
"Afficher"
,
"question"
:
"La question"
,
"example_question"
:
"Ceci est un exemple de
la
question"
,
"answer"
:
"Ceci est un exemple de
la
réponse"
,
"example_question"
:
"Ceci est un exemple de question"
,
"answer"
:
"Ceci est un exemple de réponse"
,
"q"
:
"Q"
,
"add_new_question"
:
"Ajouter nouvelle question ..."
,
"options"
:
"
Les o
ptions"
,
"add_new_question"
:
"Ajouter
une
nouvelle question ..."
,
"options"
:
"
O
ptions"
,
"close"
:
"Fermer"
,
"delete_question"
:
"Supprimer la question"
,
"delete_answer"
:
"Supprimer
réponse
"
,
"delete_answer"
:
"Supprimer
la possibilité
"
,
"right_answer"
:
"Bonne réponse"
,
"template_question"
:
"Saisi
ssez votre
question ici ..."
,
"template_answer"
:
"
Entrez
la réponse ici ..."
,
"add_answer"
:
"Ajouter une
réponse
"
,
"select_text"
:
"Choisi
ssez
la bonne réponse"
,
"options_desc"
:
"
Vous pouvez choisir n'importe lequel de ces trois options d'affichage de vos réponses. Voir un court leur description.
"
,
"radio_desc"
:
"
Cette option permet de choisir une seule réponse et les réponse
s sont affichées sous forme de boutons radio."
,
"checkbox_desc"
:
"
Cette option permet de choisir plusieurs réponses et les réponses sont affichées comme des
cases à cocher."
,
"select_desc"
:
"
Cette option permet de choisir une seule réponse et les réponse
s sont affichées sous forme de menu déroulant."
,
"template_question"
:
"Saisi
r la
question ici ..."
,
"template_answer"
:
"
Saisir
la réponse ici ..."
,
"add_answer"
:
"Ajouter une
possibilité
"
,
"select_text"
:
"Choisi
r
la bonne réponse"
,
"options_desc"
:
"
Types de questions
"
,
"radio_desc"
:
"
Option 1 : une seule bonne réponse, les possibilité
s sont affichées sous forme de boutons radio."
,
"checkbox_desc"
:
"
Option 2 : plusieurs bonnes réponses, les possibilités sont affichées sous forme de
cases à cocher."
,
"select_desc"
:
"
Option 3 : une seule bonne réponse, les possibilité
s sont affichées sous forme de menu déroulant."
,
"a"
:
"R"
}
};
...
...
resources/library/interactivities/associer_images.wgt/locales/fr/js/script.js
View file @
544568bc
var
sankoreLang
=
{
display
:
"Affich
age
"
,
display
:
"Affich
er
"
,
edit
:
"Modifier"
,
short_desc
:
"Sélectionner le numéro «trois»."
,
add
:
"Nouveau bloc"
,
enter
:
"Saisi
ssez
la consigne ici ..."
enter
:
"Saisi
r
la consigne ici ..."
};
//main function
...
...
resources/library/interactivities/associer_sounds.wgt/locales/fr/js/script.js
View file @
544568bc
var
sankoreLang
=
{
display
:
"
D'affichage
"
,
display
:
"
Afficher
"
,
edit
:
"Modifier"
,
short_desc
:
"Combien de signaux entendez-vous?"
,
short_desc
:
"Combien de signaux
sonores
entendez-vous?"
,
add
:
"Nouveau bloc"
,
enter
:
"
Entrez
votre description ici ..."
enter
:
"
Saisir
votre description ici ..."
};
//main function
...
...
resources/library/interactivities/categoriser_images.wgt/locales/fr/js/script.js
View file @
544568bc
var
sankoreLang
=
{
display
:
"
D'affichage
"
,
display
:
"
Afficher
"
,
edit
:
"Modifier"
,
first_desc
:
"Les nombres impairs"
,
second_desc
:
"
Même les chiffre
s"
,
enter
:
"
Entrez votr
e nom de la catégorie ici ..."
,
second_desc
:
"
Les nombres pair
s"
,
enter
:
"
Saisir l
e nom de la catégorie ici ..."
,
add
:
"Nouveau bloc"
};
...
...
resources/library/interactivities/categoriser_text.wgt/locales/fr/js/script.js
View file @
544568bc
var
sankoreLang
=
{
display
:
"
D'affichage
"
,
display
:
"
Afficher
"
,
edit
:
"Modifier"
,
first_desc
:
"Fruits"
,
second_desc
:
"Légumes"
,
potatoes
:
"Pomme
s
de terre"
,
potatoes
:
"Pomme de terre"
,
carrot
:
"Carotte"
,
onion
:
"Oignon"
,
apple
:
"Pomme"
,
pear
:
"Poire"
,
enter
:
"
Entrez votr
e nom de la catégorie ici ..."
,
enter
:
"
Saisir l
e nom de la catégorie ici ..."
,
add
:
"Nouveau bloc"
,
text
:
"Texte"
};
...
...
resources/library/interactivities/etudier.wgt/locales/fr/js/script.js
View file @
544568bc
var
sankoreLang
=
{
display
:
"
D'affichage
"
,
display
:
"
Afficher
"
,
edit
:
"Modifier"
,
text_content
:
"Ceci est un exemple. Au lieu de ce texte, vous pouvez
mettre votre propre contenu
."
,
text_content
:
"Ceci est un exemple. Au lieu de ce texte, vous pouvez
saisir votre propre texte ou glisser-dposer une image, un son.
"
,
new_txt
:
"Nouveau bloc de texte"
,
new_slide
:
"C
'
est une nouvelle diapositive."
new_slide
:
"C
eci
est une nouvelle diapositive."
};
//some flags
...
...
resources/library/interactivities/ord-phrases.wgt/locales/fr/script/template2.js
View file @
544568bc
...
...
@@ -26,9 +26,9 @@ function checkResponse()
*/
var
sankoreLang
=
{
view
:
"
D'affichage
"
,
view
:
"
Afficher
"
,
edit
:
"Modifier"
,
example
:
"
il
\n
s'agit
\n
d'une
\n
phrase
\n
d'exemple
"
example
:
"
Cette phrase
\n
est un
\n
exemple.
"
};
...
...
resources/library/interactivities/ord-words.wgt/locales/fr/scripts/template2.js
View file @
544568bc
...
...
@@ -27,9 +27,9 @@ function checkResponse()
*/
var
sankoreLang
=
{
view
:
"
D'affichage
"
,
view
:
"
Afficher
"
,
edit
:
"Modifier"
,
example
:
"
une*longue*,*il*ya*bien*longtemps*..
."
example
:
"
Il*y*a*longtemps*,*nous*tions**la*mer*
."
};
var
word
=
""
;
...
...
src/domain/UBGraphicsItemDelegate.cpp
View file @
544568bc
...
...
@@ -263,7 +263,6 @@ void UBGraphicsItemDelegate::positionHandles()
DelegateButton
*
button
=
mButtons
[
i
+
j
];
button
->
setTransform
(
tr
);
if
(
button
->
getSection
()
==
Qt
::
TopLeftSection
)
{
button
->
setPos
(
topX
+
(
i
++
*
1.6
*
mFrameWidth
*
mAntiScaleRatio
),
topY
);
}
else
if
(
button
->
getSection
()
==
Qt
::
BottomLeftSection
)
{
...
...
@@ -271,7 +270,6 @@ void UBGraphicsItemDelegate::positionHandles()
}
else
if
(
button
->
getSection
()
==
Qt
::
NoSection
)
{
++
k
;
}
if
(
!
button
->
scene
())
{
button
->
setParentItem
(
mFrame
);
//update parent for the case the item has been previously removed from scene
...
...
@@ -282,7 +280,7 @@ void UBGraphicsItemDelegate::positionHandles()
button
->
show
();
button
->
setZValue
(
delegated
()
->
zValue
());
}
}
}
}
else
{
foreach
(
DelegateButton
*
button
,
mButtons
)
button
->
hide
();
...
...
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