Subversion Repositories OpenInventory

Compare Revisions

Ignore whitespace Rev 127 → Rev 126

/trunk/DBViewer/mymodel.cpp
File deleted
/trunk/DBViewer/mymodel.h
File deleted
/trunk/DBViewer/mainwindow.h
4,8 → 4,6
 
//#include "mysql.h"
 
#include "mymodel.h"
 
#include "delegate.h"
 
#include <QMainWindow>
86,11 → 84,7
QMap <QString, QString> getFieldsList(QString class_id); // ïîëó÷àåì ñïèñîê ïîëåé êëàññà
void initComboBox();
QList<QTreeWidgetItem *> rootItems; // ñïèñîê óêàçàòåëåé êîðíåâûõ óçëîâ (ìîäåëåé)
 
/////// QSqlTableModel * sql_mogel;
 
MyModel * sql_mogel;
 
QSqlTableModel * sql_mogel;
int pointer_index; //èíäåêñ ïîëÿ-óêàçàòåëÿ íà ðîäèòåëüñêèé êëàññ
QString parentObject_id;
 
/trunk/DBViewer/database.cpp
377,11 → 377,8
ID = item->text(2);
inctance = parent_item->text(3);
delete sql_mogel;
 
///////sql_mogel = new QSqlTableModel();
sql_mogel = new MyModel();
 
// sql_mogel = new QSqlTableModel(this);
sql_mogel = new QSqlTableModel();
// sql_mogel = new QSqlTableModel(this);
sql_mogel->setTable(inctance);
// sql_mogel->setEditStrategy(QSqlTableModel::OnFieldChange);
sql_mogel->setEditStrategy(QSqlTableModel::OnManualSubmit);
432,13 → 429,8
// pointer_name = parent_item->text(4);
pointer_name = item->text(4);
delete sql_mogel;
 
 
////// sql_mogel = new QSqlTableModel();
 
sql_mogel = new MyModel();
 
// sql_mogel = new QSqlTableModel(this);
sql_mogel = new QSqlTableModel();
// sql_mogel = new QSqlTableModel(this);
sql_mogel->setTable(inctance);
// sql_mogel->setEditStrategy(QSqlTableModel::OnFieldChange);
sql_mogel->setEditStrategy(QSqlTableModel::OnManualSubmit);
/trunk/DBViewer/DBViewer.pro
4,22 → 4,14
QT += network \
opengl \
sql \
script \
scripttools \
svg \
xml \
xmlpatterns \
multimedia \
qt3support
xml
TARGET = DBViewer
TEMPLATE = app
SOURCES += main.cpp \
mainwindow.cpp \
database.cpp \
delegate.cpp \
mymodel.cpp
delegate.cpp
HEADERS += mainwindow.h \
delegate.h \
mymodel.h
delegate.h
FORMS += mainwindow.ui
RESOURCES += dbviewer.qrc
/trunk/DBViewer/mainwindow.cpp
27,10 → 27,7
MainWindow::buildPreviewModel(tr("Ìîÿ ìîäåëü"), tr("7"));
MainWindow::initComboBox();
getDatabaseData();
//// sql_mogel = new QSqlTableModel();
sql_mogel = new MyModel();
 
 
sql_mogel = new QSqlTableModel();
model_is_build = true;
connect(sql_mogel, SIGNAL(dataChanged(QModelIndex,QModelIndex)), this, SLOT(on_sql_mogel_dataChanged(QModelIndex,QModelIndex)));
ui->pushButton_3->setEnabled(false);