kexi

kexistartupdata.h

00001 /* This file is part of the KDE project
00002    Copyright (C) 2004-2007 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,
00034             CreateBlankProject,
00035             CreateFromTemplate,
00036             OpenProject,
00037             ImportProject,
00038             Exit
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 forcedUserMode() const;
00074 
00076         bool isProjectNavigatorVisible() const;
00077         
00078     protected:
00079         KexiProjectData *m_projectData;
00080         Action m_action;
00081         KexiStartupData::Import m_importActionData;
00082         bool m_forcedUserMode : 1;
00083         bool m_forcedDesignMode : 1;
00084         bool m_isProjectNavigatorVisible : 1;
00085         bool m_createDB : 1;
00086         bool m_dropDB : 1;
00087         bool m_alsoOpenDB : 1;
00088 };
00089 
00090 #endif
KDE Home | KDE Accessibility Home | Description of Access Keys