|
|
@ -179,7 +179,7 @@ void UBTBPageEditWidget::saveFields() |
|
|
|
{ |
|
|
|
{ |
|
|
|
mpDataMgr->actions()->clear(); |
|
|
|
mpDataMgr->actions()->clear(); |
|
|
|
mpDataMgr->urls()->clear(); |
|
|
|
mpDataMgr->urls()->clear(); |
|
|
|
mpDataMgr->mediaUrls().clear(); |
|
|
|
mpDataMgr->mediaUrls()->clear(); |
|
|
|
mpDataMgr->medias()->clear(); |
|
|
|
mpDataMgr->medias()->clear(); |
|
|
|
|
|
|
|
|
|
|
|
foreach(UBTeacherStudentAction* pAct, mActions){ |
|
|
|
foreach(UBTeacherStudentAction* pAct, mActions){ |
|
|
@ -195,7 +195,8 @@ void UBTBPageEditWidget::saveFields() |
|
|
|
mpDataMgr->urls()->append(link); |
|
|
|
mpDataMgr->urls()->append(link); |
|
|
|
} |
|
|
|
} |
|
|
|
foreach(QString url, mMediaUrls){ |
|
|
|
foreach(QString url, mMediaUrls){ |
|
|
|
mpDataMgr->mediaUrls().append(url); |
|
|
|
qDebug() << "saving media :" << url; |
|
|
|
|
|
|
|
mpDataMgr->mediaUrls()->append(url); |
|
|
|
} |
|
|
|
} |
|
|
|
foreach(QWidget* pMedia, mMedias){ |
|
|
|
foreach(QWidget* pMedia, mMedias){ |
|
|
|
mpDataMgr->medias()->append(pMedia); |
|
|
|
mpDataMgr->medias()->append(pMedia); |
|
|
@ -215,15 +216,17 @@ void UBTBPageEditWidget::updateFields() |
|
|
|
mpActions->addWidget(pAction); |
|
|
|
mpActions->addWidget(pAction); |
|
|
|
} |
|
|
|
} |
|
|
|
// Medias
|
|
|
|
// Medias
|
|
|
|
foreach(QString url, mpDataMgr->mediaUrls()){ |
|
|
|
foreach(QString url, *mpDataMgr->mediaUrls()){ |
|
|
|
if(url.isEmpty()) |
|
|
|
if(!url.isEmpty()){ |
|
|
|
continue; |
|
|
|
mMediaUrls << url; |
|
|
|
QWidget* pWidget = mpMediaContainer->generateMediaWidget(url); |
|
|
|
QWidget* pWidget = mpMediaContainer->generateMediaWidget(url); |
|
|
|
if(pWidget != NULL){ |
|
|
|
if(pWidget != NULL){ |
|
|
|
mMedias << pWidget; |
|
|
|
mMedias << pWidget; |
|
|
|
mpMediaContainer->addWidget(pWidget); |
|
|
|
mpMediaContainer->addWidget(pWidget); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// Links
|
|
|
|
// Links
|
|
|
|
foreach(sLink link, *mpDataMgr->urls()){ |
|
|
|
foreach(sLink link, *mpDataMgr->urls()){ |
|
|
|
UBUrlWidget* urlWidget = new UBUrlWidget(this); |
|
|
|
UBUrlWidget* urlWidget = new UBUrlWidget(this); |
|
|
|