Subversion Repositories OpenInventory

Rev

Rev 99 | Rev 101 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 99 Rev 100
Line 325... Line 325...
325
325
326
                field_name_str = q.value(field_name).toString();
326
                field_name_str = q.value(field_name).toString();
327
327
328
                }
328
                }
329
329
-
 
330
-
 
331
-
 
332
330
}
333
}
331
334
332
335
333
336
334
QString MainWindow::ClassName(QString class_id){ //âîçâðàùàåò èìÿ êëàññà ïî åãî ID
337
QString MainWindow::ClassName(QString class_id){ //âîçâðàùàåò èìÿ êëàññà ïî åãî ID
Line 367... Line 370...
367
    return class_name_str;
370
    return class_name_str;
368
371
369
}
372
}
370
373
371
void MainWindow::addChildsItems(QTreeWidgetItem *perent_class_item){ // äîáîâëÿåì ê ýëåìåíòó äåðåâà â êà÷åñòâå äî÷åðíèõ ýëåìåíòîâ âñå êëàññû, äëÿ êîòîðûõ êëàññ ýëåìåíòà ÿâëÿåòñÿ êîíòåéíåðîì
374
void MainWindow::addChildsItems(QTreeWidgetItem *perent_class_item){ // äîáîâëÿåì ê ýëåìåíòó äåðåâà â êà÷åñòâå äî÷åðíèõ ýëåìåíòîâ âñå êëàññû, äëÿ êîòîðûõ êëàññ ýëåìåíòà ÿâëÿåòñÿ êîíòåéíåðîì
-
 
375
QStringList chields_list;
-
 
376
QString parent_ID;
-
 
377
QTreeWidgetItem *Item_tmp;
-
 
378
parent_ID = perent_class_item->text(1);
-
 
379
int chields_count, i;
-
 
380
-
 
381
chields_list = MainWindow::classChields(parent_ID);
-
 
382
if(chields_list.isEmpty()) return;
-
 
383
chields_count = chields_list.size();
-
 
384
for (int l = 0; l < chields_count; ++l){
-
 
385
    QString chield_class_name, chield_id;
-
 
386
    chield_id = chields_list.at(l);
-
 
387
    chield_class_name = MainWindow::ClassName(chield_id);
-
 
388
    Item_tmp = new QTreeWidgetItem(perent_class_item);
-
 
389
    Item_tmp->setText(0, chield_class_name);
-
 
390
    Item_tmp->setText(1, chield_id);
-
 
391
    Item_tmp->setCheckState(0, Qt::Checked);
-
 
392
}
-
 
393
-
 
394
i++;
372
395
373
}
396
}
374
397
375
398
376
/********************************************************
399
/********************************************************