Exemple #1
0
int HDMIDisplay::teardown() {
    closeFrameBuffer();
    resetInfo();
    // unset system property
    property_set("hw.hdmiON", "0");
    return 0;
}
void ExternalDisplay::setExternalDisplay(int connected)
{

    hwc_context_t* ctx = mHwcContext;
    if(ctx) {
        ALOGD_IF(DEBUG, "%s: status = %d", __FUNCTION__,
                 connected);
        if(connected) {
            readResolution();
            //Get the best mode and set
            // TODO: Move this to activate
            setResolution(getBestMode());
            setDpyAttr();
            //enable hdmi vsync
        } else {
            // Disable the hdmi vsync
            closeFrameBuffer();
            resetInfo();
        }
        // Store the external display
        mExternalDisplay = connected;
        const char* prop = (connected) ? "1" : "0";
        // set system property
        property_set("hw.hdmiON", prop);
    }
    return;
}
void eaps8000UsbUICharWindow::connectUiElements()
{
    connect( _ui->btn_emergencyStop, SIGNAL( clicked() ), this,
             SLOT( emergencyStop() ) );
    connect( _ui->cob_setValue, SIGNAL( currentTextChanged( QString ) ), this,
             SLOT( setValueSelectionChanged() ) );
    connect( _ui->cob_unit, SIGNAL( currentTextChanged( QString ) ),
             this, SLOT( updateUnitRange() ) );

    connect( _ui->chb_calcValues, SIGNAL( stateChanged( int ) ), this,
             SLOT( fixStepSizeChanged() ) );

    connect( _ui->dsb_fromValue, SIGNAL( valueChanged( double ) ), this,
             SLOT( calculateRemainingTicks() ) );
    connect( _ui->dsb_toValue, SIGNAL( valueChanged( double ) ), this,
             SLOT( calculateRemainingTicks() ) );
    connect( _ui->dsb_stepSize, SIGNAL( valueChanged( double ) ), this,
             SLOT( calculateRemainingTicks() ) );
    connect( _ui->spb_repeat, SIGNAL( valueChanged( int ) ), this,
             SLOT( calculateRemainingTicks() ) );
    connect( _ui->chb_loop, SIGNAL( stateChanged( int ) ), this,
             SLOT( calculateRemainingTicks() ) );

    connect( _ui->btn_connect, SIGNAL( clicked() ), this,
             SLOT( connectivityButtonPressed() ) );
    connect( _ui->btn_startStop, SIGNAL( clicked() ), this,
             SLOT( startStop() ) );
    connect( _ui->btn_resetInfo, SIGNAL( clicked() ), this,
             SLOT( resetInfo() ) );
}
Exemple #4
0
void PlaylistManager::newPlaylist(QString name, QStringList tracks)
{
    Playlist *playlist = new Playlist(name);
    playlist->addTracks(tracks);
    
    //Reset Info so it finds the new playlist
    resetInfo();
    emit resetPlaylists();
}
int ExternalDisplay::teardownHDMIDisplay() {
    if(mConnectedFbNum == mHdmiFbNum) {
        // hdmi offline event..!
        closeFrameBuffer();
        resetInfo();
        setExternalDisplay(false);
    }
    return 0;
}
Exemple #6
0
void PlaylistManager::init()
{
    resetInfo();
    
    if(!KAJAM_QDIR.exists())
    {
        KAJAM_QDIR.mkdir(KAJAM_DIR);
        KAJAM_QDIR.mkdir(PLAYLIST_DIR);
    }
}
Exemple #7
0
void PlaylistManager::delPlaylist(QString name)
{
    Playlist *playlist = new Playlist(name);
    if(playlist->exists()) {
        playlist->deleteList();
    }
    
    //Reset Info so it finds the new playlist
    resetInfo();
    emit resetPlaylists();
}
void LLPanelEvent::setEventID(const U32 event_id)
{
	mEventID = event_id;
	// Should reset all of the panel state here
	resetInfo();

	if (event_id != 0)
	{
		gEventNotifier.add(event_id);
	}
}
Exemple #9
0
QStringList PlaylistManager::getPlaylistNames()
{
    resetInfo();
    
    QStringList names;
    for(int i = 0; i < count(); i++)
    {
        names.append(info.at(i).baseName());
    }
    
    return names;
}
void ExternalDisplay::processUEventOffline(const char *str) {
    const char *s1 = str + (strlen(str)-strlen(DEVICE_NODE_FB1));
    // check if it is for FB1
    if(strncmp(s1,DEVICE_NODE_FB1, strlen(DEVICE_NODE_FB1))== 0) {
        enableHDMIVsync(EXTERN_DISPLAY_NONE);
        closeFrameBuffer();
        resetInfo();
        setExternalDisplay(EXTERN_DISPLAY_NONE);
    }
    else if(strncmp(s1, DEVICE_NODE_FB2, strlen(DEVICE_NODE_FB2)) == 0) {
        closeFrameBuffer();
        setExternalDisplay(EXTERN_DISPLAY_NONE);
    }
    triggerRefresh();
}
Exemple #11
0
void eaps8000UsbWindow::connectUiElements()
{
    connect( _ui->btn_emergencyStop, SIGNAL( clicked() ), this,
             SLOT( emergencyStop() ) );
    connect( _ui->cob_measuredValues, SIGNAL( currentTextChanged( QString ) ),
             this, SLOT( visibilitySelectionChanged() ) );
    connect( _ui->cob_setValue, SIGNAL( currentTextChanged( QString ) ), this,
             SLOT( setValueSelectionChanged() ) );
    connect( _ui->cob_setValueUnit, SIGNAL( currentTextChanged( QString ) ),
             this, SLOT( updateUnitRange() ) );

    connect( _ui->btn_connect, SIGNAL( clicked() ), this,
             SLOT( connectivityButtonPressed() ) );
    connect( _ui->btn_setValue, SIGNAL( clicked() ), this, SLOT( setValue() ) );
    connect( _ui->btn_measuredValuesVisibility, SIGNAL( clicked() ), this,
             SLOT( changeVisibility() ) );
    connect( _ui->btn_resetInfo, SIGNAL( clicked() ), this,
             SLOT( resetInfo() ) );
}
Exemple #12
0
// renyang - 初始化這一個封包, 它的資料內容與封包長度
void Packet::init(char *data, int len)
{
#ifdef REN_DEBUG
	qWarning(QString("Packet::init(char *data, int %1)").arg(len));
#endif
	// renyang - 初始化封包的header
	strncpy(packet, HEADER_SYNC_STRING, HEADER_SYNC_LEN);
	packet[HEADER_SYNC_LEN] = (unsigned char) size;
	info = packet + HEADER_SYNC_LEN + 1; // Info
	dataLen = (unsigned char *) (packet + HEADER_SYNC_LEN + 2);
	*dataLen = (unsigned char) len;
	if (len > 0)
	{
		dataPtr = packet + HEADER_SIZE;
		// renyang - 把資料copy到自訂的封包中
		memcpy(dataPtr, data, len);
	}
	resetInfo();
}
Exemple #13
0
bool FileMgr::setColumnInfo(const int iTableType){

    if ( 0==iTableType ) {
        return false;
    }

    resetInfo();

    switch (iTableType) {
    case TABLE_HCODE_INFO:
        {
            HCodeInfoStruct* pBase=0;

            writeFieldBuf("HEAD_ID",FILEMGR_TRANS_INT,
                          ((char*)&(pBase->m_uiHeadID)-(char*)pBase),
                          sizeof(pBase->m_uiHeadID)); 

            writeFieldBuf("HEAD",FILEMGR_TRANS_STRING,
                          ((char*)&(pBase->m_sHead)-(char*)pBase),
                          sizeof(pBase->m_sHead)); 

            writeFieldBuf("TSP_ID",FILEMGR_TRANS_STRING,
                          ((char*)&(pBase->m_sTspID)-(char*)pBase),
                          sizeof(pBase->m_sTspID));

            writeFieldBuf("ZONE_CODE",FILEMGR_TRANS_STRING,
                          ((char*)&(pBase->m_sZoneCode)-(char*)pBase),
                          sizeof(pBase->m_sZoneCode));

            writeFieldBuf("EFF_DATE",FILEMGR_TRANS_EVTDATE,
                          ((char*)(pBase->m_sEffDate)-(char*)pBase),
                          sizeof(pBase->m_sEffDate));  

            writeFieldBuf("EXP_DATE",FILEMGR_TRANS_EVTDATE,
                          ((char*)(pBase->m_sExpDate)-(char*)pBase),
                          sizeof(pBase->m_sExpDate)); 
        }
        break;
    case TABLE_LOCAL_INFO:
        {
            HCodeInfoStruct* pBase=0;

            writeFieldBuf("HEAD_ID",FILEMGR_TRANS_INT,
                          ((char*)&(pBase->m_uiHeadID)-(char*)pBase),
                          sizeof(pBase->m_uiHeadID)); 

            writeFieldBuf("HEAD",FILEMGR_TRANS_STRING,
                          ((char*)&(pBase->m_sHead)-(char*)pBase),
                          sizeof(pBase->m_sHead)); 

            writeFieldBuf("EMULATORY_PARTNER_ID",FILEMGR_TRANS_INT,
                          ((char*)&(pBase->m_sTspID)-(char*)pBase),
                          sizeof(pBase->m_sTspID));

            writeFieldBuf("EXCHANGE_ID",FILEMGR_TRANS_INT,
                          ((char*)&(pBase->m_sZoneCode)-(char*)pBase),
                          sizeof(pBase->m_sZoneCode));

            writeFieldBuf("EFF_DATE",FILEMGR_TRANS_EVTDATE,
                          ((char*)(pBase->m_sEffDate)-(char*)pBase),
                          sizeof(pBase->m_sEffDate));  

            writeFieldBuf("EXP_DATE",FILEMGR_TRANS_EVTDATE,
                          ((char*)(pBase->m_sExpDate)-(char*)pBase),
                          sizeof(pBase->m_sExpDate)); 
        }
        break;
    case TABLE_MIN_INFO:
        {
            MinInfoStruct* pBase=0;

            writeFieldBuf("MIN_INFO_ID",FILEMGR_TRANS_INT,
                          ((char*)&(pBase->m_uiMinInfoID)-(char*)pBase),
                          sizeof(pBase->m_uiMinInfoID)); 

            writeFieldBuf("BEGIN_MIN",FILEMGR_TRANS_STRING,
                          ((char*)&(pBase->m_sBeginMin)-(char*)pBase),
                          sizeof(pBase->m_sBeginMin)); 

            writeFieldBuf("END_MIN",FILEMGR_TRANS_STRING,
                          ((char*)&(pBase->m_sEndMin)-(char*)pBase),
                          sizeof(pBase->m_sEndMin));

            writeFieldBuf("USER_FLAG",FILEMGR_TRANS_INT,
                          ((char*)&(pBase->m_iUserFlag)-(char*)pBase),
                          sizeof(pBase->m_iUserFlag));  

            writeFieldBuf("COUNTRY_ID",FILEMGR_TRANS_INT,
                          ((char*)&(pBase->m_iCountryID)-(char*)pBase),
                          sizeof(pBase->m_iCountryID)); 

            writeFieldBuf("HOME_CARRIER_CODE",FILEMGR_TRANS_STRING,
                          ((char*)&(pBase->m_sHomeCarrCode)-(char*)pBase),
                          sizeof(pBase->m_sHomeCarrCode)); 

            writeFieldBuf("ZONE_CODE",FILEMGR_TRANS_STRING,
                          ((char*)&(pBase->m_sZoneCode)-(char*)pBase),
                          sizeof(pBase->m_sZoneCode)); 

            writeFieldBuf("USER_TYPE",FILEMGR_TRANS_INT,
                          ((char*)&(pBase->m_iUserType)-(char*)pBase),
                          sizeof(pBase->m_iUserType));

            writeFieldBuf("EFF_DATE",FILEMGR_TRANS_EVTDATE,
                          ((char*)(pBase->m_sEffDate)-(char*)pBase),
                          sizeof(pBase->m_sEffDate));  

            writeFieldBuf("EXP_DATE",FILEMGR_TRANS_EVTDATE,
                          ((char*)(pBase->m_sExpDate)-(char*)pBase),
                          sizeof(pBase->m_sExpDate)); 
        }
        break;
    case TABLE_IMSI_INFO:
        {
            IMSIInfoStruct* pBase=0;

            writeFieldBuf("ISMI_ID",FILEMGR_TRANS_INT,
                          ((char*)&(pBase->m_uiIMSIID)-(char*)pBase),
                          sizeof(pBase->m_uiIMSIID)); 

            writeFieldBuf("IMSI_BEGIN",FILEMGR_TRANS_STRING,
                          ((char*)&(pBase->m_sBeginIMSI)-(char*)pBase),
                          sizeof(pBase->m_sBeginIMSI)); 

            writeFieldBuf("IMSI_END",FILEMGR_TRANS_STRING,
                          ((char*)&(pBase->m_sEndIMSI)-(char*)pBase),
                          sizeof(pBase->m_sEndIMSI));

            writeFieldBuf("IMSI_TYPE",FILEMGR_TRANS_INT,
                          ((char*)&(pBase->m_iIMSIType)-(char*)pBase),
                          sizeof(pBase->m_iIMSIType));

            writeFieldBuf("SPONSOR_CODE",FILEMGR_TRANS_STRING,
                          ((char*)(pBase->m_sSponsorCode)-(char*)pBase),
                          sizeof(pBase->m_sSponsorCode)); 

            writeFieldBuf("ZONE_CODE",FILEMGR_TRANS_STRING,
                          ((char*)(pBase->m_sZoneCode)-(char*)pBase),
                          sizeof(pBase->m_sZoneCode));  

            writeFieldBuf("EFF_DATE",FILEMGR_TRANS_EVTDATE,
                          ((char*)(pBase->m_sEffDate)-(char*)pBase),
                          sizeof(pBase->m_sEffDate));  

            writeFieldBuf("EXP_DATE",FILEMGR_TRANS_EVTDATE,
                          ((char*)(pBase->m_sExpDate)-(char*)pBase),
                          sizeof(pBase->m_sExpDate)); 
        }
        break;
    default:
        Log::log(0, "未知表类型:%d", iTableType);
        return false;
    }

    return true;
}
Exemple #14
0
void scanMusic(voice_index voice_, short *left_over)
{
  struct LOC_scanMusic V;
  Char buf[256], enote[256], xnote[256];
  boolean has_next = false, done = false;
  Char dur1, lastdur;
  music_word nscan;
  Char STR1[256];

  V.voice = voice_;
  strcpy(terminators, "d.x");
  resetInfo(V.voice, buf);
  *left_over = 0;
  V.store_macro = false;
  V.bar = full_bar;
  V.bar_length = 0;
  V.ngrace = 0;
  V.nmulti = 0;
  if (meternum == 0)
    V.bar = 32000;
  dur1 = duration(V.voice);
  lastdur = dur1;
  do {
    getNextMusWord(buf, V.note, &nscan);
    if (*V.note == '\0')
      break;
    V.count = 0;
    /*    if isNoteOrRest(note) and not (isPause(note) or isMultibarRest(note))
          then note:=toStandard(note); */
    V.doublex = (pos1('D', V.note) > 0);
    if (nscan == mword) {
      if (*V.note == '\0')
	error3(V.voice, "You may not end a line with a meter change");
      if (V.bar_length > 0)
	error3(V.voice, "Meter change only allowed at start of bar");
      else
	V.bar = barLength(V.note);
    } else if (nscan == rword) {
      if (!(isPause(V.note) || isMultiBarRest(V.note))) {
	processNote(V.note, xnote, dur1, &lastdur, &V.count);
	checkSticky(V.note, rest_attrib[V.voice-1]);
      }
    }
    if (*V.note != '\0')
      appendNote(V.voice, nscan);
    strcpy(enote, V.note);
    if (nscan == macro || nscan == endmacro)
      examineMacro(&V);
    if (nscan == abcdefg) {
      if (!multi_bar_rest && V.ngrace + V.nmulti == 0) {
	processNote(enote, xnote, dur1, &lastdur, &V.count);
	if (*xnote != '\0') {
	  checkSticky(enote, note_attrib[V.voice-1]);
	  appendToLine(V.voice, enote);
	  appendNote(V.voice, nscan);
	  strcpy(enote, xnote);
	}
	checkSticky(enote, note_attrib[V.voice-1]);
      }
    }
    appendToLine(V.voice, enote);
    if (*V.note == '\0')   /* !!! else word_bound[here]:=length(line); */
      done = true;
    sprintf(STR1, "%c", barsym);
    if (!strcmp(V.note, STR1)) {
      if (meternum == 0)
	error3(V.voice, "You may not use bar lines in barless music");
      else if (V.bar_length == 0)
	markBar(V.voice);
      else if (numberOfBars(V.voice) == 0 && V.bar_length < V.bar) {
	if (has_next)
	  has_next = false;   /*Should check whether pickups are equal*/
	else if (*left_over > 0)
	  error3(V.voice, "Bar is too short");
	*left_over = V.bar_length;
	V.bar_length = 0;
      }
    }
    if (nscan == nextvoice) {
      if (V.bar_length > 0)
	error3(V.voice, "Next voice before bar is full");
      else
	barForward(V.voice, -1);
      has_next = true;
    } else if (isPause(V.note))
      V.bar_length += V.bar;
    else if (!multi_bar_rest) {   /*do nothing*/
      if (!done && isNoteOrRest(V.note))
	countIt(&V);
      else
	maybeGroup(&V);
    }
    dur1 = lastdur;
    if (V.bar_length >= V.bar && V.ngrace + V.nmulti == 0 && !V.store_macro) {
      if (debugMode())
	printf("%d %d\n", V.voice, V.bar_length);
      barForward(V.voice, V.bar_length / V.bar);
      V.bar_length %= V.bar;
/* p2c: mtx.pas, line 268:
 * Note: Using % for possibly-negative arguments [317] */
    }
  } while (!done);
  setExtraLength(V.voice, V.bar_length);
  resetDuration(V.voice, dur1);
  regroup(V.voice);
}
void eaps8000UsbUICharWindow::mLabSignal( char signal, const QString& cmd )
{
    if( signal == SIGNAL_SHUTDOWN )
    {
        emergencyStop();
    }
    else if( signal == SIGNAL_STOP )
    {
        if( _ui->chb_setZeroAtStopSignal->isChecked() )
        {
            uiCharFinished();

            _ui->lbl_info->setText( STOP_RECEIVED );
            _ui->lbl_info->setStyleSheet( STYLE_ERROR );
        }
    }
    else if( signal == 10 )
    {
        if( _ui->btn_startStop->text() == STOP )
        {
            startStop();
        }
    }
    else if( signal == 11 )
    {
        if( _ui->btn_startStop->text() == START )
        {
            startStop();
        }
    }
    else if( signal == 12 )
    {
        if( _ui->btn_connect->text() == CONNECT_PORT )
        {
            connectPort();
        }
    }
    else if( signal == 13 )
    {
        if( _ui->btn_connect->text() == DISCONNECT_PORT )
        {
            disconnectPort();
        }
    }
    else if( signal == 14 )
    {
        if( cmd == "true" )
        {
            _ui->chb_setZeroAtStopSignal->setChecked( true );
        }
        else if( cmd == "false" )
        {
            _ui->chb_setZeroAtStopSignal->setChecked( false );
        }
    }
    else if( signal == 15 )
    {
        if( cmd == "true" )
        {
            _ui->chb_setZeroWhenFinished->setChecked( true );
        }
        else if( cmd == "false" )
        {
            _ui->chb_setZeroWhenFinished->setChecked( false );
        }
    }
    else if( signal == 16 )
    {
        if( cmd == "true" )
        {
            _ui->chb_emitStopSignal->setChecked( true );
        }
        else if( cmd == "false" )
        {
            _ui->chb_emitStopSignal->setChecked( false );
        }
    }
    else if( signal == 18
             || signal == 19 )
    {
        resetInfo();
    }
    else if( signal == 41 )
    {
        int indexType = _ui->cob_setValue->findText( cmd );
        if( indexType == -1 )
        {
            return;
        }
        _ui->cob_setValue->setCurrentIndex( indexType );
    }
    else if( signal == 42 )
    {
        bool conversionSuccessful = false;
        double stepSize = cmd.toDouble( &conversionSuccessful );
        if( conversionSuccessful )
        {
            _ui->dsb_stepSize->setValue( stepSize );
        }
    }
    else if( signal == 43 )
    {
        if( cmd == "true" )
        {
            _ui->chb_calcValues->setChecked( true );
        }
        else if( cmd == "false" )
        {
            _ui->chb_calcValues->setChecked( false );
        }
    }
    else if( signal == 45 )
    {
        bool conversionSuccessful = false;
        double fromValue = cmd.toDouble( &conversionSuccessful );
        if( conversionSuccessful )
        {
            _ui->dsb_fromValue->setValue( fromValue );
        }
    }
    else if( signal == 46 )
    {
        bool conversionSuccessful = false;
        double toValue = cmd.toDouble( &conversionSuccessful );
        if( conversionSuccessful )
        {
            _ui->dsb_toValue->setValue( toValue );
        }
    }
    else if( signal == 47 )
    {
        int unitType = _ui->cob_unit->findText( cmd );
        if( unitType == -1 )
        {
            return;
        }
        _ui->cob_unit->setCurrentIndex( unitType );
    }
    else if( signal == 51 )
    {
        bool conversionSuccessful = false;
        int repeat = cmd.toInt( &conversionSuccessful );
        if( conversionSuccessful )
        {
            _ui->spb_repeat->setValue( repeat );
        }
    }
    else if( signal == 52 )
    {
        if( cmd == "true" )
        {
            _ui->chb_loop->setChecked( true );
        }
        else if( cmd == "false" )
        {
            _ui->chb_loop->setChecked( false );
        }
    }
}
Exemple #16
0
void eaps8000UsbWindow::mLabSignal( char signal, const QString& cmd )
{
    if( signal == SIGNAL_SHUTDOWN )
    {
        emergencyStop();
    }
    else if( signal == SIGNAL_STOP )
    {
        if( _ui->chb_setZeroAtStopSignal->isChecked()
                && _port.isOpen() )
        {
            _port.setValue( eaps8000UsbPort::setValueType::setTypeVoltage, 0.0,
                            false );
            _port.setValue( eaps8000UsbPort::setValueType::setTypeCurrent, 0.0,
                            false );

            _ui->lbl_info->setText( STOP_RECEIVED );
            _ui->lbl_info->setStyleSheet( STYLE_ERROR );
            emit changeWindowState( this->windowTitle(), false );
        }
    }
    else if( signal == 12 )
    {
        if( _ui->btn_connect->text() == CONNECT_PORT )
        {
            connectPort();
        }
    }
    else if( signal == 13 )
    {
        if( _ui->btn_connect->text() == DISCONNECT_PORT )
        {
            disconnectPort();
        }
    }
    else if( signal == 18
             || signal == 19 )
    {
        resetInfo();
    }
    else if( signal == 30 )
    {
        if( _port.isRunning() )
        {
            _ui->dsp_setValue->setValue( 0.0 );
            _ui->chb_adjustSetValue->setChecked( false );
            _port.setValue( eaps8000UsbPort::setValueType::setTypeVoltage,
                            0.0, false );
            _port.setValue( eaps8000UsbPort::setValueType::setTypeCurrent,
                            0.0, false );
        }
    }
    else if( signal >= 31
             && signal <= 39 )
    {
        if( !_port.isRunning() )
        {
            return;
        }
        if( cmd.at( 0 ) != 'a'
                && cmd.at( 0 ) != 'n' )
        {
            return;
        }
        bool adjustValue = false;
        if( cmd.at( 0 ) == 'a' )
        {
            adjustValue = true;
        }
        bool convOk = false;
        double value = cmd.mid( 1 ).toDouble( &convOk );
        if( !convOk )
        {
            return;
        }

        QString type;
        QString unit;
        if( signal == 31 )
        {
            type = VOLTAGE;
            unit = UNIT_VOLT;
        }
        else if( signal == 32 )
        {
            type = CURRENT;
            unit = UNIT_AMPERE;
        }
        else if( signal == 33 )
        {
            type = POWER;
            unit = UNIT_WATT;
        }
        else if( signal == 34 )
        {
            type = POWER_BY_VOLTAGE;
            unit = UNIT_WATT;
        }
        else if( signal == 35 )
        {
            type == POWER_BY_CURRENT;
            unit = UNIT_WATT;
        }
        else if( signal == 36 )
        {
            type == RESISTANCE_BY_VOLTAGE;
            unit = UNIT_OHM;
        }
        else if( signal == 37 )
        {
            type == RESISTANCE_BY_CURRENT;
            unit = UNIT_OHM;
        }
        else if( signal == 38 )
        {
            type = _ui->cob_setValue->currentText();
            unit = _ui->cob_setValueUnit->currentText();
            value += _ui->dsp_setValue->value();
        }
        else if( signal == 39 )
        {
            type = _ui->cob_setValue->currentText();
            unit = _ui->cob_setValueUnit->currentText();
            value *= _ui->dsp_setValue->value();
        }

        int indexType = _ui->cob_setValue->findText( type );
        int indexUnit = _ui->cob_setValue->findText( unit );
        if( indexType == -1
                || indexUnit == -1 )
        {
            return;
        }
        _ui->dsp_setValue->setValue( value );
        _ui->cob_setValue->setCurrentIndex( indexType );
        _ui->cob_setValueUnit->setCurrentIndex( indexUnit );
        _ui->chb_adjustSetValue->setChecked( adjustValue );
        setValue();
    }
}