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
std::string GetDatabasePath() const
std::string GetImagePath() const
ProjectWidget(QWidget *parent, OptionManager *options)
void SetDatabasePath(const std::string &path)
void SetImagePath(const std::string &path)
static const std::string path
Definition: PointCloud.cpp:59