kexi

kexidbshortcutfile.h

00001 /* This file is part of the KDE project
00002    Copyright (C) 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 KEXIDBSHORTCUTFILE_H
00021 #define KEXIDBSHORTCUTFILE_H
00022 
00023 #include <qstring.h>
00024 
00025 class KexiProjectData;
00026 namespace KexiDB { class ConnectionData; }
00027 
00033 class KEXICORE_EXPORT KexiDBShortcutFile
00034 {
00035     public:
00037         KexiDBShortcutFile( const QString& fileName );
00038 
00039         ~KexiDBShortcutFile();
00040 
00046         bool loadProjectData(KexiProjectData& data, QString* groupKey = 0);
00047 
00056         bool saveProjectData(const KexiProjectData& data, bool savePassword, 
00057             QString* groupKey = 0, bool overwriteFirstGroup = true);
00058 
00060         QString fileName() const;
00061 
00062     protected:
00063         class Private;
00064         Private *d;
00065 };
00066 
00072 class KEXICORE_EXPORT KexiDBConnShortcutFile : protected KexiDBShortcutFile
00073 {
00074     public:
00076         KexiDBConnShortcutFile( const QString& fileName );
00077 
00078         ~KexiDBConnShortcutFile();
00079 
00084         bool loadConnectionData(KexiDB::ConnectionData& data, QString* groupKey = 0);
00085 
00094         bool saveConnectionData(const KexiDB::ConnectionData& data, 
00095             bool savePassword, QString* groupKey = 0, bool overwriteFirstGroup = true);
00096 
00098         QString fileName() const { return KexiDBShortcutFile::fileName(); }
00099 
00100     protected:
00101 };
00102 
00103 #if 0
00109 class KexiDBConnSetShortcutFiles
00110 {
00111     public:
00112         KexiDBConnSetShortcutFiles();
00113 
00116         static bool loadConnectionDataSet(KexiDBConnectionSet& set);
00117 
00121         static bool saveConnectionDataSet(const KexiDBConnectionSet& set);
00122 }
00123 #endif
00124 #endif
KDE Home | KDE Accessibility Home | Description of Access Keys