Хранилища Subversion OpenInventory

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

Учитывать пробелы Редакция 127 → Редакция 128

/trunk/DBViewer/mymodel.cpp
85,9 → 85,35
QVariant MyModel::data(const QModelIndex &index, int role) const {
 
QVariant value = QSqlTableModel::data(index, role);
QList <int> keys;
QStringList values;
keys = pointers_map.keys(); // ñïèñîê ñòîëáöîâ ñ óêàçàòåëÿìè
values = pointers_map.values(); // ñïèñîê òàáëèö-õðàíèëèù îáúåêòîâ ðîäèòåëüñêèõ êëàññîâ
 
switch (role) {
case Qt::DisplayRole: return value;
case Qt::DisplayRole:
{
int index_of_list;
index_of_list = keys.indexOf(index.column());
 
if (index_of_list == -1) return value;
else {
QString psrentInctance;
psrentInctance = values.at(index_of_list);
int ii;
ii++;
}
return value;
 
}
// if (index.column() == 1)
// return value.toString().prepend(tr("¹ "));
 
 
case Qt::EditRole: return value;
// if (index.column() == 1)
// return value.toString().prepend(tr("¹ "));
 
case Qt::TextColorRole:
if(index.column() == 1)
return qVariantFromValue(QColor(Qt::blue));