File indexing completed on 2024-04-21 04:38:09

0001 /*
0002     SPDX-FileCopyrightText: 2010-2012, 2020 Friedrich W. H. Kossebau <kossebau@kde.org>
0003 
0004     SPDX-License-Identifier: GPL-2.0-or-later
0005 */
0006 
0007 #ifndef KDEVCLAZY_CHECKSETSELECTIONLOCK_H
0008 #define KDEVCLAZY_CHECKSETSELECTIONLOCK_H
0009 
0010 // Qt
0011 #include <QSharedDataPointer>
0012 
0013 class QString;
0014 
0015 namespace Clazy {
0016 
0017 class CheckSetSelectionLockPrivate;
0018 
0019 class CheckSetSelectionLock
0020 {
0021     friend class CheckSetSelectionManager;
0022 
0023 protected:
0024     CheckSetSelectionLock(const QString& fileName,
0025                           const QString& checkSetSelectionId);
0026 
0027 public:
0028     CheckSetSelectionLock(const CheckSetSelectionLock& other);
0029 
0030     ~CheckSetSelectionLock();
0031 
0032 public:
0033     CheckSetSelectionLock& operator=(const CheckSetSelectionLock& other);
0034 
0035 public:
0036     void unlock();
0037     bool isLocked() const;
0038     QString checkSetSelectionId() const;
0039 
0040 private:
0041     QSharedDataPointer<CheckSetSelectionLockPrivate> d;
0042 };
0043 
0044 }
0045 
0046 #endif