+
+ // Build config menu
+ QMenu* confMenu = new QMenu;
+ m_showOverlay = actions.at(2);
+ connect(m_showOverlay, SIGNAL(triggered(bool)), this, SLOT(slotShowOverlay(bool)));
+ overlay_button->setDefaultAction(m_showOverlay);
+ //confMenu->addAction(m_showOverlay);
+
+ m_effectIndex = KdenliveSettings::stopmotioneffect();
+ QMenu* effectsMenu = new QMenu(i18n("Overlay effect"));
+ QActionGroup* effectGroup = new QActionGroup(this);
+ QAction* noEffect = new QAction(i18n("No Effect"), effectGroup);
+ noEffect->setData(0);
+ QAction* contrastEffect = new QAction(i18n("Contrast"), effectGroup);
+ contrastEffect->setData(1);
+ QAction* edgeEffect = new QAction(i18n("Edge detect"), effectGroup);
+ edgeEffect->setData(2);
+ QAction* brightEffect = new QAction(i18n("Brighten"), effectGroup);
+ brightEffect->setData(3);
+ QAction* invertEffect = new QAction(i18n("Invert"), effectGroup);
+ invertEffect->setData(4);
+ QAction* thresEffect = new QAction(i18n("Threshold"), effectGroup);
+ thresEffect->setData(5);
+
+ effectsMenu->addAction(noEffect);
+ effectsMenu->addAction(contrastEffect);
+ effectsMenu->addAction(edgeEffect);
+ effectsMenu->addAction(brightEffect);
+ effectsMenu->addAction(invertEffect);
+ effectsMenu->addAction(thresEffect);
+ QList <QAction*> list = effectsMenu->actions();
+ for (int i = 0; i < list.count(); i++) {
+ list.at(i)->setCheckable(true);
+ if (list.at(i)->data().toInt() == m_effectIndex) {
+ list.at(i)->setChecked(true);
+ }
+ }
+ connect(effectsMenu, SIGNAL(triggered(QAction*)), this, SLOT(slotUpdateOverlayEffect(QAction*)));
+ confMenu->addMenu(effectsMenu);
+
+ QAction* showThumbs = new QAction(KIcon("image-x-generic"), i18n("Show sequence thumbnails"), this);
+ showThumbs->setCheckable(true);
+ showThumbs->setChecked(KdenliveSettings::showstopmotionthumbs());
+ connect(showThumbs, SIGNAL(triggered(bool)), this, SLOT(slotShowThumbs(bool)));
+
+ QAction* removeCurrent = new QAction(KIcon("edit-delete"), i18n("Delete current frame"), this);
+ removeCurrent->setShortcut(Qt::Key_Delete);
+ connect(removeCurrent, SIGNAL(triggered()), this, SLOT(slotRemoveFrame()));
+
+ QAction* conf = new QAction(KIcon("configure"), i18n("Configure"), this);
+ connect(conf, SIGNAL(triggered()), this, SLOT(slotConfigure()));
+
+ confMenu->addAction(showThumbs);
+ confMenu->addAction(removeCurrent);
+ confMenu->addAction(analyse);
+ confMenu->addAction(mirror);
+ confMenu->addAction(conf);
+ config_button->setIcon(KIcon("configure"));
+ config_button->setMenu(confMenu);
+
+ connect(sequence_name, SIGNAL(textChanged(const QString&)), this, SLOT(sequenceNameChanged(const QString&)));
+ connect(sequence_name, SIGNAL(currentIndexChanged(int)), live_button, SLOT(setFocus()));
+
+ // Video widget holder
+ QVBoxLayout *layout = new QVBoxLayout;
+ layout->setContentsMargins(0, 0, 0, 0);
+ layout->setSpacing(0);
+ m_videoBox = new VideoContainer(m_monitor);
+ m_videoBox->setLineWidth(4);
+ layout->addWidget(m_videoBox);
+
+#ifdef USE_BLACKMAGIC
+ if (BMInterface::getBlackMagicDeviceList(capture_device)) {
+ // Found a BlackMagic device
+ }
+#endif
+ if (QFile::exists(KdenliveSettings::video4vdevice())) {
+#ifdef USE_V4L
+ // Video 4 Linux device detection
+ for (int i = 0; i < 10; i++) {
+ QString path = "/dev/video" + QString::number(i);
+ if (QFile::exists(path)) {
+ QStringList deviceInfo = V4lCaptureHandler::getDeviceName(path);
+ if (!deviceInfo.isEmpty()) {
+ capture_device->addItem(deviceInfo.at(0), "v4l");
+ capture_device->setItemData(capture_device->count() - 1, path, Qt::UserRole + 1);
+ capture_device->setItemData(capture_device->count() - 1, deviceInfo.at(1), Qt::UserRole + 2);
+ if (path == KdenliveSettings::video4vdevice()) capture_device->setCurrentIndex(capture_device->count() - 1);
+ }
+ }
+ }
+#endif /* USE_V4L */
+ }
+
+ connect(capture_device, SIGNAL(currentIndexChanged(int)), this, SLOT(slotUpdateDeviceHandler()));
+ /*if (m_bmCapture) {
+ connect(m_bmCapture, SIGNAL(frameSaved(const QString &)), this, SLOT(slotNewThumb(const QString &)));
+ connect(m_bmCapture, SIGNAL(gotFrame(QImage)), this, SIGNAL(gotFrame(QImage)));
+ } else live_button->setEnabled(false);*/
+