l->addWidget(pb);
connect(pb, SIGNAL(clicked()), this, SLOT(slotDeleteProxy()));
m_proxyContainer->setLayout(l);
- if (t == AUDIO) {
+ if (t == IMAGE) {
+ m_view.tab_image->layout()->addWidget(line);
+ m_view.tab_image->layout()->addWidget(m_proxyContainer);
+ }
+ else if (t == AUDIO) {
m_view.tab_audio->layout()->addWidget(line);
m_view.tab_audio->layout()->addWidget(m_proxyContainer);
}
connect(m_ui.buttonSync, SIGNAL(toggled(bool)), this, SLOT(slotSetSynchronize(bool)));
m_spinX = new DragValue(i18n("X"), 0, 0, -1, QString(), false, this);
- m_spinX->setRange(-10000, 10000);
+ m_spinX->setRange(-99000, 99000);
m_ui.horizontalLayout->addWidget(m_spinX);
m_spinY = new DragValue(i18n("Y"), 0, 0, -1, QString(), false, this);
- m_spinY->setRange(-10000, 10000);
+ m_spinY->setRange(-99000, 99000);
m_ui.horizontalLayout->addWidget(m_spinY);
m_spinWidth = new DragValue(i18n("W"), m_monitor->render->frameRenderWidth(), 0, -1, QString(), false, this);
- m_spinWidth->setRange(1, 10000);
+ m_spinWidth->setRange(1, 99000);
m_ui.horizontalLayout->addWidget(m_spinWidth);
m_spinHeight = new DragValue(i18n("H"), m_monitor->render->renderHeight(), 0, -1, QString(), false, this);
- m_spinHeight->setRange(1, 10000);
+ m_spinHeight->setRange(1, 99000);
m_ui.horizontalLayout->addWidget(m_spinHeight);
m_ui.horizontalLayout->addStretch(10);
m_spinSize = new DragValue(i18n("Size"), 100, 2, -1, i18n("%"), false, this);
- m_spinSize->setRange(1, 10000);
+ m_spinSize->setRange(1, 99000);
m_ui.horizontalLayout2->addWidget(m_spinSize);
m_opacity = new DragValue(i18n("Opacity"), 100, 0, -1, i18n("%"), true, this);
m_documentProperties["zoneout"] = "100";
m_documentProperties["enableproxy"] = QString::number((int) KdenliveSettings::enableproxy());
m_documentProperties["proxyparams"] = KdenliveSettings::proxyparams();
+ m_documentProperties["proxyextension"] = KdenliveSettings::proxyextension();
m_documentProperties["generateproxy"] = QString::number((int) KdenliveSettings::generateproxy());
m_documentProperties["proxyminsize"] = QString::number(KdenliveSettings::proxyminsize());
+ m_documentProperties["generateimageproxy"] = QString::number((int) KdenliveSettings::generateimageproxy());
+ m_documentProperties["proxyimageminsize"] = QString::number(KdenliveSettings::proxyimageminsize());
// Load properties
QMapIterator<QString, QString> i(properties);
<default>false</default>
</entry>
+ <entry name="generateimageproxy" type="Bool">
+ <label>Auto generate proxy for new image clips.</label>
+ <default>false</default>
+ </entry>
+
<entry name="proxyminsize" type="Int">
<label>Minimum source size for proxy creation.</label>
<default>1000</default>
</entry>
+ <entry name="proxyimageminsize" type="Int">
+ <label>Minimum source size for proxy creation.</label>
+ <default>2000</default>
+ </entry>
+
+ <entry name="proxyextension" type="String">
+ <label>File extension for proxy clips.</label>
+ <default>avi</default>
+ </entry>
+
<entry name="proxyparams" type="String">
<label>Proxy clips transcoding parameters.</label>
<default>-f avi -acodec libmp3lame -ac 2 -ab 92k -ar 48000 -vcodec mpeg2video -g 5 -deinterlace -s 480x270 -b 150k</default>
QWidget *p8 = new QWidget;
m_configProject.setupUi(p8);
m_page8 = addPage(p8, i18n("Project Defaults"), "document-new");
- connect(m_configProject.kcfg_enableproxy, SIGNAL(toggled(bool)), m_configProject.proxy_frame, SLOT(setEnabled(bool)));
- m_configProject.proxy_frame->setEnabled(KdenliveSettings::enableproxy());
+ connect(m_configProject.kcfg_generateproxy, SIGNAL(toggled(bool)), m_configProject.kcfg_proxyminsize, SLOT(setEnabled(bool)));
+ m_configProject.kcfg_proxyminsize->setEnabled(KdenliveSettings::generateproxy());
+ m_configProject.kcfg_proxyparams->setMaximumHeight(QFontMetrics(font()).lineSpacing() * 5);
QWidget *p3 = new QWidget;
m_configTimeline.setupUi(p3);
// set up default properties
documentProperties.insert("enableproxy", QString::number((int) KdenliveSettings::enableproxy()));
documentProperties.insert("generateproxy", QString::number((int) KdenliveSettings::generateproxy()));
- documentProperties.insert("proxyparams", KdenliveSettings::proxyparams());
documentProperties.insert("proxyminsize", QString::number(KdenliveSettings::proxyminsize()));
+ documentProperties.insert("proxyparams", KdenliveSettings::proxyparams());
+ documentProperties.insert("proxyextension", KdenliveSettings::proxyextension());
+ documentProperties.insert("generateimageproxy", QString::number((int) KdenliveSettings::generateimageproxy()));
+ documentProperties.insert("proxyimageminsize", QString::number(KdenliveSettings::proxyimageminsize()));
if (!KdenliveSettings::activatetabs())
if (!closeCurrentDocument())
return;
projectTracks = w->tracks();
documentProperties.insert("enableproxy", QString::number((int) w->useProxy()));
documentProperties.insert("generateproxy", QString::number((int) w->generateProxy()));
- documentProperties.insert("proxyparams", w->proxyParams());
documentProperties.insert("proxyminsize", QString::number(w->proxyMinSize()));
+ documentProperties.insert("proxyparams", w->proxyParams());
+ documentProperties.insert("proxyextension", w->proxyExtension());
+ documentProperties.insert("generateimageproxy", QString::number((int) w->generateImageProxy()));
+ documentProperties.insert("proxyimageminsize", QString::number(w->proxyImageMinSize()));
delete w;
}
m_timelineArea->setEnabled(true);
//m_activeDocument->rebuildAllProxies();
}
}
+ if (m_activeDocument->getDocumentProperty("proxyextension") != w->proxyExtension()) {
+ m_activeDocument->setModified();
+ m_activeDocument->setDocumentProperty("proxyextension", w->proxyExtension());
+ }
if (m_activeDocument->getDocumentProperty("generateproxy") != QString::number((int) w->generateProxy())) {
m_activeDocument->setModified();
m_activeDocument->setDocumentProperty("generateproxy", QString::number((int) w->generateProxy()));
m_activeDocument->setModified();
m_activeDocument->setDocumentProperty("proxyminsize", QString::number(w->proxyMinSize()));
}
+ if (m_activeDocument->getDocumentProperty("generateimageproxy") != QString::number((int) w->generateImageProxy())) {
+ m_activeDocument->setModified();
+ m_activeDocument->setDocumentProperty("generateimageproxy", QString::number((int) w->generateImageProxy()));
+ }
+ if (m_activeDocument->getDocumentProperty("proxyimageminsize") != QString::number(w->proxyImageMinSize())) {
+ m_activeDocument->setModified();
+ m_activeDocument->setDocumentProperty("proxyimageminsize", QString::number(w->proxyImageMinSize()));
+ }
if (QString::number((int) w->useProxy()) != m_activeDocument->getDocumentProperty("enableproxy")) {
m_activeDocument->setDocumentProperty("enableproxy", QString::number((int) w->useProxy()));
m_activeDocument->setModified();
m_infoQueue.insert(clip->getId(), e);
}
else if (item->hasProxy() && !item->isProxyRunning()) {
- slotCreateProxy(clip->getId());
+ slotCreateProxy(clip->getId(), false);
}
clip->askForAudioThumbs();
// Proxy clip successfully created
QDomElement e = item->referencedClip()->toXML().cloneNode().toElement();
//e.removeAttribute("file_hash");
+
+ // Make sure we get the correct producer length if it was adjusted in timeline
+ CLIPTYPE t = item->clipType();
+ if (t == COLOR || t == IMAGE || t == SLIDESHOW || t == TEXT) {
+ int length = QString(item->referencedClip()->producerProperty("length")).toInt();
+ if (length > 0 && !e.hasAttribute("length")) {
+ e.setAttribute("length", length);
+ }
+ }
e.setAttribute("replace", 1);
m_infoQueue.insert(id, e);
if (!m_queueRunner.isRunning() && m_processingClips.isEmpty()) m_queueRunner = QtConcurrent::run(this, &ProjectList::slotProcessNextClipInQueue);
} else {
if (item->data(0, Qt::DecorationRole).isNull())
requestClipThumbnail(clip->getId());
- if (item->data(0, DurationRole).toString().isEmpty())
+ if (item->data(0, DurationRole).toString().isEmpty()) {
item->changeDuration(item->referencedClip()->producer()->get_playtime());
+ }
}
item->setData(0, UsageRole, QString::number(item->numReferences()));
}
DocClipBase *clip = item->referencedClip();
if (!useProxy() && item->referencedClip()->getProperty("proxy").isEmpty()) setProxyStatus(item, NOPROXY);
if (useProxy() && generateProxy() && item->referencedClip()->getProperty("proxy") == "-") setProxyStatus(item, NOPROXY);
- else if (useProxy() && !item->isProxyRunning() && (item->clipType() == AV || item->clipType() == VIDEO) && generateProxy() && size.section('x', 0, 0).toInt() > proxyMinSize()) {
+ else if (useProxy() && !item->isProxyRunning() && (item->clipType() == AV || item->clipType() == VIDEO) && generateProxy() && size.section('x', 0, 0).toInt() > m_doc->getDocumentProperty("proxyminsize").toInt()) {
if (clip->getProperty("proxy").isEmpty()) {
QString proxydir = m_doc->projectFolder().path( KUrl::AddTrailingSlash) + "proxy/";
QMap <QString, QString> newProps;
- newProps.insert("proxy", proxydir + item->referencedClip()->getClipHash() + ".avi");
+ newProps.insert("proxy", proxydir + item->referencedClip()->getClipHash() + "." + m_doc->getDocumentProperty("proxyextension"));
QMap <QString, QString> oldProps = clip->properties();
oldProps.insert("proxy", QString());
EditClipCommand *command = new EditClipCommand(this, clipId, oldProps, newProps, true);
return profileUpdated;
}
+QString ProjectList::getDocumentProperty(const QString &key) const
+{
+ return m_doc->getDocumentProperty(key);
+}
+
bool ProjectList::useProxy() const
{
return m_doc->getDocumentProperty("enableproxy").toInt();
return m_doc->getDocumentProperty("generateproxy").toInt();
}
-int ProjectList::proxyMinSize() const
-{
- return m_doc->getDocumentProperty("proxyminsize").toInt();
-}
-
-QString ProjectList::proxyParams() const
+bool ProjectList::generateImageProxy() const
{
- return m_doc->getDocumentProperty("proxyparams").simplified();
+ return m_doc->getDocumentProperty("generateimageproxy").toInt();
}
void ProjectList::slotReplyGetImage(const QString &clipId, const QPixmap &pix)
return list;
}
-void ProjectList::slotCreateProxy(const QString id)
+void ProjectList::slotCreateProxy(const QString id, bool createProducer)
{
ProjectItem *item = getItemById(id);
if (!item || item->isProxyRunning()) return;
+
+ // If proxy producer already exists, skip creation
+ if (!createProducer) {
+ setProxyStatus(id, PROXYDONE);
+ return;
+ }
setProxyStatus(id, PROXYWAITING);
if (m_abortProxyId.contains(id)) m_abortProxyId.removeAll(id);
emit projectModified();
file.close();
QFile::remove(path);
}
+ if (item->clipType() == IMAGE) {
+ // Image proxy
+ QImage i(url);
+ if (i.isNull()) {
+ // Cannot load image
+ setProxyStatus(id, PROXYCRASHED);
+ return;
+ }
+ QImage proxy;
+ // Images are scaled to profile size.
+ //TODO: Make it be configurable?
+ if (i.width() > i.height()) proxy = i.scaledToWidth(m_render->frameRenderWidth());
+ else proxy = i.scaledToHeight(m_render->renderHeight());
+ int exif_orientation = QString(item->referencedClip()->producerProperty("_exif_orientation")).toInt();
+ if (exif_orientation > 1) {
+ // Rotate image according to exif data
+ QImage processed;
+ QMatrix matrix;
+
+ switch ( exif_orientation ) {
+ case 2:
+ matrix.scale( -1, 1 );
+ break;
+ case 3:
+ matrix.rotate( 180 );
+ break;
+ case 4:
+ matrix.scale( 1, -1 );
+ break;
+ case 5:
+ matrix.rotate( 270 );
+ matrix.scale( -1, 1 );
+ break;
+ case 6:
+ matrix.rotate( 90 );
+ break;
+ case 7:
+ matrix.rotate( 90 );
+ matrix.scale( -1, 1 );
+ break;
+ case 8:
+ matrix.rotate( 270 );
+ break;
+ }
+ processed = proxy.transformed( matrix );
+ processed.save(path);
+ }
+ else proxy.save(path);
+ setProxyStatus(id, PROXYDONE);
+ slotGotProxy(id);
+ return;
+ }
QStringList parameters;
parameters << "-i" << url;
- QString params = proxyParams();
+ QString params = m_doc->getDocumentProperty("proxyparams").simplified();
foreach(QString s, params.split(' '))
parameters << s;
if ((t == VIDEO || t == AV || t == UNKNOWN) && item->referencedClip() != NULL) {
if (generateProxy() && useProxy() && !item->isProxyRunning()) {
DocClipBase *clip = item->referencedClip();
- if (clip->getProperty("frame_size").section('x', 0, 0).toInt() > proxyMinSize()) {
+ if (clip->getProperty("frame_size").section('x', 0, 0).toInt() > m_doc->getDocumentProperty("proxyminsize").toInt()) {
+ if (clip->getProperty("proxy").isEmpty()) {
+ // We need to insert empty proxy in old properties so that undo will work
+ QMap <QString, QString> oldProps = clip->properties();
+ oldProps.insert("proxy", QString());
+ QMap <QString, QString> newProps;
+ newProps.insert("proxy", proxydir + item->referencedClip()->getClipHash() + "." + m_doc->getDocumentProperty("proxyextension"));
+ new EditClipCommand(this, clip->getId(), oldProps, newProps, true, command);
+ }
+ }
+ }
+ else if (item->hasProxy()) {
+ // remove proxy
+ QMap <QString, QString> newProps;
+ newProps.insert("proxy", QString());
+ newProps.insert("replace", "1");
+ new EditClipCommand(this, item->clipId(), item->referencedClip()->properties(), newProps, true, command);
+ }
+ }
+ else if (t == IMAGE && item->referencedClip() != NULL) {
+ if (generateImageProxy() && useProxy()) {
+ DocClipBase *clip = item->referencedClip();
+ int maxImageSize = m_doc->getDocumentProperty("proxyimageminsize").toInt();
+ if (clip->getProperty("frame_size").section('x', 0, 0).toInt() > maxImageSize || clip->getProperty("frame_size").section('x', 1, 1).toInt() > maxImageSize) {
if (clip->getProperty("proxy").isEmpty()) {
// We need to insert empty proxy in old properties so that undo will work
QMap <QString, QString> oldProps = clip->properties();
oldProps.insert("proxy", QString());
QMap <QString, QString> newProps;
- newProps.insert("proxy", proxydir + item->referencedClip()->getClipHash() + ".avi");
+ newProps.insert("proxy", proxydir + item->referencedClip()->getClipHash() + ".png");
new EditClipCommand(this, clip->getId(), oldProps, newProps, true, command);
}
}
newProps.insert("proxy", QString());
newProps.insert("replace", "1");
new EditClipCommand(this, item->clipId(), item->referencedClip()->properties(), newProps, true, command);
- /*item->referencedClip()->clearProperty("proxy");
- QDomElement e = item->toXml().cloneNode().toElement();
- e.removeAttribute("file_hash");
- e.setAttribute("replace", 1);
- m_infoQueue.insert(item->clipId(), e);*/
}
}
++it;
if (listItem->type() == PROJECTCLIPTYPE) {
ProjectItem *item = static_cast <ProjectItem*>(listItem);
CLIPTYPE t = item->clipType();
- if ((t == VIDEO || t == AV || t == UNKNOWN) && item->referencedClip()) {
+ if ((t == VIDEO || t == AV || t == UNKNOWN || t == IMAGE) && item->referencedClip()) {
oldProps = item->referencedClip()->properties();
if (doProxy) {
newProps.clear();
- QString path = proxydir + item->referencedClip()->getClipHash() + ".avi";
+ QString path = proxydir + item->referencedClip()->getClipHash() + "." + (t == IMAGE ? "png" : m_doc->getDocumentProperty("proxyextension"));
newProps.insert("proxy", path);
// We need to insert empty proxy so that undo will work
oldProps.insert("proxy", QString());
QMap <QString, QString> getProxies();
/** @brief Enable / disable proxies. */
void updateProxyConfig();
- /** @brief Does this project automatically use proxies. */
+ /** @brief Get a property from the document. */
+ QString getDocumentProperty(const QString &key) const;
+
+ /** @brief Does this project allow proxies. */
bool useProxy() const;
- /** @brief proxy parameters for this project. */
- QString proxyParams() const;
/** @brief Should we automatically create proxy clips for newly added clips. */
bool generateProxy() const;
- /** @brief Minimum clip width to create proxy. */
- int proxyMinSize() const;
+ /** @brief Should we automatically create proxy clips for newly added clips. */
+ bool generateImageProxy() const;
public slots:
void setDocument(KdenliveDoc *doc);
/** @brief Enable / disable proxy for current clip. */
void slotProxyCurrentItem(bool doProxy);
/** @brief Put clip in the proxy waiting list. */
- void slotCreateProxy(const QString id);
+ void slotCreateProxy(const QString id, bool createProducer = true);
/** @brief Stop creation of this clip's proxy. */
void slotAbortProxy(const QString id);
/** @brief Start creation of proxy clip. */
video_thumbs->setChecked(KdenliveSettings::videothumbnails());
audio_tracks->setValue(audiotracks);
video_tracks->setValue(videotracks);
- connect(enable_proxy, SIGNAL(toggled(bool)), proxy_box, SLOT(setEnabled(bool)));
+ proxy_params->setMaximumHeight(QFontMetrics(font()).lineSpacing() * 5);
connect(generate_proxy, SIGNAL(toggled(bool)), proxy_minsize, SLOT(setEnabled(bool)));
+ connect(generate_imageproxy, SIGNAL(toggled(bool)), proxy_imageminsize, SLOT(setEnabled(bool)));
if (projectlist) {
- enable_proxy->setChecked(projectlist->useProxy());
- generate_proxy->setChecked(projectlist->generateProxy());
- proxy_minsize->setValue(projectlist->proxyMinSize());
- proxy_params->setText(projectlist->proxyParams());
- proxy_box->setEnabled(projectlist->useProxy());
+ enable_proxy->setChecked(projectlist->getDocumentProperty("enableproxy").toInt());
+ generate_proxy->setChecked(projectlist->getDocumentProperty("generateproxy").toInt());
+ proxy_minsize->setValue(projectlist->getDocumentProperty("proxyminsize").toInt());
+ proxy_params->setPlainText(projectlist->getDocumentProperty("proxyparams"));
+ generate_imageproxy->setChecked(projectlist->getDocumentProperty("generateimageproxy").toInt());
+ proxy_imageminsize->setValue(projectlist->getDocumentProperty("proxyimageminsize").toInt());
+ proxy_extension->setText(projectlist->getDocumentProperty("proxyextension"));
}
else {
enable_proxy->setChecked(KdenliveSettings::enableproxy());
generate_proxy->setChecked(KdenliveSettings::generateproxy());
proxy_minsize->setValue(KdenliveSettings::proxyminsize());
- proxy_params->setText(KdenliveSettings::proxyparams());
- proxy_box->setEnabled(KdenliveSettings::enableproxy());
+ proxy_params->setPlainText(KdenliveSettings::proxyparams());
+ generate_imageproxy->setChecked(KdenliveSettings::generateimageproxy());
+ proxy_imageminsize->setValue(KdenliveSettings::proxyimageminsize());
+ proxy_extension->setText(KdenliveSettings::proxyextension());
+
}
if (readOnlyTracks) {
slotUpdateFiles();
connect(clear_cache, SIGNAL(clicked()), this, SLOT(slotClearCache()));
connect(delete_unused, SIGNAL(clicked()), this, SLOT(slotDeleteUnused()));
+ connect(delete_proxies, SIGNAL(clicked()), this, SLOT(slotDeleteProxies()));
} else tabWidget->widget(1)->setEnabled(false);
connect(profiles_list, SIGNAL(currentIndexChanged(int)), this, SLOT(slotUpdateDisplay()));
connect(project_folder, SIGNAL(textChanged(const QString &)), this, SLOT(slotUpdateButton(const QString &)));
slotUpdateFiles(true);
}
+void ProjectSettings::slotDeleteProxies()
+{
+ buttonBox->setEnabled(false);
+
+ KIO::NetAccess::del(KUrl(project_folder->url().path(KUrl::AddTrailingSlash) + "proxy/"), this);
+ KStandardDirs::makeDir(project_folder->url().path(KUrl::AddTrailingSlash) + "proxy/");
+ buttonBox->setEnabled(true);
+ slotUpdateFiles(true);
+}
+
void ProjectSettings::slotUpdateFiles(bool cacheOnly)
{
- KIO::DirectorySizeJob * job = KIO::directorySize(project_folder->url().path(KUrl::AddTrailingSlash) + "thumbs/");
+ KIO::DirectorySizeJob *job = KIO::directorySize(project_folder->url().path(KUrl::AddTrailingSlash) + "thumbs/");
job->exec();
thumbs_count->setText(QString::number(job->totalFiles()));
thumbs_size->setText(KIO::convertSize(job->totalSize()));
+ job = KIO::directorySize(project_folder->url().path(KUrl::AddTrailingSlash) + "proxy/");
+ job->exec();
+ proxy_count->setText(QString::number(job->totalFiles()));
+ proxy_size->setText(KIO::convertSize(job->totalSize()));
delete job;
if (cacheOnly) return;
int unused = 0;
return generate_proxy->isChecked();
}
+bool ProjectSettings::generateImageProxy() const
+{
+ return generate_imageproxy->isChecked();
+}
+
int ProjectSettings::proxyMinSize() const
{
return proxy_minsize->value();
}
+int ProjectSettings::proxyImageMinSize() const
+{
+ return proxy_imageminsize->value();
+}
+
QString ProjectSettings::proxyParams() const
{
return proxy_params->toPlainText();
}
+QString ProjectSettings::proxyExtension() const
+{
+ return proxy_extension->text();
+}
+
//static
QStringList ProjectSettings::extractPlaylistUrls(QString path)
{
bool useProxy() const;
bool generateProxy() const;
int proxyMinSize() const;
+ bool generateImageProxy() const;
+ int proxyImageMinSize() const;
QString proxyParams() const;
+ QString proxyExtension() const;
static QStringList extractPlaylistUrls(QString path);
static QStringList extractSlideshowUrls(KUrl url);
void slotUpdateButton(const QString &path);
void slotUpdateFiles(bool cacheOnly = false);
void slotClearCache();
+ void slotDeleteProxies();
void slotDeleteUnused();
/** @brief Export project data to text file. */
void slotExportToText();
QString path;
if (xml.hasAttribute("proxy") && xml.attribute("proxy") != "-") path = xml.attribute("proxy");
else path = xml.attribute("resource");
+
+
KUrl url = KUrl(path);
Mlt::Producer *producer = NULL;
CLIPTYPE type = (CLIPTYPE)xml.attribute("type").toInt();
int full_luma = xml.attribute("full_luma").toInt();
if (full_luma != 0) producer->set("set.force_full_luma", full_luma);
}
-
+
+ int clipOut = 0;
+ if (xml.hasAttribute("out")) clipOut = xml.attribute("out").toInt();
+
// setup length here as otherwise default length (currently 15000 frames in MLT) will be taken even if outpoint is larger
if (type == COLOR || type == TEXT || type == IMAGE || type == SLIDESHOW) {
int length;
- if (xml.hasAttribute("length")) length = xml.attribute("length").toInt();
+ if (xml.hasAttribute("length")) {
+ length = xml.attribute("length").toInt();
+ clipOut = length - 1;
+ }
else length = xml.attribute("out").toInt() - xml.attribute("in").toInt();
producer->set("length", length);
}
- if (xml.hasAttribute("out"))
- producer->set_in_and_out(xml.attribute("in").toInt(), xml.attribute("out").toInt());
+ if (clipOut > 0) producer->set_in_and_out(xml.attribute("in").toInt(), clipOut);
producer->set("id", clipId.toUtf8().constData());
<x>0</x>
<y>0</y>
<width>280</width>
- <height>520</height>
+ <height>503</height>
</rect>
</property>
<property name="windowTitle">
</item>
</layout>
</widget>
- <widget class="QWidget" name="tab_2">
+ <widget class="QWidget" name="tab_slideshow">
<attribute name="title">
<string>Slideshow</string>
</attribute>
</item>
</layout>
</widget>
- <widget class="QWidget" name="tab_4">
+ <widget class="QWidget" name="tab_image">
<attribute name="title">
<string>Image</string>
</attribute>
- <layout class="QGridLayout" name="gridLayout_8">
- <item row="0" column="0">
- <widget class="QLabel" name="label_16">
- <property name="text">
- <string>Image size</string>
- </property>
- </widget>
- </item>
- <item row="0" column="1">
- <widget class="KLineEdit" name="image_size">
- <property name="readOnly">
- <bool>true</bool>
- </property>
- </widget>
+ <layout class="QVBoxLayout" name="verticalLayout_3">
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout_3">
+ <item>
+ <widget class="QLabel" name="label_16">
+ <property name="text">
+ <string>Image size</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="KLineEdit" name="image_size">
+ <property name="readOnly">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ </layout>
</item>
- <item row="1" column="0" colspan="2">
+ <item>
<widget class="QCheckBox" name="image_transparency">
<property name="text">
<string>Transparent background</string>
</property>
</widget>
</item>
- <item row="2" column="0">
+ <item>
<spacer name="verticalSpacer_7">
<property name="orientation">
<enum>Qt::Vertical</enum>
<rect>
<x>0</x>
<y>0</y>
- <width>312</width>
- <height>294</height>
+ <width>333</width>
+ <height>353</height>
</rect>
</property>
<property name="windowTitle">
</spacer>
</item>
<item row="2" column="0" colspan="5">
- <widget class="QCheckBox" name="kcfg_enableproxy">
- <property name="text">
- <string>Enable proxy clips</string>
+ <widget class="QGroupBox" name="kcfg_enableproxy">
+ <property name="title">
+ <string>Proxy clips</string>
</property>
- </widget>
- </item>
- <item row="3" column="0" colspan="5">
- <widget class="QFrame" name="proxy_frame">
- <property name="frameShape">
- <enum>QFrame::NoFrame</enum>
+ <property name="checkable">
+ <bool>true</bool>
</property>
- <property name="frameShadow">
- <enum>QFrame::Raised</enum>
+ <property name="checked">
+ <bool>false</bool>
</property>
<layout class="QGridLayout" name="gridLayout">
- <property name="margin">
- <number>0</number>
- </property>
<item row="0" column="0">
<widget class="QCheckBox" name="kcfg_generateproxy">
<property name="text">
- <string>Generate proxy if clip larger than</string>
+ <string>Generate for videos larger than</string>
</property>
</widget>
</item>
</widget>
</item>
<item row="1" column="0">
- <widget class="QLabel" name="label">
+ <widget class="QCheckBox" name="kcfg_generateimageproxy">
<property name="text">
- <string>Transcoding parameters</string>
+ <string>Generate for images larger than</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1">
+ <widget class="KIntSpinBox" name="kcfg_proxyimageminsize">
+ <property name="suffix">
+ <string>pixels</string>
+ </property>
+ <property name="minimum">
+ <number>500</number>
+ </property>
+ <property name="maximum">
+ <number>100000</number>
+ </property>
+ <property name="value">
+ <number>2000</number>
</property>
</widget>
</item>
<item row="2" column="0" colspan="2">
- <widget class="QPlainTextEdit" name="kcfg_proxyparams"/>
+ <widget class="QLabel" name="label">
+ <property name="text">
+ <string>FFmpeg video transcoding parameters</string>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="0" colspan="2">
+ <widget class="QPlainTextEdit" name="kcfg_proxyparams">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Maximum">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ </item>
+ <item row="4" column="0">
+ <widget class="QLabel" name="label_2">
+ <property name="text">
+ <string>File extension</string>
+ </property>
+ </widget>
+ </item>
+ <item row="4" column="1">
+ <widget class="KLineEdit" name="kcfg_proxyextension">
+ <property name="text">
+ <string>avi</string>
+ </property>
+ </widget>
</item>
</layout>
</widget>
</item>
- <item row="4" column="0">
+ <item row="3" column="0">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
- <height>21</height>
+ <height>40</height>
</size>
</property>
</spacer>
<extends>QSpinBox</extends>
<header>knuminput.h</header>
</customwidget>
+ <customwidget>
+ <class>KLineEdit</class>
+ <extends>QLineEdit</extends>
+ <header>klineedit.h</header>
+ </customwidget>
<customwidget>
<class>KComboBox</class>
<extends>QComboBox</extends>
<rect>
<x>0</x>
<y>0</y>
- <width>321</width>
- <height>462</height>
+ <width>337</width>
+ <height>527</height>
</rect>
</property>
<property name="windowTitle">
</spacer>
</item>
<item row="4" column="0" colspan="4">
- <widget class="QCheckBox" name="enable_proxy">
- <property name="text">
- <string>Enable proxy clips</string>
+ <widget class="QGroupBox" name="enable_proxy">
+ <property name="title">
+ <string>Proxy clips</string>
</property>
- </widget>
- </item>
- <item row="5" column="0" colspan="4">
- <widget class="QFrame" name="proxy_box">
- <property name="frameShape">
- <enum>QFrame::NoFrame</enum>
+ <property name="checkable">
+ <bool>true</bool>
</property>
- <property name="frameShadow">
- <enum>QFrame::Raised</enum>
+ <property name="checked">
+ <bool>false</bool>
</property>
<layout class="QGridLayout" name="gridLayout_2">
- <property name="margin">
- <number>0</number>
- </property>
<item row="0" column="0">
<widget class="QCheckBox" name="generate_proxy">
<property name="text">
- <string>Generate proxy if clip larger than</string>
+ <string>Generate for videos larger than</string>
</property>
</widget>
</item>
</property>
</widget>
</item>
- <item row="1" column="0" colspan="2">
- <widget class="QTextEdit" name="proxy_params"/>
+ <item row="1" column="0">
+ <widget class="QCheckBox" name="generate_imageproxy">
+ <property name="text">
+ <string>Generate for images larger than</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1">
+ <widget class="KIntSpinBox" name="proxy_imageminsize">
+ <property name="suffix">
+ <string>pixels</string>
+ </property>
+ <property name="minimum">
+ <number>500</number>
+ </property>
+ <property name="maximum">
+ <number>100000</number>
+ </property>
+ <property name="value">
+ <number>2000</number>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="0" colspan="2">
+ <widget class="QLabel" name="label_16">
+ <property name="text">
+ <string>FFmpeg video transcoding parameters</string>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="0" colspan="2">
+ <widget class="QPlainTextEdit" name="proxy_params"/>
+ </item>
+ <item row="4" column="0">
+ <widget class="QLabel" name="label_17">
+ <property name="text">
+ <string>File extension</string>
+ </property>
+ </widget>
+ </item>
+ <item row="4" column="1">
+ <widget class="KLineEdit" name="proxy_extension">
+ <property name="text">
+ <string>avi</string>
+ </property>
+ </widget>
</item>
</layout>
</widget>
</item>
- <item row="6" column="0" colspan="2">
- <spacer name="verticalSpacer">
- <property name="orientation">
- <enum>Qt::Vertical</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>105</width>
- <height>17</height>
- </size>
- </property>
- </spacer>
- </item>
</layout>
</widget>
<widget class="QWidget" name="tab_2">
<string>Project Files</string>
</attribute>
<layout class="QGridLayout" name="gridLayout_4">
- <item row="0" column="0">
+ <item row="0" column="0" colspan="2">
<widget class="QLabel" name="label_12">
<property name="text">
<string>Clips used in project:</string>
</property>
</widget>
</item>
- <item row="0" column="1">
+ <item row="0" column="2">
<widget class="QLabel" name="used_count">
<property name="text">
<string/>
</property>
</widget>
</item>
- <item row="1" column="1">
+ <item row="1" column="2">
<widget class="QLabel" name="unused_count">
<property name="text">
<string/>
</property>
</widget>
</item>
- <item row="2" column="1">
+ <item row="2" column="2">
<widget class="QLabel" name="thumbs_count">
<property name="text">
<string/>
</widget>
</item>
<item row="3" column="0">
- <widget class="QLabel" name="label_13">
+ <widget class="QLabel" name="label_14">
<property name="text">
- <string>Project files</string>
+ <string>Proxy clips</string>
</property>
</widget>
</item>
- <item row="3" column="1">
- <widget class="QLabel" name="files_count">
+ <item row="3" column="2">
+ <widget class="QLabel" name="proxy_count">
<property name="text">
<string/>
</property>
</widget>
</item>
- <item row="5" column="0" colspan="5">
- <widget class="QLabel" name="label_fonts">
+ <item row="3" column="3">
+ <widget class="QLabel" name="proxy_size">
<property name="text">
- <string>Fonts</string>
+ <string/>
</property>
</widget>
</item>
- <item row="6" column="0" colspan="5">
- <widget class="QListWidget" name="fonts_list">
- <property name="alternatingRowColors">
- <bool>true</bool>
+ <item row="3" column="4">
+ <widget class="KPushButton" name="delete_proxies">
+ <property name="text">
+ <string>Delete proxies</string>
+ </property>
+ </widget>
+ </item>
+ <item row="4" column="0">
+ <widget class="QLabel" name="label_13">
+ <property name="text">
+ <string>Project files</string>
</property>
</widget>
</item>
- <item row="4" column="0" colspan="5">
+ <item row="4" column="3" colspan="2">
+ <widget class="KTreeWidgetSearchLine" name="list_search"/>
+ </item>
+ <item row="5" column="0" colspan="5">
<widget class="QTreeWidget" name="files_list">
<property name="alternatingRowColors">
<bool>true</bool>
</column>
</widget>
</item>
- <item row="3" column="2" colspan="3">
- <widget class="KTreeWidgetSearchLine" name="list_search"/>
+ <item row="6" column="0">
+ <widget class="QLabel" name="label_fonts">
+ <property name="text">
+ <string>Fonts</string>
+ </property>
+ </widget>
</item>
- <item row="7" column="0">
+ <item row="7" column="0" colspan="5">
+ <widget class="QListWidget" name="fonts_list">
+ <property name="alternatingRowColors">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="8" column="0" colspan="2">
<widget class="QPushButton" name="button_export">
<property name="text">
<string>Plain text export</string>
</property>
</widget>
</item>
+ <item row="4" column="2">
+ <widget class="QLabel" name="files_count">
+ <property name="text">
+ <string/>
+ </property>
+ </widget>
+ </item>
</layout>
</widget>
</widget>