Хранилища Subversion OpenInventory

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

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

/trunk/DBViewer/mainwindow.cpp
28,11 → 28,8
MainWindow::readSettings();
 
MainWindow::openDataBase();
 
MainWindow::buildPreviewModel(tr("Ìîÿ ìîäåëü"), tr("1"));
MainWindow::initComboBox();
 
MainWindow::buildPreviewModel(tr("Ìîÿ ìîäåëü"), tr("7"));
 
getDatabaseData();
//// sql_mogel = new QSqlTableModel();
sql_mogel = new MyModel();
/trunk/DBViewer/delegate.cpp
172,7 → 172,6
// QSpinBox *spinBox = static_cast<QSpinBox*>(editor);
// spinBox->setValue(value);
QString value = index.model()->data(index, Qt::EditRole).toString();
 
QComboBox *comboBox = static_cast<QComboBox*>(editor);
 
QStringList ID_list;
183,7 → 182,6
Name_list = items.values();
 
curr_index = ID_list.indexOf(value);
if (curr_index==-1) return;
comboBox->setCurrentIndex(curr_index);
/****************************************************
if (value == "0") comboBox->setCurrentIndex(0);
220,7 → 218,6
QComboBox *comboBox = static_cast<QComboBox*>(editor);
int currIndex;
currIndex = comboBox->currentIndex();
if (currIndex==-1) return;
// QString value = comboBox->itemText(currIndex);
 
ID_list = items.keys();