21#ifndef KEXIRELATIONWIDGET_H
22#define KEXIRELATIONWIDGET_H
26#include "kexiviewbase.h"
27#include "kexirelationview.h"
44class KEXIRELATIONSVIEW_EXPORT KexiRelationWidget :
public KexiViewBase
50 KexiRelationWidget(KexiMainWindow *win, TQWidget *parent,
const char *name=0);
51 virtual ~KexiRelationWidget();
54 TablesDict* tables()
const;
55 KexiRelationViewTableContainer* table(
const TQString& name)
const;
56 const ConnectionList* connections()
const;
59 void addTable(
const TQString& t);
63 virtual TQSize sizeHint()
const;
66 void objectCreated(
const TQCString &mime,
const TQCString& name);
67 void objectDeleted(
const TQCString &mime,
const TQCString& name);
68 void objectRenamed(
const TQCString &mime,
const TQCString& name,
const TQCString& newName);
71 void tableAdded(KexiDB::TableSchema& t);
72 void tableHidden(KexiDB::TableSchema& t);
73 void tablePositionChanged(KexiRelationViewTableContainer*);
74 void aboutConnectionRemove(KexiRelationViewConnection*);
75 void tableFieldDoubleClicked( KexiDB::TableSchema* table,
const TQString& fieldName );
81 void addTable(KexiDB::TableSchema *t,
const TQRect &rect = TQRect());
84 void addConnection(
const SourceConnection& conn);
86 void removeSelectedObject();
92 void removeAllConnections();
99 void tableViewGotFocus();
100 void connectionViewGotFocus();
101 void emptyAreaGotFocus();
102 void tableContextMenuRequest(
const TQPoint& pos);
103 void connectionContextMenuRequest(
const TQPoint& pos);
104 void emptyAreaContextMenuRequest(
const TQPoint& pos );
105 void openSelectedTable();
106 void designSelectedTable();
107 void slotTableHidden(KexiDB::TableSchema &table);
108 void aboutToShowPopupMenu();
109 void slotTableFieldDoubleClicked(TQListViewItem *i,
const TQPoint&,
int);
115 void executePopup( TQPoint pos = TQPoint(-1,-1) );
118 void invalidateActions();
121 void fillTablesCombo();
124 KexiMainWindow *m_win;
125 KComboBox *m_tableCombo;
126 KPushButton *m_btnAdd;
127 KexiRelationView *m_relationView;
128 KexiDB::Connection *m_conn;
130 TDEPopupMenu *m_tableQueryPopup
133 TDEAction *m_openSelectedTableAction, *m_designSelectedTableAction;
135 int m_tableQueryPopupTitleID, m_connectionPopupTitleID;
Provides database connection, allowing queries and data modification.
TQPtrList< TableSchema > List
Type of tables list.
Kexi's main window interface This interface is implemented by KexiMainWindowImpl class.
Base class for single view embeddable of in KexiDialogBase.
High-level database connectivity library with database backend drivers.