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
a725bc80
Commit
a725bc80
authored
Aug 29, 2012
by
shibakaneki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed issue 1033
parent
52732618
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
2 deletions
+23
-2
UBTeacherGuideWidget.cpp
src/gui/UBTeacherGuideWidget.cpp
+11
-0
UBTeacherGuideWidget.h
src/gui/UBTeacherGuideWidget.h
+5
-0
UBTeacherGuideWidgetsTools.cpp
src/gui/UBTeacherGuideWidgetsTools.cpp
+7
-2
No files found.
src/gui/UBTeacherGuideWidget.cpp
View file @
a725bc80
...
...
@@ -685,6 +685,7 @@ UBTeacherGuidePageZeroWidget::UBTeacherGuidePageZeroWidget(QWidget* parent, cons
mpSessionTitle
=
new
UBTGAdaptableText
(
0
,
this
,
"UBTGSessionTitle"
);
mpSessionTitle
->
setPlaceHolderText
(
tr
(
"Type session title here ..."
));
mpButtonTitleLayout
->
addWidget
(
mpSessionTitle
);
connect
(
this
,
SIGNAL
(
resized
()),
mpSessionTitle
,
SLOT
(
onTextChanged
()));
mpLayout
->
addLayout
(
mpButtonTitleLayout
);
...
...
@@ -703,6 +704,7 @@ UBTeacherGuidePageZeroWidget::UBTeacherGuidePageZeroWidget(QWidget* parent, cons
mpAuthors
->
setObjectName
(
"UBTGZeroPageInputText"
);
mpAuthors
->
setPlaceHolderText
(
tr
(
"Type authors here ..."
));
mpLayout
->
addWidget
(
mpAuthors
);
connect
(
this
,
SIGNAL
(
resized
()),
mpAuthors
,
SLOT
(
onTextChanged
()));
mpCreationLabel
=
new
QLabel
(
this
);
mpCreationLabel
->
setObjectName
(
"UBTGZeroPageDateLabel"
);
...
...
@@ -727,6 +729,7 @@ UBTeacherGuidePageZeroWidget::UBTeacherGuidePageZeroWidget(QWidget* parent, cons
mpObjectives
->
setObjectName
(
"UBTGZeroPageInputText"
);
mpObjectives
->
setPlaceHolderText
(
tr
(
"Type objectives here..."
));
mpLayout
->
addWidget
(
mpObjectives
);
connect
(
this
,
SIGNAL
(
resized
()),
mpObjectives
,
SLOT
(
onTextChanged
()));
mpSeparatorObjectives
=
new
QFrame
(
this
);
mpSeparatorObjectives
->
setFixedHeight
(
UBTG_SEPARATOR_FIXED_HEIGHT
);
...
...
@@ -747,6 +750,7 @@ UBTeacherGuidePageZeroWidget::UBTeacherGuidePageZeroWidget(QWidget* parent, cons
mpKeywords
=
new
UBTGAdaptableText
(
0
,
this
);
mpKeywords
->
setPlaceHolderText
(
tr
(
"Type keywords here ..."
));
mpLayout
->
addWidget
(
mpKeywords
);
connect
(
this
,
SIGNAL
(
resized
()),
mpKeywords
,
SLOT
(
onTextChanged
()));
mpSchoolLevelItemLabel
=
new
QLabel
(
this
);
mpSchoolLevelItemLabel
->
setObjectName
(
"UBTGZeroPageItemLabel"
);
...
...
@@ -1122,6 +1126,12 @@ bool UBTeacherGuidePageZeroWidget::isModified()
return
result
;
}
void
UBTeacherGuidePageZeroWidget
::
resizeEvent
(
QResizeEvent
*
ev
){
emit
resized
();
QWidget
::
resizeEvent
(
ev
);
}
/***************************************************************************
* class UBTeacherGuideWidget *
***************************************************************************/
...
...
@@ -1238,3 +1248,4 @@ bool UBTeacherGuideWidget::isModified()
else
return
mpEditionWidget
->
isModified
();
}
src/gui/UBTeacherGuideWidget.h
View file @
a725bc80
...
...
@@ -136,11 +136,16 @@ public:
QVector
<
tUBGEElementNode
*>
getData
();
bool
isModified
();
signals
:
void
resized
();
public
slots
:
void
onActiveSceneChanged
();
void
switchToMode
(
tUBTGZeroPageMode
mode
=
tUBTGZeroPageMode_EDITION
);
protected
:
void
resizeEvent
(
QResizeEvent
*
ev
);
private
:
void
fillComboBoxes
();
void
loadData
();
...
...
src/gui/UBTeacherGuideWidgetsTools.cpp
View file @
a725bc80
...
...
@@ -174,6 +174,7 @@ void UBTGAdaptableText::showEvent(QShowEvent* e)
if
(
!
mIsUpdatingSize
&&
mHasPlaceHolder
&&
toPlainText
().
isEmpty
())
setPlainText
(
mPlaceHolderText
);
else
// If the teacherguide is collapsed, don't updated the size. Or set the size as the expanded size
onTextChanged
();
}
...
...
@@ -188,9 +189,12 @@ QString UBTGAdaptableText::text()
void
UBTGAdaptableText
::
onTextChanged
()
{
qDebug
()
<<
">> onTextChanged CALLED!"
;
qreal
documentSize
=
document
()
->
size
().
height
();
if
(
height
()
==
documentSize
+
mBottomMargin
)
return
;
qDebug
()
<<
">> documentSize: "
<<
documentSize
<<
", height: "
<<
height
();
if
(
height
()
==
documentSize
+
mBottomMargin
){
return
;
}
mIsUpdatingSize
=
true
;
...
...
@@ -208,6 +212,7 @@ void UBTGAdaptableText::onTextChanged()
setFocus
();
}
mIsUpdatingSize
=
false
;
}
void
UBTGAdaptableText
::
setInitialText
(
const
QString
&
text
)
{
...
...
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