Хранилища Subversion OpenInventory

Сравнить редакции

Не учитывать пробелы Редакция 81 → Редакция 82

/trunk/ClassEditor/classeditor.h
6,6 → 6,7
#include "mymodel.h"
#include "modelfordescriptiontable.h"
#include "delegateforclassestable.h"
#include "modelforpointers.h"
 
#include <QTreeView>
 
34,7 → 35,12
QString currInctanceTable; // èìÿ òàáëèöû-õðàíèëèùà îáúåêòîâ äëÿ âûáðàííîãî êëàññà
 
QSqlTableModel* model;
// QSqlTableModel* modelForDescription;
 
 
// QSqlTableModel* modelForPointers; // ìîäåëü äëÿ òàáëèöû ñ óêàçàòåëÿìè
ModelForPointers* modelForPointers; // ìîäåëü äëÿ òàáëèöû ñ óêàçàòåëÿìè
 
// QSqlTableModel* modelForDescription;
ModelForDescriptionTable* modelForDescription;
 
QSqlTableModel* Inctance_model;
/trunk/ClassEditor/ClassEditor.pro
22,7 → 22,8
mymodel.cpp \
delegate.cpp \
modelfordescriptiontable.cpp \
delegateforclassestable.cpp
delegateforclassestable.cpp \
modelforpointers.cpp
HEADERS += classeditor.h \
mysql.h \
settingsdialog.h \
31,6 → 32,7
mymodel.h \
delegate.h \
modelfordescriptiontable.h \
delegateforclassestable.h
delegateforclassestable.h \
modelforpointers.h
FORMS += classeditor.ui \
settingsdialog.ui
/trunk/ClassEditor/classeditor.ui
7,7 → 7,7
<x>0</x>
<y>0</y>
<width>983</width>
<height>574</height>
<height>757</height>
</rect>
</property>
<property name="windowTitle">
61,7 → 61,7
<property name="geometry">
<rect>
<x>10</x>
<y>341</y>
<y>270</y>
<width>961</width>
<height>181</height>
</rect>
145,6 → 145,16
<string>Удалить все поля</string>
</property>
</widget>
<widget class="QTableView" name="tableView_3">
<property name="geometry">
<rect>
<x>10</x>
<y>490</y>
<width>961</width>
<height>192</height>
</rect>
</property>
</widget>
</widget>
<widget class="QMenuBar" name="menuBar">
<property name="geometry">
/trunk/ClassEditor/classeditor.cpp
178,6 → 178,8
model = new QSqlTableModel(); // õðàíèëèùå îáúåêòîâ êëàññà
tableForInstance = new QTableView();
mymodel = new MyModel(this);
modelForPointers = new ModelForPointers(this); // // ìîäåëü äëÿ òàáëèöû ñ óêàçàòåëÿìè
 
//modelForDescription = new QSqlTableModel(this);
modelForDescription = new ModelForDescriptionTable(this);
 
189,8 → 191,12
 
/////model->setEditStrategy(QSqlTableModel::OnManualSubmit);
 
modelForPointers->setEditStrategy(QSqlTableModel::OnManualSubmit);
modelForPointers->setTable(tr("DescriptionOfClasses"));
 
 
 
 
//mymodel->setEditStrategy(QSqlTableModel::OnFieldChange);
 
 
198,11 → 204,12
//////////////////model->setSort(0, Qt::AscendingOrder);
mymodel->setSort(0, Qt::AscendingOrder);
modelForDescription->setSort(0, Qt::AscendingOrder);
modelForPointers->setSort(0, Qt::AscendingOrder);
 
 
// model->setFilter(tr("Èäåíòèôèêàòîð_ñèñòåìíîãî_áëîêà = '7' and Èíâåíòàðíûé_íîìåð = 'i09090909'"));
////////////////////model->select();
mymodel->select();
// modelForPointers->select();
 
 
 
216,6 → 223,7
mymodel->setHeaderData(2, Qt::Horizontal, tr("Ïñåâäîíèì êëàññà"));
mymodel->setHeaderData(4, Qt::Horizontal, tr("Êîìåíòàðèé"));
 
//ui->tableView_3->setModel(modelForPointers);
 
//ui->tableView->setModel(model);
ui->tableView->setModel(mymodel);
281,8 → 289,12
modelForDescription->select();
ui->tableView_2->resizeColumnsToContents();
 
// str_fltr.clear();
// str_fltr.append( tr(" FieldType = pointer "));
modelForPointers->setFilter(tr(" FieldType = \"pointer\" "));
modelForPointers->select();
ui->tableView_3->setModel(modelForPointers);
 
 
//connect(ui->tableView, SIGNAL(clicked(const QModelIndex)), this, SLOT(on_tableView_clicked(const QModelIndex)));
connect(mymodel, SIGNAL(dataChanged(QModelIndex,QModelIndex)), this, SLOT(on_myModel_dataChanged(QModelIndex,QModelIndex)));
connect(modelForDescription, SIGNAL(dataChanged(QModelIndex,QModelIndex)), this, SLOT(on_modelForDescription_dataChanged(QModelIndex,QModelIndex)));
432,7 → 444,7
int currRow = ClassEditor::currIndexOfClassesTable.row(); //
Inctance_str = mymodel->data(mymodel->index(currRow, 3)).toString();
query_str.append( Inctance_str);
query_str.append(tr(" ADD COLUMN `New field` CHAR(10)"));
query_str.append(tr(" ADD COLUMN `New field` CHAR(30)"));
bool ok = q.prepare(query_str);
 
ok = q.exec();