bool Table::equals(const voltdb::Table *other) const { if (!(columnCount() == other->columnCount())) return false; if (!(indexCount() == other->indexCount())) return false; if (!(activeTupleCount() == other->activeTupleCount())) return false; if (!(databaseId() == other->databaseId())) return false; if (!(tableId() == other->tableId())) return false; if (!(name() == other->name())) return false; if (!(tableType() == other->tableType())) return false; std::vector<voltdb::TableIndex*> indexes = allIndexes(); std::vector<voltdb::TableIndex*> otherIndexes = other->allIndexes(); if (!(indexes.size() == indexes.size())) return false; for (std::size_t ii = 0; ii < indexes.size(); ii++) { if (!(indexes[ii]->equals(otherIndexes[ii]))) return false; } const voltdb::TupleSchema *otherSchema = other->schema(); if ((!m_schema->equals(otherSchema))) return false; voltdb::TableIterator firstTI(this); voltdb::TableIterator secondTI(other); voltdb::TableTuple firstTuple(m_schema); voltdb::TableTuple secondTuple(otherSchema); while(firstTI.next(firstTuple)) { if (!(secondTI.next(secondTuple))) return false; if (!(firstTuple.equals(secondTuple))) return false; } return true; }
QVariant displayData(uint column) const { const Interview &t = _table->item(tableId()); return (column == 0) ? QObject::tr("Интервью %1") .arg(t.dateTime().toString(Qt::SystemLocaleShortDate)) : QVariant(); }
virtual QVariant displayData(uint column) const { Person p = _table->item(tableId()); return (column == 0) ? QString("%1 %2.%3.") .arg(p.surname()) .arg(p.name().left(1)) .arg(p.secondName().left(1)) : QVariant(); }
bool setInterview(const Interview &interview) { return _table->updateItem(tableId(), interview); }
Interview interview() const { return _table->item(tableId()); }
bool setPerson(const Person &person) { return _table->updateItem(tableId(), person); }
Person person() const { return _table->item(tableId()); }
int PBGameInfo::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = QObject::qt_metacall(_c, _id, _a); if (_id < 0) return _id; #ifndef QT_NO_PROPERTIES if (_c == QMetaObject::ReadProperty) { void *_v = _a[0]; switch (_id) { case 0: *reinterpret_cast< QString*>(_v) = gameId(); break; case 1: *reinterpret_cast< QString*>(_v) = tableId(); break; case 2: *reinterpret_cast< QString*>(_v) = tourneyTableId(); break; case 3: *reinterpret_cast< QString*>(_v) = siteId(); break; case 4: *reinterpret_cast< int*>(_v) = canJoin(); break; case 5: *reinterpret_cast< QString*>(_v) = gameFamily(); break; case 6: *reinterpret_cast< double*>(_v) = smallBlind(); break; case 7: *reinterpret_cast< double*>(_v) = bigBlind(); break; case 8: *reinterpret_cast< int*>(_v) = maxSeats(); break; case 9: *reinterpret_cast< QString*>(_v) = driver(); break; case 10: *reinterpret_cast< int*>(_v) = canOpen(); break; case 11: *reinterpret_cast< int*>(_v) = openedTablesCount(); break; case 12: *reinterpret_cast< int*>(_v) = tablesMax(); break; case 13: *reinterpret_cast< int*>(_v) = tableOpened(); break; case 14: *reinterpret_cast< int*>(_v) = tourneyOpened(); break; case 15: *reinterpret_cast< int*>(_v) = gameComplete(); break; } _id -= 16; } else if (_c == QMetaObject::WriteProperty) { void *_v = _a[0]; switch (_id) { case 0: setGameId(*reinterpret_cast< QString*>(_v)); break; case 1: setTableId(*reinterpret_cast< QString*>(_v)); break; case 2: setTourneyTableId(*reinterpret_cast< QString*>(_v)); break; case 3: setSiteId(*reinterpret_cast< QString*>(_v)); break; case 4: setCanJoin(*reinterpret_cast< int*>(_v)); break; case 5: setGameFamily(*reinterpret_cast< QString*>(_v)); break; case 6: setSmallBlind(*reinterpret_cast< double*>(_v)); break; case 7: setBigBlind(*reinterpret_cast< double*>(_v)); break; case 8: setMaxSeats(*reinterpret_cast< int*>(_v)); break; case 9: setDriver(*reinterpret_cast< QString*>(_v)); break; case 10: setCanOpen(*reinterpret_cast< int*>(_v)); break; case 11: setOpenedTablesCount(*reinterpret_cast< int*>(_v)); break; case 12: setTablesMax(*reinterpret_cast< int*>(_v)); break; case 13: setTableOpened(*reinterpret_cast< int*>(_v)); break; case 14: setTourneyOpened(*reinterpret_cast< int*>(_v)); break; case 15: setGameComplete(*reinterpret_cast< int*>(_v)); break; } _id -= 16; } else if (_c == QMetaObject::ResetProperty) { _id -= 16; } else if (_c == QMetaObject::QueryPropertyDesignable) { _id -= 16; } else if (_c == QMetaObject::QueryPropertyScriptable) { _id -= 16; } else if (_c == QMetaObject::QueryPropertyStored) { _id -= 16; } else if (_c == QMetaObject::QueryPropertyEditable) { _id -= 16; } else if (_c == QMetaObject::QueryPropertyUser) { _id -= 16; } #endif // QT_NO_PROPERTIES return _id; }