refactor: cut engine-to-UI include violations ahead of the liboakengine split
- slider DisplayType enums sink to node/sliderdisplaytype.h (canonical engine home); FloatSlider/RationalSlider alias them for compatibility - DropWithoutSequenceBehavior enum sinks to common/dropworkflowbehavior.h - Config errors now go through a registered ErrorHandler hook instead of QMessageBox with a MainWindow parent; the style default no longer depends on the UI style manager - MainWindowLayoutInfo moves to node/project/serializer/ and its panel dependency is reduced to a plain std::map alias (PanelLayoutInfo), breaking the engine -> PanelWidget -> KDDockWidgets chain - ProjectImportErrorDialog moves from task/ to dialog/projectimport/ - remove confirmed-redundant UI includes and give project.h/import.h/ project.cpp the direct includes they were borrowing transitively - project.h includes folder/sequence headers directly (it used both types in its own API all along)
This commit is contained in:
@@ -30,6 +30,7 @@ if (OpenTimelineIO_FOUND)
|
||||
endif ()
|
||||
add_subdirectory(preferences)
|
||||
add_subdirectory(progress)
|
||||
add_subdirectory(projectimport)
|
||||
add_subdirectory(proxy)
|
||||
add_subdirectory(projectproperties)
|
||||
add_subdirectory(rendercancel)
|
||||
|
||||
@@ -49,7 +49,7 @@ ImageSection::ImageSection(QWidget *parent)
|
||||
frame_slider_ = new RationalSlider();
|
||||
frame_slider_->set_minimum(0);
|
||||
frame_slider_->set_value(0);
|
||||
frame_slider_->set_display_type(RationalSlider::k_time);
|
||||
frame_slider_->set_display_type(slider::k_time);
|
||||
connect(frame_slider_, &RationalSlider::value_changed, this,
|
||||
&ImageSection::time_changed);
|
||||
layout->addWidget(frame_slider_, row, 1);
|
||||
|
||||
@@ -47,7 +47,7 @@ KeyframePropertiesDialog::KeyframePropertiesDialog(
|
||||
layout->addWidget(new QLabel("Time:"), row, 0);
|
||||
|
||||
time_slider_ = new RationalSlider();
|
||||
time_slider_->set_display_type(RationalSlider::k_time);
|
||||
time_slider_->set_display_type(slider::k_time);
|
||||
time_slider_->set_timebase(timebase_);
|
||||
layout->addWidget(time_slider_, row, 1);
|
||||
|
||||
|
||||
@@ -65,10 +65,10 @@ MarkerPropertiesDialog::MarkerPropertiesDialog(
|
||||
|
||||
if (markers.size() == 1) {
|
||||
in_slider_->set_value(markers.front()->time().in());
|
||||
in_slider_->set_display_type(RationalSlider::k_time);
|
||||
in_slider_->set_display_type(slider::k_time);
|
||||
in_slider_->set_timebase(timebase);
|
||||
out_slider_->set_value(markers.front()->time().out());
|
||||
out_slider_->set_display_type(RationalSlider::k_time);
|
||||
out_slider_->set_display_type(slider::k_time);
|
||||
out_slider_->set_timebase(timebase);
|
||||
} else {
|
||||
// Markers cannot be on the same time, so we disable setting time if multiple markers are selected
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
# Olive - Non-Linear Video Editor
|
||||
# Copyright (C) 2022 Olive Team
|
||||
# Modifications Copyright (C) 2026 Oak Team
|
||||
#
|
||||
# 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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
set(OLIVE_SOURCES
|
||||
${OLIVE_SOURCES}
|
||||
dialog/projectimport/projectimporterrordialog.cpp
|
||||
dialog/projectimport/projectimporterrordialog.h
|
||||
PARENT_SCOPE
|
||||
)
|
||||
@@ -0,0 +1,58 @@
|
||||
/***
|
||||
|
||||
Olive - Non-Linear Video Editor
|
||||
Copyright (C) 2022 Olive Team
|
||||
Modifications Copyright (C) 2025 mikesolar
|
||||
|
||||
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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
***/
|
||||
|
||||
#include "projectimporterrordialog.h"
|
||||
|
||||
#include <QDialogButtonBox>
|
||||
#include <QLabel>
|
||||
#include <QListWidget>
|
||||
#include <QVBoxLayout>
|
||||
|
||||
namespace olive
|
||||
{
|
||||
|
||||
ProjectImportErrorDialog::ProjectImportErrorDialog(const QStringList &filenames,
|
||||
QWidget *parent)
|
||||
: QDialog(parent)
|
||||
{
|
||||
QVBoxLayout *layout = new QVBoxLayout(this);
|
||||
|
||||
setWindowTitle(tr("Import Error"));
|
||||
|
||||
layout->addWidget(new QLabel(tr(
|
||||
"The following files failed to import. Oak Video Editor likely does not "
|
||||
"support their formats.")));
|
||||
|
||||
QListWidget *list_widget = new QListWidget();
|
||||
foreach (const QString &s, filenames) {
|
||||
list_widget->addItem(s);
|
||||
}
|
||||
layout->addWidget(list_widget);
|
||||
|
||||
QDialogButtonBox *buttons = new QDialogButtonBox();
|
||||
buttons->setStandardButtons(QDialogButtonBox::Ok);
|
||||
buttons->setCenterButtons(true);
|
||||
connect(buttons, &QDialogButtonBox::accepted, this,
|
||||
&ProjectImportErrorDialog::accept);
|
||||
layout->addWidget(buttons);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
/***
|
||||
|
||||
Olive - Non-Linear Video Editor
|
||||
Copyright (C) 2022 Olive Team
|
||||
Modifications Copyright (C) 2025 mikesolar
|
||||
|
||||
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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
***/
|
||||
|
||||
#ifndef OAK_PROJECTIMPORTERRORDIALOG_H
|
||||
#define OAK_PROJECTIMPORTERRORDIALOG_H
|
||||
|
||||
#include <QDialog>
|
||||
|
||||
#include "common/define.h"
|
||||
|
||||
namespace olive
|
||||
{
|
||||
|
||||
class ProjectImportErrorDialog : public QDialog {
|
||||
Q_OBJECT
|
||||
public:
|
||||
ProjectImportErrorDialog(const QStringList &filenames,
|
||||
QWidget *parent = nullptr);
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif // OAK_PROJECTIMPORTERRORDIALOG_H
|
||||
@@ -57,7 +57,7 @@ SpeedDurationDialog::SpeedDurationDialog(const QVector<ClipBlock *> &clips,
|
||||
speed_layout->addWidget(new QLabel(tr("Speed:")), row, 0);
|
||||
|
||||
speed_slider_ = new FloatSlider();
|
||||
speed_slider_->set_display_type(FloatSlider::k_percentage);
|
||||
speed_slider_->set_display_type(slider::k_percentage);
|
||||
connect(speed_slider_, &FloatSlider::value_changed, this,
|
||||
&SpeedDurationDialog::speed_changed);
|
||||
speed_layout->addWidget(speed_slider_, row, 1);
|
||||
@@ -68,7 +68,7 @@ SpeedDurationDialog::SpeedDurationDialog(const QVector<ClipBlock *> &clips,
|
||||
|
||||
dur_slider_ = new RationalSlider();
|
||||
dur_slider_->set_timebase(timebase);
|
||||
dur_slider_->set_display_type(RationalSlider::k_time);
|
||||
dur_slider_->set_display_type(slider::k_time);
|
||||
connect(dur_slider_, &RationalSlider::value_changed, this,
|
||||
&SpeedDurationDialog::duration_changed);
|
||||
speed_layout->addWidget(dur_slider_, row, 1);
|
||||
|
||||
Reference in New Issue
Block a user