Warning, file /office/calligra/libs/flake/KoEventActionRegistry.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001 /* This file is part of the KDE project 0002 Copyright (C) 2008 Thorsten Zachmann <zachmann@kde.org> 0003 0004 This library is free software; you can redistribute it and/or 0005 modify it under the terms of the GNU Library General Public 0006 License as published by the Free Software Foundation; either 0007 version 2 of the License, or (at your option) any later version. 0008 0009 This library is distributed in the hope that it will be useful, 0010 but WITHOUT ANY WARRANTY; without even the implied warranty of 0011 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 0012 Library General Public License for more details. 0013 0014 You should have received a copy of the GNU Library General Public License 0015 along with this library; see the file COPYING.LIB. If not, write to 0016 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 0017 * Boston, MA 02110-1301, USA. 0018 */ 0019 0020 #ifndef KOEVENTACTIONREGISTRY_H 0021 #define KOEVENTACTIONREGISTRY_H 0022 0023 #include <QList> 0024 #include <QSet> 0025 0026 #include "flake_export.h" 0027 #include "KoXmlReaderForward.h" 0028 class KoEventAction; 0029 class KoEventActionFactoryBase; 0030 class KoShapeLoadingContext; 0031 0032 /** 0033 * This singleton keeps a register of all available KoEventActionFactoryBase objects. 0034 * 0035 * It creates the event actions when loaded from odf. 0036 */ 0037 class FLAKE_EXPORT KoEventActionRegistry 0038 { 0039 public: 0040 class Singleton; 0041 KoEventActionRegistry(); 0042 ~KoEventActionRegistry(); 0043 0044 /** 0045 * Return an instance of the KoEventActionRegistry 0046 */ 0047 static KoEventActionRegistry *instance(); 0048 0049 /** 0050 * Create action events for the elements given 0051 */ 0052 QSet<KoEventAction*> createEventActionsFromOdf(const KoXmlElement &element, KoShapeLoadingContext &context) const; 0053 0054 /** 0055 * Add presentation event action. 0056 */ 0057 void addPresentationEventAction(KoEventActionFactoryBase *factory); 0058 0059 /** 0060 * Add script event action. 0061 */ 0062 void addScriptEventAction(KoEventActionFactoryBase *factory); 0063 0064 /** 0065 * Get presentation event actions. 0066 */ 0067 QList<KoEventActionFactoryBase *> presentationEventActions(); 0068 0069 /** 0070 * Get script event actions. 0071 */ 0072 QList<KoEventActionFactoryBase *> scriptEventActions(); 0073 0074 private: 0075 0076 KoEventActionRegistry(const KoEventActionRegistry &); 0077 KoEventActionRegistry operator=(const KoEventActionRegistry &); 0078 0079 void init(); 0080 0081 class Private; 0082 Private *d; 0083 }; 0084 0085 #endif /* KOEVENTACTIONREGISTRY_H */