846,6 → 846,8 |
{ |
QString class_id; |
QString model_id; |
|
|
class_id = ui->treeWidget->currentItem()->text(1); |
model_id = ui->treeWidget->currentItem()->text(6); |
int row = filter_model->rowCount(); |
855,6 → 857,7 |
ui->pushButton_11->setEnabled(true); |
ui->pushButton_12->setEnabled(true); |
|
|
} |
|
void MainWindow::on_pushButton_10_clicked()// íàæàòèå êíîïêè "Óäàëèòü ôèëüòð" (íà âêëàäêå ôèëüòðîâ) |
887,6 → 890,18 |
model_is_build = true; |
MainWindow::getDatabaseData(); |
|
disconnect(filter_model, SIGNAL(dataChanged(QModelIndex,QModelIndex)), this, SLOT(on_filter_model_dataChanged(QModelIndex,QModelIndex))); |
delete filter_model; |
|
filter_model = new QSqlTableModel(); |
filter_model->setEditStrategy(QSqlTableModel::OnManualSubmit); |
/// filter_model = new MyModel(); |
|
connect(filter_model, SIGNAL(dataChanged(QModelIndex,QModelIndex)), this, SLOT(on_filter_model_dataChanged(QModelIndex,QModelIndex))); |
|
|
|
|
} |
|
void MainWindow::on_pushButton_11_clicked()// íàæàòèå êíîïêè "Ïðèìåíèòü" (íà âêëàäêå ôèëüòðîâ) |
900,6 → 915,17 |
MainWindow::readModels(); |
model_is_build = true; |
MainWindow::getDatabaseData(); |
disconnect(filter_model, SIGNAL(dataChanged(QModelIndex,QModelIndex)), this, SLOT(on_filter_model_dataChanged(QModelIndex,QModelIndex))); |
delete filter_model; |
|
filter_model = new QSqlTableModel(); |
filter_model->setEditStrategy(QSqlTableModel::OnManualSubmit); |
/// filter_model = new MyModel(); |
|
connect(filter_model, SIGNAL(dataChanged(QModelIndex,QModelIndex)), this, SLOT(on_filter_model_dataChanged(QModelIndex,QModelIndex))); |
|
|
|
} |
|
void MainWindow::on_pushButton_12_clicked()// íàæàòèå êíîïêè "Ñáðîñèòü èçìåíåíèÿ" (íà âêëàäêå ôèëüòðîâ) |
1456,9 → 1482,12 |
result_str.append(FieldName); |
result_str.append(tr("`")); |
result_str.append(ConditionalSymbol); |
result_str.append(tr("'")); |
result_str.append(ValueForComparison); |
result_str.append(tr("' ")); |
|
if (!ValueForComparison.isEmpty()) { |
result_str.append(tr("'")); |
result_str.append(ValueForComparison); |
result_str.append(tr("' ")); |
} |
result_str.append(PostCondition); |
|
|