MenuTrackVideo::MenuTrackVideo(QWidget *parent) : MenuCore(parent) { setTitle(tr("Video track")); setIcon(QIcon::fromTheme("video-x-generic")); actionNext()->setText(tr("Next video track")); setType(Vlc::VideoTrack); }
void MenuTrackVideo::changeEvent(QEvent *e) { QWidget::changeEvent(e); switch (e->type()) { case QEvent::LanguageChange: setTitle(tr("Video track")); actionNext()->setText(tr("Next video track")); break; default: break; } }
MenuDeinterlacing::MenuDeinterlacing(VlcWidgetVideo *videoWidget, QWidget *parent) : MenuCore(parent), _videoWidget(videoWidget) { setTitle(tr("Deinterlacing")); setIcon(QIcon::fromTheme("video-x-generic")); actionNext()->setText(tr("Next deinterlacing option")); QAction *dfDisabled = new QAction(tr("Disabled"), this); _map1.insert(dfDisabled, Vlc::Disabled); _map2.insert(Vlc::Disabled, dfDisabled); connect(dfDisabled, SIGNAL(triggered()), this, SLOT(apply())); addItem(dfDisabled); QAction *dfDiscard = new QAction(tr("Discard"), this); _map1.insert(dfDiscard, Vlc::Discard); _map2.insert(Vlc::Discard, dfDiscard); connect(dfDiscard, SIGNAL(triggered()), this, SLOT(apply())); addItem(dfDiscard); QAction *dfBlend = new QAction(tr("Blend"), this); _map1.insert(dfBlend, Vlc::Blend); _map2.insert(Vlc::Blend, dfBlend); connect(dfBlend, SIGNAL(triggered()), this, SLOT(apply())); addItem(dfBlend); QAction *dfMean = new QAction(tr("Mean"), this); _map1.insert(dfMean, Vlc::Mean); _map2.insert(Vlc::Mean, dfMean); connect(dfMean, SIGNAL(triggered()), this, SLOT(apply())); addItem(dfMean); QAction *dfBob = new QAction(tr("Bob"), this); _map1.insert(dfBob, Vlc::Bob); _map2.insert(Vlc::Bob, dfBob); connect(dfBob, SIGNAL(triggered()), this, SLOT(apply())); addItem(dfBob); QAction *dfLinear = new QAction(tr("Linear"), this); _map1.insert(dfLinear, Vlc::Linear); _map2.insert(Vlc::Linear, dfLinear); connect(dfLinear, SIGNAL(triggered()), this, SLOT(apply())); addItem(dfLinear); QAction *dfX = new QAction(tr("X"), this); _map1.insert(dfX, Vlc::X); _map2.insert(Vlc::X, dfX); connect(dfX, SIGNAL(triggered()), this, SLOT(apply())); addItem(dfX); }
void MenuScale::changeEvent(QEvent *e) { QWidget::changeEvent(e); switch (e->type()) { case QEvent::LanguageChange: setTitle(tr("Scale/Zoom")); actionNext()->setText(tr("Next scale/zoom option")); _map2[Vlc::NoScale]->setText(tr("Original")); break; default: break; } }
void MenuDeinterlacing::changeEvent(QEvent *e) { QWidget::changeEvent(e); switch (e->type()) { case QEvent::LanguageChange: setTitle(tr("Deinterlacing")); actionNext()->setText(tr("Next deinterlacing option")); _map2[Vlc::Disabled]->setText(tr("Disabled")); break; default: break; } }
MenuAspectRatio::MenuAspectRatio(VlcVideoWidget *videoWidget, QWidget *parent) : MenuCore(parent), _videoWidget(videoWidget) { setTitle(tr("Aspect ratio")); setIcon(QIcon(":/icons/24x24/interface.png")); actionNext()->setText(tr("Next aspect ratio option")); _aspectRatioOriginal = new QAction(tr("Original"), this); connect(_aspectRatioOriginal, SIGNAL(triggered()), _videoWidget, SLOT(setRatioOriginal())); addItem(_aspectRatioOriginal); _aspectRatioOriginal->setChecked(true); QAction *ratio16_9 = new QAction("16:9", this); connect(ratio16_9, SIGNAL(triggered()), _videoWidget, SLOT(setRatio16_9())); addItem(ratio16_9); QAction *ratio16_10 = new QAction("16:10", this); connect(ratio16_10, SIGNAL(triggered()), _videoWidget, SLOT(setRatio16_10())); addItem(ratio16_10); QAction *ratio2_21_1 = new QAction("2.21:1", this); connect(ratio2_21_1, SIGNAL(triggered()), _videoWidget, SLOT(setRatio2_21_1())); addItem(ratio2_21_1); QAction *ratio4_3 = new QAction("4:3", this); connect(ratio4_3, SIGNAL(triggered()), _videoWidget, SLOT(setRatio4_3())); addItem(ratio4_3); QAction *ratio5_4 = new QAction("5:4", this); connect(ratio5_4, SIGNAL(triggered()), _videoWidget, SLOT(setRatio5_4())); addItem(ratio5_4); QAction *ratio1_1 = new QAction("1:1", this); connect(ratio1_1, SIGNAL(triggered()), _videoWidget, SLOT(setRatio1_1())); addItem(ratio1_1); }
MenuScale::MenuScale(VlcWidgetVideo *videoWidget, QWidget *parent) : MenuCore(parent), _videoWidget(videoWidget) { setTitle(tr("Scale/Zoom")); setIcon(QIcon::fromTheme("preferences-system-windows")); actionNext()->setText(tr("Next scale/zoom option")); setType(Vlc::Other); QAction *original = new QAction(tr("Original"), this); _map1.insert(original, Vlc::NoScale); _map2.insert(Vlc::NoScale, original); connect(original, SIGNAL(triggered()), this, SLOT(apply())); addItem(original); for (int i = 1; i < Vlc::scale().size(); i++) { QAction *action = new QAction(QString::number(Vlc::scale()[i]), this); _map1.insert(action, Vlc::Scale(i)); _map2.insert(Vlc::Scale(i), action); connect(action, SIGNAL(triggered()), this, SLOT(apply())); addItem(action); } }