blob: 2e4384bede8018edf20e84455889d538de1b62bd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0+ OR GPL-3.0 WITH Qt-GPL-exception-1.0
#pragma once
#include "cppeditor_global.h"
#include "senddocumenttracker.h"
#include <QString>
namespace CppEditor {
class BaseEditorDocumentProcessor;
class CPPEDITOR_EXPORT CppEditorDocumentHandle
{
public:
virtual ~CppEditorDocumentHandle();
enum RefreshReason {
None,
ProjectUpdate,
Other,
};
RefreshReason refreshReason() const;
void setRefreshReason(const RefreshReason &refreshReason);
// For the Working Copy
virtual QString filePath() const = 0;
virtual QByteArray contents() const = 0;
virtual unsigned revision() const = 0;
// For updating if new project info is set
virtual BaseEditorDocumentProcessor *processor() const = 0;
virtual void resetProcessor() = 0;
SendDocumentTracker &sendTracker();
private:
SendDocumentTracker m_sendTracker;
RefreshReason m_refreshReason = None;
};
} // namespace CppEditor
|