Subversion Repositories OpenInventory

Compare Revisions

Ignore whitespace Rev 113 → Rev 114

/trunk/DBViewer/database.cpp
32,11 → 32,12
model_name = model_item->text(0);
if (model_item->checkState(0) == false) return;
 
font.setWeight(20);
//font.setWeight(20);
font.setItalic(true);
item = new QTreeWidgetItem (ui->treeWidget_2);
item->setFont(0, font);
item->setText(0, model_name);
item->setTextColor(0, Qt::darkGreen);
 
 
rootClassID = model_item->child(0)->text(1);
195,17 → 196,20
QString str_tmp;
QTreeWidgetItem * title_item;
QFont font;
font.setWeight(40);
font.setBold(true);;
// font.setWeight(40);
font.setBold(true);
filtr_empty = filtr.isEmpty();
classID = model_item->text(1);
className = model_item->text(0);
inctance = getClassInctance(classID);
/*
 
title_item = new QTreeWidgetItem(parent_object_item);
title_item->setFont(0, font);
title_item->setText(0, className);
*/
title_item->setText(1, tr("class"));
title_item->setText(2, classID);
title_item->setTextColor(0, Qt::darkBlue);
 
sql_str = tr("select * "
" from " //íàõîäèì âñå îáúåêòû êëàññà â òàáëèöå - õðàíèëèùå îáúåêòîâ êëàññà
);
227,12 → 231,14
}
 
field_ID = q.record().indexOf(tr("ID"));
 
/*
if (q.size() <= 0) return;
title_item = new QTreeWidgetItem(parent_object_item);
title_item->setFont(0, font);
title_item->setText(0, className);
*/
 
 
while(q.next()){
if (q.record().count() > 1)
{
244,7 → 250,8
// itm = new QTreeWidgetItem(parent_object_item); // äîáàâëÿåì â äåðåâî óçåë, ñîîòâåòñòâóþùèé îáúåêòó
itm = new QTreeWidgetItem(title_item); // äîáàâëÿåì â äåðåâî óçåë, ñîîòâåòñòâóþùèé îáúåêòó
itm->setText(0, value_tmp);
 
itm->setText(1, tr("object"));
itm->setText(2, ID_tmp);
for (int i=0; i < model_item->childCount(); i++) // ïðîâåðÿåì, åñòü ëè ó êëàññà äî÷åðíèå êëàññû
{
QTreeWidgetItem * model_item_tmp; // åñëè åñòü