widgets/monitor_ui.ui
widgets/colorclip_ui.ui
widgets/configmisc_ui.ui
+ widgets/configenv_ui.ui
widgets/effectlist_ui.ui
widgets/effectstack_ui.ui
+ widgets/profiledialog_ui.ui
)
set(kdenlive_SRCS
{
ui.setupUi(this);
initList(0);
+ ui.search_effect->setListWidget(ui.effectlist);
connect(ui.type_combo, SIGNAL(currentIndexChanged(int)), this, SLOT(initList(int)));
connect(ui.button_info, SIGNAL(stateChanged(int)), this, SLOT(showInfoPanel(int)));
connect(ui.effectlist, SIGNAL(itemSelectionChanged()), this, SLOT(slotUpdateInfo()));
</entry>
</group>
+ <group name="env">
+ <entry name="mltpath" type="Path">
+ <label>Mlt framework install path.</label>
+ <default></default>
+ </entry>
+
+ <entry name="rendererpath" type="Path">
+ <label>Mlt inigo renderer install path.</label>
+ <default></default>
+ </entry>
+ </group>
+
<group name="unmanaged">
<entry name="project_display_ratio" type="Double">
<label>Current project display ratio.</label>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE kpartgui SYSTEM "kpartgui.dtd">
-<gui name="kdenlive" version="5">
+<gui name="kdenlive" version="7">
<ToolBar name="extraToolBar" >
<text>Extra Toolbar</text>
<Action name="clear" />
<Menu name="file" >
<Action name="clear" />
</Menu>
+
+ <Menu name="project" ><text>Project</text>
+ <Action name="clear" />
+ </Menu>
+
+ <Menu name="settings" >
+ <Action name="manage_profiles" />
+ </Menu>
</MenuBar>
</gui>
\ No newline at end of file
#include <KConfigDialog>
#include <KXMLGUIFactory>
#include <KStatusBar>
+#include <kstandarddirs.h>
+#include <KUrlRequesterDialog>
#include <mlt++/Mlt.h>
#include "mainwindow.h"
#include "kdenlivesettings.h"
#include "ui_configmisc_ui.h"
+#include "ui_configenv_ui.h"
#include "initeffects.h"
+#include "ui_profiledialog_ui.h"
#define ID_STATUS_MSG 1
#define ID_EDITMODE_MSG 2
: KXmlGuiWindow(parent),
fileName(QString()), m_activeDocument(NULL), m_commandStack(NULL)
{
+ parseProfiles();
m_timelineArea = new KTabWidget(this);
m_timelineArea->setHoverCloseButton(true);
m_timelineArea->setTabReorderingEnabled(true);
actionCollection()->addAction("clear", clearAction);
/*connect(clearAction, SIGNAL(triggered(bool)),
textArea, SLOT(clear()));*/
+
+ KAction* profilesAction = new KAction(this);
+ profilesAction->setText(i18n("Manage Profiles"));
+ profilesAction->setIcon(KIcon("document-new"));
+ actionCollection()->addAction("manage_profiles", profilesAction);
+ connect(profilesAction, SIGNAL(triggered(bool)), this, SLOT(slotEditProfiles()));
KStandardAction::quit(kapp, SLOT(quit()),
actionCollection());
//connectDocument(trackView, doc);
}
+
+void MainWindow::parseProfiles()
+{
+ //kdDebug()<<" + + YOUR MLT INSTALL WAS FOUND IN: "<< MLT_PREFIX <<endl;
+ if (KdenliveSettings::mltpath().isEmpty()) {
+ KdenliveSettings::setMltpath(QString(MLT_PREFIX) + QString("/share/mlt/profiles/"));
+ }
+ if (KdenliveSettings::rendererpath().isEmpty())
+ {
+ KdenliveSettings::setRendererpath(KStandardDirs::findExe("inigo"));
+ }
+ QStringList profilesFilter;
+ profilesFilter<<"*";
+ QStringList profilesList = QDir(KdenliveSettings::mltpath()).entryList(profilesFilter, QDir::Files);
+
+ if (profilesList.isEmpty()) {
+ // Cannot find MLT path, try finding inigo
+ QString profilePath = KdenliveSettings::rendererpath();
+ if (!profilePath.isEmpty()) {
+ profilePath = profilePath.section('/', 0, -3);
+ KdenliveSettings::setMltpath(profilePath + "/share/mlt/profiles/");
+ QStringList profilesList = QDir(KdenliveSettings::mltpath()).entryList(profilesFilter, QDir::Files);
+ }
+
+ if (profilesList.isEmpty()) {
+ // Cannot find the MLT profiles, ask for location
+ KUrlRequesterDialog *getUrl = new KUrlRequesterDialog(KdenliveSettings::mltpath(), i18n("Cannot find your Mlt profiles, please give the path"), this);
+ getUrl->fileDialog()->setMode(KFile::Directory);
+ getUrl->exec();
+ KUrl mltPath = getUrl->selectedUrl ();
+ delete getUrl;
+ if (mltPath.isEmpty()) exit(1);
+ KdenliveSettings::setMltpath(mltPath.path());
+ QStringList profilesList = QDir(KdenliveSettings::mltpath()).entryList(profilesFilter, QDir::Files);
+ }
+ }
+
+ if (KdenliveSettings::rendererpath().isEmpty()) {
+ // Cannot find the MLT inigo renderer, ask for location
+ KUrlRequesterDialog *getUrl = new KUrlRequesterDialog(KdenliveSettings::mltpath(), i18n("Cannot find the inigo program required for rendering (part of Mlt)"), this);
+ getUrl->exec();
+ KUrl rendererPath = getUrl->selectedUrl();
+ delete getUrl;
+ if (rendererPath.isEmpty()) exit(1);
+ KdenliveSettings::setRendererpath(rendererPath.path());
+ }
+
+ kDebug()<<"RESULTING MLT PATH: "<<KdenliveSettings::mltpath();
+
+ // Parse MLT profiles to build a list of available video formats
+ if (profilesList.isEmpty()) parseProfiles();
+/*
+ uint i = 0;
+ for (; i < profilesList.count(); i++) {
+ KConfig confFile(profilePath + *profilesList.at(i), true);
+ QString name = confFile.readEntry("description");
+ int width = confFile.readNumEntry("width");
+ int height = confFile.readNumEntry("height");
+ int aspect_num = confFile.readNumEntry("sample_aspect_num");
+ int aspect_den = confFile.readNumEntry("sample_aspect_den");
+ int display_num = confFile.readNumEntry("display_aspect_num");
+ int display_den = confFile.readNumEntry("display_aspect_den");
+ int fps_num = confFile.readNumEntry("frame_rate_num");
+ int fps_den = confFile.readNumEntry("frame_rate_den");
+ int progressive = confFile.readNumEntry("progressive");
+ if (!name.isEmpty()) m_projectTemplates[name] = formatTemplate(width, height, fps_num, fps_den, aspect_num, aspect_den, display_num, display_den, progressive, *profilesList.at(i));
+ }*/
+ }
+
+
+void MainWindow::slotEditProfiles()
+{
+ QDialog *w = new QDialog;
+ Ui::ProfilesDialog_UI profilesDialog;
+ profilesDialog.setupUi(w);
+ w->exec();
+}
+
+
void MainWindow::slotUpdateMousePosition(int pos)
{
if (m_activeDocument)
QWidget *page1 = new QWidget;
Ui::ConfigMisc_UI* confWdg = new Ui::ConfigMisc_UI( );
confWdg->setupUi(page1);
-
dialog->addPage( page1, i18n("Misc"), "misc" );
+ QWidget *page2 = new QWidget;
+ Ui::ConfigEnv_UI* confWdg2 = new Ui::ConfigEnv_UI( );
+ confWdg2->setupUi(page2);
+ confWdg2->kcfg_mltpath->setMode(KFile::Directory);
+
+ //WARNING: the 2 lines below should not be necessary, but does not work without it...
+ confWdg2->kcfg_mltpath->setPath(KdenliveSettings::mltpath());
+ confWdg2->kcfg_rendererpath->setPath(KdenliveSettings::rendererpath());
+ dialog->addPage( page2, i18n("Environnment"), "env" );
//User edited the configuration - update your local copies of the
//configuration data
connect( dialog, SIGNAL(settingsChanged()), this, SLOT(updateConfiguration()) );
public:
MainWindow(QWidget *parent=0);
+ void parseProfiles();
+
protected:
virtual bool queryClose();
void slotSetClipDuration(int id, int duration);
void slotUpdateMousePosition(int pos);
void slotAddEffect(int effectType, const QString &effectName);
+ void slotEditProfiles();
};
#endif
--- /dev/null
+<ui version="4.0" >
+ <class>ConfigEnv_UI</class>
+ <widget class="QWidget" name="ConfigEnv_UI" >
+ <property name="geometry" >
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>354</width>
+ <height>182</height>
+ </rect>
+ </property>
+ <layout class="QGridLayout" name="gridLayout_2" >
+ <item row="0" column="0" >
+ <widget class="QGroupBox" name="groupBox" >
+ <property name="title" >
+ <string>Mlt environnement</string>
+ </property>
+ <layout class="QGridLayout" name="gridLayout" >
+ <item row="0" column="0" >
+ <widget class="QLabel" name="label" >
+ <property name="text" >
+ <string>Mlt profiles folder</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1" >
+ <widget class="KUrlRequester" name="kcfg_mltpath" />
+ </item>
+ <item row="1" column="0" >
+ <widget class="QLabel" name="label_2" >
+ <property name="text" >
+ <string>Inigo path</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1" >
+ <widget class="KUrlRequester" name="kcfg_rendererpath" />
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item row="1" column="0" >
+ <spacer name="verticalSpacer" >
+ <property name="orientation" >
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeHint" stdset="0" >
+ <size>
+ <width>20</width>
+ <height>56</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </widget>
+ <customwidgets>
+ <customwidget>
+ <class>KUrlRequester</class>
+ <extends>QFrame</extends>
+ <header>kurlrequester.h</header>
+ </customwidget>
+ </customwidgets>
+ <resources/>
+ <connections/>
+</ui>
--- /dev/null
+<ui version="4.0" >
+ <class>ProfilesDialog_UI</class>
+ <widget class="QDialog" name="ProfilesDialog_UI" >
+ <property name="geometry" >
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>356</width>
+ <height>339</height>
+ </rect>
+ </property>
+ <property name="windowTitle" >
+ <string>Dialog</string>
+ </property>
+ <layout class="QGridLayout" name="gridLayout_2" >
+ <item row="0" column="1" >
+ <widget class="KComboBox" name="kcombobox" />
+ </item>
+ <item row="0" column="0" >
+ <widget class="QLabel" name="label" >
+ <property name="text" >
+ <string>Profile</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="3" >
+ <widget class="KPushButton" name="kpushbutton" >
+ <property name="text" >
+ <string>Create</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="4" >
+ <widget class="KPushButton" name="kpushbutton_2" >
+ <property name="text" >
+ <string>Delete</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="0" colspan="2" >
+ <widget class="KPushButton" name="kpushbutton_3" >
+ <property name="text" >
+ <string>Use as default</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="3" colspan="2" >
+ <widget class="QDialogButtonBox" name="buttonBox" >
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="standardButtons" >
+ <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="2" >
+ <spacer name="horizontalSpacer" >
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0" >
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item row="1" column="0" colspan="5" >
+ <widget class="QGroupBox" name="groupBox" >
+ <property name="title" >
+ <string>Properties</string>
+ </property>
+ <layout class="QGridLayout" name="gridLayout" >
+ <item row="0" column="0" >
+ <widget class="QLabel" name="label_2" >
+ <property name="text" >
+ <string>Description</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1" colspan="3" >
+ <widget class="KLineEdit" name="klineedit" />
+ </item>
+ <item row="1" column="0" >
+ <widget class="QLabel" name="label_5" >
+ <property name="text" >
+ <string>Size</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1" >
+ <widget class="KIntSpinBox" name="kintspinbox_3" />
+ </item>
+ <item row="1" column="2" >
+ <widget class="QLabel" name="label_6" >
+ <property name="sizePolicy" >
+ <sizepolicy vsizetype="Preferred" hsizetype="Maximum" >
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text" >
+ <string>x</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="3" >
+ <widget class="KIntSpinBox" name="kintspinbox_4" />
+ </item>
+ <item row="2" column="0" >
+ <widget class="QLabel" name="label_3" >
+ <property name="text" >
+ <string>Frame rate</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="1" >
+ <widget class="KIntSpinBox" name="kintspinbox" />
+ </item>
+ <item row="2" column="2" >
+ <widget class="QLabel" name="label_4" >
+ <property name="sizePolicy" >
+ <sizepolicy vsizetype="Preferred" hsizetype="Maximum" >
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text" >
+ <string>/</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="3" >
+ <widget class="KIntSpinBox" name="kintspinbox_2" />
+ </item>
+ <item row="3" column="0" >
+ <widget class="QLabel" name="label_9" >
+ <property name="text" >
+ <string>Aspect ratio</string>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="1" >
+ <widget class="KIntSpinBox" name="kintspinbox_5" />
+ </item>
+ <item row="3" column="2" >
+ <widget class="QLabel" name="label_7" >
+ <property name="sizePolicy" >
+ <sizepolicy vsizetype="Preferred" hsizetype="Maximum" >
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text" >
+ <string>/</string>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="3" >
+ <widget class="KIntSpinBox" name="kintspinbox_6" />
+ </item>
+ <item row="4" column="0" >
+ <widget class="QLabel" name="label_10" >
+ <property name="text" >
+ <string>Display ratio</string>
+ </property>
+ </widget>
+ </item>
+ <item row="4" column="1" >
+ <widget class="KIntSpinBox" name="kintspinbox_7" />
+ </item>
+ <item row="4" column="2" >
+ <widget class="QLabel" name="label_8" >
+ <property name="sizePolicy" >
+ <sizepolicy vsizetype="Preferred" hsizetype="Maximum" >
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text" >
+ <string>/</string>
+ </property>
+ </widget>
+ </item>
+ <item row="4" column="3" >
+ <widget class="KIntSpinBox" name="kintspinbox_8" />
+ </item>
+ <item row="6" column="0" >
+ <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>
+ <item row="5" column="0" >
+ <widget class="QCheckBox" name="checkBox" >
+ <property name="text" >
+ <string>Progressive</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ </layout>
+ <zorder>kcombobox</zorder>
+ <zorder>label</zorder>
+ <zorder>kpushbutton</zorder>
+ <zorder>kpushbutton_2</zorder>
+ <zorder>kpushbutton_3</zorder>
+ <zorder>buttonBox</zorder>
+ <zorder>horizontalSpacer</zorder>
+ <zorder>groupBox</zorder>
+ </widget>
+ <customwidgets>
+ <customwidget>
+ <class>KComboBox</class>
+ <extends>QComboBox</extends>
+ <header>kcombobox.h</header>
+ </customwidget>
+ <customwidget>
+ <class>KIntSpinBox</class>
+ <extends>QSpinBox</extends>
+ <header>knuminput.h</header>
+ </customwidget>
+ <customwidget>
+ <class>KLineEdit</class>
+ <extends>QLineEdit</extends>
+ <header>klineedit.h</header>
+ </customwidget>
+ <customwidget>
+ <class>KPushButton</class>
+ <extends>QPushButton</extends>
+ <header>kpushbutton.h</header>
+ </customwidget>
+ </customwidgets>
+ <resources/>
+ <connections>
+ <connection>
+ <sender>buttonBox</sender>
+ <signal>accepted()</signal>
+ <receiver>ProfilesDialog_UI</receiver>
+ <slot>accept()</slot>
+ <hints>
+ <hint type="sourcelabel" >
+ <x>248</x>
+ <y>254</y>
+ </hint>
+ <hint type="destinationlabel" >
+ <x>157</x>
+ <y>274</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>buttonBox</sender>
+ <signal>rejected()</signal>
+ <receiver>ProfilesDialog_UI</receiver>
+ <slot>reject()</slot>
+ <hints>
+ <hint type="sourcelabel" >
+ <x>316</x>
+ <y>260</y>
+ </hint>
+ <hint type="destinationlabel" >
+ <x>286</x>
+ <y>274</y>
+ </hint>
+ </hints>
+ </connection>
+ </connections>
+</ui>