ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
thread_control_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/threading.h"
14 
15 namespace colmap {
16 
17 class ThreadControlWidget : public QWidget {
18 public:
19  explicit ThreadControlWidget(QWidget* parent);
20 
21  void StartThread(const QString& progress_text,
22  const bool stoppable,
23  Thread* thread);
24  void StartFunction(const QString& progress_text,
25  const std::function<void()>& func);
26 
27 private:
28  QProgressDialog* progress_bar_;
29  QAction* destructor_;
30  std::unique_ptr<Thread> thread_;
31 };
32 
33 } // namespace colmap
colmap::ThreadControlWidget
Definition: thread_control_widget.h:17
colmap::ThreadControlWidget::StartThread
void StartThread(const QString &progress_text, const bool stoppable, Thread *thread)
Definition: thread_control_widget.cc:53
colmap::Thread::FINISHED_CALLBACK
@ FINISHED_CALLBACK
Definition: threading.h:78
colmap::Thread
Definition: threading.h:74
progress_bar_
utility::CountingProgressReporter * progress_bar_
Definition: FilePLY.cpp:42
colmap::ThreadControlWidget::StartFunction
void StartFunction(const QString &progress_text, const std::function< void()> &func)
Definition: thread_control_widget.cc:97
ecvColor::LookUpTable::at
Rgb at(size_t color_id)
Definition: ecvColorTypes.cpp:77
bundle_adjustment_widget.h
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[])