void KviQueryWindow::userAction(KviIrcMask * pUser, unsigned int uActionType) { int iTemperature = kvi_getUserActionTemperature(uActionType); if(KVI_OPTION_BOOL(KviOption_boolEnableQueryTracing)) { QString szOldUser, szOldHost; if(!m_pUserListView->userActionVerifyMask(pUser->nick(), pUser->user(), pUser->host(), iTemperature, szOldUser, szOldHost)) notifyTargetChange(pUser->nick(), szOldUser, szOldHost, pUser->nick(), pUser->user(), pUser->host()); } else { m_pUserListView->userAction(pUser, iTemperature); } updateLabelText(); }
static void toggleQuality() { char *text; Widget *w = menu.widgets[menu.index]; game.audioQuality = game.audioQuality == 22050 ? 44100 : 22050; changeSoundQuality(); text = getQuality(); updateLabelText(w->label, text); free(text); }
void KviQueryWindow::notifyCommonChannels(const QString & szNick, const QString & szUser, const QString & szHost, int iChans, const QString & szChans) { static QString szStar("*"); if(iChans > 0) { output(KVI_OUT_QUERYTRACE, __tr2qs("Common channels for \r!n\r%Q\r [%Q@\r!h\r%Q\r]: %Q"), &szNick, szUser.isEmpty() ? &szStar : &szUser, szHost.isEmpty() ? &szStar : &szHost, &szChans); } else { output(KVI_OUT_QUERYTRACE, __tr2qs("No common channels for \r!n\r%Q\r [%Q@\r!h\r%Q\r]"), &szNick, szUser.isEmpty() ? &szStar : &szUser, szHost.isEmpty() ? &szStar : &szHost); } updateLabelText(); }
void KviQueryWindow::userAction(const QString & szNick, const QString & szUser, const QString & szHost, unsigned int uActionType) { int iTemperature = kvi_getUserActionTemperature(uActionType); if(KVI_OPTION_BOOL(KviOption_boolEnableQueryTracing)) { QString szOldUser, szOldHost; if(!m_pUserListView->userActionVerifyMask(szNick, szUser, szHost, iTemperature, szOldUser, szOldHost)) notifyTargetChange(szNick, szOldUser, szOldHost, szNick, szUser, szHost); } else { m_pUserListView->userAction(szNick, szUser, szHost, iTemperature); } updateLabelText(); }
void KviQueryWindow::setDeadQuery() { m_iFlags |= Dead; m_pUserListView->enableUpdates(false); m_pUserListView->partAll(); m_pUserListView->enableUpdates(true); m_pUserListView->setUserDataBase(nullptr); if(connection()) connection()->unregisterQuery(this); if(context()) context()->registerDeadQuery(this); setType(KviWindow::DeadQuery); updateIcon(); updateCaption(); updateLabelText(); };
void EdgeGroup::removeEdge(PlugEdge * edge) { #ifdef QT_DEBUG Q_ASSERT(m_edges.contains(edge)); #else if (!m_edges.contains(edge)) { return; } #endif m_edges.remove(edge); // if the edge to be removed is the last one in the group, it might be 'unbent' // to avoid confusion, temporarily set the bent count to 1 before decreasing it again if ((m_edges.count() == 0) && (m_bentEdgesCount == 0)) { m_bentEdgesCount = 1; } decreaseBentCount(); updateLabelText(); }
//-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- void RimTernaryLegendConfig::fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) { if (changedField == &applyLocalMinMax) { userDefinedMaxValueSoil = m_localAutoMax[TERNARY_SOIL_IDX]; userDefinedMinValueSoil = m_localAutoMin[TERNARY_SOIL_IDX]; userDefinedMaxValueSgas = m_localAutoMax[TERNARY_SGAS_IDX]; userDefinedMinValueSgas = m_localAutoMin[TERNARY_SGAS_IDX]; userDefinedMaxValueSwat = m_localAutoMax[TERNARY_SWAT_IDX]; userDefinedMinValueSwat = m_localAutoMin[TERNARY_SWAT_IDX]; applyLocalMinMax = false; } else if (changedField == &applyGlobalMinMax) { userDefinedMaxValueSoil = m_globalAutoMax[TERNARY_SOIL_IDX]; userDefinedMinValueSoil = m_globalAutoMin[TERNARY_SOIL_IDX]; userDefinedMaxValueSgas = m_globalAutoMax[TERNARY_SGAS_IDX]; userDefinedMinValueSgas = m_globalAutoMin[TERNARY_SGAS_IDX]; userDefinedMaxValueSwat = m_globalAutoMax[TERNARY_SWAT_IDX]; userDefinedMinValueSwat = m_globalAutoMin[TERNARY_SWAT_IDX]; applyGlobalMinMax = false; } else if (changedField == &applyFullRangeMinMax) { userDefinedMaxValueSoil = 1.0; userDefinedMinValueSoil = 0.0; userDefinedMaxValueSgas = 1.0; userDefinedMinValueSgas = 0.0; userDefinedMaxValueSwat = 1.0; userDefinedMinValueSwat = 0.0; applyFullRangeMinMax = false; } updateLabelText(); updateLegend(); if (m_reservoirView) m_reservoirView->updateCurrentTimeStepAndRedraw(); }
static void changeVolume(int *maxVolume, Widget *w, int adjustment) { char *text; *maxVolume += adjustment; if (*maxVolume < 0) { *maxVolume = 0; } else if (*maxVolume > 10) { *maxVolume = 10; } text = getVolumePercent(*maxVolume); updateLabelText(w->label, text); free(text); }
KviUserListEntry * KviQueryWindow::setTarget(const QString & szNick, const QString & szUser, const QString & szHost) { KviUserListEntry * pEntry = m_pUserListView->join(szNick, szUser, szHost); if((!pEntry->globalData()->avatar()) && (!szUser.isEmpty()) && (szUser != "*")) m_pConsole->checkDefaultAvatar(pEntry->globalData(), szNick, szUser, szHost); setWindowName(szNick); updateCaption(); if(KVI_OPTION_BOOL(KviOption_boolEnableQueryTracing)) { QString szChans; int iChans = connection()->getCommonChannels(szNick, szChans); notifyCommonChannels(szNick, szUser, szHost, iChans, szChans); } KVS_TRIGGER_EVENT_3(KviEvent_OnQueryTargetAdded, this, szNick, szUser, szHost); updateLabelText(); return pEntry; }
void PageLabel::setPageNum(int _pageNum) { pageNum = _pageNum; updateLabelText(); }
void KviQueryWindow::userAction(const QString & szNick, unsigned int uActionType) { int iTemperature = kvi_getUserActionTemperature(uActionType); m_pUserListView->userAction(szNick, iTemperature); updateLabelText(); }
void KviQueryWindow::mergeQuery(KviQueryWindow * pQuery) { m_pIrcView->appendMessagesFrom(pQuery->m_pIrcView); updateLabelText(); }