kexi
kexirelationviewconnection.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef KEXIRELATIONVIEWCONNECTION_H
00022 #define KEXIRELATIONVIEWCONNECTION_H
00023
00024 #include <qstring.h>
00025 #include <qguardedptr.h>
00026
00027 class QPainter;
00028 class KexiRelationViewTableContainer;
00029 class KexiRelationView;
00030
00031 class KEXIRELATIONSVIEW_EXPORT KexiRelationViewConnection
00032 {
00033 public:
00034
00035 KexiRelationViewConnection(KexiRelationViewTableContainer *masterTbl,
00036 KexiRelationViewTableContainer *detailsTbl, struct SourceConnection &s, KexiRelationView *parent);
00037 ~KexiRelationViewConnection();
00038
00039
00040
00041
00042
00043
00044
00045
00046 void drawConnection(QPainter *p);
00047
00048 bool selected() { return m_selected; }
00049 void setSelected(bool s) { m_selected = s; }
00050
00051 const QRect connectionRect();
00052 const QRect oldRect() const { return m_oldRect; }
00053
00054 KexiRelationViewTableContainer *masterTable() { return m_masterTable; }
00055 KexiRelationViewTableContainer *detailsTable() { return m_detailsTable; }
00056 QString masterField() const { return m_masterField; }
00057 QString detailsField() const { return m_detailsField; }
00058
00059
00060 bool matchesPoint(const QPoint &p, int tolerance=3);
00061
00062
00063 QString toString() const;
00064
00065 private:
00066 QGuardedPtr<KexiRelationViewTableContainer> m_masterTable;
00067 QGuardedPtr<KexiRelationViewTableContainer> m_detailsTable;
00068 QString m_masterField;
00069 QString m_detailsField;
00070 QRect m_oldRect;
00071 bool m_selected;
00072 QGuardedPtr<KexiRelationView> m_parent;
00073 };
00074
00075 #endif
|