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
a3753229
Commit
a3753229
authored
Jan 25, 2012
by
shibakaneki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Backup
parent
ea818993
Changes
11
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
207 additions
and
141 deletions
+207
-141
ccby.png
resources/images/licenses/ccby.png
+0
-0
ccbync.png
resources/images/licenses/ccbync.png
+0
-0
ccbyncnd.png
resources/images/licenses/ccbyncnd.png
+0
-0
ccbyncsa.png
resources/images/licenses/ccbyncsa.png
+0
-0
ccbynd.png
resources/images/licenses/ccbynd.png
+0
-0
ccbysa.png
resources/images/licenses/ccbysa.png
+0
-0
style.qss
resources/style.qss
+17
-3
UBWidgetList.cpp
src/customWidgets/UBWidgetList.cpp
+1
-1
UBTeacherBarPreviewWidget.cpp
src/gui/UBTeacherBarPreviewWidget.cpp
+137
-108
UBTeacherBarPreviewWidget.h
src/gui/UBTeacherBarPreviewWidget.h
+42
-23
UBTeacherBarWidget.cpp
src/gui/UBTeacherBarWidget.cpp
+10
-6
No files found.
resources/images/licenses/ccby.png
0 → 100644
View file @
a3753229
4.63 KB
resources/images/licenses/ccbync.png
0 → 100644
View file @
a3753229
5.02 KB
resources/images/licenses/ccbyncnd.png
0 → 100644
View file @
a3753229
5.16 KB
resources/images/licenses/ccbyncsa.png
0 → 100644
View file @
a3753229
5.33 KB
resources/images/licenses/ccbynd.png
0 → 100644
View file @
a3753229
4.77 KB
resources/images/licenses/ccbysa.png
0 → 100644
View file @
a3753229
4.96 KB
resources/style.qss
View file @
a3753229
...
@@ -13,6 +13,13 @@ QWidget#UBTBMediaContainer
...
@@ -13,6 +13,13 @@ QWidget#UBTBMediaContainer
border: 2px solid #999999;
border: 2px solid #999999;
}
}
QFrame#UBTBSeparator
{
background: #DDDDDD;
border-radius: 2px;
border: 1px solid #DDDDDD;
}
QWidget#UBMediaVideoContainer
QWidget#UBMediaVideoContainer
{
{
background: #000000;
background: #000000;
...
@@ -27,11 +34,17 @@ QWidget#UBTeacherBarPreviewWidget
...
@@ -27,11 +34,17 @@ QWidget#UBTeacherBarPreviewWidget
border: 2px solid #999999;
border: 2px solid #999999;
}
}
QLabel#UBTBPreviewSessionTitle
{
font-size: 12px;
}
QLabel#UBTeacherBarPreviewTitle
QLabel#UBTeacherBarPreviewTitle
{
{
color: #555555;
color: #555555;
font-size :
18
px;
font-size :
20
px;
font-weight:bold;
font-weight:bold;
padding-left:5px;
}
}
QLabel#UBMediaPlayerButton
QLabel#UBMediaPlayerButton
...
@@ -44,7 +57,7 @@ QLabel#UBTeacherBarPreviewSubtitle
...
@@ -44,7 +57,7 @@ QLabel#UBTeacherBarPreviewSubtitle
color: #555555;
color: #555555;
font-size : 15px;
font-size : 15px;
font-weight:bold;
font-weight:bold;
padding-
top: 10
px;
padding-
left:5
px;
}
}
QWidget#UBLibWebView
QWidget#UBLibWebView
...
@@ -61,7 +74,8 @@ QWidget#UBActionPreviewOwner
...
@@ -61,7 +74,8 @@ QWidget#UBActionPreviewOwner
font-weight: bold;
font-weight: bold;
}
}
QWidget#UBTeacherBarPreviewComments
QWidget#UBTeacherBarPreviewComments,
QWidget#UBTeacherBarTargetBox
{
{
border-radius: 10px;
border-radius: 10px;
border: white 2px solid;
border: white 2px solid;
...
...
src/customWidgets/UBWidgetList.cpp
View file @
a3753229
...
@@ -57,7 +57,7 @@ void UBWidgetList::addWidget(QWidget *widget)
...
@@ -57,7 +57,7 @@ void UBWidgetList::addWidget(QWidget *widget)
void
UBWidgetList
::
removeWidget
(
QWidget
*
widget
)
void
UBWidgetList
::
removeWidget
(
QWidget
*
widget
)
{
{
if
(
NULL
!=
mpLayout
){
if
(
NULL
!=
mpLayout
&&
NULL
!=
widget
){
mpLayout
->
removeWidget
(
widget
);
mpLayout
->
removeWidget
(
widget
);
mWidgetInfo
.
remove
(
widget
);
mWidgetInfo
.
remove
(
widget
);
widget
->
setVisible
(
false
);
widget
->
setVisible
(
false
);
...
...
src/gui/UBTeacherBarPreviewWidget.cpp
View file @
a3753229
This diff is collapsed.
Click to expand it.
src/gui/UBTeacherBarPreviewWidget.h
View file @
a3753229
...
@@ -4,6 +4,7 @@
...
@@ -4,6 +4,7 @@
#include <QLabel>
#include <QLabel>
#include <QVBoxLayout>
#include <QVBoxLayout>
#include <QPushButton>
#include <QPushButton>
#include <QFrame>
#include "core/UBPersistenceManager.h"
#include "core/UBPersistenceManager.h"
#include "customWidgets/UBWidgetList.h"
#include "customWidgets/UBWidgetList.h"
...
@@ -30,12 +31,12 @@ class UBActionPreview : public QWidget
...
@@ -30,12 +31,12 @@ class UBActionPreview : public QWidget
public
:
public
:
UBActionPreview
(
QWidget
*
parent
=
0
,
const
char
*
name
=
"UBActionPreview"
);
UBActionPreview
(
QWidget
*
parent
=
0
,
const
char
*
name
=
"UBActionPreview"
);
~
UBActionPreview
();
~
UBActionPreview
();
void
setOwner
(
const
QString
&
owner
);
void
setOwner
(
int
owner
);
void
setContent
(
const
QString
&
content
);
void
setContent
(
const
QString
&
content
);
private
:
private
:
QLabel
*
mpOwner
;
QLabel
*
mpOwner
;
Q
Label
*
mpContent
;
Q
TextEdit
*
mpContent
;
QVBoxLayout
mLayout
;
QVBoxLayout
mLayout
;
QHBoxLayout
mOwnerLayout
;
QHBoxLayout
mOwnerLayout
;
...
@@ -48,19 +49,19 @@ public:
...
@@ -48,19 +49,19 @@ public:
~
UBTBPreviewContainer
();
~
UBTBPreviewContainer
();
};
};
class
UBTBPreviewSeparator
:
public
QFrame
{
public
:
UBTBPreviewSeparator
(
QWidget
*
parent
=
0
,
const
char
*
name
=
"UBTBPreviewSeparator"
);
~
UBTBPreviewSeparator
();
};
class
UBTeacherBarPreviewWidget
:
public
QWidget
class
UBTeacherBarPreviewWidget
:
public
QWidget
{
{
Q_OBJECT
Q_OBJECT
public
:
public
:
UBTeacherBarPreviewWidget
(
UBTeacherBarDataMgr
*
pDataMgr
,
QWidget
*
parent
=
0
,
const
char
*
name
=
"UBTeacherBarPreviewWidget"
);
UBTeacherBarPreviewWidget
(
UBTeacherBarDataMgr
*
pDataMgr
,
QWidget
*
parent
=
0
,
const
char
*
name
=
"UBTeacherBarPreviewWidget"
);
~
UBTeacherBarPreviewWidget
();
~
UBTeacherBarPreviewWidget
();
UBTeacherBarPreviewMedia
*
mediaViewer
()
{
return
&
mMediaViewer
;}
void
setTitle
(
const
QString
&
title
);
void
setComments
(
const
QString
&
comments
);
void
setActions
(
QStringList
actions
);
void
setLinks
(
QStringList
links
);
void
clean
();
QLabel
*
mediaLabel
()
{
return
mpMediaLabel
;}
void
updateFields
();
void
updateFields
();
void
clearFields
();
void
clearFields
();
...
@@ -69,29 +70,47 @@ signals:
...
@@ -69,29 +70,47 @@ signals:
private
slots
:
private
slots
:
void
onEdit
();
void
onEdit
();
void
onActiveSceneChanged
();
private
:
private
:
void
hideElements
();
void
generateActions
();
void
generateMedias
();
void
generateLinks
();
void
generateComments
();
QVBoxLayout
mLayout
;
QVBoxLayout
mLayout
;
QHBoxLayout
mEditLayout
;
QHBoxLayout
mEditLayout
;
QHBoxLayout
mTitleDurationLayout
;
UBTeacherBarPreviewMedia
mMediaViewer
;
QList
<
QWidget
*>
mWidgets
;
QList
<
QWidget
*>
mStoredWidgets
;
QPushButton
*
mpEditButton
;
QPushButton
*
mpEditButton
;
// Titles
QVBoxLayout
mTitleLayout
;
UBTBPreviewSeparator
mTitleSeparator
;
QWidget
mTitleContainer
;
QLabel
*
mpSessionTitle
;
QLabel
*
mpTitle
;
QLabel
*
mpTitle
;
QLabel
*
mpDuration
;
QLabel
*
mpTitleLabel
;
QLabel
*
mpActionsLabel
;
QLabel
*
mpPageNbrLabel
;
QLabel
*
mpMediaLabel
;
QLabel
*
mpCommentsLabel
;
QLabel
*
mpComments
;
QLabel
*
mpLinksLabel
;
QLabel
*
mpTmpLink
;
UBActionPreview
*
mpTmpAction
;
UBTBPreviewContainer
*
mpContentContainer
;
UBTBPreviewContainer
*
mpContentContainer
;
// Schedule
QLabel
*
mpScheduleLabel
;
// License
UBTBPreviewSeparator
mLicenseSeparator
;
QLabel
*
mpLicenseLabel
;
/** Pointer to the datas */
UBTeacherBarDataMgr
*
mpDataMgr
;
UBTeacherBarDataMgr
*
mpDataMgr
;
/** The list of stored widgets */
QList
<
QWidget
*>
mStoredWidgets
;
/** A temporary action widget */
UBActionPreview
*
mpTmpAction
;
/** A temporary media widget */
UBTeacherBarPreviewMedia
*
mpTmpMedia
;
/** A temporary link */
QLabel
*
mpTmpLink
;
/** A temporary comments field */
QTextEdit
*
mpTmpComment
;
};
};
#endif // UBTEACHERBARPREVIEWWIDGET_H
#endif // UBTEACHERBARPREVIEWWIDGET_H
src/gui/UBTeacherBarWidget.cpp
View file @
a3753229
...
@@ -39,13 +39,13 @@ UBTeacherBarWidget::UBTeacherBarWidget(QWidget *parent, const char *name):UBDock
...
@@ -39,13 +39,13 @@ UBTeacherBarWidget::UBTeacherBarWidget(QWidget *parent, const char *name):UBDock
// Create the GUI
// Create the GUI
setLayout
(
&
mLayout
);
setLayout
(
&
mLayout
);
mpPageEditWidget
=
new
UBTBPageEditWidget
(
&
mData
,
this
);
mpPreview
=
new
UBTeacherBarPreviewWidget
(
&
mData
,
this
);
mpDocPreviewWidget
=
new
UBTBDocumentPreviewWidget
(
&
mData
,
this
);
mpDocEditWidget
=
new
UBTBDocumentEditWidget
(
&
mData
,
this
);
mpStackWidget
=
new
QStackedWidget
(
this
);
mpStackWidget
=
new
QStackedWidget
(
this
);
mLayout
.
addWidget
(
mpStackWidget
);
mLayout
.
addWidget
(
mpStackWidget
);
mpPageEditWidget
=
new
UBTBPageEditWidget
(
&
mData
,
mpStackWidget
);
mpPreview
=
new
UBTeacherBarPreviewWidget
(
&
mData
,
mpStackWidget
);
mpDocPreviewWidget
=
new
UBTBDocumentPreviewWidget
(
&
mData
,
mpStackWidget
);
mpDocEditWidget
=
new
UBTBDocumentEditWidget
(
&
mData
,
mpStackWidget
);
mpStackWidget
->
addWidget
(
mpPageEditWidget
);
mpStackWidget
->
addWidget
(
mpPageEditWidget
);
mpStackWidget
->
addWidget
(
mpPreview
);
mpStackWidget
->
addWidget
(
mpPreview
);
mpStackWidget
->
addWidget
(
mpDocPreviewWidget
);
mpStackWidget
->
addWidget
(
mpDocPreviewWidget
);
...
@@ -120,7 +120,7 @@ void UBTeacherBarWidget::loadContent(bool docChanged)
...
@@ -120,7 +120,7 @@ void UBTeacherBarWidget::loadContent(bool docChanged)
// Update the fields
// Update the fields
mpPageEditWidget
->
updateFields
();
mpPageEditWidget
->
updateFields
();
mpPreview
->
updateFields
();
//
mpPreview->updateFields();
if
(
docChanged
){
if
(
docChanged
){
mpDocEditWidget
->
updateFields
();
mpDocEditWidget
->
updateFields
();
mpDocPreviewWidget
->
updateFields
();
mpDocPreviewWidget
->
updateFields
();
...
@@ -155,15 +155,19 @@ void UBTeacherBarWidget::onTBStateChanged(eTeacherBarState state)
...
@@ -155,15 +155,19 @@ void UBTeacherBarWidget::onTBStateChanged(eTeacherBarState state)
{
{
switch
(
state
){
switch
(
state
){
case
eTeacherBarState_DocumentEdit
:
case
eTeacherBarState_DocumentEdit
:
//mpDocEditWidget->updateFields();
mpStackWidget
->
setCurrentWidget
(
mpDocEditWidget
);
mpStackWidget
->
setCurrentWidget
(
mpDocEditWidget
);
break
;
break
;
case
eTeacherBarState_DocumentPreview
:
case
eTeacherBarState_DocumentPreview
:
//mpDocPreviewWidget->updateFields();
mpStackWidget
->
setCurrentWidget
(
mpDocPreviewWidget
);
mpStackWidget
->
setCurrentWidget
(
mpDocPreviewWidget
);
break
;
break
;
case
eTeacherBarState_PageEdit
:
case
eTeacherBarState_PageEdit
:
mpPageEditWidget
->
updateFields
();
mpStackWidget
->
setCurrentWidget
(
mpPageEditWidget
);
mpStackWidget
->
setCurrentWidget
(
mpPageEditWidget
);
break
;
break
;
case
eTeacherBarState_PagePreview
:
case
eTeacherBarState_PagePreview
:
mpPreview
->
updateFields
();
mpStackWidget
->
setCurrentWidget
(
mpPreview
);
mpStackWidget
->
setCurrentWidget
(
mpPreview
);
break
;
break
;
}
}
...
...
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