Form::Form(QWidget *parent) : QWidget(parent) { ui.setupUi(this); connect( this->ui.pushButton, SIGNAL( clicked() ), this, SLOT(SetLabelText()) ); connect( this->ui.checkBox, SIGNAL( clicked() ), this, SLOT(SetLabelText()) ); }
void CTcContainer::Update( CTcTestRunner& aRunner ) { // Update "Value" labels SetLabelText( ETestCaseValue, aRunner.CurrentTestCaseName() ); SetLabelText( ERequestValue, aRunner.CurrentRequestName() ); // Force screen update NOW DrawDeferred(); CEikonEnv::Static()->WsSession().Flush(); }
//----------------------------------------------------------------------------- // Purpose: //----------------------------------------------------------------------------- void CHudLevel::Reset(void) { wchar_t *tempString = g_pVGuiLocalize->Find("#Valve_Hud_LEVEL"); if (tempString) { SetLabelText(tempString); } else { SetLabelText(L"LEVEL"); } }
//----------------------------------------------------------------------------- // Purpose: //----------------------------------------------------------------------------- void CHudMoneyClassic::Reset(void) { wchar_t *tempString = g_pVGuiLocalize->Find("#Valve_Hud_MONEY"); if (tempString) { SetLabelText(tempString); } else { SetLabelText(L"MONEY"); } }
//----------------------------------------------------------------------------- // Purpose: //----------------------------------------------------------------------------- void CHudAmmo::Init( void ) { m_iAmmo = -1; m_iAmmo2 = -1; wchar_t *tempString = g_pVGuiLocalize->Find("#Valve_Hud_AMMO"); if (tempString) { SetLabelText(tempString); } else { SetLabelText(L"AMMO"); } }
void CTcContainer::UpdateStatus( const TDesC8& aStatus ) { // Update "Status" label SetLabelText( EStatusValue, aStatus ); // Force screen update NOW DrawNow(); CEikonEnv::Static()->WsSession().Flush(); }
InputPortRepresentation::InputPortRepresentation(std::type_index type, NodeRepresentation* parent, GraphDisplayArea* displayArea, const wxString& name, wxAlignment alignment) : PortRepresentationBase(parent, displayArea, "", alignment), m_name(name), m_type(type) { SetLabelText((name + " : ") + type.name()); wxStaticText::Bind(wxEVT_LEFT_DOWN, &InputPortRepresentation::OnMouse, this); wxStaticText::Bind(wxEVT_LEFT_UP, &InputPortRepresentation::OnMouse, this); wxStaticText::Bind(wxEVT_LEFT_DCLICK, &InputPortRepresentation::OnMouse, this); }
void ButtonLabel::Set(const Menu &menu, const Menu *overlay, bool full) { for (unsigned i = 0; i < menu.MAX_ITEMS; ++i) { const MenuItem &item = overlay != nullptr && (*overlay)[i].IsDefined() ? (*overlay)[i] : menu[i]; if (full || item.IsDynamic()) SetLabelText(i, item.label, item.event); } }
void InputPortRepresentation::SetConstant(const wxVariant& constant) { m_hasConstantSet = true; m_constant = constant; std::string scalarText; scalarText = ScalarSelectionDialog::GetValueString(constant, m_type, 4); SetLabelText(((scalarText + " = ") + m_name + " : ") + m_type.name()); m_pDisplayArea->RemoveLink(this); m_pParent->Refresh(); }
//----------------------------------------------------------------------------- // Purpose: //----------------------------------------------------------------------------- void CSDKHudArmor::OnThink( void ) { int newArmor = 0; C_SDKPlayer *local = C_SDKPlayer::GetLocalSDKPlayer(); if ( local ) { // Never below zero newArmor = MAX( local->GetArmorValue(), 0 ); } if ( m_iArmor == newArmor ) return; if ( !newArmor ) { GetClientMode()->GetViewportAnimationController()->StartAnimationSequence("SuitPowerZero"); } else if ( newArmor < m_iArmor ) { // battery power has decreased, so play the damaged animation GetClientMode()->GetViewportAnimationController()->StartAnimationSequence("SuitDamageTaken"); // play an extra animation if we're super low if ( newArmor < 20 ) { GetClientMode()->GetViewportAnimationController()->StartAnimationSequence("SuitArmorLow"); } } else { // battery power has increased (if we had no previous armor, or if we just loaded the game, don't use alert state) if ( m_iArmor == INIT_ARMOR || m_iArmor == 0 || newArmor >= 20) { GetClientMode()->GetViewportAnimationController()->StartAnimationSequence("SuitPowerIncreasedAbove20"); } else { GetClientMode()->GetViewportAnimationController()->StartAnimationSequence("SuitPowerIncreasedBelow20"); } } m_iArmor = newArmor; //Tony; moved down to fix localization crash at load, update the label name and armor value when it changes. //TODO (Nican): Find where to define text. const wchar_t *text = g_pVGuiLocalize->Find("#SDK_HudArmor"); if( text ) SetLabelText(text); SetDisplayValue(m_iArmor); }
void plGraphPlate::SetLabelText(const char *text1, const char *text2, const char *text3, const char *text4 ) { std::vector<std::string> strings; if( text1 != nil ) strings.push_back(text1); else strings.push_back(""); if( text2 != nil ) strings.push_back(text2); else strings.push_back(""); if( text3 != nil ) strings.push_back(text3); else strings.push_back(""); if( text4 != nil ) strings.push_back(text4); else strings.push_back(""); SetLabelText(strings); }
plGraphPlate::plGraphPlate( plPlate **owningHandle ) : plPlate( owningHandle ) { fFlags |= kFlagIsAGraph; SetLabelText( nil ); }
void CHudRoundTimer::Init() { SetLabelText(L"TIMER"); }
void CHudAccount::Init() { SetLabelText(L"$"); }
/// Display espionage intelligence of a city /// \param a_City The city that has been investigated void CityEspionage::DisplayWindow(Unit a_City) { if (m_window) { AUI_ERRCODE err = g_c3ui->AddWindow(m_window); Assert(err == AUI_ERRCODE_OK); if (err == AUI_ERRCODE_OK) { err = m_window->Show(); } if (!a_City.IsValid()) { return; } SlicObject so; so.AddPlayer(a_City.GetOwner()); so.AddCity(a_City); SetLabelText("DialogBackground.CityLabel", "str_ldl_Espionage_City_Label", so); SetLabelText("DialogBackground.PopulationLabel", "str_ldl_Espionage_Population_Label", so); SetLabelText("DialogBackground.HapinessLabel", "str_ldl_Espionage_Happiness_Label", so); SetLabelText("DialogBackground.Building", "str_ldl_Espionage_Building_Label", so); SetLabelText("DialogBackground.CompleteIn", "str_ldl_Espionage_CompleteIn_Label", so); SetLabelText("DialogBackground.CityIncome", "str_ldl_Espionage_CityIncome_Label", so); SetLabelText("DialogBackground.GoldFromTrade", "str_ldl_Espionage_GoldInTrade_Label", so); Assert(m_inventoryList); if (m_inventoryList) { m_inventoryList->ClearUserData CALL_TEMPLATE_FUNCTION_WITHOUT_ARGUMENT(InventoryItemInfo); m_inventoryList->Clear(); m_inventoryList->BuildListStart(); CityData const * cityData = a_City.GetCityData(); for (sint32 buildIndex = 0; buildIndex < g_theBuildingDB->NumRecords(); ++buildIndex) { if (cityData->HasBuilding(buildIndex)) { ctp2_ListItem * item = static_cast<ctp2_ListItem *> (aui_Ldl::BuildHierarchyFromRoot("ce_InventoryListItem")); if (item) { item->SetText(g_theBuildingDB->Get(buildIndex)->GetNameText()); item->SetUserData(new InventoryItemInfo(true, buildIndex)); } m_inventoryList->AddItem(item); } } for (sint32 wonderIndex = 0; wonderIndex < g_theWonderDB->NumRecords(); ++wonderIndex) { if (cityData->GetBuiltWonders() & ((uint64) 1 << (uint64) wonderIndex)) { ctp2_ListItem * item = static_cast<ctp2_ListItem *> (aui_Ldl::BuildHierarchyFromRoot("ce_InventoryListItem")); if (item) { item->SetText(g_theWonderDB->Get(wonderIndex)->GetNameText()); item->SetUserData(new InventoryItemInfo(false, wonderIndex)); } m_inventoryList->AddItem(item); } } m_inventoryList->BuildListEnd(); MapPoint pos; a_City.GetPos(pos); Cell * cell = g_theWorld->GetCell(pos); CellUnitList cellUnitList; cell->GetArmy(cellUnitList); sint32 unitIndex = 0; for (sint32 multiIndex = 0; multiIndex < k_MAX_ARMY_SIZE; ++multiIndex) { MBCHAR interp[k_MAX_NAME_LEN]; sprintf(interp, "DialogBackground.FortifiedUnitsBox.Unit%i", multiIndex); ctp2_Static * st = (ctp2_Static *) aui_Ldl::GetObject(LDL_BLOCK, interp); if (st) { if (unitIndex < cellUnitList.Num()) { Unit & unit = cellUnitList[unitIndex++]; if (st->IsDisabled()) { st->Enable(true); } st->ExchangeImage(0, 0, unit.GetDBRec()->GetDefaultIcon()->GetIcon()); } else { if (!st->IsDisabled()) { st->Enable(false); } st->ExchangeImage(0, 0, NULL); } } } } } }
static void WifiScan_r() { FILE *fstream; char buffer[512] = {0}; char buffer1[512] = {0}; vsystem("wpa_cli scan_r > /mnt/sdcard/wifi/list.txt"); MsecSleep(1000); vsystem("awk '{print $5}' /mnt/sdcard/wifi/list.txt | tail -n +3 > /mnt/sdcard/scan"); MutexLock(&pWifiMutex); if (NULL == (fstream = fopen("/mnt/sdcard/scan", "r"))) { perror("fopen"); return; } int index = 0; while (NULL != mfgets(buffer, sizeof(buffer), fstream)) { if (index >= MAX_SIGNUM) { break; } strncpy(stWifi[index].ssid, buffer, sizeof(stWifi[index].ssid) - 1); index++; } fclose(fstream); vsystem("awk '{print $3}' /mnt/sdcard/wifi/list.txt | tail -n +3 > /mnt/sdcard/scan"); if (NULL == (fstream = fopen("/mnt/sdcard/scan", "r"))) { perror("fopen"); return; } index = 0; while (NULL != mfgets(buffer, sizeof(buffer), fstream)) { if (index >= MAX_SIGNUM) { break; } stWifi[index].iLevel = atoi(buffer); stWifi[index].iCell = CalcWifiCell(stWifi[index].iLevel); index++; } fclose(fstream); SortByLevel(index); int i; for(i = 0; i < index; i++) { if(i < WIFIITEM) { snprintf(buffer1, sizeof(buffer1), "%s", stWifi[i].ssid); if(NULL == pWiFiStrItem[i]) { free(pWiFiStrItem[i]); pWiFiStrItem[i] = NULL; } pWiFiStrItem[i] = TransString(buffer1); SetLabelText(pWiFiStrItem[i], pWiFiLblItem[i]); DisplayPicture(pWiFiItem[i]); DisplayLabel(pWiFiLblItem[i]); } printf("sig%d %s %d %d\n", i, stWifi[i].ssid, stWifi[i].iCell, stWifi[i].iLevel); } MutexUnlock(&pWifiMutex); WriteWifiMsgQueue(ENUM_SCAN); }
void InputPortRepresentation::OnLinked() { m_hasConstantSet = false; SetLabelText((m_name + " : ") + m_type.name()); }
//----------------------------------------------------------------------------- // Purpose: //----------------------------------------------------------------------------- void CSDKHudArmor::Reset( void ) { SetLabelText(L"Armor"); }