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
0fb7cad9
Commit
0fb7cad9
authored
Jan 05, 2012
by
shibakaneki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added some logic in the teacher bar
parent
bac4c4ca
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
2 deletions
+21
-2
UBWidgetList.cpp
src/customWidgets/UBWidgetList.cpp
+5
-0
UBWidgetList.h
src/customWidgets/UBWidgetList.h
+1
-0
UBTeacherBarWidget.cpp
src/gui/UBTeacherBarWidget.cpp
+14
-2
UBTeacherBarWidget.h
src/gui/UBTeacherBarWidget.h
+1
-0
No files found.
src/customWidgets/UBWidgetList.cpp
View file @
0fb7cad9
...
...
@@ -155,5 +155,10 @@ void UBWidgetList::setEmptyText(const QString &text)
}
}
bool
UBWidgetList
::
empty
()
{
return
mWidgets
.
empty
();
}
// TODO : - add onHover 'delete' button
src/customWidgets/UBWidgetList.h
View file @
0fb7cad9
...
...
@@ -27,6 +27,7 @@ public:
void
setMargin
(
int
margin
);
void
setEmptyText
(
const
QString
&
text
);
int
margin
();
bool
empty
();
protected
:
void
resizeEvent
(
QResizeEvent
*
ev
);
...
...
src/gui/UBTeacherBarWidget.cpp
View file @
0fb7cad9
...
...
@@ -245,7 +245,11 @@ UBTeacherBarWidget::~UBTeacherBarWidget()
void
UBTeacherBarWidget
::
onValueChanged
()
{
if
(
mpTitle
->
text
()
==
""
)
if
(
mpTitle
->
text
()
==
""
&&
mpLinks
->
empty
()
&&
mpActions
->
empty
()
&&
mpDropMediaZone
->
empty
()
&&
mpComments
->
document
()
->
toPlainText
()
==
""
)
{
mIconToLeft
=
QPixmap
(
":images/teacher_open_disabled.png"
);
mIconToRight
=
QPixmap
(
":images/teacher_close_disabled.png"
);
...
...
@@ -291,6 +295,7 @@ void UBTeacherBarWidget::onLinkButton()
mpLinks
->
addWidget
(
pUrl
);
}
// ---------------------------------------------------------------------------------------------
UBTeacherStudentAction
::
UBTeacherStudentAction
(
QWidget
*
parent
,
const
char
*
name
)
:
QWidget
(
parent
)
,
mpText
(
NULL
)
,
mpLayout
(
NULL
)
...
...
@@ -359,11 +364,14 @@ QString UBTeacherStudentAction::comboValue()
{
QString
str
;
// TODO : Implement this method
if
(
NULL
!=
mpCombo
){
str
=
mpCombo
->
currentText
();
}
return
str
;
}
// ---------------------------------------------------------------------------------------------
UBTeacherBarDropMediaZone
::
UBTeacherBarDropMediaZone
(
QWidget
*
parent
,
const
char
*
name
)
:
QWidget
(
parent
)
{
...
...
@@ -385,6 +393,10 @@ UBTeacherBarDropMediaZone::~UBTeacherBarDropMediaZone()
}
}
bool
UBTeacherBarDropMediaZone
::
empty
()
{
return
mWidget
->
empty
();
}
void
UBTeacherBarDropMediaZone
::
dragEnterEvent
(
QDragEnterEvent
*
pEvent
)
{
...
...
src/gui/UBTeacherBarWidget.h
View file @
0fb7cad9
...
...
@@ -45,6 +45,7 @@ class UBTeacherBarDropMediaZone : public QWidget
public
:
UBTeacherBarDropMediaZone
(
QWidget
*
parent
=
0
,
const
char
*
name
=
"UBTeacherBarDropMediaZone"
);
~
UBTeacherBarDropMediaZone
();
bool
empty
();
private
:
QList
<
QWidget
*>
mWidgetList
;
...
...
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