ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
ThreadControlWidget.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 namespace colmap {
14 class Thread;
15 }
16 
17 namespace cloudViewer {
18 
19 class ThreadControlWidget : public QWidget {
20 public:
21  explicit ThreadControlWidget(QWidget* parent);
22 
23  void StartThread(const QString& progress_text,
24  const bool stoppable,
25  colmap::Thread* thread);
26  void StartFunction(const QString& progress_text,
27  const std::function<void()>& func);
28 
29 private:
30  QProgressDialog* progress_bar_;
31  QAction* destructor_;
32  std::unique_ptr<colmap::Thread> thread_;
33 };
34 
35 } // namespace cloudViewer
cloudViewer
Generic file read and write utility for python interface.
Definition: CloudViewerConfig.cpp:12
cloudViewer::ThreadControlWidget::StartThread
void StartThread(const QString &progress_text, const bool stoppable, colmap::Thread *thread)
Definition: ThreadControlWidget.cpp:34
colmap::Thread::FINISHED_CALLBACK
@ FINISHED_CALLBACK
Definition: threading.h:78
colmap::Thread
Definition: threading.h:74
cloudViewer::ThreadControlWidget
Definition: ThreadControlWidget.h:19
progress_bar_
utility::CountingProgressReporter * progress_bar_
Definition: FilePLY.cpp:42
ThreadControlWidget.h
ecvColor::LookUpTable::at
Rgb at(size_t color_id)
Definition: ecvColorTypes.cpp:77
cloudViewer::ThreadControlWidget::StartFunction
void StartFunction(const QString &progress_text, const std::function< void()> &func)
Definition: ThreadControlWidget.cpp:79
cloudViewer::ThreadControlWidget::ThreadControlWidget
ThreadControlWidget(QWidget *parent)
Definition: ThreadControlWidget.cpp:17
colmap::ThreadControlWidget::ThreadControlWidget
ThreadControlWidget(QWidget *parent)
Definition: thread_control_widget.cc:36
threading.h
colmap
Definition: AutomaticReconstructionController.h:17
Run
int Run(int argc, const char *argv[])
BundleAdjustmentWidget.h