File indexing completed on 2024-05-12 05:10:36
0001 /****************************************************************************** 0002 * konsolekalendardelete.h * 0003 * * 0004 * KonsoleKalendar is a command line interface to KDE calendars * 0005 * SPDX-FileCopyrightText: 2002-2004 Tuukka Pasanen <illuusio@mailcity.com> * 0006 * SPDX-FileCopyrightText: 2003-2005 Allen Winter <winter@kde.org> * 0007 * * 0008 * SPDX-License-Identifier: GPL-2.0-or-later WITH Qt-Commercial-exception-1.0 * 0009 * * 0010 ******************************************************************************/ 0011 0012 #pragma once 0013 0014 #include "konsolekalendarvariables.h" 0015 0016 #include <KCalendarCore/Event> 0017 0018 /** 0019 * @file konsolekalendardelete.h 0020 * Provides the KonsoleKalendarDelete class definition. 0021 */ 0022 0023 /** 0024 * @brief 0025 * Class to manage the Event removal capability. 0026 * @author Tuukka Pasanen 0027 * @author Allen Winter 0028 */ 0029 class KonsoleKalendarDelete 0030 { 0031 public: 0032 /** 0033 * Constructs a KonsoleKalendarDelete object from command line arguments. 0034 * 0035 * @param vars is a pointer to the #KonsoleKalendarVariables object 0036 * which contains all the command line arguments. 0037 */ 0038 explicit KonsoleKalendarDelete(KonsoleKalendarVariables *vars); 0039 0040 /** 0041 * Destructor 0042 */ 0043 ~KonsoleKalendarDelete(); 0044 0045 /** 0046 * Delete the Event. 0047 */ 0048 bool deleteEvent(); 0049 0050 private: 0051 /** 0052 * Print event specs for dryrun and verbose options. 0053 * 0054 * @param event is a pointer to an Event that is to be printed. 0055 */ 0056 void printSpecs(const KCalendarCore::Event::Ptr &event); 0057 0058 //@cond PRIVATE 0059 KonsoleKalendarVariables *m_variables = nullptr; 0060 //@endcond 0061 };