kexi
kexistartupdata.cpp
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 #include "kexistartupdata.h" 00021 #include "kexi.h" 00022 00023 #include <kexidb/driver.h> 00024 #include <kexidb/drivermanager.h> 00025 00026 #include <qfileinfo.h> 00027 #include <qcstring.h> 00028 00029 KexiStartupData::KexiStartupData() 00030 : m_projectData(0) 00031 , m_action(KexiStartupData::DoNothing) 00032 , m_forcedUserMode(false) 00033 , m_forcedDesignMode(false) 00034 , m_isProjectNavigatorVisible(false) 00035 // , m_createDB(false) 00036 // , m_dropDB(false) 00037 // , m_alsoOpenDB(false) 00038 { 00039 } 00040 00041 KexiStartupData::~KexiStartupData() 00042 { 00043 } 00044 00045 KexiProjectData *KexiStartupData::projectData() const 00046 { 00047 return m_projectData; 00048 } 00049 00050 KexiStartupData::Action KexiStartupData::action() const 00051 { 00052 return m_action; 00053 } 00054 00055 bool KexiStartupData::forcedUserMode() const 00056 { 00057 return m_forcedUserMode; 00058 } 00059 00060 bool KexiStartupData::forcedDesignMode() const 00061 { 00062 return m_forcedDesignMode; 00063 } 00064 00065 bool KexiStartupData::isProjectNavigatorVisible() const 00066 { 00067 if (m_forcedUserMode && !m_forcedDesignMode) 00068 return m_isProjectNavigatorVisible; 00069 return true; 00070 } 00071 00072 KexiStartupData::Import KexiStartupData::importActionData() const 00073 { 00074 return m_importActionData; 00075 } 00076 00077 KexiStartupData::Import::Import() 00078 { 00079 } 00080 00081 KexiStartupData::Import::operator bool() const 00082 { 00083 return !fileName.isEmpty() && !mimeType.isEmpty(); 00084 }