MCPcopy Create free account
hub / github.com/BehaviorTree/Groot / SidepanelEditor

Method SidepanelEditor

bt_editor/sidepanel_editor.cpp:17–42  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

15#include <QSettings>
16
17SidepanelEditor::SidepanelEditor(QtNodes::DataModelRegistry *registry,
18 NodeModels &tree_nodes_model,
19 QWidget *parent) :
20 QFrame(parent),
21 ui(new Ui::SidepanelEditor),
22 _tree_nodes_model(tree_nodes_model),
23 _model_registry(registry)
24{
25 ui->setupUi(this);
26 ui->paramsFrame->setHidden(true);
27 ui->paletteTreeWidget->setContextMenuPolicy(Qt::CustomContextMenu);
28
29 connect( ui->paletteTreeWidget, &QWidget::customContextMenuRequested,
30 this, &SidepanelEditor::onContextMenu);
31
32 auto table_header = ui->portsTableWidget->horizontalHeader();
33
34 table_header->setSectionResizeMode(0, QHeaderView::ResizeToContents);
35 table_header->setSectionResizeMode(1, QHeaderView::Interactive);
36 table_header->setSectionResizeMode(2, QHeaderView::Stretch);
37
38 ui->buttonLock->setChecked(false);
39
40 QSettings settings;
41 table_header->restoreState( settings.value("SidepanelEditor/header").toByteArray() );
42}
43
44SidepanelEditor::~SidepanelEditor()
45{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected