Loading...
Searching...
No Matches
MissingFilesDialog.hpp
1#pragma once
2#include <Process/MissingFiles.hpp>
3
4#include <QDialog>
5#include <QHash>
6#include <QPointer>
7
8#include <score_lib_process_export.h>
9
10#include <memory>
11
12class QLabel;
13class QPushButton;
14class QTimer;
15class QTreeWidget;
16class QTreeWidgetItem;
17
18namespace score
19{
20class Document;
21struct DocumentContext;
22}
23
24namespace Process
25{
26
39class SCORE_LIB_PROCESS_EXPORT MissingFilesDialog final : public QDialog
40{
41public:
42 MissingFilesDialog(score::Document& doc, QWidget* parent);
44
46 static bool nothingMissing(const score::DocumentContext& ctx);
47
48private:
49 void rescan();
50 void searchFolder();
51 void cancelSearch();
52 void finishSearch(FileIndex index, bool cancelled);
53 void updateSearchProgress();
54 void locateSelected();
55 void applyRelink();
56 void updateSummary();
57
59 struct Resolution
60 {
61 std::vector<QString> candidates;
62 int chosen{-1};
63 };
64
65 QTreeWidgetItem* itemFor(const QString& storedPath) const;
66
75 QPointer<score::Document> m_doc;
76
77 QLabel* m_summary{};
78 QTreeWidget* m_files{};
79 QPushButton* m_search{};
80 QPushButton* m_locate{};
81 QPushButton* m_apply{};
82
83 QWidget* m_progressRow{};
84 QLabel* m_progress{};
85 QPushButton* m_cancel{};
86 QTimer* m_progressTimer{};
87
93 std::shared_ptr<FileScan> m_scan;
94 QString m_searchRoot;
95
96 FileReport m_report;
98 QHash<QString, Resolution> m_resolutions;
99 QString m_lastSearchFolder;
100};
101}
Definition MissingFiles.hpp:48
Lists what a document cannot find, and helps point it at the files.
Definition MissingFilesDialog.hpp:40
The Document class is the central part of the software.
Definition Document.hpp:51
Base classes and tools to implement processes and layers.
Definition JSONVisitor.hpp:1115
Base toolkit upon which the software is built.
Definition Application.cpp:83
Definition FileOperation.hpp:81
Definition DocumentContext.hpp:18