Changeset View
Changeset View
Standalone View
Standalone View
src/plugins/scripting/kexiscripting/kexiscriptdesignview.h
Show All 21 Lines | |||||
22 | 22 | | |||
23 | #ifndef KEXISCRIPTDESIGNVIEW_H | 23 | #ifndef KEXISCRIPTDESIGNVIEW_H | ||
24 | #define KEXISCRIPTDESIGNVIEW_H | 24 | #define KEXISCRIPTDESIGNVIEW_H | ||
25 | 25 | | |||
26 | #include <KexiView.h> | 26 | #include <KexiView.h> | ||
27 | 27 | | |||
28 | #include <KPropertySet> | 28 | #include <KPropertySet> | ||
29 | #include <KProperty> | 29 | #include <KProperty> | ||
30 | #include <QJSValue> | ||||
30 | 31 | | |||
31 | // Forward declarations. | 32 | // Forward declarations. | ||
32 | class KexiScriptEditor; | 33 | class KexiScriptEditor; | ||
33 | class KexiScriptDesignViewPrivate; | 34 | class KexiScriptDesignViewPrivate; | ||
34 | 35 | | |||
35 | namespace Kross | | |||
36 | { | | |||
37 | class Action; | | |||
38 | } | | |||
39 | | ||||
40 | /** | 36 | /** | ||
41 | * The KexiScriptDesignView class provides the KexiView to | 37 | * The KexiScriptDesignView class provides the KexiView to | ||
42 | * manage script modules in the design-view. The design-view | 38 | * manage script modules in the design-view. The design-view | ||
43 | * is used to be able to view and edit the scripting code via | 39 | * is used to be able to view and edit the scripting code via | ||
44 | * a \a KexiScriptEditor instance. | 40 | * a \a KexiScriptEditor instance. | ||
45 | */ | 41 | */ | ||
46 | class KexiScriptDesignView : public KexiView | 42 | class KexiScriptDesignView : public KexiView | ||
47 | { | 43 | { | ||
48 | Q_OBJECT | 44 | Q_OBJECT | ||
49 | 45 | | |||
50 | public: | 46 | public: | ||
51 | 47 | | |||
52 | /** | 48 | /** | ||
53 | * Constructor. | 49 | * Constructor. | ||
54 | */ | 50 | */ | ||
55 | KexiScriptDesignView(QWidget *parent, Kross::Action* scriptaction); | 51 | KexiScriptDesignView(QWidget *parent); | ||
56 | 52 | | |||
57 | /** | 53 | /** | ||
58 | * Destructor. | 54 | * Destructor. | ||
59 | */ | 55 | */ | ||
60 | virtual ~KexiScriptDesignView(); | 56 | virtual ~KexiScriptDesignView(); | ||
61 | 57 | | |||
62 | /** | 58 | /** | ||
63 | * \return the \a Kross::Action this \a KexiScriptDesignView | 59 | * \return the program string this \a KexiScriptDesignView | ||
64 | * is responsible for. | 60 | * is responsible for. | ||
65 | */ | 61 | */ | ||
66 | Kross::Action* scriptAction() const; | 62 | // QString scriptAction() const; | ||
67 | 63 | | |||
68 | /** | 64 | /** | ||
69 | * \return a property set for this view. | 65 | * \return a property set for this view. | ||
70 | */ | 66 | */ | ||
71 | virtual KPropertySet* propertySet(); | 67 | virtual KPropertySet* propertySet(); | ||
72 | 68 | | |||
73 | /** | 69 | /** | ||
74 | * Try to call \a storeData with new data we like to store. On | 70 | * Try to call \a storeData with new data we like to store. On | ||
Show All 15 Lines | |||||
90 | */ | 86 | */ | ||
91 | virtual tristate storeData(bool dontAsk = false); | 87 | virtual tristate storeData(bool dontAsk = false); | ||
92 | 88 | | |||
93 | private Q_SLOTS: | 89 | private Q_SLOTS: | ||
94 | 90 | | |||
95 | /** | 91 | /** | ||
96 | * Deferred initialization. | 92 | * Deferred initialization. | ||
97 | */ | 93 | */ | ||
98 | void initialize(); | 94 | void initialize(const QString &program); | ||
99 | 95 | | |||
100 | void slotImport(); | 96 | void slotImport(); | ||
101 | void slotExport(); | 97 | void slotExport(); | ||
102 | 98 | | |||
103 | /** | 99 | /** | ||
104 | * Handle changes in the property editor. | 100 | * Handle changes in the property editor. | ||
105 | */ | 101 | */ | ||
106 | void slotPropertyChanged(KPropertySet& set, KProperty& property); | 102 | void slotPropertyChanged(KPropertySet& set, KProperty& property); | ||
Show All 23 Lines |