scriptmanager.h
1/* This file is part of the KDE project
2 Copyright (C) 2004 Cedric Pasteur <cedric.pasteur@free.fr>
3
4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public
6 License as published by the Free Software Foundation; either
7 version 2 of the License, or (at your option) any later version.
8
9 This library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Library General Public License for more details.
13
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to
16 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18*/
19
20#ifndef SCRIPTMANAGER_H
21#define SCRIPTMANAGER_H
22
23#include <tqobject.h>
24#include <tqptrdict.h>
25
26class FormScript;
27
28namespace Kross {
29 namespace Api {
30 class Manager;
31 }
32}
33
34namespace KFormDesigner {
35 class FormManager;
36 class Form;
37}
38
39using namespace KFormDesigner;
40
41class ScriptManager : public TQObject
42{
44
45
46 public:
47 ScriptManager(TQObject *parent=0, const char *name=0);
48 ~ScriptManager();
49
51 FormScript* scriptForForm(Form *form);
52
53 void setFormManager(FormManager *manager);
54 FormManager* formManager() { return m_formManager; }
55 Kross::Api::Manager* krossManager() { return m_manager; }
56
57 public slots:
59 void slotFormDeleted(KFormDesigner::Form *form);
61 FormScript* newFormScript(KFormDesigner::Form *form);
62
63 private:
64 Kross::Api::Manager *m_manager;
65 KFormDesigner::FormManager *m_formManager;
66 TQPtrDict<FormScript> m_dict;
67};
68
69#endif
70
A class that stores the code and events related to a single form.
Definition formscript.h:45
A class to manage (create/load/save) Forms.
Definition formmanager.h:73
A simple class representing a form.
Definition form.h:136
type * findParent(TQObject *o, const char *className, TQObject *&prevPrev)