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
10class QLabel;
11class QPushButton;
12class QTreeWidget;
13class QTreeWidgetItem;
14
15namespace score
16{
17class Document;
18struct DocumentContext;
19}
20
21namespace Process
22{
23
36class SCORE_LIB_PROCESS_EXPORT MissingFilesDialog final : public QDialog
37{
38public:
39 MissingFilesDialog(score::Document& doc, QWidget* parent);
41
43 static bool nothingMissing(const score::DocumentContext& ctx);
44
45private:
46 void rescan();
47 void searchFolder();
48 void locateSelected();
49 void applyRelink();
50 void updateSummary();
51
53 struct Resolution
54 {
55 std::vector<QString> candidates;
56 int chosen{-1};
57 };
58
59 QTreeWidgetItem* itemFor(const QString& storedPath) const;
60
69 QPointer<score::Document> m_doc;
70
71 QLabel* m_summary{};
72 QTreeWidget* m_files{};
73 QPushButton* m_search{};
74 QPushButton* m_locate{};
75 QPushButton* m_apply{};
76
77 FileReport m_report;
79 QHash<QString, Resolution> m_resolutions;
80 QString m_lastSearchFolder;
81};
82}
Lists what a document cannot find, and helps point it at the files.
Definition MissingFilesDialog.hpp:37
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:116
Definition FileOperation.hpp:78
Definition DocumentContext.hpp:18