ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
ProjectWidget.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 cloudViewer {
17 
19 
20 class ProjectWidget : public QWidget {
21 public:
22  ProjectWidget(QWidget* parent, OptionManager* options);
23 
24  bool IsValid() const;
25  void Reset();
26 
27  void persistSave(const std::string& project_path,
28  const std::string& database_path,
29  const std::string& image_path);
30 
31  std::string GetDatabasePath() const;
32  std::string GetImagePath() const;
33  void SetDatabasePath(const std::string& path);
34  void SetImagePath(const std::string& path);
35 
36 private:
37  void Save();
38  void SelectNewDatabasePath();
39  void SelectExistingDatabasePath();
40  void SelectImagePath();
41  QString DefaultDirectory();
42 
43  OptionManager* options_;
44 
45  // Whether file dialog was opened previously.
46  bool prev_selected_;
47 
48  // Text boxes that hold the currently selected paths.
49  QLineEdit* database_path_text_;
50  QLineEdit* image_path_text_;
51 };
52 
53 } // namespace cloudViewer
void SetImagePath(const std::string &path)
std::string GetImagePath() const
void persistSave(const std::string &project_path, const std::string &database_path, const std::string &image_path)
void SetDatabasePath(const std::string &path)
std::string GetDatabasePath() const
ProjectWidget(QWidget *parent, OptionManager *options)
static const std::string path
Definition: PointCloud.cpp:59
Generic file read and write utility for python interface.
colmap::OptionManager OptionManager