File indexing completed on 2024-11-24 04:44:29
0001 /* 0002 This file is part of oxaccess. 0003 0004 SPDX-FileCopyrightText: 2009 Tobias Koenig <tokoe@kde.org> 0005 0006 SPDX-License-Identifier: LGPL-2.0-or-later 0007 */ 0008 0009 #pragma once 0010 0011 #include "object.h" 0012 0013 class QDomDocument; 0014 class QDomElement; 0015 0016 namespace OXA 0017 { 0018 /** 0019 * Namespace that contains helper methods for handling events and tasks. 0020 */ 0021 namespace IncidenceUtils 0022 { 0023 /** 0024 * Parses the XML tree under @p propElement and fills the event data of @p object. 0025 */ 0026 void parseEvent(const QDomElement &propElement, Object &object); 0027 0028 /** 0029 * Parses the XML tree under @p propElement and fills the task data of @p object. 0030 */ 0031 void parseTask(const QDomElement &propElement, Object &object); 0032 0033 /** 0034 * Adds the event data of @p object to the @p document under the @p propElement. 0035 */ 0036 void addEventElements(QDomDocument &document, QDomElement &propElement, const Object &object); 0037 0038 /** 0039 * Adds the task data of @p object to the @p document under the @p propElement. 0040 */ 0041 void addTaskElements(QDomDocument &document, QDomElement &propElement, const Object &object); 0042 } 0043 }