Commit b0f11e01 authored by Vivek Yadav's avatar Vivek Yadav
Browse files

fortesting

parent 948845ec
......@@ -826,9 +826,11 @@ bool LineEventEater::eventFilter(QObject *obj, QEvent *event)
void ClipWidget::init(QDockWidget* m_DockClipWidget)
{
QString clipFolder = KRecentDirs::dir(QStringLiteral(":KdenliveClipFolder"));
ClipCreationDialog::clipWidget(m_DockClipWidget);
/*QString clipFolder = KRecentDirs::dir(QStringLiteral(":KdenliveClipFolder"));
KFileWidget* fileWidget = new KFileWidget(QUrl::fromLocalFile(clipFolder), m_DockClipWidget);
m_DockClipWidget->setWidget(fileWidget);
fileWidget->setMode(KFile::Files);
m_DockClipWidget->setWidget(fileWidget);*/
}
Bin::Bin(std::shared_ptr<ProjectItemModel> model, QWidget *parent)
......
......@@ -357,7 +357,7 @@ for (const QUrl & file : list) {
}
}*/
//}
#include <iostream>
void ClipCreationDialog::createClipsCommand(KdenliveDoc *doc, const QString &parentFolder, const std::shared_ptr<ProjectItemModel> &model)
{
qDebug() << "/////////// starting to add bin clips";
......@@ -448,3 +448,26 @@ void ClipCreationDialog::createClipsCommand(KdenliveDoc *doc, const QString &par
pCore->pushUndo(undo, redo, i18np("Add clip", "Add clips", list.size()));
}
}
void ClipCreationDialog::clipWidget(QDockWidget* m_DockClipWidget)
{
QString clipFolder = KRecentDirs::dir(QStringLiteral(":KdenliveClipFolder"));
KFileWidget* fileWidget = new KFileWidget(QUrl::fromLocalFile(clipFolder), m_DockClipWidget);
fileWidget->setMode(KFile::Files | KFile::ExistingOnly | KFile::LocalOnly | KFile::Directory);
QPushButton* importseq = new QPushButton("Import image sequence");
fileWidget->setCustomWidget(importseq);
QObject::connect(importseq, &QPushButton::clicked, fileWidget, &KFileWidget::slotOk);
QObject::connect(importseq, &QPushButton::clicked, fileWidget, &KFileWidget::accepted);
QObject::connect(importseq, &QPushButton::clicked, fileWidget, &KFileWidget::accept);
QObject::connect(importseq, &QPushButton::clicked, fileWidget, [&]{
//fileWidget->slotOk();
//fileWidget->accepted();
//fileWidget->accept();
QList<QUrl> list;
list = fileWidget->selectedUrls(); // work if this line is commented
std::cout << list.size() << "\n";
});
m_DockClipWidget->setWidget(fileWidget);
}
......@@ -23,6 +23,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define CLIPCREATIONDIALOG_H
#include "definitions.h"
#include <QDockWidget>
class KdenliveDoc;
class Bin;
......@@ -45,6 +46,7 @@ void createSlideshowClip(KdenliveDoc *doc, const QString &parentId, std::shared_
void createTitleClip(KdenliveDoc *doc, const QString &parentFolder, const QString &templatePath, std::shared_ptr<ProjectItemModel> model);
void createTitleTemplateClip(KdenliveDoc *doc, const QString &parentFolder, std::shared_ptr<ProjectItemModel> model);
void createClipsCommand(KdenliveDoc *doc, const QString &parentFolder, const std::shared_ptr<ProjectItemModel> &model);
void clipWidget(QDockWidget* m_DockClipWidget);
} // namespace ClipCreationDialog
#endif
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment