Subversion Repositories OpenInventory

Compare Revisions

Ignore whitespace Rev 139 → Rev 140

/trunk/DBViewer/mainwindow.cpp
11,6 → 11,9
MainWindow::readModel();
 
//QString model_str;
 
 
/*
MainWindow::creatModelString();
int i;
i++;
20,7 → 23,7
QTextStream out(&file_tmp);
out << MainWindow::modelString;
file_tmp.close();
 
*/
ui->treeWidget->setAlternatingRowColors(true);
ui->treeWidget_2->setAlternatingRowColors(true);
 
33,6 → 36,22
 
MainWindow::buildPreviewModel(tr("Ìîÿ ìîäåëü"), tr("7"));
 
 
MainWindow::creatModelString();
//int i;
//i++;
QFile file_tmp("./modelstring.txt");
bool ok;
file_tmp.remove();
ok = file_tmp.open(QIODevice::ReadWrite | QIODevice::Text);
QTextStream out(&file_tmp);
out.setCodec("cp1251");
out << MainWindow::modelString;
file_tmp.close();
 
 
 
 
getDatabaseData();
//// sql_mogel = new QSqlTableModel();
sql_mogel = new MyModel();
74,7 → 93,7
bool MainWindow::readModel(){
bool result;
QString model_str;
QFile file(":/model.txt");
QFile file("modelstring.txt");
 
rootItem1 = new QTreeWidgetItem(ui->treeWidget);
rootItem1->setText(0, tr("Óðîâåíü 1"));