Subversion Repositories OpenInventory

Compare Revisions

Ignore whitespace Rev 158 → Rev 159

/trunk/DBViewer/mymodel.cpp
26,6 → 26,7
if (bolleans_list.indexOf(index.column()) != -1)
{
flags |= Qt::ItemIsUserCheckable; // åñëè â ñòîëáöå òèï "BOOL", äåëàåì åãî âèáèðàåìûì
//flags |= Qt::ItemIsEnabled;
flags &= ~Qt::ItemIsEditable;
}
 
72,7 → 73,7
// lResult = updateRowInTable(index.row(), rec);
// lResult = setRecord(index.row(),rec); // âåðíåì ðåçóëüòàò îá óñòàíîâêå
 
/*
/*
QStandardItem* item = static_cast<QStandardItem*>(index.internalPointer());
Qt::CheckState state = (value.toInt() == 2) ? Qt::Checked : Qt::Unchecked;
item->setCheckState(state);
81,9 → 82,16
 
 
lResult = QSqlTableModel::setData(index, value, Qt::EditRole);
// emit MyModel::dataChanged(index, index);
 
// MyModel::reset();
// Qt::CheckState state = (value.toInt() == 2) ? Qt::Checked : Qt::Unchecked;
// lResult = QSqlTableModel::setData(index, value.toBool(), Qt::CheckStateRole);
 
// QSqlTableModel::setItemData(index,Qt::CheckStateRole);
// lResult = QSqlTableModel::setData(index, value, role);
 
// emit MyModel::dataChanged(index, index);
 
// MyModel::updateRowInTable();
// lResult = QSqlTableModel::setData(index, value, Qt::DisplayRole);
// QSqlTableModel::setData(index, value, Qt::CheckStateRole);
MyModel::submitAll();