kexi

kexistartupdata.h
1/* This file is part of the KDE project
2 Copyright (C) 2004-2007 Jaroslaw Staniek <js@iidea.pl>
3
4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public
6 License as published by the Free Software Foundation; either
7 version 2 of the License, or (at your option) any later version.
8
9 This library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Library General Public License for more details.
13
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to
16 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18*/
19
20#ifndef KEXI_STARTUPDATA_H
21#define KEXI_STARTUPDATA_H
22
23#include <tqstring.h>
24
25class KexiProjectData;
26
29class KEXICORE_EXPORT KexiStartupData
30{
31 public:
32 enum Action {
33 DoNothing,
34 CreateBlankProject,
35 CreateFromTemplate,
36 OpenProject,
37 ImportProject,
38 Exit
39 };
40
44 class KEXICORE_EXPORT Import
45 {
46 public:
47 Import();
48 operator bool() const;
49 TQString fileName;
50 TQString mimeType;
51 };
52
53 KexiStartupData();
54 virtual ~KexiStartupData();
55
56 virtual bool init() { return true; };
57
58 Action action() const;
59
61 KexiProjectData *projectData() const;
62
64 KexiStartupData::Import importActionData() const;
65
68 bool forcedDesignMode() const;
69
73 bool forcedUserMode() const;
74
76 bool isProjectNavigatorVisible() const;
77
78 protected:
79 KexiProjectData *m_projectData;
80 Action m_action;
81 KexiStartupData::Import m_importActionData;
82 bool m_forcedUserMode : 1;
83 bool m_forcedDesignMode : 1;
84 bool m_isProjectNavigatorVisible : 1;
85 bool m_createDB : 1;
86 bool m_dropDB : 1;
87 bool m_alsoOpenDB : 1;
88};
89
90#endif
Kexi project core data member.