parameterplotter.cpp
profilesdialog.cpp
projectsettings.cpp
+ kdenlivesettingsdialog.cpp
)
kde4_add_kcfg_files(kdenlive_SRCS GENERATE_MOC kdenlivesettings.kcfgc )
--- /dev/null
+/***************************************************************************
+ * Copyright (C) 2008 by Jean-Baptiste Mardelle (jb@kdenlive.org) *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA *
+ ***************************************************************************/
+
+#include <QDir>
+
+#include <KStandardDirs>
+#include <KDebug>
+
+#include "profilesdialog.h"
+#include "kdenlivesettings.h"
+#include "kdenlivesettingsdialog.h"
+
+KdenliveSettingsDialog::KdenliveSettingsDialog(QWidget * parent): KConfigDialog(parent, "settings", KdenliveSettings::self())
+{
+
+ QWidget *page1 = new QWidget;
+ m_configMisc = new Ui::ConfigMisc_UI( );
+ m_configMisc->setupUi(page1);
+ addPage( page1, i18n("Misc"), "misc" );
+
+ QWidget *page2 = new QWidget;
+ m_configEnv = new Ui::ConfigEnv_UI( );
+ m_configEnv->setupUi(page2);
+ m_configEnv->kcfg_mltpath->setMode(KFile::Directory);
+
+ //WARNING: the 2 lines below should not be necessary, but does not work without it...
+ m_configEnv->kcfg_mltpath->setPath(KdenliveSettings::mltpath());
+ m_configEnv->kcfg_rendererpath->setPath(KdenliveSettings::rendererpath());
+ addPage( page2, i18n("Environnement"), "env" );
+
+ QStringList profilesNames = ProfilesDialog::getProfileNames();
+ m_configMisc->profiles_list->addItems(profilesNames);
+
+ //User edited the configuration - update your local copies of the
+ //configuration data
+
+ slotUpdateDisplay();
+ connect(m_configMisc->profiles_list, SIGNAL(currentIndexChanged( int )), this, SLOT(slotUpdateDisplay()));
+}
+
+
+void KdenliveSettingsDialog::slotUpdateDisplay()
+{
+ QString currentProfile = m_configMisc->profiles_list->currentText();
+ QMap< QString, QString > values = ProfilesDialog::getSettingsForProfile(currentProfile);
+ m_configMisc->p_size->setText(values.value("width") + "x" + values.value("height"));
+ m_configMisc->p_fps->setText(values.value("frame_rate_num") + "/" + values.value("frame_rate_den"));
+ m_configMisc->p_aspect->setText(values.value("sample_aspect_num") + "/" + values.value("sample_aspect_den"));
+ m_configMisc->p_display->setText(values.value("display_aspect_num") + "/" + values.value("display_aspect_den"));
+ if (values.value("progressive").toInt() == 0) m_configMisc->p_progressive->setText(i18n("Interlaced"));
+ else m_configMisc->p_progressive->setText(i18n("Progressive"));
+}
+
+
+#include "kdenlivesettingsdialog.moc"
+
+
--- /dev/null
+/***************************************************************************
+ * Copyright (C) 2008 by Jean-Baptiste Mardelle (jb@kdenlive.org) *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA *
+ ***************************************************************************/
+
+
+#ifndef KDENLIVESETTINGSDIALOG_H
+#define KDENLIVESETTINGSDIALOG_H
+
+#include <QDialog>
+
+#include <KConfigDialog>
+
+#include "ui_configmisc_ui.h"
+#include "ui_configenv_ui.h"
+
+class KdenliveSettingsDialog : public KConfigDialog
+{
+ Q_OBJECT
+
+ public:
+ KdenliveSettingsDialog(QWidget * parent = 0);
+
+ private slots:
+ void slotUpdateDisplay();
+
+ private:
+ Ui::ConfigEnv_UI* m_configEnv;
+ Ui::ConfigMisc_UI* m_configMisc;
+ QStringList m_mltProfilesList;
+ QStringList m_customProfilesList;
+ bool m_isCustomProfile;
+};
+
+
+#endif
+
#include "mainwindow.h"
#include "kdenlivesettings.h"
-#include "ui_configmisc_ui.h"
-#include "ui_configenv_ui.h"
+#include "kdenlivesettingsdialog.h"
#include "initeffects.h"
#include "profilesdialog.h"
#include "projectsettings.h"
// KConfigDialog didn't find an instance of this dialog, so lets
// create it :
- KConfigDialog* dialog = new KConfigDialog(this, "settings",
- KdenliveSettings::self());
-
- 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
+ KdenliveSettingsDialog* dialog = new KdenliveSettingsDialog(this);
connect( dialog, SIGNAL(settingsChanged()), this, SLOT(updateConfiguration()) );
dialog->show();
<rect>
<x>0</x>
<y>0</y>
- <width>316</width>
- <height>117</height>
+ <width>369</width>
+ <height>241</height>
</rect>
</property>
- <property name="windowTitle" >
- <string>Form</string>
- </property>
- <layout class="QGridLayout" >
+ <layout class="QGridLayout" name="gridLayout_4" >
<item row="0" column="0" >
<widget class="QGroupBox" name="groupBox" >
<property name="title" >
- <string>Default durations</string>
+ <string>Default Durations</string>
</property>
- <layout class="QGridLayout" >
+ <layout class="QGridLayout" name="gridLayout_3" >
<item row="0" column="0" >
<widget class="QLabel" name="label" >
<property name="text" >
</property>
</widget>
</item>
- <item row="1" column="0" >
+ <item row="0" column="2" >
<widget class="QLabel" name="label_2" >
<property name="text" >
<string>Image clips</string>
</property>
</widget>
</item>
- <item row="1" column="1" >
+ <item row="0" column="3" >
<widget class="KRestrictedLine" name="kcfg_image_duration" >
<property name="inputMask" >
<string>99:99:99:99; </string>
</widget>
</item>
<item row="1" column="0" >
+ <widget class="QGroupBox" name="properties" >
+ <property name="title" >
+ <string>Default Profile</string>
+ </property>
+ <layout class="QGridLayout" name="gridLayout_2" >
+ <item row="0" column="0" >
+ <widget class="QLabel" name="label_3" >
+ <property name="text" >
+ <string>Profile</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1" >
+ <widget class="KComboBox" name="profiles_list" />
+ </item>
+ <item row="1" column="0" colspan="2" >
+ <layout class="QGridLayout" name="gridLayout" >
+ <item row="0" column="0" >
+ <widget class="QLabel" name="label_5" >
+ <property name="text" >
+ <string>Size:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1" >
+ <widget class="QLabel" name="p_size" >
+ <property name="text" >
+ <string>720x576</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="2" >
+ <widget class="QLabel" name="label_4" >
+ <property name="text" >
+ <string>Frame rate:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="3" >
+ <widget class="QLabel" name="p_fps" >
+ <property name="text" >
+ <string>25/1</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0" >
+ <widget class="QLabel" name="label_9" >
+ <property name="text" >
+ <string>Aspect ratio:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1" >
+ <widget class="QLabel" name="p_aspect" >
+ <property name="text" >
+ <string>59/54</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="2" >
+ <widget class="QLabel" name="label_10" >
+ <property name="text" >
+ <string>Display ratio:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="3" >
+ <widget class="QLabel" name="p_display" >
+ <property name="text" >
+ <string>4/3</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item row="2" column="0" colspan="2" >
+ <widget class="QLabel" name="p_progressive" >
+ <property name="text" >
+ <string>Interlaced</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item row="2" column="0" >
<spacer>
<property name="orientation" >
<enum>Qt::Vertical</enum>
</property>
- <property name="sizeHint" >
+ <property name="sizeHint" stdset="0" >
<size>
<width>20</width>
<height>40</height>
</layout>
</widget>
<customwidgets>
+ <customwidget>
+ <class>KComboBox</class>
+ <extends>QComboBox</extends>
+ <header>kcombobox.h</header>
+ </customwidget>
<customwidget>
<class>KRestrictedLine</class>
<extends>KLineEdit</extends>