kexi

kexi.h
1/* This file is part of the KDE project
2 Copyright (C) 2003-2005 Jaroslaw Staniek <js@iidea.pl>
3
4 This program 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 program 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 program; see the file COPYING. 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_H
21#define KEXI_H
22
23#include <tqguardedptr.h>
24#include <tqfont.h>
25
26#include <kexi_version.h>
27#include "kexiprojectdata.h"
28#include "kexipartmanager.h"
29#include "kexidbconnectionset.h"
30#include "kexiprojectset.h"
31#include <kexidb/drivermanager.h>
32#include <kexidb/driver.h>
33
34#include <tdelocale.h>
35#include <tdemessagebox.h>
36
37namespace Kexi
38{
39 KEXICORE_EXPORT void initCmdLineArgs(int argc, char *argv[], TDEAboutData* aboutData = 0);
40
42 enum ViewMode {
46 DataViewMode = 1,
47 DesignViewMode = 2,
49 };
50
51 KEXICORE_EXPORT TQString nameForViewMode(int m);
52
54 KEXICORE_EXPORT KexiDBConnectionSet& connset();
55
57 KEXICORE_EXPORT KexiProjectSet& recentProjects();
58
60 KEXICORE_EXPORT KexiDB::DriverManager& driverManager();
61
63 KEXICORE_EXPORT KexiPart::Manager& partManager();
64
68 KEXICORE_EXPORT void deleteGlobalObjects();
69
70 //some temporary flags
71
73 KEXICORE_EXPORT bool& tempShowForms();
74
76 KEXICORE_EXPORT bool& tempShowReports();
77
79 KEXICORE_EXPORT bool& tempShowMacros();
80
82 KEXICORE_EXPORT bool& tempShowScripts();
83
87 KEXICORE_EXPORT TQFont smallFont(TQWidget *init = 0);
88
90 class KEXICORE_EXPORT ObjectStatus
91 {
92 public:
93 ObjectStatus();
94
95 ObjectStatus(const TQString& message, const TQString& description);
96
97 ObjectStatus(KexiDB::Object* dbObject, const TQString& message, const TQString& description);
98
99 ~ObjectStatus();
100
101 const ObjectStatus& status() const;
102
103 bool error() const;
104
105 void setStatus(const TQString& message, const TQString& description);
106
109 void setStatus(KexiDB::Object* dbObject,
110 const TQString& message = TQString(), const TQString& description = TQString());
111
112 void setStatus(KexiDB::ResultInfo* result,
113 const TQString& message = TQString(), const TQString& description = TQString());
114
115 void setStatus(KexiDB::Object* dbObject, KexiDB::ResultInfo* result,
116 const TQString& message = TQString(), const TQString& description = TQString());
117
118 void clearStatus();
119
120 TQString singleStatusString() const;
121
122 void append( const ObjectStatus& otherStatus );
123
124 KexiDB::Object *dbObject() const { return dynamic_cast<KexiDB::Object*>((TQObject*)dbObj); }
125
128 operator KexiDB::MessageHandler*();
129
130 TQString message, description;
131 protected:
132 TQGuardedPtr<TQObject> dbObj;
134 };
135
136 KEXICORE_EXPORT TQString msgYouCanImproveData();
137
138}//namespace Kexi
139
141KEXICORE_EXPORT void KEXI_UNFINISHED(const TQString& feature_name, const TQString& extra_text = TQString());
142
144#define KEXI_UNFINISHED_SHARED_ACTION(action_name) \
145 KEXI_UNFINISHED(sharedAction(action_name) ? sharedAction(action_name)->text() : TQString())
146
147#endif
Database driver management, e.g. finding and loading drivers.
KexiPart's manager: looks up and instantiates them.
Stores information about multiple kexi project-data items.
KexiDB::MessageHandler * msgHandler
This is in fact KexiDB::Object.
Definition kexi.h:133
Namespace for general Kexi functions.
Definition kexi.h:38
KEXICORE_EXPORT bool & tempShowScripts()
false by default, flag loaded on main window startup
Definition kexi.cpp:134
KEXICORE_EXPORT void deleteGlobalObjects()
Definition kexi.cpp:103
KEXICORE_EXPORT bool & tempShowForms()
false by default, flag loaded on main window startup
Definition kexi.cpp:110
KEXICORE_EXPORT bool & tempShowMacros()
false by default, flag loaded on main window startup
Definition kexi.cpp:126
KEXICORE_EXPORT TQFont smallFont(TQWidget *init=0)
Definition kexi.cpp:143
KEXICORE_EXPORT KexiPart::Manager & partManager()
shared part manager
Definition kexi.cpp:97
KEXICORE_EXPORT KexiDB::DriverManager & driverManager()
shared driver manager
Definition kexi.cpp:91
KEXICORE_EXPORT bool & tempShowReports()
false by default, flag loaded on main window startup
Definition kexi.cpp:118
KEXICORE_EXPORT KexiDBConnectionSet & connset()
A set of known connections.
Definition kexi.cpp:74
KEXICORE_EXPORT TQString nameForViewMode(int m)
i18n'ed name of view mode m
Definition kexi.cpp:157
KEXICORE_EXPORT KexiProjectSet & recentProjects()
A set avaiulable of project infos.
Definition kexi.cpp:86
ViewMode
Definition kexi.h:42
@ TextViewMode
Also known as SQL View Mode.
Definition kexi.h:48
@ NoViewMode
Definition kexi.h:44
@ AllViewModes
Usable primarily in KexiPart::initInstanceActions().
Definition kexi.h:43