QTfrontend/ui/page/pagevideos.cpp
changeset 8200 90f524718f3d
parent 8190 92792d48574b
child 8203 2c98ec41697a
equal deleted inserted replaced
8198:7c6e7492333d 8200:90f524718f3d
   152         IconedGroupBox* pDescGroup = new IconedGroupBox(this);
   152         IconedGroupBox* pDescGroup = new IconedGroupBox(this);
   153         pDescGroup->setIcon(QIcon(":/res/graphicsicon.png")); // FIXME
   153         pDescGroup->setIcon(QIcon(":/res/graphicsicon.png")); // FIXME
   154         pDescGroup->setTitle(QGroupBox::tr("Description"));
   154         pDescGroup->setTitle(QGroupBox::tr("Description"));
   155 
   155 
   156         QVBoxLayout* pDescLayout = new QVBoxLayout(pDescGroup);
   156         QVBoxLayout* pDescLayout = new QVBoxLayout(pDescGroup);
   157         QHBoxLayout* pTopDescLayout = new QHBoxLayout(0);    // picture and text
       
   158         QHBoxLayout* pBottomDescLayout = new QHBoxLayout(0); // buttons
   157         QHBoxLayout* pBottomDescLayout = new QHBoxLayout(0); // buttons
   159 
   158 
   160         // label with thumbnail picture
   159         // label with thumbnail picture
   161         labelThumbnail = new QLabel(pDescGroup);
   160         labelThumbnail = new QLabel(pDescGroup);
   162         labelThumbnail->setAlignment(Qt::AlignHCenter | Qt::AlignVCenter);
   161         labelThumbnail->setAlignment(Qt::AlignHCenter | Qt::AlignVCenter);
   167                     "border-width: 3px;"
   166                     "border-width: 3px;"
   168                     "border-color: #ffcc00;"
   167                     "border-color: #ffcc00;"
   169                     "border-radius: 4px;"
   168                     "border-radius: 4px;"
   170                     "}" );
   169                     "}" );
   171         clearThumbnail();
   170         clearThumbnail();
   172         pTopDescLayout->addWidget(labelThumbnail, 2);
       
   173 
   171 
   174         // label with file description
   172         // label with file description
   175         labelDesc = new QLabel(pDescGroup);
   173         labelDesc = new QLabel(pDescGroup);
   176         labelDesc->setAlignment(Qt::AlignLeft | Qt::AlignTop);
   174         labelDesc->setAlignment(Qt::AlignLeft | Qt::AlignTop);
   177         labelDesc->setTextInteractionFlags(Qt::TextSelectableByMouse |
   175         labelDesc->setTextInteractionFlags(Qt::TextSelectableByMouse |
   178                                            Qt::TextSelectableByKeyboard	|
   176                                            Qt::TextSelectableByKeyboard	|
   179                                            Qt::LinksAccessibleByMouse |
   177                                            Qt::LinksAccessibleByMouse |
   180                                            Qt::LinksAccessibleByKeyboard);
   178                                            Qt::LinksAccessibleByKeyboard);
   181         labelDesc->setTextFormat(Qt::RichText);
   179         labelDesc->setTextFormat(Qt::RichText);
   182         labelDesc->setOpenExternalLinks(true);
   180         labelDesc->setOpenExternalLinks(true);
   183         pTopDescLayout->addWidget(labelDesc, 1);
   181         //pTopDescLayout->addWidget(labelDesc, 1);
   184 
   182 
   185         // buttons: play and delete
   183         // buttons: play and delete
   186         btnPlay = new QPushButton(QPushButton::tr("Play"), pDescGroup);
   184         btnPlay = new QPushButton(QPushButton::tr("Play"), pDescGroup);
   187         btnPlay->setEnabled(false);
   185         btnPlay->setEnabled(false);
   188         btnPlay->setWhatsThis(QPushButton::tr("Play this video"));
   186         btnPlay->setWhatsThis(QPushButton::tr("Play this video"));
   195         btnToYouTube->setEnabled(false);
   193         btnToYouTube->setEnabled(false);
   196         btnToYouTube->setWhatsThis(QPushButton::tr("Upload this video to your Youtube account"));
   194         btnToYouTube->setWhatsThis(QPushButton::tr("Upload this video to your Youtube account"));
   197         pBottomDescLayout->addWidget(btnToYouTube);
   195         pBottomDescLayout->addWidget(btnToYouTube);
   198 
   196 
   199         pDescLayout->addStretch(1);
   197         pDescLayout->addStretch(1);
   200         pDescLayout->addLayout(pTopDescLayout, 0);
   198         pDescLayout->addWidget(labelThumbnail, 0);
       
   199         pDescLayout->addStretch(1);
       
   200         pDescLayout->addWidget(labelDesc, 0);
   201         pDescLayout->addStretch(1);
   201         pDescLayout->addStretch(1);
   202         pDescLayout->addLayout(pBottomDescLayout, 0);
   202         pDescLayout->addLayout(pBottomDescLayout, 0);
   203 
   203 
   204         pPageLayout->addWidget(pDescGroup, 0, 0);
   204         pPageLayout->addWidget(pDescGroup, 0, 0);
   205     }
   205     }