Subversion Repositories OpenInventory

Compare Revisions

Ignore whitespace Rev 103 → Rev 104

/trunk/DBViewer/mainwindow.cpp
22,34 → 22,9
 
MainWindow::openDataBase();
MainWindow::buildPreviewModel(tr("Ìîÿ ìîäåëü"), tr("7"));
MainWindow::initComboBox();
 
QMap <QString, QString> class_list_map;
QStringList classesNameList;
QStringList classesID_list;
QStringList tmp_stringList;
 
 
 
QString tmp_str;
 
class_list_map = MainWindow::getClassList();
classesID_list = class_list_map.keys();
classesNameList = class_list_map.values();
QMapIterator<QString, QString> interator(class_list_map);
// ui->comboBox->addItems(classesID_list);
// ui->comboBox->addItems(classesNameList);
while (interator.hasNext()) {
interator.next();
tmp_str = interator.value();
tmp_str.append(tr(" \t(ID="));
tmp_str.append(interator.key());
tmp_str.append(tr(")"));
tmp_stringList << tmp_str;
 
}
ui->comboBox->addItems(tmp_stringList);
 
 
}
 
MainWindow::~MainWindow()
322,8 → 297,10
rootItem1->setText(0, modelName);
 
rootItem1->setCheckState(0,Qt::Checked);
rootItems.append(rootItem1);
 
 
 
rootItem2 = new QTreeWidgetItem(rootItem1);
rootItem2->setText(0, root_class_name);
rootItem2->setText(1, rootClassID);
501,3 → 478,38
}
return result_map;
}
 
 
 
 
 
void MainWindow::initComboBox(){
 
QMap <QString, QString> class_list_map;
QStringList classesNameList;
QStringList classesID_list;
QStringList tmp_stringList;
 
 
 
QString tmp_str;
 
class_list_map = MainWindow::getClassList();
classesID_list = class_list_map.keys();
classesNameList = class_list_map.values();
QMapIterator<QString, QString> interator(class_list_map);
// ui->comboBox->addItems(classesID_list);
// ui->comboBox->addItems(classesNameList);
while (interator.hasNext()) {
interator.next();
tmp_str = interator.value();
tmp_str.append(tr(" \t(ID="));
tmp_str.append(interator.key());
tmp_str.append(tr(")"));
tmp_stringList << tmp_str;
 
}
ui->comboBox->addItems(tmp_stringList);
 
 
}
/trunk/DBViewer/mainwindow.h
71,6 → 71,8
void addChildsItems(QTreeWidgetItem *perent_class_item); // äîáîâëÿåì ê ýëåìåíòó äåðåâà â êà÷åñòâå äî÷åðíèõ ýëåìåíòîâ âñå êëàññû, äëÿ êîòîðûõ êëàññ ýëåìåíòà ÿâëÿåòñÿ êîíòåéíåðîì
QStringList classChields(QString class_id);
QMap <QString, QString> getClassList(); // ïîëó÷àåì ñïèñîê êëàññîâ
void initComboBox();
QList<QTreeWidgetItem *> rootItems; // ñïèñîê óêàçàòåëåé êîðíåâûõ óçëîâ (ìîäåëåé)
 
};
 
/trunk/DBViewer/mainwindow.ui
70,7 → 70,7
<rect>
<x>10</x>
<y>480</y>
<width>231</width>
<width>381</width>
<height>31</height>
</rect>
</property>