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
18d24f9d
Commit
18d24f9d
authored
Oct 20, 2011
by
shibakaneki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Finished the teacher bar
parent
f01bc840
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
64 additions
and
3 deletions
+64
-3
teacher_close.png
resources/images/teacher_close.png
+0
-0
teacher_close_disabled.png
resources/images/teacher_close_disabled.png
+0
-0
teacher_open.png
resources/images/teacher_open.png
+0
-0
teacher_open_disabled.png
resources/images/teacher_open_disabled.png
+0
-0
sankore.qrc
resources/sankore.qrc
+2
-0
UBBoardPaletteManager.cpp
src/board/UBBoardPaletteManager.cpp
+6
-0
UBBoardPaletteManager.h
src/board/UBBoardPaletteManager.h
+1
-0
UBTeacherBarWidget.cpp
src/gui/UBTeacherBarWidget.cpp
+52
-3
UBTeacherBarWidget.h
src/gui/UBTeacherBarWidget.h
+3
-0
No files found.
resources/images/teacher_close.png
View replaced file @
f01bc840
View file @
18d24f9d
855 Bytes
|
W:
|
H:
1.02 KB
|
W:
|
H:
2-up
Swipe
Onion skin
resources/images/teacher_close_disabled.png
0 → 100644
View file @
18d24f9d
1.02 KB
resources/images/teacher_open.png
View replaced file @
f01bc840
View file @
18d24f9d
842 Bytes
|
W:
|
H:
1.01 KB
|
W:
|
H:
2-up
Swipe
Onion skin
resources/images/teacher_open_disabled.png
0 → 100644
View file @
18d24f9d
1.01 KB
resources/sankore.qrc
View file @
18d24f9d
...
...
@@ -332,5 +332,7 @@
<file>images/moveUpDisabled.svg</file>
<file>images/teacher_close.png</file>
<file>images/teacher_open.png</file>
<file>images/teacher_close_disabled.png</file>
<file>images/teacher_open_disabled.png</file>
</qresource>
</RCC>
src/board/UBBoardPaletteManager.cpp
View file @
18d24f9d
...
...
@@ -734,3 +734,9 @@ void UBBoardPaletteManager::connectToDocumentController()
{
emit
connectToDocController
();
}
void
UBBoardPaletteManager
::
refreshPalettes
()
{
mRightPalette
->
update
();
mLeftPalette
->
update
();
}
src/board/UBBoardPaletteManager.h
View file @
18d24f9d
...
...
@@ -51,6 +51,7 @@ class UBBoardPaletteManager : public QObject
void
showVirtualKeyboard
(
bool
show
=
true
);
void
initPalettesPosAtStartup
();
void
connectToDocumentController
();
void
refreshPalettes
();
UBKeyboardPalette
*
mKeyboardPalette
;
UBRightPalette
*
createDesktopRightPalette
(
QWidget
*
parent
);
...
...
src/gui/UBTeacherBarWidget.cpp
View file @
18d24f9d
...
...
@@ -7,6 +7,7 @@
#include "document/UBDocumentProxy.h"
#include "board/UBBoardController.h"
#include "board/UBBoardPaletteManager.h"
UBTeacherBarWidget
::
UBTeacherBarWidget
(
QWidget
*
parent
,
const
char
*
name
)
:
UBDockPaletteWidget
(
parent
)
,
mpLayout
(
NULL
)
...
...
@@ -119,6 +120,17 @@ UBTeacherBarWidget::UBTeacherBarWidget(QWidget *parent, const char *name):UBDock
connect
(
UBApplication
::
boardController
,
SIGNAL
(
activeSceneWillChange
()),
this
,
SLOT
(
saveContent
()));
connect
(
UBApplication
::
boardController
,
SIGNAL
(
activeSceneChanged
()),
this
,
SLOT
(
loadContent
()));
connect
(
mpTitle
,
SIGNAL
(
textChanged
(
QString
)),
this
,
SLOT
(
onValueChanged
()));
connect
(
mpPhasis
,
SIGNAL
(
currentIndexChanged
(
int
)),
this
,
SLOT
(
onValueChanged
()));
connect
(
mpDuration
,
SIGNAL
(
currentIndexChanged
(
int
)),
this
,
SLOT
(
onValueChanged
()));
connect
(
mpEquipment
,
SIGNAL
(
textChanged
(
QString
)),
this
,
SLOT
(
onValueChanged
()));
connect
(
mpActivity
,
SIGNAL
(
currentIndexChanged
(
int
)),
this
,
SLOT
(
onValueChanged
()));
connect
(
mpAction1
->
teacher
(),
SIGNAL
(
textChanged
()),
this
,
SLOT
(
onValueChanged
()));
connect
(
mpAction1
->
student
(),
SIGNAL
(
textChanged
()),
this
,
SLOT
(
onValueChanged
()));
connect
(
mpAction2
->
teacher
(),
SIGNAL
(
textChanged
()),
this
,
SLOT
(
onValueChanged
()));
connect
(
mpAction2
->
student
(),
SIGNAL
(
textChanged
()),
this
,
SLOT
(
onValueChanged
()));
connect
(
mpAction3
->
teacher
(),
SIGNAL
(
textChanged
()),
this
,
SLOT
(
onValueChanged
()));
connect
(
mpAction3
->
student
(),
SIGNAL
(
textChanged
()),
this
,
SLOT
(
onValueChanged
()));
}
UBTeacherBarWidget
::~
UBTeacherBarWidget
()
...
...
@@ -228,17 +240,17 @@ UBTeacherBarWidget::~UBTeacherBarWidget()
void
UBTeacherBarWidget
::
populateCombos
()
{
QStringList
qslPhasis
;
qslPhasis
<<
tr
(
"I discover"
)
<<
tr
(
"I experiment"
)
<<
tr
(
"I train myself"
)
<<
tr
(
"I play"
)
<<
tr
(
"I memorize"
);
qslPhasis
<<
tr
(
"
"
)
<<
tr
(
"
I discover"
)
<<
tr
(
"I experiment"
)
<<
tr
(
"I train myself"
)
<<
tr
(
"I play"
)
<<
tr
(
"I memorize"
);
mpPhasis
->
insertItems
(
0
,
qslPhasis
);
mpPhasis
->
setCurrentIndex
(
0
);
QStringList
qslDuration
;
qslDuration
<<
tr
(
"Short"
)
<<
tr
(
"Middle"
)
<<
tr
(
"Long"
);
qslDuration
<<
tr
(
"
"
)
<<
tr
(
"
Short"
)
<<
tr
(
"Middle"
)
<<
tr
(
"Long"
);
mpDuration
->
insertItems
(
0
,
qslDuration
);
mpDuration
->
setCurrentIndex
(
0
);
QStringList
qslActivity
;
qslActivity
<<
tr
(
"Alone"
)
<<
tr
(
"By Group"
)
<<
tr
(
"All together"
);
qslActivity
<<
tr
(
""
)
<<
tr
(
"Alone"
)
<<
tr
(
"By Group"
)
<<
tr
(
"All together"
);
mpActivity
->
insertItems
(
0
,
qslActivity
);
mpActivity
->
setCurrentIndex
(
0
);
}
...
...
@@ -276,6 +288,33 @@ void UBTeacherBarWidget::loadContent()
mpAction3
->
setStudentText
(
nextInfos
.
action3Student
);
}
void
UBTeacherBarWidget
::
onValueChanged
()
{
if
(
mpTitle
->
text
()
==
""
&&
mpDuration
->
currentIndex
()
==
0
&&
mpPhasis
->
currentIndex
()
==
0
&&
mpEquipment
->
text
()
==
""
&&
mpActivity
->
currentIndex
()
==
0
&&
mpAction1
->
teacherText
()
==
""
&&
mpAction1
->
studentText
()
==
""
&&
mpAction2
->
teacherText
()
==
""
&&
mpAction2
->
studentText
()
==
""
&&
mpAction3
->
teacherText
()
==
""
&&
mpAction3
->
studentText
()
==
""
)
{
mIconToLeft
=
QPixmap
(
":images/teacher_open_disabled.png"
);
mIconToRight
=
QPixmap
(
":images/teacher_close_disabled.png"
);
}
else
{
mIconToLeft
=
QPixmap
(
":images/teacher_open.png"
);
mIconToRight
=
QPixmap
(
":images/teacher_close.png"
);
}
// TODO: refresh the icon
UBApplication
::
boardController
->
paletteManager
()
->
refreshPalettes
();
}
UBTeacherStudentAction
::
UBTeacherStudentAction
(
int
actionNumber
,
QWidget
*
parent
,
const
char
*
name
)
:
QWidget
(
parent
)
,
mpActionLabel
(
NULL
)
,
mpTeacherLabel
(
NULL
)
...
...
@@ -381,3 +420,13 @@ void UBTeacherStudentAction::setStudentText(QString text)
{
mpStudent
->
setText
(
text
);
}
QTextEdit
*
UBTeacherStudentAction
::
teacher
()
{
return
mpTeacher
;
}
QTextEdit
*
UBTeacherStudentAction
::
student
()
{
return
mpStudent
;
}
src/gui/UBTeacherBarWidget.h
View file @
18d24f9d
...
...
@@ -22,6 +22,8 @@ public:
QString
studentText
();
void
setTeacherText
(
QString
text
);
void
setStudentText
(
QString
text
);
QTextEdit
*
teacher
();
QTextEdit
*
student
();
private
:
int
mActionNumber
;
...
...
@@ -45,6 +47,7 @@ public:
private
slots
:
void
saveContent
();
void
loadContent
();
void
onValueChanged
();
private
:
void
populateCombos
();
...
...
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