diff options
| author | 2014-12-06 17:33:25 -0500 | |
|---|---|---|
| committer | 2014-12-06 17:33:25 -0500 | |
| commit | 7167ce41b61d2ba2cdb526777a4233eb84a3b66a (patch) | |
| tree | a35c14143716e1f2c98f808c81f89426045a946f /SQLiteStudio3/guiSQLiteStudio/constraints/columnforeignkeypanel.h | |
Imported Upstream version 2.99.6upstream/2.99.6
Diffstat (limited to 'SQLiteStudio3/guiSQLiteStudio/constraints/columnforeignkeypanel.h')
| -rw-r--r-- | SQLiteStudio3/guiSQLiteStudio/constraints/columnforeignkeypanel.h | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/SQLiteStudio3/guiSQLiteStudio/constraints/columnforeignkeypanel.h b/SQLiteStudio3/guiSQLiteStudio/constraints/columnforeignkeypanel.h new file mode 100644 index 0000000..3fe3077 --- /dev/null +++ b/SQLiteStudio3/guiSQLiteStudio/constraints/columnforeignkeypanel.h @@ -0,0 +1,48 @@ +#ifndef COLUMNFOREIGNKEYPANEL_H +#define COLUMNFOREIGNKEYPANEL_H + +#include "constraintpanel.h" +#include "parser/ast/sqlitecreatetable.h" +#include "guiSQLiteStudio_global.h" +#include <QStringListModel> +#include <QWidget> + +namespace Ui { + class ColumnForeignKeyPanel; +} + +class QGridLayout; +class QSignalMapper; + +class GUI_API_EXPORT ColumnForeignKeyPanel : public ConstraintPanel +{ + Q_OBJECT + + public: + explicit ColumnForeignKeyPanel(QWidget *parent = 0); + ~ColumnForeignKeyPanel(); + + bool validate(); + + protected: + void changeEvent(QEvent *e); + void constraintAvailable(); + void storeConfiguration(); + + private: + void init(); + void readConstraint(); + void readTables(); + void readCondition(SqliteForeignKey::Condition* condition); + void storeCondition(SqliteForeignKey::Condition::Action action, const QString& reaction); + void storeMatchCondition(const QString& reaction); + + Ui::ColumnForeignKeyPanel *ui = nullptr; + QStringListModel fkColumnsModel; + + private slots: + void updateState(); + void updateFkColumns(); +}; + +#endif // COLUMNFOREIGNKEYPANEL_H |
