Move widget tabs to the top instead of below. Add settings option to have...

Move widget tabs to the top instead of below. Add settings option to have vertical tabs instead of horizontal to save space
parent 1cf5935e
......@@ -830,7 +830,7 @@ void KdenliveSettingsDialog::updateSettings()
KdenliveSettings::setAudiodevicename(QString());
resetProfile = true;
}
value = m_configSdl.kcfg_audio_backend->itemData(m_configSdl.kcfg_audio_backend->currentIndex()).toString();
if (value != KdenliveSettings::audiobackend()) {
KdenliveSettings::setAudiobackend(value);
......@@ -866,7 +866,7 @@ void KdenliveSettingsDialog::updateSettings()
if (KdenliveSettings::shuttlebuttons() != maps)
KdenliveSettings::setShuttlebuttons(maps);
#endif
bool restart = false;
if (m_configSdl.kcfg_gpu_accel->isChecked() != KdenliveSettings::gpu_accel()) {
// GPU setting was changed, we need to restart Kdenlive or everything will be corrupted
......@@ -882,6 +882,7 @@ void KdenliveSettingsDialog::updateSettings()
//KConfigDialog::updateSettings();
if (resetProfile) emit doResetProfile();
if (restart) emit restartKdenlive();
emit checkTabPosition();
}
void KdenliveSettingsDialog::slotUpdateDisplay()
......
......@@ -126,6 +126,7 @@ signals:
void updateFullScreenGrab();
/** @brief A settings changed that requires a Kdenlive restart, trigger it */
void restartKdenlive();
void checkTabPosition();
};
......
......@@ -372,7 +372,7 @@ ParameterContainer::ParameterContainer(const QDomElement &effect, const ItemInfo
connect(pl, SIGNAL(parameterChanged()), this, SLOT(slotCollectAllParameters()));
} else if (type == QLatin1String("geometry")) {
m_acceptDrops = true;
if (true /*KdenliveSettings::on_monitor_effects()*/) {
if (true) {
m_monitorEffectScene = MonitorSceneGeometry;
bool useOffset = false;
if (effect.tagName() == QLatin1String("effect") && effect.hasAttribute(QStringLiteral("kdenlive:sync_in_out")) && effect.attribute(QStringLiteral("kdenlive:sync_in_out")).toInt() == 0) {
......@@ -906,12 +906,7 @@ void ParameterContainer::updateTimecodeFormat()
QString paramName = na.isNull() ? pa.attributes().namedItem(QStringLiteral("name")).nodeValue() : i18n(na.text().toUtf8().data());
if (type == QLatin1String("geometry")) {
if (KdenliveSettings::on_monitor_effects()) {
if (m_geometryWidget) m_geometryWidget->updateTimecodeFormat();
} else {
Geometryval *geom = static_cast<Geometryval*>(m_valueItems[paramName+"geometry"]);
geom->updateTimecodeFormat();
}
if (m_geometryWidget) m_geometryWidget->updateTimecodeFormat();
break;
} else if (type == QLatin1String("position")) {
PositionEdit *posi = static_cast<PositionEdit*>(m_valueItems[paramName+"position"]);
......@@ -1009,12 +1004,7 @@ void ParameterContainer::slotCollectAllParameters()
ComplexParameter *complex = static_cast<ComplexParameter*>(m_valueItems.value(paramName));
if (complex) namenode.item(i) = complex->getParamDesc();
} else if (type == QLatin1String("geometry")) {
/*if (KdenliveSettings::on_monitor_effects())*/ {
if (m_geometryWidget) namenode.item(i).toElement().setAttribute(QStringLiteral("value"), m_geometryWidget->getValue());
}/* else {
Geometryval *geom = static_cast<Geometryval*>(m_valueItems.value(paramName));
namenode.item(i).toElement().setAttribute("value", geom->getValue());
}*/
if (m_geometryWidget) namenode.item(i).toElement().setAttribute(QStringLiteral("value"), m_geometryWidget->getValue());
} else if (type == QLatin1String("addedgeometry")) {
if (m_geometryWidget) namenode.item(i).toElement().setAttribute(QStringLiteral("value"), m_geometryWidget->getExtraValue(namenode.item(i).toElement().attribute(QStringLiteral("name"))));
} else if (type == QLatin1String("position")) {
......
......@@ -24,6 +24,11 @@
<default>false</default>
</entry>
<entry name="verticaltabs" type="Bool">
<label>Use vertical tabs for stacked widgets.</label>
<default>false</default>
</entry>
<entry name="crashrecovery" type="Bool">
<label>Auto save document in backup file on each change.</label>
<default>true</default>
......@@ -88,12 +93,7 @@
<label>Default title clip duration.</label>
<default>00:00:05:00</default>
</entry>
<entry name="on_monitor_effects" type="Bool">
<label>Use on-monitor effects.</label>
<default>true</default>
</entry>
<entry name="disable_effect_parameters" type="Bool">
<label>Disable parameters when the effect is disabled.</label>
<default>true</default>
......
......@@ -239,7 +239,8 @@ MainWindow::MainWindow(const QString &MltPath, const QUrl &Url, const QString &
connect(m_shortcutRemoveFocus, SIGNAL(activated()), this, SLOT(slotRemoveFocus()));
/// Add Widgets
setDockNestingEnabled(true);
setDockOptions(QMainWindow::AllowNestedDocks | QMainWindow::AllowTabbedDocks);
setTabPosition(Qt::AllDockWidgetAreas, KdenliveSettings::verticaltabs() ? QTabWidget::East : QTabWidget::North);
QToolBar *timelineTb = new QToolBar(this);//pCore->window()->toolBar("timelineToolBar");
QWidget *ctn = new QWidget(this);
QVBoxLayout *ctnLay = new QVBoxLayout;
......@@ -325,7 +326,6 @@ MainWindow::MainWindow(const QString &MltPath, const QUrl &Url, const QString &
m_transitionListDock = addDock(i18n("Transitions"), QStringLiteral("transition_list"), m_transitionList);
setupActions();
// Add monitors here to keep them at the right of the window
m_clipMonitorDock = addDock(i18n("Clip Monitor"), QStringLiteral("clip_monitor"), m_clipMonitor);
m_projectMonitorDock = addDock(i18n("Project Monitor"), QStringLiteral("project_monitor"), m_projectMonitor);
......@@ -1837,6 +1837,7 @@ void MainWindow::slotPreferences(int page, int option)
connect(dialog, SIGNAL(settingsChanged(QString)), this, SLOT(updateConfiguration()));
connect(dialog, SIGNAL(settingsChanged(QString)), SIGNAL(configurationChanged()));
connect(dialog, SIGNAL(doResetProfile()), pCore->projectManager(), SLOT(slotResetProfiles()));
connect(dialog, SIGNAL(checkTabPosition()), this, SLOT(slotCheckTabPosition()));
connect(dialog, SIGNAL(restartKdenlive()), this, SLOT(slotRestart()));
connect(dialog, SIGNAL(updateLibraryFolder()), pCore, SIGNAL(updateLibraryPath()));
......@@ -1850,6 +1851,19 @@ void MainWindow::slotPreferences(int page, int option)
}
}
void MainWindow::slotCheckTabPosition()
{
QTabWidget::TabPosition pos = tabPosition(Qt::LeftDockWidgetArea);
bool reload = false;
if (KdenliveSettings::verticaltabs() && pos != QTabWidget::East) {
reload = true;
} else if (!KdenliveSettings::verticaltabs() && pos != QTabWidget::North) {
reload = true;
}
if (reload)
setTabPosition(Qt::AllDockWidgetAreas, KdenliveSettings::verticaltabs() ? QTabWidget::East : QTabWidget::North);
}
void MainWindow::slotRestart()
{
m_exitCode = EXIT_RESTART;
......
......@@ -442,6 +442,7 @@ private slots:
void removeSplitOverlay();
/** @brief Create a generator's setup dialog */
void buildGenerator(QAction *action);
void slotCheckTabPosition();
signals:
Q_SCRIPTABLE void abortRenderJob(const QString &url);
......
......@@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>411</width>
<height>533</height>
<width>587</width>
<height>616</height>
</rect>
</property>
<layout class="QGridLayout" name="gridLayout_4">
......@@ -17,13 +17,6 @@
<property name="topMargin">
<number>0</number>
</property>
<item row="3" column="0" colspan="2">
<widget class="QCheckBox" name="kcfg_usekuiserver">
<property name="text">
<string>Use KDE job tracking for render jobs</string>
</property>
</widget>
</item>
<item row="1" column="0" colspan="2">
<widget class="QCheckBox" name="kcfg_checkfirstprojectclip">
<property name="text">
......@@ -31,66 +24,37 @@
</property>
</widget>
</item>
<item row="2" column="0" colspan="3">
<widget class="QCheckBox" name="kcfg_crashrecovery">
<property name="text">
<string>Crash recovery (automatic backup)</string>
</property>
</widget>
</item>
<item row="7" column="0">
<widget class="QCheckBox" name="kcfg_automultistreams">
<property name="text">
<string>Automatically import all streams in multi stream clips</string>
<item row="14" column="0" colspan="3">
<spacer>
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
</widget>
</item>
<item row="6" column="0">
<widget class="QCheckBox" name="kcfg_disable_effect_parameters">
<property name="text">
<string>Disable parameters when the effect is disabled</string>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</widget>
</spacer>
</item>
<item row="8" column="0">
<widget class="QCheckBox" name="kcfg_bypasscodeccheck">
<item row="0" column="0" colspan="3">
<widget class="QCheckBox" name="kcfg_openlastproject">
<property name="text">
<string>Bypass codec verification</string>
<string>Open last project on startup</string>
</property>
</widget>
</item>
<item row="12" column="0">
<widget class="QCheckBox" name="kcfg_autoimagesequence">
<item row="13" column="0">
<widget class="QCheckBox" name="kcfg_autoimagetransparency">
<property name="text">
<string>Automatically import image sequences</string>
<string>Transparent background for imported images</string>
</property>
</widget>
</item>
<item row="5" column="0">
<widget class="QCheckBox" name="kcfg_projectloading_avformatnovalidate">
<property name="text">
<string>Do not validate the video files when loading a project (faster)</string>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QCheckBox" name="kcfg_on_monitor_effects">
<property name="text">
<string>Use on-monitor effects</string>
</property>
</widget>
</item>
<item row="9" column="0">
<widget class="QCheckBox" name="kcfg_use_exiftool">
<property name="text">
<string>Get clip metadata with exiftool</string>
</property>
</widget>
</item>
<item row="0" column="0" colspan="3">
<widget class="QCheckBox" name="kcfg_openlastproject">
<widget class="QCheckBox" name="kcfg_disable_effect_parameters">
<property name="text">
<string>Open last project on startup</string>
<string>Disable parameters when the effect is disabled</string>
</property>
</widget>
</item>
......@@ -143,30 +107,66 @@
</layout>
</widget>
</item>
<item row="13" column="0">
<widget class="QCheckBox" name="kcfg_autoimagetransparency">
<item row="3" column="0" colspan="2">
<widget class="QCheckBox" name="kcfg_usekuiserver">
<property name="text">
<string>Transparent background for imported images</string>
<string>Use KDE job tracking for render jobs</string>
</property>
</widget>
</item>
<item row="14" column="0" colspan="3">
<spacer>
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
<item row="9" column="0">
<widget class="QCheckBox" name="kcfg_use_magicLantern">
<property name="text">
<string>Get clip metadata created by Magic Lantern</string>
</property>
</spacer>
</widget>
</item>
<item row="10" column="0">
<widget class="QCheckBox" name="kcfg_use_magicLantern">
<widget class="QCheckBox" name="kcfg_verticaltabs">
<property name="text">
<string>Get clip metadata created by Magic Lantern</string>
<string>Vertical tab bars in interface</string>
</property>
</widget>
</item>
<item row="8" column="0">
<widget class="QCheckBox" name="kcfg_use_exiftool">
<property name="text">
<string>Get clip metadata with exiftool</string>
</property>
</widget>
</item>
<item row="2" column="0" colspan="3">
<widget class="QCheckBox" name="kcfg_crashrecovery">
<property name="text">
<string>Crash recovery (automatic backup)</string>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QCheckBox" name="kcfg_projectloading_avformatnovalidate">
<property name="text">
<string>Do not validate the video files when loading a project (faster)</string>
</property>
</widget>
</item>
<item row="12" column="0">
<widget class="QCheckBox" name="kcfg_autoimagesequence">
<property name="text">
<string>Automatically import image sequences</string>
</property>
</widget>
</item>
<item row="7" column="0">
<widget class="QCheckBox" name="kcfg_bypasscodeccheck">
<property name="text">
<string>Bypass codec verification</string>
</property>
</widget>
</item>
<item row="6" column="0">
<widget class="QCheckBox" name="kcfg_automultistreams">
<property name="text">
<string>Automatically import all streams in multi stream clips</string>
</property>
</widget>
</item>
......
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