~ubuntu-branches/ubuntu/precise/koffice/precise

« back to all changes in this revision

Viewing changes to libs/flake/KoEventAction.h

  • Committer: Bazaar Package Importer
  • Author(s): Jonathan Riddell
  • Date: 2010-09-21 15:36:35 UTC
  • mfrom: (1.4.1 upstream) (60.2.11 maverick)
  • Revision ID: james.westby@ubuntu.com-20100921153635-6tejqkiro2u21ydi
Tags: 1:2.2.2-0ubuntu3
Add kubuntu_03_fix-crash-on-closing-sqlite-connection-2.2.2.diff and
kubuntu_04_support-large-memo-values-for-msaccess-2.2.2.diff as
recommended by upstream http://kexi-
project.org/wiki/wikiview/index.php@Kexi2.2_Patches.html#sqlite_stab
ility

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
#include "KoXmlReaderForward.h"
25
25
class KoShapeLoadingContext;
26
26
class KoShapeSavingContext;
27
 
class KoTool;
 
27
class KoToolBase;
28
28
 
29
29
/**
30
30
 * This is the base class for actions that are executed on events.
47
47
class FLAKE_EXPORT KoEventAction
48
48
{
49
49
public:
50
 
    KoEventAction(const QString & id);
 
50
    /**
 
51
     * Constructor
 
52
     */
 
53
    KoEventAction();
51
54
    virtual ~KoEventAction();
52
55
 
53
 
    const QString & id() const;
54
 
 
55
 
    virtual bool loadOdf(const KoXmlElement & element, KoShapeLoadingContext &context) = 0;
56
 
    virtual void saveOdf(KoShapeSavingContext & context) const = 0;
57
 
 
58
 
    virtual void execute(KoTool * tool) = 0;
59
 
    virtual void finish(KoTool * tool) = 0;
 
56
    /**
 
57
     * Set The id of the action
 
58
     *
 
59
     * @param id this is the value that is used for storing the event action in odf.
 
60
     */
 
61
    void setId(const QString &id);
 
62
 
 
63
    /**
 
64
     * The id of the action
 
65
     *
 
66
     * The id is the value that is used for storing the event action in odf.
 
67
     */
 
68
    QString id() const;
 
69
 
 
70
    /**
 
71
     * Load action from ODF.
 
72
     *
 
73
     * @param context the KoShapeLoadingContext used for loading
 
74
     * @param element element which represents the shape in odf
 
75
     *
 
76
     * @return false if loading failed
 
77
     */
 
78
    virtual bool loadOdf(const KoXmlElement &element, KoShapeLoadingContext &context) = 0;
 
79
 
 
80
    /**
 
81
     * Store the action as ODF.
 
82
     *
 
83
     * @param context The KoShapeSavingContext used for saving
 
84
     */
 
85
    virtual void saveOdf(KoShapeSavingContext &context) const = 0;
 
86
 
 
87
    /**
 
88
     * Start the action.
 
89
     */
 
90
    virtual void start() = 0;
 
91
    /**
 
92
     * Finish the action
 
93
     *
 
94
     * If the action takes some time to finish it can bs stoped with
 
95
     * this method before its end.
 
96
     */
 
97
    virtual void finish() {}
60
98
 
61
99
private:
62
100
    class Private;