kexi

kexistartupdata.h

00001 /* This file is part of the KDE project
00002    Copyright (C) 2004-2005 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 KEXI_STARTUPDATA_H
00021 #define KEXI_STARTUPDATA_H
00022 
00023 #include <qstring.h>
00024 
00025 class KexiProjectData;
00026 
00029 class KEXICORE_EXPORT KexiStartupData
00030 {
00031     public:
00032         typedef enum Action {
00033             DoNothing = 0,
00034             CreateBlankProject = 1,
00035             UseTemplate = 2,
00036             OpenProject = 3,
00037             ImportProject = 4,
00038             Exit = 5
00039         };
00040 
00044         class KEXICORE_EXPORT Import
00045         {
00046             public:
00047                 Import();
00048                 operator bool() const;
00049                 QString fileName;
00050                 QString mimeType;
00051         };
00052 
00053         KexiStartupData();
00054         virtual ~KexiStartupData();
00055         
00056         virtual bool init() { return true; };
00057 
00058         Action action() const;
00059 
00061         KexiProjectData *projectData() const;
00062 
00064         KexiStartupData::Import importActionData() const;
00065 
00068         bool forcedDesignMode() const;
00069     
00073         bool forcedFinalMode() const;
00074         
00075     protected:
00076         KexiProjectData *m_projectData;
00077         Action m_action;
00078         KexiStartupData::Import m_importActionData;
00079         bool m_forcedFinalMode : 1;
00080         bool m_forcedDesignMode : 1;
00081         bool m_createDB : 1;
00082         bool m_dropDB : 1;
00083         bool m_alsoOpenDB : 1;
00084 };
00085 
00086 #endif
KDE Home | KDE Accessibility Home | Description of Access Keys