Changeset View
Changeset View
Standalone View
Standalone View
src/plugins/scripting/kexiscripting/kexiscriptpart.h
Show All 19 Lines | |||||
20 | */ | 20 | */ | ||
21 | 21 | | |||
22 | #ifndef KEXISCRIPTPART_H | 22 | #ifndef KEXISCRIPTPART_H | ||
23 | #define KEXISCRIPTPART_H | 23 | #define KEXISCRIPTPART_H | ||
24 | 24 | | |||
25 | 25 | | |||
26 | #include <kexi.h> | 26 | #include <kexi.h> | ||
27 | #include <kexipart.h> | 27 | #include <kexipart.h> | ||
28 | #include <QJSValue> | ||||
28 | 29 | | |||
29 | /** | 30 | /** | ||
30 | * Kexi Scripting Plugin. | 31 | * Kexi Scripting Plugin. | ||
31 | */ | 32 | */ | ||
32 | class KexiScriptPart : public KexiPart::Part | 33 | class KexiScriptPart : public KexiPart::Part | ||
33 | { | 34 | { | ||
34 | Q_OBJECT | 35 | Q_OBJECT | ||
35 | 36 | | |||
Show All 14 Lines | 37 | public: | |||
50 | virtual ~KexiScriptPart(); | 51 | virtual ~KexiScriptPart(); | ||
51 | 52 | | |||
52 | /** | 53 | /** | ||
53 | * Implementation of the \a KexiPart::Part::execute method used to | 54 | * Implementation of the \a KexiPart::Part::execute method used to | ||
54 | * execute the passed \p item instance. | 55 | * execute the passed \p item instance. | ||
55 | */ | 56 | */ | ||
56 | virtual bool execute(KexiPart::Item* item, QObject* sender = 0); | 57 | virtual bool execute(KexiPart::Item* item, QObject* sender = 0); | ||
57 | 58 | | |||
59 | QJSValue execute(const QString &program); | ||||
60 | | ||||
58 | /** | 61 | /** | ||
59 | * \return the i18n message for the passed \p englishMessage string. | 62 | * \return the i18n message for the passed \p englishMessage string. | ||
60 | */ | 63 | */ | ||
61 | virtual KLocalizedString i18nMessage(const QString& englishMessage, | 64 | virtual KLocalizedString i18nMessage(const QString& englishMessage, | ||
62 | KexiWindow* window) const; | 65 | KexiWindow* window) const; | ||
63 | 66 | | |||
64 | protected: | 67 | protected: | ||
65 | 68 | | |||
Show All 25 Lines | |||||
91 | */ | 94 | */ | ||
92 | virtual void initInstanceActions(); | 95 | virtual void initInstanceActions(); | ||
93 | 96 | | |||
94 | private: | 97 | private: | ||
95 | /// \internal d-pointer class. | 98 | /// \internal d-pointer class. | ||
96 | class Private; | 99 | class Private; | ||
97 | /// \internal d-pointer instance. | 100 | /// \internal d-pointer instance. | ||
98 | Private* const d; | 101 | Private* const d; | ||
102 | | ||||
103 | void registerMetaObjects(); | ||||
104 | | ||||
105 | QString loadData(KexiPart::Item* item); | ||||
99 | }; | 106 | }; | ||
100 | 107 | | |||
101 | #endif | 108 | #endif | ||
102 | 109 | |