Subversion Repositories OpenInventory

Compare Revisions

Ignore whitespace Rev 96 → Rev 97

/trunk/DBViewer/mainwindow.cpp
21,7 → 21,7
file_tmp.close();
 
MainWindow::openDataBase();
MainWindow::buildPreviewModel(tr("3"));
MainWindow::buildPreviewModel(tr("Ìîÿ ìîäåëü"), tr("3"));
 
}
 
279,7 → 279,7
}
 
 
bool MainWindow::buildPreviewModel(QString rootClassID){
bool MainWindow::buildPreviewModel(QString modelName, QString rootClassID){
QSqlQuery q;
QString sql_str;
QString field_name_str;
292,14 → 292,18
root_class_name = MainWindow::ClassName(rootClassID); // îïðåäåëÿåì èìÿ êëàññà
 
rootItem1 = new QTreeWidgetItem(ui->treeWidget);
rootItem1->setText(0, root_class_name);
// rootItem2 = new QTreeWidgetItem(rootItem1);
// rootItem2->setText(0, tr("óðîâåíü 2"));
rootItem1->setText(0, modelName);
 
rootItem1->setCheckState(0,Qt::Checked);
 
 
rootItem2 = new QTreeWidgetItem(rootItem1);
rootItem2->setText(0, root_class_name);
rootItem2->setText(1, rootClassID);
rootItem2->setCheckState(0,Qt::Checked);
 
 
 
sql_str = tr("select * "
" from DescriptionOfClasses where DescriptionOfClasses.DefaultValue = '" //îïðåäåëèì êëàññû, äëÿ êîòîðûõ êîðíåâîé ÿâëÿåòñÿ êîíòåéíåðîì
);
/trunk/DBViewer/mainwindow.h
62,7 → 62,7
QSqlDatabase sql;
 
bool openDataBase();
bool buildPreviewModel(QString rootClassID);
bool buildPreviewModel(QString modelName, QString rootClassID);
QString ClassName(QString class_id); //âîçâðàùàåò èìÿ êëàññà ïî åãî ID