Subversion Repositories OpenInventory

Compare Revisions

Ignore whitespace Rev 215 → Rev 217

/trunk/DBViewer/database.cpp
820,9 → 820,27
filtr_model->insertRows(row, 1);
filtr_model->setData(filtr_model->index(row, 1), QVariant(model_id), Qt::EditRole); // ïðèñâàèâàåì íîâîå çíà÷åíèå ïîëþ "Model ID"
filtr_model->setData(filtr_model->index(row, 2), QVariant(class_id), Qt::EditRole); // ïðèñâàèâàåì íîâîå çíà÷åíèå ïîëþ "Class ID"
ui->pushButton_11->setEnabled(true);
ui->pushButton_12->setEnabled(true);
 
}
 
void MainWindow::on_pushButton_10_clicked()// íàæàòèå êíîïêè "Óäàëèòü ôèëüòð" (íà âêëàäêå ôèëüòðîâ)
{
 
}
 
void MainWindow::on_pushButton_11_clicked()// íàæàòèå êíîïêè "Ïðèìåíèòü" (íà âêëàäêå ôèëüòðîâ)
{
filtr_model->submitAll();
}
 
void MainWindow::on_pushButton_12_clicked()// íàæàòèå êíîïêè "Ñáðîñèòü èçìåíåíèÿ" (íà âêëàäêå ôèëüòðîâ)
{
 
}
 
 
void MainWindow::on_sql_mogel_dataChanged ( const QModelIndex & topLeft, const QModelIndex & bottomRight ){ // èçìåíèëè ñâîéñòâà îáúåêòà èëè äîáàâèëè íîâûé îáúåêò
int i;
i++;
/trunk/DBViewer/mainwindow.ui
7,7 → 7,7
<x>0</x>
<y>0</y>
<width>1094</width>
<height>703</height>
<height>691</height>
</rect>
</property>
<property name="windowTitle">
320,19 → 320,54
<item>
<layout class="QHBoxLayout" name="horizontalLayout_6">
<item>
<widget class="QPushButton" name="pushButton_9">
<property name="text">
<string>Добавить фильтр</string>
</property>
</widget>
<layout class="QVBoxLayout" name="verticalLayout_9">
<item>
<widget class="QPushButton" name="pushButton_9">
<property name="text">
<string>Добавить фильтр</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pushButton_11">
<property name="text">
<string>Применить</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QPushButton" name="pushButton_10">
<property name="text">
<string>Удалить фильтр</string>
<spacer name="horizontalSpacer_3">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<layout class="QVBoxLayout" name="verticalLayout_10">
<item>
<widget class="QPushButton" name="pushButton_10">
<property name="text">
<string>Удалить фильтр</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pushButton_12">
<property name="text">
<string>Сбросить изменения</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</item>
</layout>
/trunk/DBViewer/mainwindow.cpp
87,6 → 87,12
ui->pushButton_3->setEnabled(false);
ui->pushButton_4->setEnabled(false);
 
 
ui->pushButton_9->setEnabled(false);
ui->pushButton_10->setEnabled(false);
ui->pushButton_11->setEnabled(false);
ui->pushButton_12->setEnabled(false);
 
// setFrm.show();
 
// treeForm.show();
839,6 → 845,15
QStringList classesNameList;
QStringList classesID_list;
 
ui->pushButton_9->setEnabled(false);
ui->pushButton_10->setEnabled(false);
ui->pushButton_11->setEnabled(false);
ui->pushButton_12->setEnabled(false);
// ui->tableView->reset();
// MainWindow::filtr_model->clear();
delete filtr_model;
filtr_model = new MyModel();
 
int index;
classesID_list = class_list_map.keys();
classesNameList = class_list_map.values();
864,11 → 879,11
QString filtr_str;
class_id = item->text(1);
model_id = item->text(6);
filtr_str = tr("`Model_ID` = `");
filtr_str = tr("`Model_ID` = ");
filtr_str.append(model_id);
filtr_str.append(tr("` AND `Class_ID` = `"));
filtr_str.append(tr(" AND `Class_ID` = "));
filtr_str.append(class_id);
filtr_str.append(tr("`"));
// filtr_str.append(tr("`"));
 
delete filtr_model;
filtr_model = new MyModel();
878,6 → 893,9
filtr_model->select();
ui->tableView_3->setModel(filtr_model);
 
ui->pushButton_9->setEnabled(true);
ui->pushButton_10->setEnabled(true);
 
ui->comboBox->setEnabled(false);
 
 
/trunk/DBViewer/mainwindow.h
181,7 → 181,11
void on_pushButton_6_clicked();// íàæàòèå êíîïêè "Óäàëèòü ìîäåëü "
void on_pushButton_7_clicked();// íàæàòèå êíîïêè "Ïðèìåíèòü" (íà âêëàäêå ìîäåëåé)
void on_pushButton_8_clicked();// íàæàòèå êíîïêè "Îòìåíèòü" (íà âêëàäêå ìîäåëåé)
void on_pushButton_9_clicked();// íàæàòèå êíîïêè "Äîáàâèòü ôèëüòð" (íà âêëàäêå ìîäåëåé)
void on_pushButton_9_clicked();// íàæàòèå êíîïêè "Äîáàâèòü ôèëüòð" (íà âêëàäêå ôèëüòðîâ)
void on_pushButton_10_clicked();// íàæàòèå êíîïêè "Óäàëèòü ôèëüòð" (íà âêëàäêå ôèëüòðîâ)
void on_pushButton_11_clicked();// íàæàòèå êíîïêè "Ïðèìåíèòü" (íà âêëàäêå ôèëüòðîâ)
void on_pushButton_12_clicked();// íàæàòèå êíîïêè "Ñáðîñèòü èçìåíåíèÿ" (íà âêëàäêå ôèëüòðîâ)
 
void on_sql_mogel_dataChanged ( const QModelIndex & topLeft, const QModelIndex & bottomRight ); // èçìåíèëè ñâîéñòâà îáúåêòà èëè äîáàâèëè íîâûé îáúåêò
void on_model_for_ListModelsTable_dataChanged ( const QModelIndex & topLeft, const QModelIndex & bottomRight ); // èçìåíèëè ñâîéñòâà îáúåêòà èëè äîáàâèëè íîâûé îáúåêò
void applySetting();