Subversion Repositories OpenInventory

Compare Revisions

Ignore whitespace Rev 214 → Rev 215

/trunk/DBViewer/database.cpp
809,6 → 809,20
 
}
 
 
void MainWindow::on_pushButton_9_clicked()// íàæàòèå êíîïêè "Äîáàâèòü ôèëüòð" (íà âêëàäêå ìîäåëåé)
{
QString class_id;
QString model_id;
class_id = ui->treeWidget->currentItem()->text(1);
model_id = ui->treeWidget->currentItem()->text(6);
int row = filtr_model->rowCount();
filtr_model->insertRows(row, 1);
filtr_model->setData(filtr_model->index(row, 1), QVariant(model_id), Qt::EditRole); // ïðèñâàèâàåì íîâîå çíà÷åíèå ïîëþ "Model ID"
filtr_model->setData(filtr_model->index(row, 2), QVariant(class_id), Qt::EditRole); // ïðèñâàèâàåì íîâîå çíà÷åíèå ïîëþ "Class ID"
 
}
 
void MainWindow::on_sql_mogel_dataChanged ( const QModelIndex & topLeft, const QModelIndex & bottomRight ){ // èçìåíèëè ñâîéñòâà îáúåêòà èëè äîáàâèëè íîâûé îáúåêò
int i;
i++;
1192,7 → 1206,7
 
modelString = model_for_ListModelsTable->data(model_for_ListModelsTable->index(i, 2)).toString();
if (modelString.isEmpty()) continue;
else setupModelData(modelString.split(QString("\n")), item_tmp, i); // ñòðîèì ìîäåëü
else setupModelData(modelString.split(QString("\n")), item_tmp, i, model_id); // ñòðîèì ìîäåëü
 
}