Редакция 206 | Редакция 211 | К новейшей редакции | Весь файл | Не учитывать пробелы | Содержимое файла | Авторство | Последнее изменение | Открыть журнал | RSS
Редакция 206 | Редакция 209 | ||
---|---|---|---|
Строка 33... | Строка 33... | ||
33 | 33 | ||
34 | ui->treeWidget->setAlternatingRowColors(true); |
34 | ui->treeWidget->setAlternatingRowColors(true); |
35 | ui->treeWidget_2->setAlternatingRowColors(true); |
35 | ui->treeWidget_2->setAlternatingRowColors(true); |
36 | 36 | ||
37 | ui->treeWidget->setIconSize(QSize(30,30)); |
37 | ui->treeWidget->setIconSize(QSize(30,30)); |
- | 38 | ui->treeWidget->setColumnWidth(0, 400); |
|
38 | ui->treeWidget_2->setIconSize(QSize(128,128)); |
39 | ui->treeWidget_2->setIconSize(QSize(128,128)); |
39 | 40 | ||
40 | MainWindow::readSettings(); |
41 | MainWindow::readSettings(); |
41 | 42 | ||
42 | MainWindow::openDataBase(); |
43 | MainWindow::openDataBase(); |
Строка 84... | Строка 85... | ||
84 | 85 | ||
85 | ui->pushButton_3->setEnabled(false); |
86 | ui->pushButton_3->setEnabled(false); |
86 | ui->pushButton_4->setEnabled(false); |
87 | ui->pushButton_4->setEnabled(false); |
87 | 88 | ||
88 | // setFrm.show();
|
89 | // setFrm.show();
|
- | 90 | treeForm.show(); |
|
89 | 91 | ||
90 | connect(ui->getsettingAct, SIGNAL(triggered()), this, SLOT(getSetting())); // âûáîð â ãëàâíîé ôîðìå â ìåíþ "Áàçà äàííûõ" ïóíêòà "Ïàðàìåòðû ñîåäèíåíèÿ" |
92 | connect(ui->getsettingAct, SIGNAL(triggered()), this, SLOT(getSetting())); // âûáîð â ãëàâíîé ôîðìå â ìåíþ "Áàçà äàííûõ" ïóíêòà "Ïàðàìåòðû ñîåäèíåíèÿ" |
91 | connect(setFrm.pushButton, SIGNAL(clicked()), this, SLOT(applySetting())); |
93 | connect(setFrm.pushButton, SIGNAL(clicked()), this, SLOT(applySetting())); |
92 | 94 | ||
93 | // connect(ui->tableView_2,SIGNAL(activated(QModelIndex)),ui->tableView_2,SLOT(edit(QModelIndex)));
|
95 | // connect(ui->tableView_2,SIGNAL(activated(QModelIndex)),ui->tableView_2,SLOT(edit(QModelIndex)));
|
Строка 190... | Строка 192... | ||
190 | 192 | ||
191 | // Append a new item to the current parent's list of children.
|
193 | // Append a new item to the current parent's list of children.
|
192 | // // // parents.last()->appendChild(new QTreeWidgetItem(columnData, parents.last()));
|
194 | // // // parents.last()->appendChild(new QTreeWidgetItem(columnData, parents.last()));
|
193 | QTreeWidgetItem* itm_tmp; |
195 | QTreeWidgetItem* itm_tmp; |
194 | itm_tmp = new QTreeWidgetItem( parents.last()); |
196 | itm_tmp = new QTreeWidgetItem( parents.last()); |
- | 197 | itm_tmp->setFlags(Qt::ItemIsEditable | Qt::ItemIsEnabled); |
|
- | 198 | ||
- | 199 | /*
|
|
- | 200 | QLineEdit * edit_line;
|
|
- | 201 | edit_line = new QLineEdit(this);
|
|
- | 202 | ui->treeWidget->setItemWidget(itm_tmp, 5, edit_line);
|
|
- | 203 | */
|
|
- | 204 | //static QStandartDelegate delegate;
|
|
- | 205 | ui->treeWidget->setItemDelegateForColumn(5, &standart_delegate); |
|
- | 206 | ||
195 | 207 | ||
196 | itm_tmp->setText(0, QString(columnData.at(0).toString())); |
208 | itm_tmp->setText(0, QString(columnData.at(0).toString())); |
197 | if (columnData.at(1).toString() == "true") { |
209 | if (columnData.at(1).toString() == "true") { |
198 | itm_tmp->setCheckState(0,Qt::Checked); |
210 | itm_tmp->setCheckState(0,Qt::Checked); |
199 | }
|
211 | }
|