/* * Take the integer part of a complex number. * This means take the integer part of both components. */ COMPLEX * cint(COMPLEX *c) { COMPLEX *r; if (cisint(c)) return clink(c); r = comalloc(); qfree(r->real); r->real = qint(c->real); qfree(r->imag); r->imag = qint(c->imag); return r; }
QString AbstractTestModel::FieldName(int section) const { if (section >= qint(m_columns.size())) return QString::null; int field = ViewToMetaIndex(section); switch (field) { case 0: return QStringLiteral("filename"); case 1: return QStringLiteral("sometext"); case 2: return QStringLiteral("int_value"); default: return QString::null; } }
int AbstractTestModel::columnCount(const QModelIndex & parent /* = QModelIndex() */) const { return qint(m_columns.size()); }
void resize(size_type sz) { str->resize(qint(sz)); }