kexi

keximainwindow.h

00001 /* This file is part of the KDE project
00002    Copyright (C) 2003 Lucijan Busch <lucijan@kde.org>
00003    Copyright (C) 2003-2005 Jaroslaw Staniek <js@iidea.pl>
00004 
00005    This library is free software; you can redistribute it and/or
00006    modify it under the terms of the GNU Library General Public
00007    License as published by the Free Software Foundation; either
00008    version 2 of the License, or (at your option) any later version.
00009 
00010    This library is distributed in the hope that it will be useful,
00011    but WITHOUT ANY WARRANTY; without even the implied warranty of
00012    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013    Library General Public License for more details.
00014 
00015    You should have received a copy of the GNU Library General Public License
00016    along with this library; see the file COPYING.LIB.  If not, write to
00017    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00018  * Boston, MA 02110-1301, USA.
00019 */
00020 
00021 #ifndef KEXIMAINWINDOW_H
00022 #define KEXIMAINWINDOW_H
00023 
00024 #include <qmap.h>
00025 #include <qintdict.h>
00026 
00027 #include <kmdimainfrm.h>
00028 #include <kexiutils/tristate.h>
00029 
00030 #include "kexisharedactionhost.h"
00031 #include "kexi.h"
00032 
00033 class KexiDialogBase;
00034 class KexiProject;
00035 namespace KexiPart {
00036     class Item;
00037 }
00038 
00045 class KEXICORE_EXPORT KexiMainWindow : public KMdiMainFrm, public KexiSharedActionHost
00046 {
00047     Q_OBJECT
00048     public:
00049         KexiMainWindow();
00050         virtual ~KexiMainWindow();
00051 
00053         virtual KexiProject *project() = 0;
00054 
00056         virtual void registerChild(KexiDialogBase *dlg) = 0;
00057 
00058         virtual QPopupMenu* findPopupMenu(const char *popupName) = 0;
00059 
00065         virtual int generatePrivateID() = 0;
00066 
00070         virtual KActionPtrList allActions() const = 0;
00071 
00072     signals:
00075         void acceptProjectClosingRequested(bool& cancel);
00076 
00079         void beforeProjectClosing();
00080 
00082         void projectClosed();
00083 
00084     public slots:
00086         virtual KexiDialogBase * openObject(KexiPart::Item *item, int viewMode,
00087             bool &openingCancelled, QMap<QString,QString>* staticObjectArgs = 0) = 0;
00088 
00090         virtual KexiDialogBase * openObject(const QCString& mime, const QString& name, 
00091             int viewMode, bool &openingCancelled, QMap<QString,QString>* staticObjectArgs = 0) = 0;
00092 
00094         virtual void acceptPropertySetEditing() = 0;
00095 
00103         virtual void propertySetSwitched(KexiDialogBase *dlg, bool force=false,
00104             bool preservePrevSelection = true) = 0;
00105 
00113         virtual tristate saveObject( KexiDialogBase *dlg,
00114             const QString& messageWhenAskingForName = QString::null, bool dontAsk = false ) = 0;
00115 
00120         virtual tristate closeDialog(KexiDialogBase *dlg) = 0;
00121 
00134         virtual tristate getNewObjectInfo( KexiPart::Item *partItem, KexiPart::Part *part,
00135             bool& allowOverwriting, const QString& messageWhenAskingForName = QString::null ) = 0;
00136 
00140         virtual void highlightObject(const QCString& mime, const QCString& name) = 0;
00141 
00142     protected slots:
00143         virtual void slotObjectRenamed(const KexiPart::Item &item, const QCString& oldName) = 0;
00144 
00145 };
00146 
00147 
00148 #endif
00149 
KDE Home | KDE Accessibility Home | Description of Access Keys