File indexing completed on 2024-04-21 16:33:53
0001 /* 0002 This file is part of the Okteta Core library, made within the KDE community. 0003 0004 SPDX-FileCopyrightText: 2007 Friedrich W. H. Kossebau <kossebau@kde.org> 0005 0006 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL 0007 */ 0008 0009 #ifndef OKTETA_VERSIONABLE_HPP 0010 #define OKTETA_VERSIONABLE_HPP 0011 0012 // Qt 0013 #include <QtPlugin> 0014 0015 class QString; 0016 0017 namespace Okteta { 0018 0019 class Versionable 0020 { 0021 public: 0022 virtual ~Versionable(); 0023 0024 public: // get 0025 virtual int versionIndex() const = 0; 0026 virtual int versionCount() const = 0; 0027 virtual QString versionDescription(int versionIndex) const = 0; 0028 0029 public: // set/action 0030 virtual void revertToVersionByIndex(int versionIndex) = 0; 0031 0032 public: // signal 0033 virtual void revertedToVersionIndex(int versionIndex) = 0; 0034 virtual void headVersionDescriptionChanged(const QString& versionDescription) = 0; 0035 virtual void headVersionChanged(int newHeadVersionIndex) = 0; 0036 }; 0037 0038 inline Versionable::~Versionable() = default; 0039 0040 } 0041 0042 Q_DECLARE_INTERFACE(Okteta::Versionable, "org.kde.okteta.versionable/1.0") 0043 0044 #endif