QTfrontend/ui/page/pagevideos.cpp
changeset 8362 89a6b7cc6f95
parent 8219 a0ef5d1cba1d
child 8434 4821897a0f10
equal deleted inserted replaced
8361:2831c1403666 8362:89a6b7cc6f95
   175         labelDesc->setTextInteractionFlags(Qt::TextSelectableByMouse |
   175         labelDesc->setTextInteractionFlags(Qt::TextSelectableByMouse |
   176                                            Qt::TextSelectableByKeyboard	|
   176                                            Qt::TextSelectableByKeyboard	|
   177                                            Qt::LinksAccessibleByMouse |
   177                                            Qt::LinksAccessibleByMouse |
   178                                            Qt::LinksAccessibleByKeyboard);
   178                                            Qt::LinksAccessibleByKeyboard);
   179         labelDesc->setTextFormat(Qt::RichText);
   179         labelDesc->setTextFormat(Qt::RichText);
       
   180         labelDesc->setWordWrap(true);
   180         labelDesc->setOpenExternalLinks(true);
   181         labelDesc->setOpenExternalLinks(true);
   181         labelDesc->setMinimumSize(ThumbnailSize);
   182         //labelDesc->setMinimumSize(ThumbnailSize);
   182         //pTopDescLayout->addWidget(labelDesc, 1);
   183         //pTopDescLayout->addWidget(labelDesc, 1);
   183 
   184 
   184         // buttons: play and delete
   185         // buttons: play and delete
   185         btnPlay = new QPushButton(QPushButton::tr("Play"), pDescGroup);
   186         btnPlay = new QPushButton(QPushButton::tr("Play"), pDescGroup);
   186         btnPlay->setEnabled(false);
   187         btnPlay->setEnabled(false);
   193         btnToYouTube = new QPushButton(QPushButton::tr("Upload to YouTube"), pDescGroup);
   194         btnToYouTube = new QPushButton(QPushButton::tr("Upload to YouTube"), pDescGroup);
   194         btnToYouTube->setEnabled(false);
   195         btnToYouTube->setEnabled(false);
   195         btnToYouTube->setWhatsThis(QPushButton::tr("Upload this video to your Youtube account"));
   196         btnToYouTube->setWhatsThis(QPushButton::tr("Upload this video to your Youtube account"));
   196         pBottomDescLayout->addWidget(btnToYouTube);
   197         pBottomDescLayout->addWidget(btnToYouTube);
   197 
   198 
       
   199         pDescLayout->addWidget(labelThumbnail, 0);
       
   200         pDescLayout->addWidget(labelDesc, 0);
       
   201         pDescLayout->addLayout(pBottomDescLayout, 0);
   198         pDescLayout->addStretch(1);
   202         pDescLayout->addStretch(1);
   199         pDescLayout->addWidget(labelThumbnail, 0);
       
   200         pDescLayout->addStretch(1);
       
   201         pDescLayout->addWidget(labelDesc, 0);
       
   202         pDescLayout->addStretch(1);
       
   203         pDescLayout->addLayout(pBottomDescLayout, 0);
       
   204 
   203 
   205         pPageLayout->addWidget(pDescGroup, 0, 0);
   204         pPageLayout->addWidget(pDescGroup, 0, 0);
   206     }
   205     }
   207 
   206 
   208     return pPageLayout;
   207     return pPageLayout;
   507     if (!item->ready())
   506     if (!item->ready())
   508         desc += tr("(in progress...)");
   507         desc += tr("(in progress...)");
   509     else
   508     else
   510     {
   509     {
   511         QString path = item->path();
   510         QString path = item->path();
   512         desc += tr("Date: ") + QFileInfo(path).created().toString(Qt::DefaultLocaleLongDate) + '\n';
   511         desc += tr("Date: %1\n").arg(QFileInfo(path).created().toString(Qt::DefaultLocaleLongDate));
   513         desc += tr("Size: ") + FileSizeStr(path) + '\n';
   512         desc += tr("Size: %1\n").arg(FileSizeStr(path));
   514         if (item->desc.isEmpty())
   513         if (item->desc.isEmpty())
   515         {
   514         {
   516             // Extract description from file;
   515             // Extract description from file;
   517             // It will contain duration, resolution, etc and also comment added by hwengine.
   516             // It will contain duration, resolution, etc and also comment added by hwengine.
   518             item->desc = LibavInteraction::instance().getFileInfo(path);
   517             item->desc = LibavInteraction::instance().getFileInfo(path);