17 std::numeric_limits<size_t>::max();
22 : QComboBox(parent), reconstruction_manager_(reconstruction_manager) {
24 font.setPointSize(10);
29 if (view()->isVisible()) {
35 const int prev_idx = currentIndex() == -1 ? 0 : currentIndex();
39 addItem(
"Newest model");
42 for (
size_t i = 0; i < reconstruction_manager_->
Size(); ++i) {
43 const QString item = QString().asprintf(
44 "Model %d (%d images, %d points)",
static_cast<int>(i + 1),
49 QFontMetrics font_metrics(view()->font());
50 max_width = std::max(max_width, font_metrics.horizontalAdvance(item));
54 view()->setMinimumWidth(max_width);
56 if (reconstruction_manager_->
Size() == 0) {
59 setCurrentIndex(prev_idx);
66 if (reconstruction_manager_->
Size() == 0) {
69 if (currentIndex() == 0) {
72 return currentIndex() - 1;
78 if (reconstruction_manager_->
Size() == 0) {
84 setCurrentIndex(idx + 1);
const Reconstruction & Get(const size_t idx) const
size_t NumRegImages() const
size_t NumPoints3D() const
Generic file read and write utility for python interface.