Хранилища Subversion OpenInventory

Редакция

Редакция 62 | Редакция 64 | К новейшей редакции | Весь файл | Не учитывать пробелы | Содержимое файла | Авторство | Последнее изменение | Открыть журнал | RSS

Редакция 62 Редакция 63
Строка 420... Строка 420...
420
}
420
}
421
void ClassEditor::on_pushButton_4_clicked(){         // îáðàáîò÷èê íàæàòèÿ êíîïêè "Óäàëèòü ïîëå"
421
void ClassEditor::on_pushButton_4_clicked(){         // îáðàáîò÷èê íàæàòèÿ êíîïêè "Óäàëèòü ïîëå"
422
    int i;
422
    int i;
423
    i++;
423
    i++;
424
    QModelIndex model_index;
424
    QModelIndex model_index;
425
    QItemSelectionModel *selectionModel = ui->tableView->selectionModel();
425
    QItemSelectionModel *selectionModel = ui->tableView_2->selectionModel();
426
    QModelIndexList indexes = selectionModel->selectedIndexes();
426
    QModelIndexList indexes = selectionModel->selectedIndexes();
427
    //model_index = mymodel->selec;
427
    //model_index = mymodel->selec;
428
    //modelList = ui->tableView->SelectItems;
428
    //modelList = ui->tableView->SelectItems;
429
    i = indexes.size();
429
    i = indexes.size();
-
 
430
    QList<int> selectedRows;
-
 
431
    selectedRows.clear();
-
 
432
    foreach (model_index, indexes){ // ñïèñîê âñåõ âûäåëåííûõ ñòðîê
-
 
433
        if (!selectedRows.contains(model_index.row()))  selectedRows.append(model_index.row());
-
 
434
-
 
435
    }
-
 
436
    i = selectedRows.size();
430
437
431
    if (i > 0) model_index = indexes.at(0);
438
    if (i > 0) model_index = indexes.at(0);
432
    i++;
439
    i++;
433
}
440
}
434
441
435
442
-
 
443
void ClassEditor::on_pushButton_5_clicked(){         // îáðàáîò÷èê íàæàòèÿ êíîïêè "Óäàëèòü âñå ïîëÿ"
-
 
444
int row;
-
 
445
row = ClassEditor::modelForDescription->rowCount();
-
 
446
ClassEditor::modelForDescription->removeRows(0, row);
-
 
447
ClassEditor::modelForDescription->submitAll();
-
 
448
}
-
 
449
436
void ClassEditor::on_myModel_dataChanged( const QModelIndex & topLeft, const QModelIndex & bottomRight ){
450
void ClassEditor::on_myModel_dataChanged( const QModelIndex & topLeft, const QModelIndex & bottomRight ){
437
int i;
451
int i;
438
i++;
452
i++;
439
ui->tableView->resizeColumnsToContents();
453
ui->tableView->resizeColumnsToContents();
440
}
454
}