forked from KDE/okteta
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathversionable.hpp
47 lines (33 loc) · 1.09 KB
/
versionable.hpp
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
45
46
47
/*
This file is part of the Okteta Core library, made within the KDE community.
SPDX-FileCopyrightText: 2007 Friedrich W. H. Kossebau <[email protected]>
SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
*/
#ifndef OKTETA_VERSIONABLE_HPP
#define OKTETA_VERSIONABLE_HPP
// Qt
#include <QtPlugin>
class QString;
namespace Okteta {
class Versionable
{
public:
virtual ~Versionable();
public: // get
[[nodiscard]]
virtual int versionIndex() const = 0;
[[nodiscard]]
virtual int versionCount() const = 0;
[[nodiscard]]
virtual QString versionDescription(int versionIndex) const = 0;
public: // set/action
virtual void revertToVersionByIndex(int versionIndex) = 0;
public: // signal
virtual void revertedToVersionIndex(int versionIndex) = 0;
virtual void headVersionDescriptionChanged(const QString& versionDescription) = 0;
virtual void headVersionChanged(int newHeadVersionIndex) = 0;
};
inline Versionable::~Versionable() = default;
}
Q_DECLARE_INTERFACE(Okteta::Versionable, "org.kde.okteta.versionable/1.0")
#endif