kexi
kexipartmanager.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef KEXIPARTMANAGER_H
00022 #define KEXIPARTMANAGER_H
00023
00024 #include <qobject.h>
00025 #include <qdict.h>
00026 #include <qasciidict.h>
00027 #include <qintdict.h>
00028 #include <qvaluelist.h>
00029 #include <qptrlist.h>
00030
00031 #include <kservice.h>
00032
00033 #include <kexidb/object.h>
00034
00035
00036
00037 namespace KexiDB
00038 {
00039 class Connection;
00040 }
00041
00042 namespace KexiPart
00043 {
00044 class Info;
00045 class Part;
00046 class StaticPart;
00047
00048 struct Missing
00049 {
00050 QString name;
00051 QCString mime;
00052 QString url;
00053 };
00054
00055 typedef QAsciiDict<Info> PartInfoDict;
00056 typedef QDictIterator<Info> PartInfoDictIterator;
00057 typedef QValueList<Missing> MissingList;
00058 typedef QPtrList<Info> PartInfoList;
00059 typedef QPtrListIterator<Info> PartInfoListIterator;
00060 typedef QIntDict<Part> PartDict;
00061
00062
00068 class KEXICORE_EXPORT Manager : public QObject, public KexiDB::Object
00069 {
00070 Q_OBJECT
00071
00072 public:
00076 Manager(QObject *parent = 0);
00077 ~Manager();
00078
00082 void lookup();
00083
00088 Part *partForMimeType(const QString& mimeTypt);
00089
00094 Part *part(Info *);
00095
00099 Info *infoForMimeType(const QString& mimeType);
00100
00107 bool checkProject(KexiDB::Connection *conn);
00108
00112 MissingList missingParts() const { return m_missing; }
00113
00114
00118 PartInfoList *partInfoList() { return &m_partlist; }
00119
00120 signals:
00121 void partLoaded(KexiPart::Part*);
00122
00123 protected:
00125 void insertStaticPart(KexiPart::StaticPart* part);
00126
00127 private:
00128 PartDict m_parts;
00129 PartInfoList m_partlist;
00130 PartInfoDict m_partsByMime;
00131 MissingList m_missing;
00132 int m_nextTempProjectPartID;
00133 bool m_lookupDone : 1;
00134
00135 friend class StaticPart;
00136 };
00137
00138 }
00139
00140 #endif
00141
|