|
|
@ -746,37 +746,9 @@ UBTeacherBarPreviewWidget::UBTeacherBarPreviewWidget(QWidget *parent, const char |
|
|
|
mTitleDurationLayout.addWidget(mpDuration, 1); |
|
|
|
mTitleDurationLayout.addWidget(mpDuration, 1); |
|
|
|
mLayout.addLayout(&mTitleDurationLayout, 0); |
|
|
|
mLayout.addLayout(&mTitleDurationLayout, 0); |
|
|
|
|
|
|
|
|
|
|
|
// Actions
|
|
|
|
|
|
|
|
mpActionsLabel = new QLabel(tr("Actions"), this); |
|
|
|
|
|
|
|
mpActionsLabel->setObjectName("UBTeacherBarPreviewSubtitle"); |
|
|
|
|
|
|
|
mActionLabelLayout.addWidget(mpActionsLabel, 0); |
|
|
|
|
|
|
|
mActionLabelLayout.addStretch(1); |
|
|
|
|
|
|
|
mpActionsLabel->setVisible(false); |
|
|
|
|
|
|
|
//mLayout.addLayout(&mActionLabelLayout);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Media
|
|
|
|
|
|
|
|
mpMediaLabel = new QLabel(tr("Medias"), this); |
|
|
|
|
|
|
|
mpMediaLabel->setObjectName("UBTeacherBarPreviewSubtitle"); |
|
|
|
|
|
|
|
mMediaLabelLayout.addWidget(mpMediaLabel, 0); |
|
|
|
|
|
|
|
mMediaLabelLayout.addStretch(1); |
|
|
|
|
|
|
|
mpMediaLabel->setVisible(false); |
|
|
|
|
|
|
|
//mLayout.addLayout(&mMediaLabelLayout, 0);
|
|
|
|
|
|
|
|
mLayout.addWidget(&mMediaViewer, 1); |
|
|
|
mLayout.addWidget(&mMediaViewer, 1); |
|
|
|
|
|
|
|
|
|
|
|
mpLinksLabel = new QLabel(tr("Links"), this); |
|
|
|
hideElements(); |
|
|
|
mpLinksLabel->setObjectName("UBTeacherBarPreviewSubtitle"); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Comments
|
|
|
|
|
|
|
|
mpCommentsLabel = new QLabel(tr("Comments"), this); |
|
|
|
|
|
|
|
mpCommentsLabel->setObjectName("UBTeacherBarPreviewSubtitle"); |
|
|
|
|
|
|
|
mCommentsLabelLayout.addWidget(mpCommentsLabel, 0); |
|
|
|
|
|
|
|
mCommentsLabelLayout.addStretch(1); |
|
|
|
|
|
|
|
//mLayout.addLayout(&mCommentsLabelLayout);
|
|
|
|
|
|
|
|
mpComments = new QLabel(this); |
|
|
|
|
|
|
|
mpComments->setWordWrap(true); |
|
|
|
|
|
|
|
mpCommentsLabel->setVisible(false); |
|
|
|
|
|
|
|
mpComments->setVisible(false); |
|
|
|
|
|
|
|
//mLayout.addWidget(mpComments);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Edit button
|
|
|
|
// Edit button
|
|
|
|
mpEditButton = new QPushButton(tr("Edit infos"), this); |
|
|
|
mpEditButton = new QPushButton(tr("Edit infos"), this); |
|
|
@ -880,6 +852,17 @@ void UBTeacherBarPreviewWidget::clean() |
|
|
|
|
|
|
|
|
|
|
|
void UBTeacherBarPreviewWidget::hideElements() |
|
|
|
void UBTeacherBarPreviewWidget::hideElements() |
|
|
|
{ |
|
|
|
{ |
|
|
|
|
|
|
|
mpActionsLabel = new QLabel(tr("Actions"), this); |
|
|
|
|
|
|
|
mpActionsLabel->setObjectName("UBTeacherBarPreviewSubtitle"); |
|
|
|
|
|
|
|
mpMediaLabel = new QLabel(tr("Media"), this); |
|
|
|
|
|
|
|
mpMediaLabel->setObjectName("UBTeacherBarPreviewSubtitle"); |
|
|
|
|
|
|
|
mpCommentsLabel = new QLabel(tr("Comments"), this); |
|
|
|
|
|
|
|
mpCommentsLabel->setObjectName("UBTeacherBarPreviewSubtitle"); |
|
|
|
|
|
|
|
mpComments = new QLabel(this); |
|
|
|
|
|
|
|
mpComments->setWordWrap(true); |
|
|
|
|
|
|
|
mpLinksLabel = new QLabel(tr("Links"), this); |
|
|
|
|
|
|
|
mpLinksLabel->setObjectName("UBTeacherBarPreviewSubtitle"); |
|
|
|
|
|
|
|
|
|
|
|
mpActionsLabel->setVisible(false); |
|
|
|
mpActionsLabel->setVisible(false); |
|
|
|
mpMediaLabel->setVisible(false); |
|
|
|
mpMediaLabel->setVisible(false); |
|
|
|
mpCommentsLabel->setVisible(false); |
|
|
|
mpCommentsLabel->setVisible(false); |
|
|
@ -945,11 +928,9 @@ UBTeacherBarPreviewMedia::~UBTeacherBarPreviewMedia() |
|
|
|
void UBTeacherBarPreviewMedia::cleanMedia() |
|
|
|
void UBTeacherBarPreviewMedia::cleanMedia() |
|
|
|
{ |
|
|
|
{ |
|
|
|
foreach(QWidget* eachWidget, mWidgetList.keys()){ |
|
|
|
foreach(QWidget* eachWidget, mWidgetList.keys()){ |
|
|
|
if(QString(eachWidget->metaObject()->className()).contains("UBDraggable")){ |
|
|
|
|
|
|
|
delete eachWidget; |
|
|
|
delete eachWidget; |
|
|
|
eachWidget = NULL; |
|
|
|
eachWidget = NULL; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
mWidgetList.clear(); |
|
|
|
mWidgetList.clear(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|