m_configMisc.kcfg_profiles_list->addItem(i.key(), i.value());
}
+ checkProfile();
+
+ slotUpdateDisplay();
+ m_audioDevice = KdenliveSettings::audio_device();
+ initDevices();
+ connect(m_configMisc.kcfg_profiles_list, SIGNAL(currentIndexChanged(int)), this, SLOT(slotUpdateDisplay()));
+}
+
+KdenliveSettingsDialog::~KdenliveSettingsDialog() {}
+
+
+void KdenliveSettingsDialog::checkProfile() {
if (!KdenliveSettings::default_profile().isEmpty()) {
for (int i = 0; i < m_configMisc.kcfg_profiles_list->count(); i++) {
if (m_configMisc.kcfg_profiles_list->itemData(i).toString() == KdenliveSettings::default_profile()) {
}
}
}
-
- slotUpdateDisplay();
- m_audioDevice = KdenliveSettings::audio_device();
- initDevices();
- connect(m_configMisc.kcfg_profiles_list, SIGNAL(currentIndexChanged(int)), this, SLOT(slotUpdateDisplay()));
}
-KdenliveSettingsDialog::~KdenliveSettingsDialog() {}
-
void KdenliveSettingsDialog::initDevices() {
// Fill audio drivers
m_configSdl.kcfg_audio_driver->addItem(i18n("Automatic"), QString());
KdenliveSettingsDialog(QWidget * parent = 0);
~KdenliveSettingsDialog();
void showPage(int page, int option);
-
+ void checkProfile();
bool hasChanged();
bool isDefault();
void updateSettings();
// cached, in which case you want to display the cached dialog
// instead of creating another one
if (KConfigDialog::showDialog("settings")) {
- if (page != -1) static_cast <KdenliveSettingsDialog*>(KConfigDialog::exists("settings"))->showPage(page, option);
+ KdenliveSettingsDialog* d = static_cast <KdenliveSettingsDialog*>(KConfigDialog::exists("settings"));
+ if (page != -1) d->showPage(page, option);
+ d->checkProfile();
return;
}
connect(m_view.button_create, SIGNAL(clicked()), this, SLOT(slotCreateProfile()));
connect(m_view.button_save, SIGNAL(clicked()), this, SLOT(slotSaveProfile()));
connect(m_view.button_delete, SIGNAL(clicked()), this, SLOT(slotDeleteProfile()));
+ connect(m_view.button_default, SIGNAL(clicked()), this, SLOT(slotSetDefaultProfile()));
}
void ProfilesDialog::fillList(const QString selectedProfile) {
m_view.properties->setEnabled(true);
}
+void ProfilesDialog::slotSetDefaultProfile() {
+ int ix = m_view.profiles_list->currentIndex();
+ QString path = m_view.profiles_list->itemData(ix).toString();
+ if (!path.isEmpty()) KdenliveSettings::setDefault_profile(path);
+}
+
void ProfilesDialog::slotSaveProfile() {
const QString profileDesc = m_view.description->text();
int ix = m_view.profiles_list->findText(profileDesc);
void slotCreateProfile();
void slotSaveProfile();
void slotDeleteProfile();
+ void slotSetDefaultProfile();
private:
Ui::ProfilesDialog_UI m_view;