Subversion Repositories OpenInventory

Rev

Rev 213 | Rev 217 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 213 Rev 215
Line 807... Line 807...
807
ui->pushButton_7->setEnabled(false);
807
ui->pushButton_7->setEnabled(false);
808
ui->pushButton_8->setEnabled(false);
808
ui->pushButton_8->setEnabled(false);
809
809
810
}
810
}
811
811
-
 
812
-
 
813
 void MainWindow::on_pushButton_9_clicked()// íàæàòèå êíîïêè "Äîáàâèòü ôèëüòð" (íà âêëàäêå ìîäåëåé)
-
 
814
 {
-
 
815
    QString class_id;
-
 
816
    QString model_id;
-
 
817
    class_id = ui->treeWidget->currentItem()->text(1);
-
 
818
    model_id = ui->treeWidget->currentItem()->text(6);
-
 
819
     int row = filtr_model->rowCount();
-
 
820
     filtr_model->insertRows(row, 1);
-
 
821
    filtr_model->setData(filtr_model->index(row, 1), QVariant(model_id), Qt::EditRole); // ïðèñâàèâàåì íîâîå çíà÷åíèå ïîëþ "Model ID"
-
 
822
    filtr_model->setData(filtr_model->index(row, 2), QVariant(class_id), Qt::EditRole); // ïðèñâàèâàåì íîâîå çíà÷åíèå ïîëþ "Class ID"
-
 
823
-
 
824
 }
-
 
825
812
void MainWindow::on_sql_mogel_dataChanged ( const QModelIndex & topLeft, const QModelIndex & bottomRight ){ // èçìåíèëè ñâîéñòâà îáúåêòà èëè äîáàâèëè íîâûé îáúåêò
826
void MainWindow::on_sql_mogel_dataChanged ( const QModelIndex & topLeft, const QModelIndex & bottomRight ){ // èçìåíèëè ñâîéñòâà îáúåêòà èëè äîáàâèëè íîâûé îáúåêò
813
int i;
827
int i;
814
i++;
828
i++;
815
829
816
if (sql_mogel->iconIndex() !=-1) {
830
if (sql_mogel->iconIndex() !=-1) {
Line 1190... Line 1204...
1190
    models_items[i] =item_tmp ;
1204
    models_items[i] =item_tmp ;
1191
1205
1192
1206
1193
    modelString = model_for_ListModelsTable->data(model_for_ListModelsTable->index(i, 2)).toString();
1207
    modelString = model_for_ListModelsTable->data(model_for_ListModelsTable->index(i, 2)).toString();
1194
    if (modelString.isEmpty()) continue;
1208
    if (modelString.isEmpty()) continue;
1195
    else setupModelData(modelString.split(QString("\n")), item_tmp, i); // ñòðîèì ìîäåëü
1209
    else setupModelData(modelString.split(QString("\n")), item_tmp, i, model_id); // ñòðîèì ìîäåëü
1196
1210
1197
        }
1211
        }
1198
1212
1199
}
1213
}
1200
1214