kexi

kexiformeventhandler.h

00001 /* This file is part of the KDE project
00002    Copyright (C) 2005-2006 Jaroslaw Staniek <js@iidea.pl>
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 KEXIFORMEVENTHANDLER_H
00021 #define KEXIFORMEVENTHANDLER_H
00022 
00023 #include <qwidget.h>
00024 #include <kaction.h>
00025 
00026 class KexiMainWindow;
00027 namespace KexiPart {
00028     class Info;
00029 }
00030 
00032 
00039 class KEXIFORMUTILS_EXPORT KexiFormEventHandler
00040 {
00041     public:
00042         KexiFormEventHandler();
00043         virtual ~KexiFormEventHandler();
00044 
00050         void setMainWidgetForEventHandling(KexiMainWindow *mainWin, QWidget* mainWidget);
00051 
00052     protected:
00053         QWidget *m_mainWidget;
00054 };
00055 
00057 class KEXIFORMUTILS_EXPORT KexiFormEventAction : public KAction
00058 {
00059     public:
00061         class KEXIFORMUTILS_EXPORT ActionData
00062         {
00063             public:
00064                 ActionData();
00065 
00075                 KexiPart::Info* decodeString(QString& actionType, QString& actionArg, bool& ok) const;
00076 
00078                 bool isEmpty() const;
00079 
00080                 QString string; 
00081 
00082                 QString option; 
00083 
00084 
00085         };
00086 
00087         KexiFormEventAction(KexiMainWindow *mainWin, QObject* parent, const QString& actionName, 
00088             const QString& objectName, const QString& actionOption);
00089         virtual ~KexiFormEventAction();
00090 
00091     public slots:
00094         virtual void activate();
00095 
00096     private:
00097         KexiMainWindow *m_mainWin;
00098         QString m_actionName, m_objectName, m_actionOption;
00099 };
00100 
00101 #endif
KDE Home | KDE Accessibility Home | Description of Access Keys