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
22bd3e08
Commit
22bd3e08
authored
Apr 26, 2012
by
shibakaneki
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of github.com:Sankore/Sankore-3.1
parents
0d517aad
2a1a6ebf
Changes
16
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
757 additions
and
62 deletions
+757
-62
UBCFFAdaptor.cpp
plugins/cffadaptor/src/UBCFFAdaptor.cpp
+32
-24
release.linux.sh
release.linux.sh
+3
-3
indexingParameters.xml
resources/customizations/teacherGuide/indexingParameters.xml
+211
-0
style.qss
resources/style.qss
+1
-2
UBCFFSubsetAdaptor.cpp
src/adaptors/UBCFFSubsetAdaptor.cpp
+0
-2
UBMetadataDcSubsetAdaptor.cpp
src/adaptors/UBMetadataDcSubsetAdaptor.cpp
+13
-6
UBPersistenceManager.cpp
src/core/UBPersistenceManager.cpp
+3
-1
UBPreferencesController.cpp
src/core/UBPreferencesController.cpp
+0
-2
UBDocumentController.cpp
src/document/UBDocumentController.cpp
+1
-2
UBDocumentController.h
src/document/UBDocumentController.h
+0
-3
UBDocumentProxy.cpp
src/document/UBDocumentProxy.cpp
+11
-6
UBDocumentProxy.h
src/document/UBDocumentProxy.h
+3
-1
UBStringUtils.cpp
src/frameworks/UBStringUtils.cpp
+5
-0
UBStringUtils.h
src/frameworks/UBStringUtils.h
+1
-0
UBTeacherGuideWidget.cpp
src/gui/UBTeacherGuideWidget.cpp
+399
-10
UBTeacherGuideWidget.h
src/gui/UBTeacherGuideWidget.h
+74
-0
No files found.
plugins/cffadaptor/src/UBCFFAdaptor.cpp
View file @
22bd3e08
...
...
@@ -443,7 +443,6 @@ bool UBCFFAdaptor::UBToCFFConverter::parseMetadata()
QSize
tmpSize
=
getSVGDimentions
(
nextInElement
.
text
());
if
(
!
tmpSize
.
isNull
())
{
mSVGSize
=
tmpSize
;
mViewbox
.
setRect
(
0
,
0
,
tmpSize
.
width
(),
tmpSize
.
height
());
}
else
{
qDebug
()
<<
"can't interpret svg section size"
;
errorStr
=
"InterpretSvgSizeError"
;
...
...
@@ -487,6 +486,11 @@ bool UBCFFAdaptor::UBToCFFConverter::parseContent() {
}
if
(
QRect
()
==
mViewbox
)
{
mViewbox
.
setRect
(
0
,
0
,
mSVGSize
.
width
(),
mSVGSize
.
height
());
}
svgDocumentSection
.
setAttribute
(
aIWBViewBox
,
rectToIWBAttr
(
mViewbox
));
svgDocumentSection
.
setAttribute
(
aWidth
,
QString
(
"%1"
).
arg
(
mViewbox
.
width
()));
svgDocumentSection
.
setAttribute
(
aHeight
,
QString
(
"%1"
).
arg
(
mViewbox
.
height
()));
...
...
@@ -639,30 +643,29 @@ QDomElement UBCFFAdaptor::UBToCFFConverter::parseSvgPageSection(const QDomElemen
void
UBCFFAdaptor
::
UBToCFFConverter
::
writeQDomElementToXML
(
const
QDomNode
&
node
)
{
if
(
!
node
.
isNull
()){
if
(
node
.
isText
())
if
(
!
node
.
isNull
())
if
(
node
.
isText
())
{
mIWBContentWriter
->
writeCharacters
(
node
.
nodeValue
());
}
else
{
mIWBContentWriter
->
writeStartElement
(
node
.
namespaceURI
(),
node
.
toElement
().
tagName
());
for
(
int
i
=
0
;
i
<
node
.
toElement
().
attributes
().
count
();
i
++
)
{
mIWBContentWriter
->
writeCharacters
(
node
.
nodeValue
());
QDomAttr
attr
=
node
.
toElement
().
attributes
().
item
(
i
).
toAttr
();
mIWBContentWriter
->
writeAttribute
(
attr
.
name
(),
attr
.
value
());
}
else
QDomNode
child
=
node
.
firstChild
();
while
(
!
child
.
isNull
())
{
mIWBContentWriter
->
writeStartElement
(
node
.
namespaceURI
(),
node
.
toElement
().
tagName
());
for
(
int
i
=
0
;
i
<
node
.
toElement
().
attributes
().
count
();
i
++
)
{
QDomAttr
attr
=
node
.
toElement
().
attributes
().
item
(
i
).
toAttr
();
mIWBContentWriter
->
writeAttribute
(
attr
.
name
(),
attr
.
value
());
}
QDomNode
child
=
node
.
firstChild
();
while
(
!
child
.
isNull
())
{
writeQDomElementToXML
(
child
);
child
=
child
.
nextSibling
();
}
mIWBContentWriter
->
writeEndElement
();
writeQDomElementToXML
(
child
);
child
=
child
.
nextSibling
();
}
}
mIWBContentWriter
->
writeEndElement
();
}
}
bool
UBCFFAdaptor
::
UBToCFFConverter
::
writeExtendedIwbSection
()
...
...
@@ -1025,8 +1028,6 @@ void UBCFFAdaptor::UBToCFFConverter::setCoordinatesFromUBZ(const QDomElement &ub
item
.
setRect
(
0
,
0
,
width
,
height
);
item
.
setTransform
(
tr
);
item
.
setTransformOriginPoint
(
item
.
boundingRect
().
center
());
item
.
setRotation
(
-
alpha
);
QMatrix
sceneMatrix
=
item
.
sceneMatrix
();
...
...
@@ -1107,6 +1108,9 @@ bool UBCFFAdaptor::UBToCFFConverter::setContentFromUBZ(const QDomElement &ubzEle
svgElement
.
setAttribute
(
aSVGRequiredExtension
,
svgRequiredExtensionPrefix
+
fePng
);
}
}
}
else
{
bRet
=
false
;
}
if
(
!
bRet
)
...
...
@@ -1142,7 +1146,6 @@ void UBCFFAdaptor::UBToCFFConverter::setCFFTextFromHTMLTextNode(const QDomElemen
QDomNode
spanNode
=
htmlPNode
.
firstChild
();
while
(
!
spanNode
.
isNull
())
{
if
(
spanNode
.
isText
())
...
...
@@ -1153,7 +1156,10 @@ void UBCFFAdaptor::UBToCFFConverter::setCFFTextFromHTMLTextNode(const QDomElemen
else
if
(
spanNode
.
isElement
())
{
QDomElement
pElementIwb
;
QDomElement
spanElement
=
textDoc
.
createElementNS
(
svgIWBNS
,
svgIWBNSPrefix
+
":"
+
tIWBTspan
);
setCommonAttributesFromUBZ
(
htmlPNode
.
toElement
(),
pElementIwb
,
spanElement
);
if
(
spanNode
.
hasAttributes
())
{
int
attrCount
=
spanNode
.
attributes
().
count
();
...
...
@@ -1196,6 +1202,8 @@ QString UBCFFAdaptor::UBToCFFConverter::ubzAttrNameToCFFAttrName(QString cffAttr
QString
sRet
=
cffAttrName
;
if
(
QString
(
"color"
)
==
cffAttrName
)
sRet
=
QString
(
"fill"
);
if
(
QString
(
"align"
)
==
cffAttrName
)
sRet
=
QString
(
"text-align"
);
return
sRet
;
}
...
...
release.linux.sh
View file @
22bd3e08
...
...
@@ -111,8 +111,8 @@ else
LAST_COMMITED_VERSION
=
"
`
git describe
$(
git rev-list
--tags
--max-count
=
1
)
`
"
if
[
"v
$VERSION
"
!=
"
$LAST_COMMITED_VERSION
"
]
;
then
echo
creating a tag with the version
$VERSION
#
git tag -a "v$VERSION" -m "Generating setup for v$VERSION"
#
git push origin --tags
git tag
-a
"v
$VERSION
"
-m
"Generating setup for v
$VERSION
"
git push origin
--tags
fi
fi
...
...
@@ -353,4 +353,4 @@ cd $RELEASE_DIR
rm
../../../install/linux/Open-Sankore.tar.gz
tar
cvzf ../../../install/linux/Open-Sankore.tar.gz Open-Sankore.
$VERSION
-C
.
notify-send
"Open-Sankore"
"tar.gz Build done"
\ No newline at end of file
notify-send
"Open-Sankore"
"tar.gz Build done"
resources/customizations/teacherGuide/indexingParameters.xml
0 → 100644
View file @
22bd3e08
This diff is collapsed.
Click to expand it.
resources/style.qss
View file @
22bd3e08
...
...
@@ -254,8 +254,7 @@ UBTGAdaptableText#UBTGPresentationComment
border : none;
}
QFrame#UBTGEditionSeparator,
QFrame#UBTGPresentationSepartor
QFrame#UBTGSeparator
{
background-color: #cccccc;
}
src/adaptors/UBCFFSubsetAdaptor.cpp
View file @
22bd3e08
...
...
@@ -41,8 +41,6 @@
#include "core/UBApplication.h"
#include "QFile"
#include <QDomDocument>
#include "core/memcheck.h"
//#include "qtlogger.h"
...
...
src/adaptors/UBMetadataDcSubsetAdaptor.cpp
View file @
22bd3e08
...
...
@@ -97,7 +97,7 @@ void UBMetadataDcSubsetAdaptor::persist(UBDocumentProxy* proxy)
xmlWriter
.
writeTextElement
(
nsDc
,
"title"
,
proxy
->
metaData
(
UBSettings
::
documentName
).
toString
());
xmlWriter
.
writeTextElement
(
nsDc
,
"type"
,
proxy
->
metaData
(
UBSettings
::
documentGroupName
).
toString
());
xmlWriter
.
writeTextElement
(
nsDc
,
"date"
,
QDate
::
currentDate
().
toString
(
"yyyy-MM-dd"
));
xmlWriter
.
writeTextElement
(
nsDc
,
"date"
,
proxy
->
metaData
(
UBSettings
::
documentDate
).
toString
(
));
xmlWriter
.
writeTextElement
(
nsDc
,
"format"
,
"image/svg+xml"
);
// introduced in UB 4.2
...
...
@@ -108,8 +108,7 @@ void UBMetadataDcSubsetAdaptor::persist(UBDocumentProxy* proxy)
xmlWriter
.
writeTextElement
(
UBSettings
::
uniboardDocumentNamespaceUri
,
"size"
,
QString
(
"%1x%2"
).
arg
(
width
).
arg
(
height
));
// introduced in UB 4.4
xmlWriter
.
writeTextElement
(
UBSettings
::
uniboardDocumentNamespaceUri
,
"updated-at"
,
proxy
->
metaData
(
UBSettings
::
documentUpdatedAt
).
toString
());
xmlWriter
.
writeTextElement
(
UBSettings
::
uniboardDocumentNamespaceUri
,
"updated-at"
,
UBStringUtils
::
toUtcIsoDateTime
(
QDateTime
::
currentDateTimeUtc
()));
// introduced in OpenSankore 1.40.00
xmlWriter
.
writeTextElement
(
UBSettings
::
uniboardDocumentNamespaceUri
,
UBSettings
::
sessionTitle
,
proxy
->
metaData
(
UBSettings
::
sessionTitle
).
toString
());
xmlWriter
.
writeTextElement
(
UBSettings
::
uniboardDocumentNamespaceUri
,
UBSettings
::
sessionTarget
,
proxy
->
metaData
(
UBSettings
::
sessionTarget
).
toString
());
...
...
@@ -278,13 +277,21 @@ QMap<QString, QVariant> UBMetadataDcSubsetAdaptor::load(QString pPath)
metadata
.
insert
(
UBSettings
::
documentSize
,
QVariant
(
docSize
));
}
if
(
!
updatedAtFound
)
{
metadata
.
insert
(
UBSettings
::
documentUpdatedAt
,
date
+
"T00:00:00Z"
);
// this is necessary to update the old files date
QString
dateString
=
metadata
.
value
(
UBSettings
::
documentDate
).
toString
();
if
(
dateString
.
length
()
<
10
){
metadata
.
remove
(
UBSettings
::
documentDate
);
metadata
.
insert
(
UBSettings
::
documentDate
,
dateString
+
"T00:00:00Z"
);
}
if
(
!
updatedAtFound
)
{
metadata
.
insert
(
UBSettings
::
documentUpdatedAt
,
dateString
);
}
metadata
.
insert
(
UBSettings
::
documentDate
,
QVariant
(
date
));
return
metadata
;
}
src/core/UBPersistenceManager.cpp
View file @
22bd3e08
...
...
@@ -239,7 +239,9 @@ UBDocumentProxy* UBPersistenceManager::createDocument(const QString& pGroupName,
}
doc
->
setMetaData
(
UBSettings
::
documentVersion
,
UBSettings
::
currentFileVersion
);
doc
->
setMetaData
(
UBSettings
::
documentUpdatedAt
,
UBStringUtils
::
toUtcIsoDateTime
(
QDateTime
::
currentDateTime
()));
QString
currentDate
=
UBStringUtils
::
toUtcIsoDateTime
(
QDateTime
::
currentDateTime
());
doc
->
setMetaData
(
UBSettings
::
documentUpdatedAt
,
currentDate
);
doc
->
setMetaData
(
UBSettings
::
documentDate
,
currentDate
);
if
(
withEmptyPage
)
createDocumentSceneAt
(
doc
,
0
);
...
...
src/core/UBPreferencesController.cpp
View file @
22bd3e08
...
...
@@ -470,14 +470,12 @@ void UBPreferencesController::toolbarOrientationVertical(bool checked)
{
UBSettings
*
settings
=
UBSettings
::
settings
();
settings
->
appToolBarOrientationVertical
->
set
(
checked
);
//settings->appToolBarOrientationVertical->set(true);
}
void
UBPreferencesController
::
toolbarOrientationHorizontal
(
bool
checked
)
{
UBSettings
*
settings
=
UBSettings
::
settings
();
settings
->
appToolBarOrientationVertical
->
set
(
!
checked
);
//settings->appToolBarOrientationVertical->set(false);
}
UBBrushPropertiesFrame
::
UBBrushPropertiesFrame
(
QFrame
*
owner
,
const
QList
<
QColor
>&
lightBackgroundColors
,
...
...
src/document/UBDocumentController.cpp
View file @
22bd3e08
...
...
@@ -509,7 +509,6 @@ void UBDocumentController::openSelectedItem()
if
(
proxy
&&
isOKToOpenDocument
(
proxy
))
{
//mBoardController->setActiveDocumentScene(proxy, thumb->sceneIndex());
UBApplication
::
applicationController
->
showBoard
();
}
}
...
...
@@ -1639,4 +1638,4 @@ int UBDocumentController::getSelectedItemIndex()
return
thumb
->
sceneIndex
();
}
else
return
-
1
;
}
\ No newline at end of file
}
src/document/UBDocumentController.h
View file @
22bd3e08
...
...
@@ -34,7 +34,6 @@ class UBDocumentGroupTreeItem;
class
UBDocumentProxyTreeItem
;
class
UBMainWindow
;
class
UBDocumentToolsPalette
;
//class UBKeyboardPalette;
class
UBDocumentController
:
public
QObject
{
...
...
@@ -77,8 +76,6 @@ class UBDocumentController : public QObject
void
paste
();
void
focusChanged
(
QWidget
*
old
,
QWidget
*
current
);
// void showKeyboard(bool show);
protected
:
virtual
void
setupViews
();
virtual
void
setupToolbar
();
...
...
src/document/UBDocumentProxy.cpp
View file @
22bd3e08
...
...
@@ -295,13 +295,18 @@ QString UBDocumentProxy::sessionAuthors()
return
QString
();
}
Q
String
UBDocumentProxy
::
documentDate
()
Q
DateTime
UBDocumentProxy
::
documentDate
()
{
if
(
mMetaDatas
.
contains
(
UBSettings
::
documentDate
)){
return
metaData
(
UBSettings
::
documentDate
).
toString
();
}
else
{
return
QString
();
}
if
(
mMetaDatas
.
contains
(
UBSettings
::
documentDate
))
return
UBStringUtils
::
fromUtcIsoDate
(
metaData
(
UBSettings
::
documentDate
).
toString
());
return
QDateTime
::
currentDateTime
();
}
QDateTime
UBDocumentProxy
::
lastUpdate
()
{
if
(
mMetaDatas
.
contains
(
UBSettings
::
documentUpdatedAt
))
return
UBStringUtils
::
fromUtcIsoDate
(
metaData
(
UBSettings
::
documentUpdatedAt
).
toString
());
return
QDateTime
().
currentDateTime
();
}
bool
UBDocumentProxy
::
isModified
()
const
...
...
src/document/UBDocumentProxy.h
View file @
22bd3e08
...
...
@@ -59,7 +59,9 @@ class UBDocumentProxy : public QObject
QString
sessionTopic
();
void
setSessionAuthor
(
const
QString
&
authors
);
QString
sessionAuthors
();
QString
documentDate
();
QDateTime
documentDate
();
QDateTime
lastUpdate
();
QSize
defaultDocumentSize
()
const
;
...
...
src/frameworks/UBStringUtils.cpp
View file @
22bd3e08
...
...
@@ -105,6 +105,11 @@ QString UBStringUtils::toUtcIsoDateTime(const QDateTime& dateTime)
return
dateTime
.
toUTC
().
toString
(
Qt
::
ISODate
)
+
"Z"
;
}
QDateTime
UBStringUtils
::
fromUtcIsoDate
(
const
QString
&
dateString
)
{
return
QDateTime
::
fromString
(
dateString
,
Qt
::
ISODate
).
toLocalTime
();
}
src/frameworks/UBStringUtils.h
View file @
22bd3e08
...
...
@@ -33,6 +33,7 @@ class UBStringUtils
static
QString
toCanonicalUuid
(
const
QUuid
&
uuid
);
static
QString
toUtcIsoDateTime
(
const
QDateTime
&
dateTime
);
static
QDateTime
fromUtcIsoDate
(
const
QString
&
dateString
);
};
...
...
src/gui/UBTeacherGuideWidget.cpp
View file @
22bd3e08
This diff is collapsed.
Click to expand it.
src/gui/UBTeacherGuideWidget.h
View file @
22bd3e08
...
...
@@ -21,10 +21,17 @@ class QHeaderView;
class
QLabel
;
class
QVBoxLayout
;
class
QPushButton
;
class
UBDocumentProxy
;
#include "UBTeacherGuideWidgetsTools.h"
#include "UBTGWidgetTreeDelegate.h"
typedef
enum
{
tUBTGZeroPageMode_EDITION
,
tUBTGZeroPageMode_PRESENTATION
}
tUBTGZeroPageMode
;
/***************************************************************************
* class UBTeacherGuideEditionWidget *
***************************************************************************/
...
...
@@ -95,7 +102,73 @@ private:
};
/***************************************************************************
* class UBTeacherGuidePageZeroPresentationWidget *
***************************************************************************/
class
UBTeacherGuidePageZeroEditionWidget
:
public
QWidget
{
Q_OBJECT
public
:
explicit
UBTeacherGuidePageZeroEditionWidget
(
QWidget
*
parent
,
const
char
*
name
=
"UBTeacherGuidePageZeroEditionWidget"
);
~
UBTeacherGuidePageZeroEditionWidget
();
QVector
<
tUBGEElementNode
*>
getData
();
public
slots
:
void
onActiveSceneChanged
();
void
switchToMode
(
tUBTGZeroPageMode
mode
=
tUBTGZeroPageMode_EDITION
);
private
:
void
fillComboBoxes
();
QVBoxLayout
*
mpLayout
;
QHBoxLayout
*
mpButtonTitleLayout
;
QPushButton
*
mpModePushButton
;
QLabel
*
mpPageNumberLabel
;
UBTGAdaptableText
*
mpSessionTitle
;
QFrame
*
mpSeparatorSessionTitle
;
QLabel
*
mpAuthorsLabel
;
UBTGAdaptableText
*
mpAuthors
;
QFrame
*
mpSeparatorAuthors
;
QLabel
*
mpCreationLabel
;
QLabel
*
mpLastModifiedLabel
;
QLabel
*
mpGoalsLabel
;
UBTGAdaptableText
*
mpGoals
;
QFrame
*
mpSeparatorGoals
;
QLabel
*
mpIndexLabel
;
QLabel
*
mpKeywordsLabel
;
UBTGAdaptableText
*
mpKeywords
;
QLabel
*
mpSchoolLevelItemLabel
;
QComboBox
*
mpSchoolLevelBox
;
QLabel
*
mpSchoolLevelValueLabel
;
QLabel
*
mpSchoolBranchItemLabel
;
QComboBox
*
mpSchoolBranchBox
;
QLabel
*
mpSchoolBranchValueLabel
;
QLabel
*
mpSchoolTypeItemLabel
;
QComboBox
*
mpSchoolTypeBox
;
QLabel
*
mpSchoolTypeValueLabel
;
QFrame
*
mpSeparatorIndex
;
QLabel
*
mpLicenceLabel
;
QComboBox
*
mpLicenceBox
;
QLabel
*
mpLicenceValueLabel
;
QLabel
*
mpLicenceIcon
;
QHBoxLayout
*
mpLicenceLayout
;
QMap
<
QString
,
QString
>
mGradeLevelsMap
;
QMap
<
QString
,
QStringList
>
mSubjects
;
private
slots
:
void
onSchoolLevelChanged
(
QString
schoolLevel
);
};
/***************************************************************************
* class UBTeacherGuideWidget *
...
...
@@ -114,6 +187,7 @@ public slots:
void
connectToStylusPalette
();
private
:
UBTeacherGuidePageZeroEditionWidget
*
mpPageZeroEditonWidget
;
UBTeacherGuideEditionWidget
*
mpEditionWidget
;
UBTeacherGuidePresentationWidget
*
mpPresentationWidget
;
QVector
<
tUBGEElementNode
*>
mCurrentData
;
...
...
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