Subversion Repositories OpenInventory

Rev

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

Rev 145 Rev 146
Line 62... Line 62...
62
    sql_mogel = new MyModel();
62
    sql_mogel = new MyModel();
63
63
64
64
65
    model_is_build = true;
65
    model_is_build = true;
66
    connect(sql_mogel, SIGNAL(dataChanged(QModelIndex,QModelIndex)), this, SLOT(on_sql_mogel_dataChanged(QModelIndex,QModelIndex)));
66
    connect(sql_mogel, SIGNAL(dataChanged(QModelIndex,QModelIndex)), this, SLOT(on_sql_mogel_dataChanged(QModelIndex,QModelIndex)));
-
 
67
    connect(model_for_ListModelsTable, SIGNAL(dataChanged(QModelIndex,QModelIndex)), this, SLOT(on_model_for_ListModelsTable_dataChanged(QModelIndex,QModelIndex)));
-
 
68
67
    ui->pushButton_3->setEnabled(false);
69
    ui->pushButton_3->setEnabled(false);
68
    ui->pushButton_4->setEnabled(false);
70
    ui->pushButton_4->setEnabled(false);
69
71
70
   // setFrm.show();
72
   // setFrm.show();
71
73
Line 250... Line 252...
250
        initTreeWidget();
252
        initTreeWidget();
251
}
253
}
252
*/
254
*/
253
255
254
256
255
void MainWindow::creatModelString(){
257
QString MainWindow::creatModelString(QTreeWidgetItem* model){
256
258
257
    MainWindow::modelString.clear(); // î÷èùàåì ñòðîêó ìîäåëè
259
    MainWindow::modelString.clear(); // î÷èùàåì ñòðîêó ìîäåëè
258
 //   for (int i =0; i < rootItem1->childCount(); ++i )
260
 //   for (int i =0; i < rootItem1->childCount(); ++i )
259
261
260
    {MainWindow::addChildsString(rootItem1, 0);}
262
    {MainWindow::addChildsString(model, 0);}
-
 
263
-
 
264
    return MainWindow::modelString;
261
// {MainWindow::addChildsString(ui->treeWidget, 0);}
265
// {MainWindow::addChildsString(ui->treeWidget, 0);}
262
 /*
266
 /*
263
    int root_item_child_count;
267
    int root_item_child_count;
264
    int i;
268
    int i;
265
    root_item_child_count = rootItem1->childCount();
269
    root_item_child_count = rootItem1->childCount();
Line 749... Line 753...
749
753
750
void MainWindow::initListModelsTablle(){
754
void MainWindow::initListModelsTablle(){
751
    model_for_ListModelsTable = new QSqlTableModel(this);
755
    model_for_ListModelsTable = new QSqlTableModel(this);
752
756
753
    model_for_ListModelsTable->setTable(tr("ListOfModels"));
757
    model_for_ListModelsTable->setTable(tr("ListOfModels"));
754
    model_for_ListModelsTable->setEditStrategy(QSqlTableModel::OnFieldChange);
758
 //   model_for_ListModelsTable->setEditStrategy(QSqlTableModel::OnFieldChange);
755
-
 
-
 
759
    model_for_ListModelsTable->setEditStrategy(QSqlTableModel::OnManualSubmit);
756
    ui->tableView_2->setModel(model_for_ListModelsTable);
760
    ui->tableView_2->setModel(model_for_ListModelsTable);
757
    model_for_ListModelsTable->select();
761
    model_for_ListModelsTable->select();
-
 
762
    ui->pushButton_7->setEnabled(false);
-
 
763
    ui->pushButton_8->setEnabled(false);
758
}
764
}