MCPcopy Create free account
hub / github.com/colmap/colmap / InitializeTable

Method InitializeTable

src/colmap/ui/database_management_widget.cc:51–75  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

49}
50
51void TwoViewInfoTab::InitializeTable(const QStringList& table_header) {
52 QGridLayout* grid = new QGridLayout(this);
53
54 info_label_ = new QLabel(this);
55 grid->addWidget(info_label_, 0, 0);
56
57 QPushButton* show_button = new QPushButton(tr("Show matches"), this);
58 connect(
59 show_button, &QPushButton::released, this, &TwoViewInfoTab::ShowMatches);
60 grid->addWidget(show_button, 0, 1, Qt::AlignRight);
61
62 table_widget_ = new QTableWidget(this);
63 table_widget_->setColumnCount(table_header.size());
64 table_widget_->setHorizontalHeaderLabels(table_header);
65
66 table_widget_->setShowGrid(true);
67 table_widget_->setSelectionBehavior(QAbstractItemView::SelectRows);
68 table_widget_->setSelectionMode(QAbstractItemView::SingleSelection);
69 table_widget_->setEditTriggers(QAbstractItemView::NoEditTriggers);
70 table_widget_->horizontalHeader()->setStretchLastSection(true);
71 table_widget_->verticalHeader()->setVisible(false);
72 table_widget_->verticalHeader()->setDefaultSectionSize(20);
73
74 grid->addWidget(table_widget_, 1, 0, 1, 2);
75}
76
77void TwoViewInfoTab::ShowMatches() {
78 QItemSelectionModel* select = table_widget_->selectionModel();

Callers

nothing calls this directly

Calls 1

sizeMethod · 0.80

Tested by

no test coverage detected