ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
project_widget.h
Go to the documentation of this file.
1 // ----------------------------------------------------------------------------
2 // - CloudViewer: www.cloudViewer.org -
3 // ----------------------------------------------------------------------------
4 // Copyright (c) 2018-2024 www.cloudViewer.org
5 // SPDX-License-Identifier: MIT
6 // ----------------------------------------------------------------------------
7 
8 #pragma once
9 
10 #include <QtCore>
11 #include <QtWidgets>
12 
13 #include "util/misc.h"
14 #include "util/option_manager.h"
15 
16 namespace colmap {
17 
18 class ProjectWidget : public QWidget {
19 public:
20  ProjectWidget(QWidget* parent, OptionManager* options);
21 
22  bool IsValid() const;
23  void Reset();
24 
25  std::string GetDatabasePath() const;
26  std::string GetImagePath() const;
27  void SetDatabasePath(const std::string& path);
28  void SetImagePath(const std::string& path);
29 
30 private:
31  void Save();
32  void SelectNewDatabasePath();
33  void SelectExistingDatabasePath();
34  void SelectImagePath();
35  QString DefaultDirectory();
36 
37  OptionManager* options_;
38 
39  // Whether file dialog was opened previously.
40  bool prev_selected_;
41 
42  // Text boxes that hold the currently selected paths.
43  QLineEdit* database_path_text_;
44  QLineEdit* image_path_text_;
45 };
46 
47 } // namespace colmap
colmap::OptionManager::image_path
std::shared_ptr< std::string > image_path
Definition: option_manager.h:100
option_manager.h
colmap::OptionManager
Definition: option_manager.h:38
colmap::ProjectWidget::ProjectWidget
ProjectWidget(QWidget *parent, OptionManager *options)
Definition: project_widget.cc:38
colmap::HasFileExtension
bool HasFileExtension(const std::string &file_name, const std::string &ext)
Definition: misc.cc:51
colmap::Database
Definition: database.h:29
colmap::ProjectWidget
Definition: project_widget.h:18
colmap::ProjectWidget::Reset
void Reset()
Definition: project_widget.cc:85
cloudViewer::t::geometry::path
static const std::string path
Definition: PointCloud.cpp:59
misc.h
database.h
project_widget.h
colmap::ExistsDir
bool ExistsDir(const std::string &path)
Definition: misc.cc:104
colmap::OptionManager::project_path
std::shared_ptr< std::string > project_path
Definition: option_manager.h:98
colmap::OptionManager::database_path
std::shared_ptr< std::string > database_path
Definition: option_manager.h:99
colmap::ProjectWidget::SetImagePath
void SetImagePath(const std::string &path)
Definition: project_widget.cc:102
colmap::GetParentDir
std::string GetParentDir(const std::string &path)
Definition: misc.cc:128
colmap
Definition: AutomaticReconstructionController.h:17
colmap::ProjectWidget::GetDatabasePath
std::string GetDatabasePath() const
Definition: project_widget.cc:90
colmap::ProjectWidget::GetImagePath
std::string GetImagePath() const
Definition: project_widget.cc:94
colmap::ProjectWidget::SetDatabasePath
void SetDatabasePath(const std::string &path)
Definition: project_widget.cc:98
colmap::ProjectWidget::IsValid
bool IsValid() const
Definition: project_widget.cc:80