Merge branch 'Bett-2012' of github.com:Sankore/Sankore-3.1 into Bett-2012

preferencesAboutTextFull
Claudio Valerio 13 years ago
commit f7cd5b2bac
  1. 21
      resources/style.qss
  2. 20
      src/gui/UBTeacherBarWidget.cpp
  3. 3
      src/gui/UBTeacherBarWidget.h

@ -12,6 +12,27 @@ QWidget#UBTeacherBarDropMediaZone
border: 2px solid #999999; border: 2px solid #999999;
} }
QWidget#UBTeacherBarPreviewWidget
{
background: #FFFFFF;
border-radius: 10px;
border: 2px solid #999999;
}
QLabel#UBTeacherBarPreviewTitle
{
color: #555555;
font-size : 18px;
font-weight:bold;
}
QLabel#UBTeacherBarPreviewSubtitle
{
color: #555555;
font-size : 14px;
font-weight:bold;
}
QWidget#UBLibWebView QWidget#UBLibWebView
{ {
background: #EEEEEE; background: #EEEEEE;

@ -365,7 +365,7 @@ void UBTeacherBarWidget::loadContent()
}else{ }else{
mpPreview->setDuration(eDuration_ThreeQuarter); mpPreview->setDuration(eDuration_ThreeQuarter);
} }
mpPreview->setComments(mpComments->document()->toPlainText());
} }
// this is always done becasue it allows to clean the media on // this is always done becasue it allows to clean the media on
// changing the page // changing the page
@ -696,6 +696,7 @@ UBTeacherBarPreviewWidget::UBTeacherBarPreviewWidget(QWidget *parent, const char
, mpActionsLabel(NULL) , mpActionsLabel(NULL)
, mpMediaLabel(NULL) , mpMediaLabel(NULL)
, mpCommentsLabel(NULL) , mpCommentsLabel(NULL)
, mpComments(NULL)
{ {
setObjectName(name); setObjectName(name);
@ -717,12 +718,14 @@ UBTeacherBarPreviewWidget::UBTeacherBarPreviewWidget(QWidget *parent, const char
// Actions // Actions
mpActionsLabel = new QLabel(tr("Actions"), this); mpActionsLabel = new QLabel(tr("Actions"), this);
mpActionsLabel->setObjectName("UBTeacherBarPreviewSubtitle");
mActionLabelLayout.addWidget(mpActionsLabel, 0); mActionLabelLayout.addWidget(mpActionsLabel, 0);
mActionLabelLayout.addStretch(1); mActionLabelLayout.addStretch(1);
mLayout.addLayout(&mActionLabelLayout); mLayout.addLayout(&mActionLabelLayout);
// Media // Media
mpMediaLabel = new QLabel(tr("Medias"), this); mpMediaLabel = new QLabel(tr("Medias"), this);
mpMediaLabel->setObjectName("UBTeacherBarPreviewSubtitle");
mMediaLabelLayout.addWidget(mpMediaLabel, 0); mMediaLabelLayout.addWidget(mpMediaLabel, 0);
mMediaLabelLayout.addStretch(1); mMediaLabelLayout.addStretch(1);
mLayout.addLayout(&mMediaLabelLayout); mLayout.addLayout(&mMediaLabelLayout);
@ -733,9 +736,13 @@ UBTeacherBarPreviewWidget::UBTeacherBarPreviewWidget(QWidget *parent, const char
// Comments // Comments
mpCommentsLabel = new QLabel(tr("Comments"), this); mpCommentsLabel = new QLabel(tr("Comments"), this);
mpCommentsLabel->setObjectName("UBTeacherBarPreviewSubtitle");
mCommentsLabelLayout.addWidget(mpCommentsLabel, 0); mCommentsLabelLayout.addWidget(mpCommentsLabel, 0);
mCommentsLabelLayout.addStretch(1); mCommentsLabelLayout.addStretch(1);
mLayout.addLayout(&mCommentsLabelLayout); mLayout.addLayout(&mCommentsLabelLayout);
mpComments = new QLabel(this);
mpComments->setWordWrap(true);
mLayout.addWidget(mpComments);
// Edit button // Edit button
mpEditButton = new QPushButton(tr("Edit infos"), this); mpEditButton = new QPushButton(tr("Edit infos"), this);
@ -751,6 +758,10 @@ UBTeacherBarPreviewWidget::UBTeacherBarPreviewWidget(QWidget *parent, const char
UBTeacherBarPreviewWidget::~UBTeacherBarPreviewWidget() UBTeacherBarPreviewWidget::~UBTeacherBarPreviewWidget()
{ {
if(NULL != mpComments){
delete mpComments;
mpComments = NULL;
}
if(NULL != mpTitle){ if(NULL != mpTitle){
delete mpTitle; delete mpTitle;
mpTitle = NULL; mpTitle = NULL;
@ -810,6 +821,13 @@ void UBTeacherBarPreviewWidget::setDuration(eDuration duration)
} }
} }
void UBTeacherBarPreviewWidget::setComments(const QString &comments)
{
if(NULL != mpComments){
mpComments->setText(comments);
}
}
// ------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------
UBTeacherBarPreviewMedia::UBTeacherBarPreviewMedia(QWidget* parent, const char* name) : QWidget(parent) UBTeacherBarPreviewMedia::UBTeacherBarPreviewMedia(QWidget* parent, const char* name) : QWidget(parent)
{ {

@ -114,6 +114,7 @@ public:
UBTeacherBarPreviewMedia* mediaViewer() {return &mMediaViewer;} UBTeacherBarPreviewMedia* mediaViewer() {return &mMediaViewer;}
void setTitle(const QString& title); void setTitle(const QString& title);
void setDuration(eDuration duration); void setDuration(eDuration duration);
void setComments(const QString& comments);
signals: signals:
void showEditMode(); void showEditMode();
@ -129,12 +130,14 @@ private:
QHBoxLayout mMediaLabelLayout; QHBoxLayout mMediaLabelLayout;
QHBoxLayout mCommentsLabelLayout; QHBoxLayout mCommentsLabelLayout;
UBTeacherBarPreviewMedia mMediaViewer; UBTeacherBarPreviewMedia mMediaViewer;
QPushButton* mpEditButton; QPushButton* mpEditButton;
QLabel* mpTitle; QLabel* mpTitle;
QLabel* mpDuration; QLabel* mpDuration;
QLabel* mpActionsLabel; QLabel* mpActionsLabel;
QLabel* mpMediaLabel; QLabel* mpMediaLabel;
QLabel* mpCommentsLabel; QLabel* mpCommentsLabel;
QLabel* mpComments;
}; };
class UBTeacherBarWidget : public UBDockPaletteWidget class UBTeacherBarWidget : public UBDockPaletteWidget

Loading…
Cancel
Save