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
f85bb2d5
Commit
f85bb2d5
authored
May 05, 2012
by
Claudio Valerio
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
the title is found after reloading the document using the text
parent
9ed62340
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
5 deletions
+16
-5
UBGraphicsScene.cpp
src/domain/UBGraphicsScene.cpp
+6
-3
UBTeacherGuideWidget.cpp
src/gui/UBTeacherGuideWidget.cpp
+9
-2
UBTeacherGuideWidget.h
src/gui/UBTeacherGuideWidget.h
+1
-0
No files found.
src/domain/UBGraphicsScene.cpp
View file @
f85bb2d5
...
...
@@ -1480,15 +1480,18 @@ UBGraphicsTextItem* UBGraphicsScene::textForObjectName(const QString& pString, c
//looking for a previous such item text
for
(
int
i
=
0
;
i
<
mFastAccessItems
.
count
()
&&
!
found
;
i
+=
1
){
UBGraphicsTextItem
*
currentItem
=
dynamic_cast
<
UBGraphicsTextItem
*>
(
mFastAccessItems
.
at
(
i
));
if
(
currentItem
&&
currentItem
->
objectName
()
==
objectName
){
if
(
currentItem
&&
(
currentItem
->
objectName
()
==
objectName
||
currentItem
->
toPlainText
()
==
pString
)){
// The second condition is necessary because the object name isn't stored. On reopeining the file we
// need another rule than the objectName
textItem
=
currentItem
;
found
=
true
;
if
(
currentItem
->
objectName
()
!=
objectName
)
textItem
->
setObjectName
(
objectName
);
}
}
if
(
!
textItem
){
textItem
=
addTextWithFont
(
pString
,
QPointF
(
0
,
0
)
,
64
,
""
,
true
,
false
);
textItem
=
addTextWithFont
(
pString
,
QPointF
(
0
,
0
)
,
48
,
""
,
true
,
false
);
textItem
->
setObjectName
(
objectName
);
textItem
->
Delegate
()
->
setCanDuplicate
(
false
);
}
textItem
->
setPlainText
(
pString
);
...
...
src/gui/UBTeacherGuideWidget.cpp
View file @
f85bb2d5
...
...
@@ -829,7 +829,7 @@ void UBTeacherGuidePageZeroWidget::onActiveSceneChanged()
QDateTime
updatedDate
=
documentProxy
->
lastUpdate
();
mpLastModifiedLabel
->
setText
(
tr
(
"Updated the:
\n
"
)
+
updatedDate
.
toString
(
Qt
::
SystemLocaleShortDate
));
loadData
();
UBApplication
::
boardController
->
activeScene
()
->
textForObjectName
(
mpSessionTitle
->
text
()
);
updateSceneTitle
(
);
}
}
...
...
@@ -873,6 +873,13 @@ void UBTeacherGuidePageZeroWidget::persistData()
documentProxy
->
setMetaData
(
UBSettings
::
sessionLicence
,
mpLicenceBox
->
currentText
());
}
void
UBTeacherGuidePageZeroWidget
::
updateSceneTitle
()
{
QString
sessionTitle
=
mpSessionTitle
->
text
();
if
(
!
sessionTitle
.
isEmpty
())
UBApplication
::
boardController
->
activeScene
()
->
textForObjectName
(
mpSessionTitle
->
text
());
}
void
UBTeacherGuidePageZeroWidget
::
switchToMode
(
tUBTGZeroPageMode
mode
)
{
if
(
mode
==
tUBTGZeroPageMode_EDITION
){
...
...
@@ -902,7 +909,7 @@ void UBTeacherGuidePageZeroWidget::switchToMode(tUBTGZeroPageMode mode)
QString
inputStyleSheet
(
"QTextEdit { background: transparent; border: none;}"
);
mpModePushButton
->
show
();
mpSessionTitle
->
setReadOnly
(
true
);
UBApplication
::
boardController
->
activeScene
()
->
textForObjectName
(
mpSessionTitle
->
text
()
);
updateSceneTitle
(
);
mpSessionTitle
->
setStyleSheet
(
inputStyleSheet
);
mpSessionTitle
->
setTextColor
(
QColor
(
Qt
::
black
));
QFont
titleFont
(
QApplication
::
font
().
family
(),
14
,
1
);
...
...
src/gui/UBTeacherGuideWidget.h
View file @
f85bb2d5
...
...
@@ -135,6 +135,7 @@ private:
void
loadData
();
void
hideEvent
(
QHideEvent
*
event
);
bool
eventFilter
(
QObject
*
object
,
QEvent
*
event
);
void
updateSceneTitle
();
QVBoxLayout
*
mpLayout
;
QHBoxLayout
*
mpButtonTitleLayout
;
...
...
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