/*** 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 . ***/ #include "tool.h" #include "core.h" #include "widget/toolbar/toolbar.h" namespace olive { ToolPanel::ToolPanel() : PanelWidget(QStringLiteral("ToolPanel")) { Toolbar *t = new Toolbar(this); t->set_tool(Core::instance()->tool()); t->set_snapping(Core::instance()->snapping()); set_widget_with_padding(t); connect(t, &Toolbar::tool_changed, Core::instance(), &Core::set_tool); connect(Core::instance(), &Core::tool_changed, t, &Toolbar::set_tool); connect(t, &Toolbar::snapping_changed, Core::instance(), &Core::set_snapping); connect(Core::instance(), &Core::snapping_changed, t, &Toolbar::set_snapping); connect(t, &Toolbar::selected_transition_changed, Core::instance(), &Core::set_selected_transition_object); retranslate(); } void ToolPanel::retranslate() { set_title(tr("Tools")); } }