Warning, file /office/calligra/libs/flake/KoEventActionFactoryBase.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 KOEVENTACTIONFACTORY_H
0021 #define KOEVENTACTIONFACTORY_H
0022 
0023 #include <QString>
0024 
0025 #include "flake_export.h"
0026 
0027 class KoEventAction;
0028 class QWidget;
0029 
0030 /**
0031  * Factory for creating KoEventActions 
0032  *
0033  * This is the base class for event action plugins. Each plugin that ships a KoEventAction should
0034  * also ship a factory.
0035  */
0036 class FLAKE_EXPORT KoEventActionFactoryBase
0037 {
0038 public:
0039     /**
0040      * Factory to create events
0041      *
0042      * @param id The id of the event action
0043      * @param action Only presentation event actions need to set the action. It is not used
0044      *               for script event actions.
0045      */
0046     explicit KoEventActionFactoryBase(const QString &id, const QString & action = QString());
0047     virtual ~KoEventActionFactoryBase();
0048 
0049     /**
0050      * Create the event action.
0051      */
0052     virtual KoEventAction *createEventAction() = 0;
0053 
0054     /**
0055      * Create the widget to configure the action
0056      */
0057     virtual QWidget *createOptionWidget() = 0;
0058 
0059     /**
0060      * The action is used to differentiate presentation effects.
0061      */
0062     QString action() const;
0063 
0064     /**
0065      * return the id for the variable this factory creates.
0066      * @return the id for the variable this factory creates.
0067      */
0068     QString id() const;
0069 
0070 private:
0071     class Private;
0072     Private * const d;
0073 };
0074 
0075 #endif /* KOEVENTACTIONFACTORY_H */