1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
|
/* This file is part of the KDE project
Copyright (C) 2004 Cedric Pasteur <cedric.pasteur@free.fr>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
#ifndef KFORMDESIGNEREVENTS_H
#define KFORMDESIGNEREVENTS_H
#include <tqptrlist.h>
#include <tqstring.h>
class TQDomNode;
namespace KFormDesigner {
class KFORMEDITOR_EXPORT Connection
{
public:
Connection(const TQString &sender, const TQString &signal,
const TQString &receiver, const TQString &slot);
Connection() {;}
~Connection() {;}
TQString sender() const { return m_sender; }
TQString receiver() const { return m_receiver; }
TQString signal() const { return m_signal; }
TQString slot() const { return m_slot; }
void setSender(const TQString &v) { m_sender = v; }
void setReceiver(const TQString &v) { m_receiver = v; }
void setSignal(const TQString &v) { m_signal = v; }
void setSlot(const TQString &v) { m_slot = v; }
protected:
TQString m_sender;
TQString m_signal;
TQString m_receiver;
TQString m_slot;
};
typedef TQPtrList<Connection> ConnectionList;
class KFORMEDITOR_EXPORT ConnectionBuffer : public ConnectionList
{
public:
ConnectionBuffer();
~ConnectionBuffer() {;}
void save(TQDomNode &parentNode);
void load(TQDomNode parentNode);
/*! This function is called when a widget is renamed from \a oldname
to \a newname. All the Connections for this widget are updated. */
void fixName(const TQString &oldname, const TQString &newName);
ConnectionBuffer* allConnectionsForWidget(const TQString &widget);
void saveAllConnectionsForWidget(const TQString &widget, TQDomNode parentNode);
void removeAllConnectionsForWidget(const TQString &widget);
};
}
#endif
|