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
a3582234
Commit
a3582234
authored
Apr 12, 2012
by
Claudio Valerio
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
UBTGAdaptableText handling the resize event
parent
c4a694e7
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
1 deletion
+8
-1
UBTeacherGuideWidget.cpp
src/gui/UBTeacherGuideWidget.cpp
+1
-1
UBTeacherGuideWidgetsTools.cpp
src/gui/UBTeacherGuideWidgetsTools.cpp
+6
-0
UBTeacherGuideWidgetsTools.h
src/gui/UBTeacherGuideWidgetsTools.h
+1
-0
No files found.
src/gui/UBTeacherGuideWidget.cpp
View file @
a3582234
...
@@ -388,7 +388,7 @@ void UBTeacherGuidePresentationWidget::showData(QVector<tUBGEElementNode*> data)
...
@@ -388,7 +388,7 @@ void UBTeacherGuidePresentationWidget::showData(QVector<tUBGEElementNode*> data)
newWidgetItem
->
setText
(
0
,
element
->
attributes
.
value
(
"task"
));
newWidgetItem
->
setText
(
0
,
element
->
attributes
.
value
(
"task"
));
QString
colorString
=
element
->
attributes
.
value
(
"owner"
).
toInt
()
==
0
?
"red"
:
"green"
;
QString
colorString
=
element
->
attributes
.
value
(
"owner"
).
toInt
()
==
0
?
"red"
:
"green"
;
UBTGAdaptableText
*
textWidget
=
new
UBTGAdaptableText
(
newWidgetItem
,
0
);
UBTGAdaptableText
*
textWidget
=
new
UBTGAdaptableText
(
newWidgetItem
,
0
);
textWidget
->
bottomMargin
(
1
5
);
textWidget
->
bottomMargin
(
1
4
);
textWidget
->
setStyleSheet
(
"QWidget {background: #EEEEEE; border:none; color:"
+
colorString
+
";}"
);
textWidget
->
setStyleSheet
(
"QWidget {background: #EEEEEE; border:none; color:"
+
colorString
+
";}"
);
textWidget
->
showText
(
element
->
attributes
.
value
(
"task"
));
textWidget
->
showText
(
element
->
attributes
.
value
(
"task"
));
textWidget
->
document
()
->
setDefaultFont
(
QFont
(
QApplication
::
font
().
family
(),
11
));
textWidget
->
document
()
->
setDefaultFont
(
QFont
(
QApplication
::
font
().
family
(),
11
));
...
...
src/gui/UBTeacherGuideWidgetsTools.cpp
View file @
a3582234
...
@@ -194,6 +194,12 @@ void UBTGAdaptableText::bottomMargin(int newValue)
...
@@ -194,6 +194,12 @@ void UBTGAdaptableText::bottomMargin(int newValue)
onTextChanged
();
onTextChanged
();
}
}
void
UBTGAdaptableText
::
resizeEvent
(
QResizeEvent
*
e
)
{
QTextEdit
::
resizeEvent
(
e
);
onTextChanged
();
}
/***************************************************************************
/***************************************************************************
* class UBTGMediaWidget *
* class UBTGMediaWidget *
***************************************************************************/
***************************************************************************/
...
...
src/gui/UBTeacherGuideWidgetsTools.h
View file @
a3582234
...
@@ -99,6 +99,7 @@ protected:
...
@@ -99,6 +99,7 @@ protected:
void
keyPressEvent
(
QKeyEvent
*
e
);
void
keyPressEvent
(
QKeyEvent
*
e
);
void
keyReleaseEvent
(
QKeyEvent
*
e
);
void
keyReleaseEvent
(
QKeyEvent
*
e
);
void
showEvent
(
QShowEvent
*
e
);
void
showEvent
(
QShowEvent
*
e
);
void
resizeEvent
(
QResizeEvent
*
e
);
private
:
private
:
int
mBottomMargin
;
int
mBottomMargin
;
...
...
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