kexi

events.h

00001 /* This file is part of the KDE project
00002    Copyright (C) 2004 Cedric Pasteur <cedric.pasteur@free.fr>
00003 
00004    This library is free software; you can redistribute it and/or
00005    modify it under the terms of the GNU Library General Public
00006    License as published by the Free Software Foundation; either
00007    version 2 of the License, or (at your option) any later version.
00008 
00009    This library is distributed in the hope that it will be useful,
00010    but WITHOUT ANY WARRANTY; without even the implied warranty of
00011    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012    Library General Public License for more details.
00013 
00014    You should have received a copy of the GNU Library General Public License
00015    along with this library; see the file COPYING.LIB.  If not, write to
00016    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00017  * Boston, MA 02110-1301, USA.
00018 */
00019 
00020 #ifndef KFORMDESIGNEREVENTS_H
00021 #define KFORMDESIGNEREVENTS_H
00022 
00023 #include <qptrlist.h>
00024 #include <qstring.h>
00025 
00026 class QDomNode;
00027 
00028 namespace KFormDesigner {
00029 
00030 class KFORMEDITOR_EXPORT Connection
00031 {
00032     public:
00033         Connection(const QString &sender, const QString &signal,
00034             const QString &receiver, const QString &slot);
00035         Connection() {;}
00036         ~Connection() {;}
00037 
00038         QString sender() const { return m_sender; }
00039         QString receiver() const { return m_receiver; }
00040         QString signal() const { return m_signal; }
00041         QString slot() const { return m_slot; }
00042 
00043         void    setSender(const QString &v) { m_sender = v; }
00044         void    setReceiver(const QString &v) { m_receiver = v; }
00045         void    setSignal(const QString &v) { m_signal = v; }
00046         void    setSlot(const QString &v) { m_slot = v; }
00047 
00048     protected:
00049         QString m_sender;
00050         QString m_signal;
00051         QString m_receiver;
00052         QString m_slot;
00053 };
00054 
00055 typedef QPtrList<Connection> ConnectionList;
00056 
00057 class KFORMEDITOR_EXPORT ConnectionBuffer : public ConnectionList
00058 {
00059     public:
00060         ConnectionBuffer();
00061         ~ConnectionBuffer() {;}
00062 
00063         void save(QDomNode &parentNode);
00064         void load(QDomNode parentNode);
00065 
00068         void    fixName(const QString &oldname, const QString &newName);
00069 
00070         ConnectionBuffer*     allConnectionsForWidget(const QString &widget);
00071         void     saveAllConnectionsForWidget(const QString &widget, QDomNode parentNode);
00072         void     removeAllConnectionsForWidget(const QString &widget);
00073 };
00074 
00075 }
00076 
00077 #endif
00078 
KDE Home | KDE Accessibility Home | Description of Access Keys