/*
 * 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;
}
示例#2
0
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;
	}
}
示例#3
0
int AbstractTestModel::columnCount(const QModelIndex & parent /* = QModelIndex() */) const
{
	return qint(m_columns.size());
}
示例#4
0
			void   resize(size_type sz) { str->resize(qint(sz)); }