kexi

kexiprojectdata.h
1/* This file is part of the KDE project
2 Copyright (C) 2003 Lucijan Busch <lucijan@gmx.at>
3 Copyright (C) 2003-2004 Jaroslaw Staniek <js@iidea.pl>
4
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public
7 License as published by the Free Software Foundation; either
8 version 2 of the License, or (at your option) any later version.
9
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Library General Public License for more details.
14
15 You should have received a copy of the GNU Library General Public License
16 along with this library; see the file COPYING.LIB. If not, write to
17 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 * Boston, MA 02110-1301, USA.
19*/
20
21#ifndef KEXIPROJECTDATA_H
22#define KEXIPROJECTDATA_H
23
24#include <kexidb/connectiondata.h>
25#include <kexidb/schemadata.h>
26
27#include <tqdatetime.h>
28
29class KexiProjectDataPrivate;
30
39class KEXICORE_EXPORT KexiProjectData : public TQObject, public KexiDB::SchemaData
40{
41 public:
42 typedef TQPtrList<KexiProjectData> List;
43 typedef TQMap<TQCString,TQString> ObjectInfo;
44
46
48 const TQString& dbname = TQString(), const TQString& caption = TQString() );
49
51 KexiProjectData( const KexiProjectData& pdata );
52
54
55 KexiProjectData& operator=(const KexiProjectData& pdata);
56
59 bool userMode() const;
60
61 KexiDB::ConnectionData* connectionData();
62
63 const KexiDB::ConnectionData* constConnectionData() const;
64
67 TQString databaseName() const;
68 void setDatabaseName(const TQString& dbName);
69
76 TQString infoString(bool nobr = true) const;
77
78 TQDateTime lastOpened() const;
79 void setLastOpened(const TQDateTime& lastOpened);
80
81 TQString description() const;
82 void setDescription(const TQString& desc);
83
87 void setReadOnly(bool set);
88
91 bool isReadOnly() const;
92
95 TQValueList<ObjectInfo> autoopenObjects;
96
102 uint formatVersion;
103
104 private:
105 KexiProjectDataPrivate *d;
106};
107
108#endif
Database specific connection data, e.g. host, port.
Kexi project core data member.
TQValueList< ObjectInfo > autoopenObjects