Редакция 140 | Редакция 142 | К новейшей редакции | Весь файл | Учитывать пробелы | Содержимое файла | Авторство | Последнее изменение | Открыть журнал | RSS
Редакция 140 | Редакция 141 | ||
---|---|---|---|
Строка 32... | Строка 32... | ||
32 | 32 | ||
33 | MainWindow::openDataBase(); |
33 | MainWindow::openDataBase(); |
34 | 34 | ||
35 | MainWindow::initComboBox(); |
35 | MainWindow::initComboBox(); |
36 | 36 | ||
37 | MainWindow::buildPreviewModel(tr("Ìîÿ ìîäåëü"), tr("7")); |
37 | MainWindow::buildPreviewModel(tr("Ìîÿ ìîäåëü"), tr("46")); |
38 | 38 | ||
39 | 39 | ||
40 | MainWindow::creatModelString(); |
40 | MainWindow::creatModelString(); |
41 | //int i;
|
41 | //int i;
|
42 | //i++;
|
42 | //i++;
|
Строка 92... | Строка 92... | ||
92 | 92 | ||
93 | bool MainWindow::readModel(){ |
93 | bool MainWindow::readModel(){ |
94 | bool result; |
94 | bool result; |
95 | QString model_str;
|
95 | QString model_str;
|
96 | QFile file("modelstring.txt"); |
96 | QFile file("modelstring.txt"); |
97 | - | ||
- | 97 | // QFile file("model.txt");
|
|
98 | rootItem1 = new QTreeWidgetItem(ui->treeWidget); |
98 | rootItem1 = new QTreeWidgetItem(ui->treeWidget); |
99 | rootItem1->setText(0, tr("Óðîâåíü 1")); |
99 | rootItem1->setText(0, tr("Óðîâåíü 1")); |
100 | // rootItem2 = new QTreeWidgetItem(rootItem1);
|
100 | // rootItem2 = new QTreeWidgetItem(rootItem1);
|
101 | // rootItem2->setText(0, tr("óðîâåíü 2"));
|
101 | // rootItem2->setText(0, tr("óðîâåíü 2"));
|
102 | rootItem1->setCheckState(0,Qt::Checked); |
102 | rootItem1->setCheckState(0,Qt::Checked); |
Строка 166... | Строка 166... | ||
166 | itm_tmp->setText(0, QString(columnData.at(0).toString())); |
166 | itm_tmp->setText(0, QString(columnData.at(0).toString())); |
167 | if (columnData.at(1).toString() == "true") { |
167 | if (columnData.at(1).toString() == "true") { |
168 | itm_tmp->setCheckState(0,Qt::Checked); |
168 | itm_tmp->setCheckState(0,Qt::Checked); |
169 | }
|
169 | }
|
170 | else itm_tmp->setCheckState(0,Qt::Unchecked); |
170 | else itm_tmp->setCheckState(0,Qt::Unchecked); |
- | 171 | if (columnData.count()>2) |
|
- | 172 | {
|
|
171 | itm_tmp->setText(1, QString(columnData.at(2).toString())); |
173 | itm_tmp->setText(1, QString(columnData.at(2).toString())); |
172 | itm_tmp->setText(2, QVariant(number).toString()); // íîìåð ñòðîêè â ôàéëå-ìîäåëè îòîáðàæåíèÿ |
174 | itm_tmp->setText(2, QVariant(number).toString()); // íîìåð ñòðîêè â ôàéëå-ìîäåëè îòîáðàæåíèÿ |
173 | itm_tmp->setText(3, QVariant(indentations.size()).toString()); |
175 | itm_tmp->setText(3, QVariant(indentations.size()).toString()); |
174 | }
|
176 | }
|
- | 177 | }
|
|
175 | 178 | ||
176 | number++; |
179 | number++; |
177 | }
|
180 | }
|
178 | }
|
181 | }
|
179 | 182 |