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
44a06538
Commit
44a06538
authored
Jan 04, 2012
by
Claudio Valerio
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'Bett-2012' of github.com:Sankore/Sankore-3.1 into Bett-2012
parents
453debb2
38ee9bf8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
89 additions
and
18 deletions
+89
-18
UBTeacherBarWidget.cpp
src/gui/UBTeacherBarWidget.cpp
+78
-15
UBTeacherBarWidget.h
src/gui/UBTeacherBarWidget.h
+11
-3
No files found.
src/gui/UBTeacherBarWidget.cpp
View file @
44a06538
...
...
@@ -25,6 +25,7 @@ UBTeacherBarWidget::UBTeacherBarWidget(QWidget *parent, const char *name):UBDock
,
mpDurationLabel
(
NULL
)
,
mpTitle
(
NULL
)
,
mpAction1
(
NULL
)
,
mpMediaLabel
(
NULL
)
,
mpDropMediaZone
(
NULL
)
,
mpContainer
(
NULL
)
,
mpContainerLayout
(
NULL
)
...
...
@@ -32,7 +33,13 @@ UBTeacherBarWidget::UBTeacherBarWidget(QWidget *parent, const char *name):UBDock
,
mpDuration2
(
NULL
)
,
mpDuration3
(
NULL
)
,
mpDurationButtons
(
NULL
)
,
mpActionLabel
(
NULL
)
,
mpActions
(
NULL
)
,
mpActionButton
(
NULL
)
,
mpCommentLabel
(
NULL
)
,
mpComments
(
NULL
)
,
mpLinkLabel
(
NULL
)
,
mpLinks
(
NULL
)
{
setObjectName
(
name
);
mName
=
"TeacherBarWidget"
;
...
...
@@ -60,15 +67,13 @@ UBTeacherBarWidget::UBTeacherBarWidget(QWidget *parent, const char *name):UBDock
mpTitle
=
new
QLineEdit
(
mpContainer
);
mpTitle
->
setObjectName
(
"DockPaletteWidgetLineEdit"
);
connect
(
mpTitle
,
SIGNAL
(
textChanged
(
const
QString
&
)),
this
,
SLOT
(
onTitleTextChanged
(
const
QString
&
)));
mpTitleLayout
=
new
QHBoxLayout
();
mpTitleLayout
->
addWidget
(
mpTitleLabel
,
0
);
mpTitleLayout
->
addWidget
(
mpTitle
,
1
);
mpLayout
->
addLayout
(
mpTitleLayout
);
mpLayout
->
addWidget
(
mpTitleLabel
,
0
);
mpLayout
->
addWidget
(
mpTitle
,
0
);
// Duration
mpDurationLabel
=
new
QLabel
(
tr
(
"Duration"
),
mpContainer
);
mpLayout
->
addWidget
(
mpDurationLabel
,
0
);
mpDurationLayout
=
new
QHBoxLayout
();
mpDurationLayout
->
addWidget
(
mpDurationLabel
,
1
);
mpDuration1
=
new
QCheckBox
(
this
);
mpDuration1
->
setIcon
(
QIcon
(
":images/duration1.png"
));
mpDurationLayout
->
addWidget
(
mpDuration1
,
0
);
...
...
@@ -82,35 +87,88 @@ UBTeacherBarWidget::UBTeacherBarWidget(QWidget *parent, const char *name):UBDock
mpDurationButtons
->
addButton
(
mpDuration1
);
mpDurationButtons
->
addButton
(
mpDuration2
);
mpDurationButtons
->
addButton
(
mpDuration3
);
mpLayout
->
addLayout
(
mpDurationLayout
);
mpLayout
->
addLayout
(
mpDurationLayout
,
0
);
// Actions
mpActionLabel
=
new
QLabel
(
tr
(
"Actions"
),
this
);
mpLayout
->
addWidget
(
mpActionLabel
,
0
);
mpActions
=
new
UBWidgetList
(
this
);
mpActions
->
setEmptyText
(
tr
(
"Add actions"
));
mpLayout
->
addWidget
(
mpActions
);
mpLayout
->
addWidget
(
mpActions
,
1
);
mpActionButton
=
new
QPushButton
(
this
);
mpActionButton
->
setObjectName
(
"DockPaletteWidgetButton"
);
mpActionButton
->
setText
(
tr
(
"Add action"
));
mpLayout
->
addWidget
(
mpActionButton
,
0
);
// Media
mpMediaLabel
=
new
QLabel
(
tr
(
"Media"
),
this
);
mpLayout
->
addWidget
(
mpMediaLabel
,
0
);
mpDropMediaZone
=
new
UBTeacherBarDropMediaZone
();
mpLayout
->
addWidget
(
mpDropMediaZone
);
populateCombos
();
mpLayout
->
addWidget
(
mpDropMediaZone
,
1
);
// Links
mpLinkLabel
=
new
QLabel
(
tr
(
"Links"
),
this
);
mpLayout
->
addWidget
(
mpLinkLabel
,
0
);
mpLinks
=
new
UBWidgetList
(
this
);
mpLayout
->
addWidget
(
mpLinks
,
1
);
mpLinkButton
=
new
QPushButton
(
tr
(
"Add link"
),
this
);
mpLinkButton
->
setObjectName
(
"DockPaletteWidgetButton"
);
mpLayout
->
addWidget
(
mpLinkButton
);
// Comments
mpCommentLabel
=
new
QLabel
(
tr
(
"Comments"
),
this
);
mpLayout
->
addWidget
(
mpCommentLabel
,
0
);
mpComments
=
new
QTextEdit
(
this
);
mpComments
->
setObjectName
(
"DockPaletteWidgetBox"
);
mpComments
->
setStyleSheet
(
"background:white;"
);
mpLayout
->
addWidget
(
mpComments
,
1
);
connect
(
UBApplication
::
boardController
,
SIGNAL
(
activeSceneWillChange
()),
this
,
SLOT
(
saveContent
()));
connect
(
UBApplication
::
boardController
,
SIGNAL
(
activeSceneChanged
()),
this
,
SLOT
(
loadContent
()));
connect
(
UBApplication
::
mainWindow
->
actionQuit
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
saveContent
()));
connect
(
mpTitle
,
SIGNAL
(
textChanged
(
QString
)),
this
,
SLOT
(
onValueChanged
()));
connect
(
mpActionButton
,
SIGNAL
(
clicked
()),
this
,
SLOT
(
onActionButton
()));
connect
(
mpLinkButton
,
SIGNAL
(
clicked
()),
this
,
SLOT
(
onLinkButton
()));
}
UBTeacherBarWidget
::~
UBTeacherBarWidget
()
{
if
(
NULL
!=
mpComments
){
delete
mpComments
;
mpComments
=
NULL
;
}
if
(
NULL
!=
mpCommentLabel
){
delete
mpCommentLabel
;
mpCommentLabel
=
NULL
;
}
if
(
NULL
!=
mpLinks
){
delete
mpLinks
;
mpLinks
=
NULL
;
}
if
(
NULL
!=
mpLinkLabel
){
delete
mpLinkLabel
;
mpLinkLabel
=
NULL
;
}
if
(
NULL
!=
mpDropMediaZone
){
delete
mpDropMediaZone
;
mpDropMediaZone
=
NULL
;
}
if
(
NULL
!=
mpMediaLabel
){
delete
mpMediaLabel
;
mpMediaLabel
=
NULL
;
}
if
(
NULL
!=
mpActionButton
){
delete
mpActionButton
;
mpActionButton
=
NULL
;
}
if
(
NULL
!=
mpAction1
){
delete
mpAction1
;
mpAction1
=
NULL
;
}
if
(
NULL
!=
mpActionLabel
){
delete
mpActionLabel
;
mpActionLabel
=
NULL
;
}
if
(
NULL
!=
mpDurationLabel
){
delete
mpDurationLabel
;
mpDurationLabel
=
NULL
;
...
...
@@ -161,11 +219,6 @@ UBTeacherBarWidget::~UBTeacherBarWidget()
}
}
void
UBTeacherBarWidget
::
populateCombos
()
{
}
void
UBTeacherBarWidget
::
onValueChanged
()
{
if
(
mpTitle
->
text
()
==
""
...
...
@@ -202,6 +255,16 @@ void UBTeacherBarWidget::onTitleTextChanged(const QString& text)
mpTitle
->
setToolTip
(
text
);
}
void
UBTeacherBarWidget
::
onActionButton
()
{
}
void
UBTeacherBarWidget
::
onLinkButton
()
{
}
UBTeacherStudentAction
::
UBTeacherStudentAction
(
int
actionNumber
,
QWidget
*
parent
,
const
char
*
name
)
:
QWidget
(
parent
)
,
mpActionLabel
(
NULL
)
,
mpTeacherLabel
(
NULL
)
...
...
src/gui/UBTeacherBarWidget.h
View file @
44a06538
...
...
@@ -12,7 +12,7 @@ class UBMediaPlayer;
#include <QCheckBox>
#include <QTabWidget>
#include <QButtonGroup>
#include <QPushButton>
#include "customWidgets/UBWidgetList.h"
#include "UBDockPaletteWidget.h"
...
...
@@ -80,10 +80,10 @@ private slots:
void
loadContent
();
void
onValueChanged
();
void
onTitleTextChanged
(
const
QString
&
text
);
void
onActionButton
();
void
onLinkButton
();
private
:
void
populateCombos
();
QVBoxLayout
*
mpLayout
;
QHBoxLayout
*
mpTitleLayout
;
QHBoxLayout
*
mpDurationLayout
;
...
...
@@ -91,6 +91,7 @@ private:
QLabel
*
mpDurationLabel
;
QLineEdit
*
mpTitle
;
UBTeacherStudentAction
*
mpAction1
;
QLabel
*
mpMediaLabel
;
UBTeacherBarDropMediaZone
*
mpDropMediaZone
;
QWidget
*
mpContainer
;
QVBoxLayout
*
mpContainerLayout
;
...
...
@@ -98,7 +99,14 @@ private:
QCheckBox
*
mpDuration2
;
QCheckBox
*
mpDuration3
;
QButtonGroup
*
mpDurationButtons
;
QLabel
*
mpActionLabel
;
UBWidgetList
*
mpActions
;
QPushButton
*
mpActionButton
;
QLabel
*
mpLinkLabel
;
UBWidgetList
*
mpLinks
;
QPushButton
*
mpLinkButton
;
QLabel
*
mpCommentLabel
;
QTextEdit
*
mpComments
;
};
#endif // UBTEACHERBARWIDGET_H
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