Subversion Repositories OpenInventory

Compare Revisions

Ignore whitespace Rev 108 → Rev 109

/trunk/DBViewer/mainwindow.h
3,6 → 3,7
 
 
//#include "mysql.h"
 
#include <QMainWindow>
#include <QStandardItemModel>
#include <QStandardItem>
77,9 → 78,13
QMap <QString, QString> getClassList(); // ïîëó÷àåì ñïèñîê êëàññîâ
void initComboBox();
QList<QTreeWidgetItem *> rootItems; // ñïèñîê óêàçàòåëåé êîðíåâûõ óçëîâ (ìîäåëåé)
 
QMap <QString, QString> class_list_map;
void getDatabaseData();
void buildTree(QTreeWidgetItem * model_item);
QString getClassInctance(QString class_id); // ïîëó÷àåì èìÿ òàáëèöû - õðàíèëèùà îáúåêòîâ êëàññà
void showClassObjects(QTreeWidgetItem * parent_item, QTreeWidgetItem * model_item); // îòîáðàçèì îáúåêòû äî÷åðíèõ êëàññîâ
 
 
private slots:
void on_comboBox_currentIndexChanged( int index );
void on_treeWidget_itemChanged ( QTreeWidgetItem * item, int column );
/trunk/DBViewer/DBViewer.pro
8,7 → 8,8
TARGET = DBViewer
TEMPLATE = app
SOURCES += main.cpp \
mainwindow.cpp
mainwindow.cpp \
database.cpp
HEADERS += mainwindow.h
FORMS += mainwindow.ui
RESOURCES += dbviewer.qrc
/trunk/DBViewer/mainwindow.ui
30,6 → 30,21
<attribute name="title">
<string>Tab 1</string>
</attribute>
<widget class="QTreeWidget" name="treeWidget_2">
<property name="geometry">
<rect>
<x>10</x>
<y>10</y>
<width>701</width>
<height>451</height>
</rect>
</property>
<column>
<property name="text">
<string notr="true">1</string>
</property>
</column>
</widget>
</widget>
<widget class="QWidget" name="tab_2">
<attribute name="title">
66,6 → 81,9
</column>
</widget>
<widget class="QComboBox" name="comboBox">
<property name="enabled">
<bool>false</bool>
</property>
<property name="geometry">
<rect>
<x>10</x>
/trunk/DBViewer/mainwindow.cpp
24,6 → 24,7
MainWindow::openDataBase();
MainWindow::buildPreviewModel(tr("Ìîÿ ìîäåëü"), tr("7"));
MainWindow::initComboBox();
getDatabaseData();
 
 
}
631,7 → 632,6
ui->comboBox->setEnabled(true);
 
 
 
}
// if ((rootItem1) == (item) ) ui->comboBox->setEnabled(true);
else ( ui->comboBox->setEnabled(false));