/
Team8
/
kittycad
Обзор
Документация
Войти
/
Team8
/
kittycad
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
src/gui/tools/debug.cpp
75 строк
1 KB
levovix
add<wip>: part/assembly templates
07 янв 2026, 02:53
07 янв 2026, 02:53
b1870f8
Код
Авторство
О чём код?
#include "debug.h" #include <QVBoxLayout> #include <QLabel> #include <QPushButton> #include <QFormLayout> #include <gce_types.h> #include <gce_api.h> #include "data/document.h" // #include "data/assembly/assembly.h" // #include "data/sketch/constraints.h" // #include "data/assembly/constraints.h" // #include "data/sketch/contours.h" #include "data/templates/flange_coupling.h" #include "gui/document_view.h" // #include "gui/edits/point3_edit.h" // #include "gui/edits/float_edit.h" DebugToolPanel::DebugToolPanel(DebugTool* tool, QWidget* parent): ToolPanel(parent), m_tool(tool) { initUi(); } DebugToolPanel::~DebugToolPanel() {} void DebugToolPanel::initUi() { auto layout = ToolPanel::newFormLayout(this); layout->addRow(newStandardButtons(m_tool)); } DebugTool::DebugTool(QWidget* parent) : Tool(parent) {} DebugTool::~DebugTool() {} void DebugTool::activated(DocumentView *docView) { m_docView = docView; start(); assert(m_panel == nullptr); m_panel = new DebugToolPanel(this, (QWidget*)parent()); ((QWidget*)parent())->layout()->addWidget(m_panel); } void DebugTool::deactivated() { if (m_panel != nullptr) { delete m_panel; m_panel = nullptr; } Tool::deactivated(); } void DebugTool::start() { auto document = m_docView->document(); auto assemblyTemplate = create<data::FlangeCoupling>(document); document->addChild(assemblyTemplate); // document->update(); // print(document); } void DebugTool::finish() { deactivated(); }