sqldata_w/mainwindow.cpp
// Add table to validation view and list
Add table to validation view and list
Add table to validation view and list
int MainWindow::AddTableForValidation(const char *name)
{
    if(name == NULL)
        return -1;
    QFont font;
    font.setPointSize(8);
    _avail_tables.push_back(name);
    int idx = (int)_avail_tables.size() - 1;
    ui->validationTableWidget->insertRow(idx);
    ui->validationTableWidget->verticalHeader()->resizeSection(idx, 25);
    QTableWidgetItem *item = new QTableWidgetItem(name);
    item->setFont(font);
    ui->validationTableWidget->setItem(idx, 0, item);
    item = new QTableWidgetItem("");
    item->setFont(font);
    ui->validationTableWidget->setItem(idx, 1, item);
    item = new QTableWidgetItem("");
    item->setFont(font);
    ui->validationTableWidget->setItem(idx, 2, item);
    item = new QTableWidgetItem("");
    item->setFont(font);
    ui->validationTableWidget->setItem(idx, 3, item);
    item = new QTableWidgetItem("");
    item->setFont(font);
    ui->validationTableWidget->setItem(idx, 4, item);
    return idx;
}
int MainWindow :: AddTableForValidation ( const char * name ) { if ( name == NULL ) return -1 ; QFont font ; font . setPointSize ( 8 ) ; _avail_tables . push_back ( name ) ; int idx = ( int ) _avail_tables . size ( ) - 1 ; ui -> validationTableWidget -> insertRow ( idx ) ; ui -> validationTableWidget -> verticalHeader ( ) -> resizeSection ( idx , 25 ) ; QTableWidgetItem * item = new QTableWidgetItem ( name ) ; item -> setFont ( font ) ; ui -> validationTableWidget -> setItem ( idx , 0 , item ) ; item = new QTableWidgetItem ( " " ) ; item -> setFont ( font ) ; ui -> validationTableWidget -> setItem ( idx , 1 , item ) ; item = new QTableWidgetItem ( " " ) ; item -> setFont ( font ) ; ui -> validationTableWidget -> setItem ( idx , 2 , item ) ; item = new QTableWidgetItem ( " " ) ; item -> setFont ( font ) ; ui -> validationTableWidget -> setItem ( idx , 3 , item ) ; item = new QTableWidgetItem ( " " ) ; item -> setFont ( font ) ; ui -> validationTableWidget -> setItem ( idx , 4 , item ) ; return idx ; }
Add table to validation view and list
Add table to validation view and list
// Add to list