File indexing completed on 2023-10-03 03:19:54
0001 /* 0002 This file is part of the KDE libraries 0003 SPDX-FileCopyrightText: 2014 David Faure <faure@kde.org> 0004 0005 SPDX-License-Identifier: LGPL-2.0-or-later 0006 */ 0007 0008 #ifndef EMPTYTRASHJOB_H 0009 #define EMPTYTRASHJOB_H 0010 0011 #include "kiocore_export.h" 0012 #include "simplejob.h" 0013 0014 namespace KIO 0015 { 0016 class EmptyTrashJobPrivate; 0017 /** 0018 * @class KIO::EmptyTrashJob emptytrashjob.h <KIO/EmptyTrashJob> 0019 * 0020 * A KIO job for emptying the trash 0021 * @see KIO::trash() 0022 * @see KIO::restoreFromTrash() 0023 * @since 5.2 0024 */ 0025 class KIOCORE_EXPORT EmptyTrashJob : public SimpleJob 0026 { 0027 Q_OBJECT 0028 0029 public: 0030 ~EmptyTrashJob() override; 0031 0032 protected: 0033 void slotFinished() override; 0034 0035 private: 0036 KIOCORE_NO_EXPORT explicit EmptyTrashJob(EmptyTrashJobPrivate &dd); 0037 0038 private: 0039 Q_DECLARE_PRIVATE(EmptyTrashJob) 0040 }; 0041 0042 /** 0043 * Empties the trash. 0044 * 0045 * @return A pointer to the job handling the operation. 0046 * @since 5.2 0047 */ 0048 KIOCORE_EXPORT EmptyTrashJob *emptyTrash(); 0049 0050 } 0051 0052 #endif