/* Slot to recieve data updates from the base QCaObject and generate integer updates. */ void QEInteger::convertVariant( const QVariant &value, QCaAlarmInfo& alarmInfo, QCaDateTime& timeStamp, const unsigned int& variableIndex ) { if( value.type() == QVariant::List ) { emit integerArrayChanged( integerFormat->formatIntegerArray( value ), alarmInfo, timeStamp, variableIndex ); int ai = getArrayIndex(); if( ai >= 0 && ai < value.toList().count() ) { // Convert this array element as a scalar update. emit integerChanged( integerFormat->formatInteger( value.toList().value( ai ) ), alarmInfo, timeStamp, variableIndex ); } } else { emit integerChanged( integerFormat->formatInteger( value ), alarmInfo, timeStamp, variableIndex ); // A scalar is also an array of one element. // QVariantList array; array.append (value); emit integerArrayChanged( integerFormat->formatIntegerArray( array ), alarmInfo, timeStamp, variableIndex ); } }
int QCaInteger::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { typedef qcaobject::QCaObject QMocSuperClass; _id = QMocSuperClass::qt_metacall(_c, _id, _a); if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { switch (_id) { case 0: integerChanged((*reinterpret_cast< const long(*)>(_a[1])),(*reinterpret_cast< QCaAlarmInfo(*)>(_a[2])),(*reinterpret_cast< QCaDateTime(*)>(_a[3])),(*reinterpret_cast< const uint(*)>(_a[4]))); break; case 1: writeInteger((*reinterpret_cast< const long(*)>(_a[1]))); break; case 2: convertVariant((*reinterpret_cast< const QVariant(*)>(_a[1])),(*reinterpret_cast< QCaAlarmInfo(*)>(_a[2])),(*reinterpret_cast< QCaDateTime(*)>(_a[3]))); break; default: ; } _id -= 3; } return _id; }
void QVLCInteger::trigger (vlc_object_t *obj, vlc_value_t old, vlc_value_t cur) { emit integerChanged (obj, old.i_int, cur.i_int); emit integerChanged (obj, cur.i_int); }
bool QVLCInteger::addCallback (QObject *tgt, const char *method, Qt::ConnectionType type) { return tgt->connect (this, SIGNAL(integerChanged(qlonglong)), method, type); }
void QVLCInteger::trigger (vlc_value_t, vlc_value_t cur) { emit integerChanged (cur.i_int); }