Esempio n. 1
0
IoObject *IoAppleSensors_getRAMTemperature(IoAppleSensors *self, IoObject *locals, IoMessage *m)
{
	/*doc AppleSensors getRAMTemperature
		Returns a number for the RAM temperature sensor.
	 */
	SMCVal_t val = createEmptyValue();
	char cStr[16];
	kern_return_t result = SMCReadKey("TM0P", &val);
	if (result == kIOReturnSuccess) {
		result = representValue(val, &cStr[0]);
		if (result == TRUE) {
			float ftemp = atof(&cStr[0]);
			return IONUMBER(ftemp);
		}
	}
	return IONUMBER(-127);
}
QVariant QgsValueMapWidgetFactory::sortValue( QgsVectorLayer* vl, int fieldIdx, const QgsEditorWidgetConfig& config, const QVariant& cache, const QVariant& value ) const
{
    return representValue( vl, fieldIdx, config, cache, value );
}
QVariant QgsRelationReferenceFieldFormatter::sortValue( QgsVectorLayer *layer, int fieldIndex, const QVariantMap &config, const QVariant &cache, const QVariant &value ) const
{
  return representValue( layer, fieldIndex, config, cache, value );
}