kexi

kexistartupdata.cpp
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#include "kexistartupdata.h"
21#include "kexi.h"
22
23#include <kexidb/driver.h>
24#include <kexidb/drivermanager.h>
25
26#include <tqfileinfo.h>
27#include <tqcstring.h>
28
29KexiStartupData::KexiStartupData()
30 : m_projectData(0)
31 , m_action(KexiStartupData::DoNothing)
32 , m_forcedUserMode(false)
33 , m_forcedDesignMode(false)
34 , m_isProjectNavigatorVisible(false)
35// , m_createDB(false)
36// , m_dropDB(false)
37// , m_alsoOpenDB(false)
38{
39}
40
41KexiStartupData::~KexiStartupData()
42{
43}
44
46{
47 return m_projectData;
48}
49
50KexiStartupData::Action KexiStartupData::action() const
51{
52 return m_action;
53}
54
56{
57 return m_forcedUserMode;
58}
59
61{
62 return m_forcedDesignMode;
63}
64
66{
67 if (m_forcedUserMode && !m_forcedDesignMode)
68 return m_isProjectNavigatorVisible;
69 return true;
70}
71
73{
74 return m_importActionData;
75}
76
77KexiStartupData::Import::Import()
78{
79}
80
81KexiStartupData::Import::operator bool() const
82{
83 return !fileName.isEmpty() && !mimeType.isEmpty();
84}
Kexi project core data member.
bool isProjectNavigatorVisible() const
bool forcedDesignMode() const
bool forcedUserMode() const
KexiStartupData::Import importActionData() const
KexiProjectData * projectData() const