void LongPoll::setPollInterval(int interval) { Q_D(LongPoll); if (d->pollInterval != interval) { d->pollInterval = interval; emit pollIntervalChanged(interval); } }
const char *LH_LgBacklight::userInit() { if( const char *err = LH_QtPlugin::userInit() ) return err; devselect_ = new LH_Qt_QStringList( this, "Device", QStringList(), LH_FLAG_NOSAVE_DATA|LH_FLAG_NOSAVE_LINK|LH_FLAG_NOSOURCE|LH_FLAG_NOSINK|LH_FLAG_HIDDEN ); devselect_->setHelp( "The device which backlight you want to control." ); connect( devselect_, SIGNAL(changed()), this, SLOT(changeDev()) ); devcolor_ = new LH_Qt_QColor( this, "Color", Qt::white, LH_FLAG_NOSAVE_DATA|LH_FLAG_NOSAVE_LINK|LH_FLAG_HIDDEN ); devcolor_->setHelp("The color you want to see used as backlight."); connect( devcolor_, SIGNAL(changed()), this, SLOT(changeColor()) ); allcolor_ = new LH_Qt_QColor( this, "SetAllColor", Qt::white, LH_FLAG_NOSAVE_DATA|LH_FLAG_NOSAVE_LINK|LH_FLAG_HIDDEN|LH_FLAG_NOSOURCE ); allcolor_->setSubscribePath("/plugin/backlight/all/set"); connect( allcolor_, SIGNAL(changed()), this, SLOT(setAllColor()) ); poll_interval_ = new LH_Qt_int(this, "Poll interval", 500, 100, 5000); poll_interval_->setHelp("Interval in milliseconds to check for device color changes"); connect(poll_interval_, SIGNAL(changed()), this, SLOT(pollIntervalChanged())); LH_HidDevice::subscribe(this, SLOT(onlineChanged(LH_HidDevice*,bool))); pollIntervalChanged(); return 0; }