aboutsummaryrefslogtreecommitdiffstats
path: root/SQLiteStudio3/guiSQLiteStudio/constraints/tableuniquepanel.cpp
blob: 14b298ed1de67207d23836973d7ea692ab4e3e18 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include "tableuniquepanel.h"
#include "ui_tablepkanduniquepanel.h"

TableUniquePanel::TableUniquePanel(QWidget *parent) :
    TablePrimaryKeyAndUniquePanel(parent)
{
    ui->autoIncrCheckBox->setVisible(false);
}


void TableUniquePanel::storeConfiguration()
{
    TablePrimaryKeyAndUniquePanel::storeConfiguration();

    if (constraint.isNull())
        return;

    // Type
    SqliteCreateTable::Constraint* constr = dynamic_cast<SqliteCreateTable::Constraint*>(constraint.data());
    constr->type = SqliteCreateTable::Constraint::UNIQUE;
}