Хранилища Subversion OpenInventory

Сравнить редакции

Не учитывать пробелы Редакция 81 → Редакция 82

/trunk/ClassEditor/classeditor.cpp
178,6 → 178,8
model = new QSqlTableModel(); // õðàíèëèùå îáúåêòîâ êëàññà
tableForInstance = new QTableView();
mymodel = new MyModel(this);
modelForPointers = new ModelForPointers(this); // // ìîäåëü äëÿ òàáëèöû ñ óêàçàòåëÿìè
 
//modelForDescription = new QSqlTableModel(this);
modelForDescription = new ModelForDescriptionTable(this);
 
189,8 → 191,12
 
/////model->setEditStrategy(QSqlTableModel::OnManualSubmit);
 
modelForPointers->setEditStrategy(QSqlTableModel::OnManualSubmit);
modelForPointers->setTable(tr("DescriptionOfClasses"));
 
 
 
 
//mymodel->setEditStrategy(QSqlTableModel::OnFieldChange);
 
 
198,11 → 204,12
//////////////////model->setSort(0, Qt::AscendingOrder);
mymodel->setSort(0, Qt::AscendingOrder);
modelForDescription->setSort(0, Qt::AscendingOrder);
modelForPointers->setSort(0, Qt::AscendingOrder);
 
 
// model->setFilter(tr("Èäåíòèôèêàòîð_ñèñòåìíîãî_áëîêà = '7' and Èíâåíòàðíûé_íîìåð = 'i09090909'"));
////////////////////model->select();
mymodel->select();
// modelForPointers->select();
 
 
 
216,6 → 223,7
mymodel->setHeaderData(2, Qt::Horizontal, tr("Ïñåâäîíèì êëàññà"));
mymodel->setHeaderData(4, Qt::Horizontal, tr("Êîìåíòàðèé"));
 
//ui->tableView_3->setModel(modelForPointers);
 
//ui->tableView->setModel(model);
ui->tableView->setModel(mymodel);
281,8 → 289,12
modelForDescription->select();
ui->tableView_2->resizeColumnsToContents();
 
// str_fltr.clear();
// str_fltr.append( tr(" FieldType = pointer "));
modelForPointers->setFilter(tr(" FieldType = \"pointer\" "));
modelForPointers->select();
ui->tableView_3->setModel(modelForPointers);
 
 
//connect(ui->tableView, SIGNAL(clicked(const QModelIndex)), this, SLOT(on_tableView_clicked(const QModelIndex)));
connect(mymodel, SIGNAL(dataChanged(QModelIndex,QModelIndex)), this, SLOT(on_myModel_dataChanged(QModelIndex,QModelIndex)));
connect(modelForDescription, SIGNAL(dataChanged(QModelIndex,QModelIndex)), this, SLOT(on_modelForDescription_dataChanged(QModelIndex,QModelIndex)));
432,7 → 444,7
int currRow = ClassEditor::currIndexOfClassesTable.row(); //
Inctance_str = mymodel->data(mymodel->index(currRow, 3)).toString();
query_str.append( Inctance_str);
query_str.append(tr(" ADD COLUMN `New field` CHAR(10)"));
query_str.append(tr(" ADD COLUMN `New field` CHAR(30)"));
bool ok = q.prepare(query_str);
 
ok = q.exec();