|
|
@ -43,34 +43,34 @@ void UBTeacherBarPreviewMedia::loadWidgets(QList<QWidget*> pWidgetsList, bool is |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int UBTeacherBarPreviewMedia::loadMedia(QStringList pMedias) |
|
|
|
//int UBTeacherBarPreviewMedia::loadMedia(QStringList pMedias)
|
|
|
|
{ |
|
|
|
//{
|
|
|
|
int addedMedia = 0; |
|
|
|
// int addedMedia = 0;
|
|
|
|
// foreach(QString eachString, pMedias){
|
|
|
|
//// foreach(QString eachString, pMedias){
|
|
|
|
// if(!eachString.isEmpty()){
|
|
|
|
//// if(!eachString.isEmpty()){
|
|
|
|
// QString mimeType = UBFileSystemUtils::mimeTypeFromFileName(eachString);
|
|
|
|
//// QString mimeType = UBFileSystemUtils::mimeTypeFromFileName(eachString);
|
|
|
|
// if(mimeType.contains("image")){
|
|
|
|
//// if(mimeType.contains("image")){
|
|
|
|
// UBDraggableLabel* label = new UBDraggableLabel();
|
|
|
|
//// UBDraggableLabel* label = new UBDraggableLabel();
|
|
|
|
// label->loadImage(eachString);
|
|
|
|
//// label->loadImage(eachString);
|
|
|
|
// mWidget->addWidget(label);
|
|
|
|
//// mWidget->addWidget(label);
|
|
|
|
// mWidgetList[label]=eachString;
|
|
|
|
//// mWidgetList[label]=eachString;
|
|
|
|
// addedMedia += 1;
|
|
|
|
//// addedMedia += 1;
|
|
|
|
// }
|
|
|
|
//// }
|
|
|
|
// else if(mimeType.contains("video") || mimeType.contains("audio")){
|
|
|
|
//// else if(mimeType.contains("video") || mimeType.contains("audio")){
|
|
|
|
// UBDraggableMediaPlayer* mediaPlayer = new UBDraggableMediaPlayer();
|
|
|
|
//// UBDraggableMediaPlayer* mediaPlayer = new UBDraggableMediaPlayer();
|
|
|
|
// mediaPlayer->setFile(eachString);
|
|
|
|
//// mediaPlayer->setFile(eachString);
|
|
|
|
// mWidget->addWidget(mediaPlayer);
|
|
|
|
//// mWidget->addWidget(mediaPlayer);
|
|
|
|
// mWidgetList[mediaPlayer] = eachString;
|
|
|
|
//// mWidgetList[mediaPlayer] = eachString;
|
|
|
|
// addedMedia += 1;
|
|
|
|
//// addedMedia += 1;
|
|
|
|
// }
|
|
|
|
//// }
|
|
|
|
// else{
|
|
|
|
//// else{
|
|
|
|
// qWarning() << "pMediaPath" << eachString;
|
|
|
|
//// qWarning() << "pMediaPath" << eachString;
|
|
|
|
// qWarning() << "bad idea to come here";
|
|
|
|
//// qWarning() << "bad idea to come here";
|
|
|
|
// }
|
|
|
|
//// }
|
|
|
|
// }
|
|
|
|
//// }
|
|
|
|
// }
|
|
|
|
//// }
|
|
|
|
return addedMedia; |
|
|
|
// return addedMedia;
|
|
|
|
} |
|
|
|
//}
|
|
|
|
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------------------------------
|
|
|
|
// -----------------------------------------------------------------------------------------------
|
|
|
|
UBActionPreview::UBActionPreview(QWidget *parent, const char *name):QWidget(parent) |
|
|
|
UBActionPreview::UBActionPreview(QWidget *parent, const char *name):QWidget(parent) |
|
|
|