kexi
kexi.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef KEXI_H
00021 #define KEXI_H
00022
00023 #include <qguardedptr.h>
00024 #include <qfont.h>
00025
00026 #include <kexi_version.h>
00027 #include "kexiprojectdata.h"
00028 #include "kexipartmanager.h"
00029 #include "kexidbconnectionset.h"
00030 #include "kexiprojectset.h"
00031 #include <kexidb/drivermanager.h>
00032 #include <kexidb/driver.h>
00033
00034 #include <klocale.h>
00035 #include <kmessagebox.h>
00036
00037 namespace Kexi
00038 {
00039 KEXICORE_EXPORT void initCmdLineArgs(int argc, char *argv[], KAboutData* aboutData = 0);
00040
00042 enum ViewMode {
00043 AllViewModes = 0,
00044 NoViewMode = 0,
00045
00046 DataViewMode = 1,
00047 DesignViewMode = 2,
00048 TextViewMode = 4
00049 };
00051 KEXICORE_EXPORT QString nameForViewMode(int m);
00052
00054 KEXICORE_EXPORT KexiDBConnectionSet& connset();
00055
00057 KEXICORE_EXPORT KexiProjectSet& recentProjects();
00058
00060 KEXICORE_EXPORT KexiDB::DriverManager& driverManager();
00061
00063 KEXICORE_EXPORT KexiPart::Manager& partManager();
00064
00068 KEXICORE_EXPORT void deleteGlobalObjects();
00069
00070
00071
00073 KEXICORE_EXPORT bool& tempShowForms();
00074
00076 KEXICORE_EXPORT bool& tempShowReports();
00077
00079 KEXICORE_EXPORT bool& tempShowMacros();
00080
00082 KEXICORE_EXPORT bool& tempShowScripts();
00083
00087 KEXICORE_EXPORT QFont smallFont(QWidget *init = 0);
00088
00090 class KEXICORE_EXPORT ObjectStatus
00091 {
00092 public:
00093 ObjectStatus();
00094
00095 ObjectStatus(const QString& message, const QString& description);
00096
00097 ObjectStatus(KexiDB::Object* dbObject, const QString& message, const QString& description);
00098
00099 ~ObjectStatus();
00100
00101 const ObjectStatus& status() const;
00102
00103 bool error() const;
00104
00105 void setStatus(const QString& message, const QString& description);
00106
00109 void setStatus(KexiDB::Object* dbObject,
00110 const QString& message = QString::null, const QString& description = QString::null);
00111
00112 void setStatus(KexiDB::ResultInfo* result,
00113 const QString& message = QString::null, const QString& description = QString::null);
00114
00115 void setStatus(KexiDB::Object* dbObject, KexiDB::ResultInfo* result,
00116 const QString& message = QString::null, const QString& description = QString::null);
00117
00118 void clearStatus();
00119
00120 QString singleStatusString() const;
00121
00122 void append( const ObjectStatus& otherStatus );
00123
00124 KexiDB::Object *dbObject() const { return dynamic_cast<KexiDB::Object*>((QObject*)dbObj); }
00125
00128 operator KexiDB::MessageHandler*();
00129
00130 QString message, description;
00131 protected:
00132 QGuardedPtr<QObject> dbObj;
00133 KexiDB::MessageHandler* msgHandler;
00134 };
00135
00136 KEXICORE_EXPORT QString msgYouCanImproveData();
00137
00138 }
00139
00141 KEXICORE_EXPORT void KEXI_UNFINISHED(const QString& feature_name, const QString& extra_text = QString::null);
00142
00144 #define KEXI_UNFINISHED_SHARED_ACTION(action_name) \
00145 KEXI_UNFINISHED(sharedAction(action_name) ? sharedAction(action_name)->text() : QString::null)
00146
00147 #endif
|