File indexing completed on 2024-05-12 05:22:32
0001 /* 0002 * This file is part of LibKGAPI library 0003 * 0004 * SPDX-FileCopyrightText: 2013 Daniel Vrátil <dvratil@redhat.com> 0005 * 0006 * SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL 0007 */ 0008 0009 #pragma once 0010 0011 #include "kgapitasks_export.h" 0012 #include "object.h" 0013 #include "types.h" 0014 0015 #include <QScopedPointer> 0016 0017 #include <KCalendarCore/Todo> 0018 0019 namespace KGAPI2 0020 { 0021 0022 /** 0023 * @brief Represents a single task (or todo) 0024 * 0025 * @author Daniel Vrátil <dvratil@redhat.com> 0026 * @since 0.3 0027 */ 0028 class KGAPITASKS_EXPORT Task : public KGAPI2::Object, public KCalendarCore::Todo 0029 { 0030 public: 0031 /** 0032 * @brief Constructor 0033 */ 0034 explicit Task(); 0035 0036 /** 0037 * @brief Copy constructor 0038 */ 0039 Task(const Task &other); 0040 0041 /** 0042 * @brief Copy constructor 0043 */ 0044 explicit Task(const KCalendarCore::Todo &other); 0045 0046 /** 0047 * @brief Destructor 0048 */ 0049 ~Task() override; 0050 0051 bool operator==(const Task &other) const; 0052 0053 /** 0054 * @brief Sets whether the task has been deleted 0055 * 0056 * @param deleted 0057 */ 0058 void setDeleted(bool deleted); 0059 0060 /** 0061 * @brief Returns whether the task has been deleted 0062 */ 0063 bool deleted() const; 0064 0065 private: 0066 class Private; 0067 QScopedPointer<Private> const d; 0068 friend class Private; 0069 }; 0070 0071 } // namespace KGAPI2/