added the links in the teacherbar preview

preferencesAboutTextFull
shibakaneki 13 years ago
parent 07241990f5
commit c7c931b92a
  1. 43
      src/gui/UBTeacherBarWidget.cpp
  2. 3
      src/gui/UBTeacherBarWidget.h

@ -746,37 +746,9 @@ UBTeacherBarPreviewWidget::UBTeacherBarPreviewWidget(QWidget *parent, const char
mTitleDurationLayout.addWidget(mpDuration, 1);
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);
mpLinksLabel = new QLabel(tr("Links"), this);
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);
hideElements();
// Edit button
mpEditButton = new QPushButton(tr("Edit infos"), this);
@ -880,6 +852,17 @@ void UBTeacherBarPreviewWidget::clean()
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);
mpMediaLabel->setVisible(false);
mpCommentsLabel->setVisible(false);
@ -945,11 +928,9 @@ UBTeacherBarPreviewMedia::~UBTeacherBarPreviewMedia()
void UBTeacherBarPreviewMedia::cleanMedia()
{
foreach(QWidget* eachWidget, mWidgetList.keys()){
if(QString(eachWidget->metaObject()->className()).contains("UBDraggable")){
delete eachWidget;
eachWidget = NULL;
}
}
mWidgetList.clear();
}

@ -133,9 +133,6 @@ private:
QVBoxLayout mLayout;
QHBoxLayout mEditLayout;
QHBoxLayout mTitleDurationLayout;
QHBoxLayout mActionLabelLayout;
QHBoxLayout mMediaLabelLayout;
QHBoxLayout mCommentsLabelLayout;
UBTeacherBarPreviewMedia mMediaViewer;
QList<QWidget*> mWidgets;

Loading…
Cancel
Save