| 1 |
////////////////////////////////////////////////////////////////////////////// |
| 2 |
////////////////////////////////////////////////////////////////////////////// |
| 3 |
// |
| 4 |
// copyright : (C) 2014 Eran Ifrah |
| 5 |
// file name : CreateForeignKey.h |
| 6 |
// |
| 7 |
// ------------------------------------------------------------------------- |
| 8 |
// A |
| 9 |
// _____ _ _ _ _ |
| 10 |
// / __ \ | | | | (_) | |
| 11 |
// | / \/ ___ __| | ___| | _| |_ ___ |
| 12 |
// | | / _ \ / _ |/ _ \ | | | __/ _ ) |
| 13 |
// | \__/\ (_) | (_| | __/ |___| | || __/ |
| 14 |
// \____/\___/ \__,_|\___\_____/_|\__\___| |
| 15 |
// |
| 16 |
// F i l e |
| 17 |
// |
| 18 |
// This program is free software; you can redistribute it and/or modify |
| 19 |
// it under the terms of the GNU General Public License as published by |
| 20 |
// the Free Software Foundation; either version 2 of the License, or |
| 21 |
// (at your option) any later version. |
| 22 |
// |
| 23 |
////////////////////////////////////////////////////////////////////////////// |
| 24 |
////////////////////////////////////////////////////////////////////////////// |
| 25 |
|
| 26 |
#ifndef CREATEFOREIGNKEY_H |
| 27 |
#define CREATEFOREIGNKEY_H |
| 28 |
#include <wx/wx.h> |
| 29 |
#include <wx/wxsf/ShapeBase.h> |
| 30 |
|
| 31 |
#include "ErdTable.h" |
| 32 |
#include "table.h" |
| 33 |
#include "column.h" |
| 34 |
#include "constraint.h" |
| 35 |
|
| 36 |
#include "GUI.h" // Base class: _CreateForeignKey |
| 37 |
/*! \brief Dialog for foreign key creating. If N:M connection type is selected, dialog create new connection table. */ |
| 38 |
class CreateForeignKey : public _CreateForeignKey { |
| 39 |
|
| 40 |
public: |
| 41 |
CreateForeignKey(wxWindow* parent, ErdTable* pSourceTable, ErdTable* pDestTable, const wxString& srcColName, const wxString& dstColName); |
| 42 |
virtual ~CreateForeignKey(); |
| 43 |
virtual void OnCancelClick(wxCommandEvent& event); |
| 44 |
virtual void OnOKClick(wxCommandEvent& event); |
| 45 |
virtual void OnOKUI(wxUpdateUIEvent& event); |
| 46 |
protected: |
| 47 |
ErdTable* m_pSrcTable; |
| 48 |
ErdTable* m_pDstTable; |
| 49 |
wxString m_srcColName; |
| 50 |
wxString m_dstColName; |
| 51 |
}; |
| 52 |
|
| 53 |
#endif // CREATEFOREIGNKEY_H |