Хранилища Subversion OpenInventory

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

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

/trunk/DBViewer/mainwindow.cpp
82,6 → 82,7
{
delete sql_mogel;
delete ui;
delete model_for_ListModelsTable;
}
 
void MainWindow::changeEvent(QEvent *e)
810,7 → 811,7
 
 
void MainWindow::initListModelsTablle(){
model_for_ListModelsTable = new QSqlTableModel(this);
model_for_ListModelsTable = new QSqlTableModel();
 
model_for_ListModelsTable->setTable(tr("ListOfModels"));
// model_for_ListModelsTable->setEditStrategy(QSqlTableModel::OnFieldChange);
/trunk/DBViewer/database.cpp
800,10 → 800,27
// // // ui->treeWidget->clear(); // î÷èùàåì äåðåâî ñ ìîäåëüþ
 
// // // buildPreviewModel(tr("Ìîÿ ìîäåëü"), tr("1"));
 
model_is_build = false;
 
class_list_map.clear(); // î÷èùàåì ñïèñîê êëàññîâ
rootItems.clear();
models_items.clear();
delete model_for_ListModelsTable;
initListModelsTablle();
 
ui->treeWidget->clear();
initComboBox();
// model_for_ListModelsTable->select();
MainWindow::readModels();
 
 
 
// // // getDatabaseData();
// delete setFrm;
 
 
model_is_build = true;
setFrm.close();
}
 
870,4 → 887,5
else setupModelData(modelString.split(QString("\n")), item_tmp, i); // ñòðîèì ìîäåëü
 
}
 
}
/trunk/DBViewer/mainwindow.ui
17,9 → 17,9
<widget class="QTabWidget" name="tabWidget">
<property name="geometry">
<rect>
<x>20</x>
<x>10</x>
<y>10</y>
<width>521</width>
<width>1071</width>
<height>591</height>
</rect>
</property>
28,7 → 28,7
</property>
<widget class="QWidget" name="tab">
<attribute name="title">
<string>Tab 1</string>
<string>Данные</string>
</attribute>
<widget class="QTreeWidget" name="treeWidget_2">
<property name="geometry">
65,10 → 65,79
</property>
</column>
</widget>
<widget class="QPushButton" name="pushButton">
<property name="geometry">
<rect>
<x>530</x>
<y>450</y>
<width>251</width>
<height>30</height>
</rect>
</property>
<property name="text">
<string>Добавить новый объект</string>
</property>
</widget>
<widget class="QPushButton" name="pushButton_3">
<property name="geometry">
<rect>
<x>530</x>
<y>490</y>
<width>151</width>
<height>30</height>
</rect>
</property>
<property name="text">
<string>Применить</string>
</property>
</widget>
<widget class="QPushButton" name="pushButton_2">
<property name="geometry">
<rect>
<x>850</x>
<y>450</y>
<width>211</width>
<height>30</height>
</rect>
</property>
<property name="text">
<string>Удалить объект</string>
</property>
</widget>
<widget class="QPushButton" name="pushButton_4">
<property name="geometry">
<rect>
<x>850</x>
<y>490</y>
<width>211</width>
<height>30</height>
</rect>
</property>
<property name="text">
<string>Сбросить изменения</string>
</property>
</widget>
<widget class="QTableView" name="tableView">
<property name="geometry">
<rect>
<x>510</x>
<y>10</y>
<width>551</width>
<height>431</height>
</rect>
</property>
</widget>
<zorder>treeWidget_2</zorder>
<zorder>pushButton</zorder>
<zorder>pushButton_3</zorder>
<zorder>pushButton_2</zorder>
<zorder>pushButton_4</zorder>
<zorder>tableView</zorder>
<zorder>tabWidget_2</zorder>
</widget>
<widget class="QWidget" name="tab_2">
<attribute name="title">
<string>Tab 2</string>
<string>Модели</string>
</attribute>
<widget class="QTreeWidget" name="treeWidget">
<property name="geometry">
75,7 → 144,7
<rect>
<x>10</x>
<y>10</y>
<width>711</width>
<width>471</width>
<height>451</height>
</rect>
</property>
134,78 → 203,50
<string>ID</string>
</property>
</widget>
</widget>
</widget>
<widget class="QTabWidget" name="tabWidget_2">
<property name="geometry">
<rect>
<x>580</x>
<y>10</y>
<width>501</width>
<height>591</height>
</rect>
</property>
<property name="currentIndex">
<number>0</number>
</property>
<widget class="QWidget" name="tab_3">
<attribute name="title">
<string>Tab 1</string>
</attribute>
<widget class="QTableView" name="tableView">
<widget class="QPushButton" name="pushButton_5">
<property name="geometry">
<rect>
<x>10</x>
<y>10</y>
<width>471</width>
<height>451</height>
</rect>
</property>
</widget>
<widget class="QPushButton" name="pushButton">
<property name="geometry">
<rect>
<x>10</x>
<y>470</y>
<width>251</width>
<x>490</x>
<y>450</y>
<width>191</width>
<height>30</height>
</rect>
</property>
<property name="text">
<string>Добавить новый объект</string>
<string>Добавить модель</string>
</property>
</widget>
<widget class="QPushButton" name="pushButton_2">
<widget class="QPushButton" name="pushButton_7">
<property name="geometry">
<rect>
<x>269</x>
<y>470</y>
<width>211</width>
<x>490</x>
<y>490</y>
<width>130</width>
<height>30</height>
</rect>
</property>
<property name="text">
<string>Удалить объект</string>
<string>Применить</string>
</property>
</widget>
<widget class="QPushButton" name="pushButton_3">
<widget class="QPushButton" name="pushButton_6">
<property name="geometry">
<rect>
<x>10</x>
<y>510</y>
<width>151</width>
<x>830</x>
<y>450</y>
<width>221</width>
<height>30</height>
</rect>
</property>
<property name="text">
<string>Применить</string>
<string>Удалить модель</string>
</property>
</widget>
<widget class="QPushButton" name="pushButton_4">
<widget class="QPushButton" name="pushButton_8">
<property name="geometry">
<rect>
<x>269</x>
<y>510</y>
<x>840</x>
<y>490</y>
<width>211</width>
<height>30</height>
</rect>
214,73 → 255,16
<string>Сбросить изменения</string>
</property>
</widget>
</widget>
<widget class="QWidget" name="tab_4">
<attribute name="title">
<string>Tab 2</string>
</attribute>
<widget class="QTableView" name="tableView_2">
<property name="geometry">
<rect>
<x>10</x>
<x>490</x>
<y>10</y>
<width>471</width>
<height>351</height>
<width>561</width>
<height>431</height>
</rect>
</property>
</widget>
<widget class="QPushButton" name="pushButton_5">
<property name="geometry">
<rect>
<x>20</x>
<y>380</y>
<width>191</width>
<height>30</height>
</rect>
</property>
<property name="text">
<string>Добавить модель</string>
</property>
</widget>
<widget class="QPushButton" name="pushButton_6">
<property name="geometry">
<rect>
<x>259</x>
<y>380</y>
<width>221</width>
<height>30</height>
</rect>
</property>
<property name="text">
<string>Удалить модель</string>
</property>
</widget>
<widget class="QPushButton" name="pushButton_7">
<property name="geometry">
<rect>
<x>20</x>
<y>430</y>
<width>130</width>
<height>30</height>
</rect>
</property>
<property name="text">
<string>Применить</string>
</property>
</widget>
<widget class="QPushButton" name="pushButton_8">
<property name="geometry">
<rect>
<x>269</x>
<y>430</y>
<width>211</width>
<height>30</height>
</rect>
</property>
<property name="text">
<string>Сбросить изменения</string>
</property>
</widget>
</widget>
</widget>
</widget>