void LLFloaterBuyLandUI::startBuyPostConfirm(const std::string& password) { runWebSitePrep(password); mCanBuy = false; mCannotBuyReason = getString("processing"); refreshUI(); }
void LLPanelFriends::setContactGroup(std::string contact_grp) { LLChat msg("Group set to " + contact_grp); LLFloaterChat::addChat(msg); refreshNames(LLFriendObserver::ADD); refreshUI(); categorizeContacts(); }
// virtual void LLFloaterBuyLandUI::setMinimized(BOOL minimize) { bool restored = (isMinimized() && !minimize); LLFloater::setMinimized(minimize); if (restored) { refreshUI(); } }
void MainWindow::nouvelOnglet(){ Onglet *newonglet = new Onglet(); QString nom = "Calc"; nbonglet++; mesonglets->addTab(newonglet,nom.append(QString::number(nbonglet))); mesonglets->setCurrentWidget(newonglet); Collection_Onglet::GetInstance().ajouterOnglet(newonglet); Collection_Onglet::GetInstance().SetActif(mesonglets->currentIndex()); refreshUI(mesonglets->currentIndex()); }
void LLPanelFriends::categorizeContacts() { LLSD contact_groups = gSavedPerAccountSettings.getLLSD("AscentContactGroups"); std::string group_name = "All"; LLComboBox* combo = getChild<LLComboBox>("buddy_group_combobox"); if (combo) { group_name = combo->getValue().asString(); if (group_name != "All") { std::vector<LLScrollListItem*> vFriends = mFriendsList->getAllData(); // all of it. for (std::vector<LLScrollListItem*>::iterator itr = vFriends.begin(); itr != vFriends.end(); ++itr) { BOOL show_entry = false;//contact_groups[group_name].has((*itr)->getUUID().asString()); S32 count = contact_groups[group_name].size(); int i; for(i = 0; i < count; i++) { if (contact_groups[group_name][i].asString() == (*itr)->getUUID().asString()) { show_entry = true; break; } } if (!show_entry) { LLChat msg("False: contact_groups['" + group_name + "'].has('" + (*itr)->getUUID().asString() + "');"); LLFloaterChat::addChat(msg); mFriendsList->deleteItems((*itr)->getValue()); } else { LLChat msg("True: contact_groups['" + group_name + "'].has('" + (*itr)->getUUID().asString() + "');"); LLFloaterChat::addChat(msg); } } } else { LLChat msg("Group set to all."); LLFloaterChat::addChat(msg); } refreshUI(); } else { LLChat msg("Null combo."); LLFloaterChat::addChat(msg); } }
//Signaux onglets void MainWindow::fermerOnglet(int index){ if(mesonglets->count()>1){ mesonglets->removeTab(index); Collection_Onglet::GetInstance().supprimerOnglet(index); Collection_Onglet::GetInstance().SetActif(mesonglets->currentIndex()); refreshUI(mesonglets->currentIndex()); } else QMessageBox::critical(this,tr("Erreur"), tr("Il faut au moins un onglet!")); }
void LogviewDialog::onClearLogfile() { if (remove((char*)Paths::getLogPath().c_str()) != 0) { QMessageBox::critical(this, "Error", "Unable to delete the log file."); } else { refreshUI(); } }
void LLPanelFriends::filterContacts(const std::string& search_string) { if (search_string.empty()) { refreshNames(LLFriendObserver::ADD, ""); } else { refreshNames(LLFriendObserver::ADD, search_string); } refreshUI(); }
//=================================== // === Main timer loop === // void radeon_profile::timerEvent() { if (!refreshWhenHidden->isChecked() && this->isHidden()) { // even if in tray, keep the fan control active (if enabled) if (device.features.pwmAvailable && ui->btn_pwmProfile->isChecked()) { device.getTemperature(); adjustFanSpeed(); } return; } if (ui->cb_gpuData->isChecked()) { refreshGpuData(); ui->combo_pProfile->setCurrentIndex(ui->combo_pProfile->findText(device.currentPowerProfile)); if (device.features.pm == globalStuff::DPM) ui->combo_pLevel->setCurrentIndex(ui->combo_pLevel->findText(device.currentPowerLevel)); if (device.features.pwmAvailable && ui->btn_pwmProfile->isChecked()) adjustFanSpeed(); // lets say coreClk is essential to get stats (it is disabled in ui anyway when features.clocksAvailable is false) if (ui->cb_stats->isChecked() && device.gpuClocksData.coreClk != -1) { doTheStats(); // do the math only when user looking at stats table if (ui->tabs_systemInfo->currentIndex() == 3 && ui->mainTabs->currentIndex() == 0) updateStatsTable(); } refreshUI(); } if (ui->cb_graphs->isChecked()) refreshGraphs(); if (ui->cb_glxInfo->isChecked()) { ui->list_glxinfo->clear(); ui->list_glxinfo->addItems(device.getGLXInfo(ui->combo_gpus->currentText())); } if (ui->cb_connectors->isChecked()) { ui->list_connectors->clear(); ui->list_connectors->addTopLevelItems(device.getCardConnectors()); ui->list_connectors->expandToDepth(2); } if (ui->cb_modParams->isChecked()) { ui->list_modInfo->clear(); ui->list_modInfo->addTopLevelItems(device.getModuleInfo()); } refreshTooltip(); }
void WidgetBacklight::setCurrValue(int num) { if (client) { QVector<int> vals; if (client->getAllBacklighsLevel(vals)) { if (num<vals.size()) { refreshUI(vals[num]); } } } }
// virtual BOOL LLPanelFriends::postBuild() { mFriendsList = getChild<LLScrollListCtrl>("friend_list"); mFriendsList->setMaxSelectable(MAX_FRIEND_SELECT); mFriendsList->setMaximumSelectCallback(onMaximumSelect); mFriendsList->setCommitOnSelectionChange(TRUE); childSetCommitCallback("friend_list", onSelectName, this); childSetCommitCallback("buddy_group_combobox", onChangeContactGroup, this); childSetDoubleClickCallback("friend_list", onClickIM); // <dogmode> // Contact search and group system. // 09/05/2010 - Charley Levenque LLLineEditor* contact = getChild<LLLineEditor>("buddy_search_lineedit"); if (contact) { contact->setKeystrokeCallback(&onContactSearchKeystroke); } getChild<LLTextBox>("s_num")->setValue("0"); getChild<LLTextBox>("f_num")->setValue(llformat("%d", mFriendsList->getItemCount())); U32 changed_mask = LLFriendObserver::ADD | LLFriendObserver::REMOVE | LLFriendObserver::ONLINE; refreshNames(changed_mask); childSetAction("im_btn", onClickIM, this); childSetAction("assign_btn", onClickAssign, this); childSetAction("expand_collapse_btn", onClickExpand, this); childSetAction("profile_btn", onClickProfile, this); childSetAction("offer_teleport_btn", onClickOfferTeleport, this); childSetAction("pay_btn", onClickPay, this); childSetAction("add_btn", onClickAddFriend, this); childSetAction("remove_btn", onClickRemove, this); //childSetAction("export_btn", onClickExport, this); Making Dummy View -HgB //childSetAction("import_btn", onClickImport, this); Making Dummy View -HgB setDefaultBtn("im_btn"); updateFriends(LLFriendObserver::ADD); refreshUI(); // primary sort = online status, secondary sort = name mFriendsList->sortByColumn(std::string("friend_name"), TRUE); mFriendsList->sortByColumn(std::string("icon_online_status"), FALSE); updateColumns(this); return TRUE; }
// +----------------------------------------------------------- void fsdk::VolumeButton::setVolume(int iValue) { m_pLabel->setText(QString("%1%").arg(iValue)); if(iValue == 0) setIcon(QIcon(":/icons/audio-muted.png")); else if(iValue <= 32) setIcon(QIcon(":/icons/audio-min.png")); else if(iValue <= 65) setIcon(QIcon(":/icons/audio-med.png")); else setIcon(QIcon(":/icons/audio-max.png")); m_pSlider->setValue(iValue); refreshUI(); }
void LLFloaterSellLandUI::callbackAvatarPick(const uuid_vec_t& ids, const std::vector<LLAvatarName> names) { LLParcel* parcel = mParcelSelection->getParcel(); if (names.empty() || ids.empty()) return; LLUUID id = ids[0]; parcel->setAuthorizedBuyerID(id); mAuthorizedBuyer = ids[0]; getChild<LLUICtrl>("sell_to_agent")->setValue(names[0].getCompleteName()); refreshUI(); }
void LogviewDialog::onClearLogfile() { std::ofstream truncStream; truncStream.open(Paths::getLogPath(), std::ios::trunc); if (!truncStream.is_open()) { QMessageBox::critical(this, "Error", "Unable to clear the log file."); } else { refreshUI(); } truncStream.close(); }
void LLFloaterFriends::updateFriends(U32 changed_mask) { if (!sInstance) return; LLUUID selected_id; LLCtrlListInterface *friends_list = sInstance->childGetListInterface("friend_list"); if (!friends_list) return; LLCtrlScrollInterface *friends_scroll = sInstance->childGetScrollInterface("friend_list"); if (!friends_scroll) return; // We kill the selection warning, otherwise we'll spam with warning popups // if the maximum amount of friends are selected mShowMaxSelectWarning = false; LLDynamicArray<LLUUID> selected_friends = sInstance->getSelectedIDs(); if(changed_mask & (LLFriendObserver::ADD | LLFriendObserver::REMOVE | LLFriendObserver::ONLINE)) { refreshNames(); } else if(changed_mask & LLFriendObserver::POWERS) { --mNumRightsChanged; if(mNumRightsChanged > 0) { mPeriod = RIGHTS_CHANGE_TIMEOUT; mEventTimer.start(); mEventTimer.reset(); mAllowRightsChange = FALSE; } else { tick(); } } if(selected_friends.size() > 0) { // only non-null if friends was already found. This may fail, // but we don't really care here, because refreshUI() will // clean up the interface. friends_list->setCurrentByID(selected_id); for(LLDynamicArray<LLUUID>::iterator itr = selected_friends.begin(); itr != selected_friends.end(); ++itr) { friends_list->setSelectedByValue(*itr, true); } } refreshUI(); mShowMaxSelectWarning = true; }
LLFloaterFriends::LLFloaterFriends() : LLFloater(), LLEventTimer(1000000), mObserver(NULL), mShowMaxSelectWarning(TRUE), mAllowRightsChange(TRUE), mNumRightsChanged(0) { sInstance = this; mEventTimer.stop(); mObserver = new LLLocalFriendsObserver(this); LLAvatarTracker::instance().addObserver(mObserver); gSavedSettings.setBOOL("ShowFriends", TRUE); gUICtrlFactory->buildFloater(this, "floater_friends.xml"); refreshUI(); }
// virtual BOOL LLPanelFriends::postBuild() { mFriendsList = getChild<LLScrollListCtrl>("friend_list"); mFriendsList->setCommitOnSelectionChange(TRUE); mFriendsList->setCommitCallback(onSelectName, this); //childSetCommitCallback("buddy_group_combobox", onChangeContactGroup, this); mFriendsList->setDoubleClickCallback(onClickIM, this); // <dogmode> // Contact search and group system. // 09/05/2010 - Charley Levenque LLFilterEditor* contact = getChild<LLFilterEditor>("buddy_search_lineedit"); if (contact) { contact->setCommitCallback(boost::bind(&LLPanelFriends::onContactFilterEdit, this, _2)); } getChild<LLTextBox>("s_num")->setValue("0"); getChild<LLTextBox>("f_num")->setValue(llformat("%d", mFriendsList->getItemCount())); U32 changed_mask = LLFriendObserver::ADD | LLFriendObserver::REMOVE | LLFriendObserver::ONLINE; refreshNames(changed_mask); childSetAction("im_btn", onClickIM, this); //childSetAction("assign_btn", onClickAssign, this); childSetAction("expand_collapse_btn", onClickExpand, this); childSetAction("profile_btn", onClickProfile, this); getChild<LLUICtrl>("offer_teleport_btn")->setCommitCallback(boost::bind(static_cast<void(*)(const uuid_vec_t&)>(LLAvatarActions::offerTeleport), boost::bind(&LLScrollListCtrl::getSelectedIDs, mFriendsList))); childSetAction("pay_btn", onClickPay, this); childSetAction("add_btn", onClickAddFriend, this); getChild<LLUICtrl>("remove_btn")->setCommitCallback(boost::bind(LLAvatarActions::removeFriendsDialog, boost::bind(&LLScrollListCtrl::getSelectedIDs, mFriendsList))); //childSetAction("export_btn", onClickExport, this); Making Dummy View -HgB //childSetAction("import_btn", onClickImport, this); Making Dummy View -HgB setDefaultBtn("im_btn"); updateFriends(LLFriendObserver::ADD); refreshUI(); // primary sort = online status, secondary sort = name mFriendsList->sortByColumn(std::string("friend_name"), TRUE); mFriendsList->sortByColumn(std::string("icon_online_status"), FALSE); updateColumns(this); return TRUE; }
bool LLFloaterSellLandUI::setParcel(LLViewerRegion* region, LLParcelSelectionHandle parcel) { if (!parcel->getParcel()) { return false; } mRegion = region; mParcelSelection = parcel; mChoseSellTo = false; updateParcelInfo(); refreshUI(); return true; }
bool LLFloaterSellLandUI::setParcel(LLViewerRegion* region, LLParcelSelectionHandle parcel) { if (!parcel->getParcel()) // || !can_agent_modify_parcel(parcel)) // can_agent_modify_parcel was deprecated by GROUPS { return false; } mRegion = region; mParcelSelection = parcel; mChoseSellTo = false; updateParcelInfo(); refreshUI(); return true; }
LogviewDialog::LogviewDialog(QWidget *parent) : QDialog(parent), ui(new Ui::LogviewDialog) { ui->setupUi(this); QStringList columnTitles; columnTitles << "Date" << "Level" << "Info"; ui->treeWidget->setHeaderLabels(columnTitles); refreshUI(); QMenu *contextMenu = new QMenu(ui->treeWidget); ui->treeWidget->setContextMenuPolicy(Qt::ActionsContextMenu); QAction *deleteDrive = new QAction("Clear Log", contextMenu); ui->treeWidget->addAction(deleteDrive); connect(deleteDrive, SIGNAL(triggered()), this, SLOT(onClearLogfile())); }
static RETSIGTYPE sigintSigHandler(int sig) { switch(sig) { case SIGINT: if(ignsigint == TRUE) break; if (sigintcnt++ > 1) { cleanUI(); cleanupLocks(); exit(EXIT_FAILURE); } else { cleanUI(); refreshUI(); g_main_loop_quit (loop); } break; } /* switch(sig) */ }
void LLFloaterBuyLandUI::setParcel(LLViewerRegion* region, LLParcelSelectionHandle parcel) { if (mTransaction && mTransactionType == TransactionBuy) { // the user is buying, don't change the selection return; } mRegion = region; mParcel = parcel; updateAgentInfo(); updateParcelInfo(); updateCovenantInfo(); if (mCanBuy) { updateWebSiteInfo(); } refreshUI(); }
void PluginManager::pluginStopped( SPlugin *plugin ) { if( !loadedPlugins.values().contains(plugin) ) return ; if( !startedPlugins.contains(plugin) ) return ; bool error = false; // Enable Depended Plugins =======// for( int i=0 ; i<startedPlugins.count() ; i++ ) { if( startedPlugins.at(i)->depends().contains(plugin->name()) ) error = error || startedPlugins.at(i)->stop(); } // END ====// startedPlugins.removeOne( plugin ); refreshUI(); }
bool LLPanelFriends::modifyRightsConfirmation(const LLSD& notification, const LLSD& response, rights_map_t* rights) { S32 option = LLNotification::getSelectedOption(notification, response); if(0 == option) { sendRightsGrant(*rights); } else { // need to resync view with model, since user cancelled operation rights_map_t::iterator rights_it; for (rights_it = rights->begin(); rights_it != rights->end(); ++rights_it) { const LLRelationship* info = LLAvatarTracker::instance().getBuddyInfo(rights_it->first); updateFriendItem(rights_it->first, info); } } refreshUI(); delete rights; return false; }
void LLFloaterBuyLandUI::draw() { LLFloater::draw(); bool needsUpdate = false; needsUpdate |= checkTransaction(); needsUpdate |= mCurrency.process(); if (mBought) { closeFloater(); } else if (needsUpdate) { if (mCanBuy && mCurrency.hasError()) { tellUserError(mCurrency.errorMessage(), mCurrency.errorURI()); } refreshUI(); } }
// virtual BOOL LLPanelFriends::postBuild() { mFriendsList = getChild<LLScrollListCtrl>("friend_list"); mFriendsList->setMaxSelectable(MAX_FRIEND_SELECT); mFriendsList->setMaximumSelectCallback(onMaximumSelect); mFriendsList->setCommitOnSelectionChange(TRUE); childSetCommitCallback("friend_list", onSelectName, this); childSetDoubleClickCallback("friend_list", onClickIM); LLSearchEditor* buddy_search = getChild<LLSearchEditor>("buddy_search"); if (buddy_search) { buddy_search->setSearchCallback(&onContactSearchKeystroke, this); } U32 changed_mask = LLFriendObserver::ADD | LLFriendObserver::REMOVE | LLFriendObserver::ONLINE; refreshNames(changed_mask, ""); childSetAction("im_btn", onClickIM, this); childSetAction("profile_btn", onClickProfile, this); childSetAction("offer_teleport_btn", onClickOfferTeleport, this); childSetAction("pay_btn", onClickPay, this); childSetAction("add_btn", onClickAddFriend, this); childSetAction("remove_btn", onClickRemove, this); setDefaultBtn("im_btn"); updateFriends(LLFriendObserver::ADD); refreshUI(); // primary sort = online status, secondary sort = name mFriendsList->sortByColumn(std::string("friend_name"), TRUE); mFriendsList->sortByColumn(std::string("icon_online_status"), FALSE); return TRUE; }
void LLFloaterBuyLandUI::updateFloaterCovenantText(const std::string &string, const LLUUID& asset_id) { LLViewerTextEditor* editor = getChild<LLViewerTextEditor>("covenant_editor"); editor->setText(string); LLCheckBoxCtrl* check = getChild<LLCheckBoxCtrl>("agree_covenant"); LLTextBox* box = getChild<LLTextBox>("covenant_text"); if (asset_id.isNull()) { check->set(true); check->setEnabled(false); refreshUI(); // remove the line stating that you must agree box->setVisible(FALSE); } else { check->setEnabled(true); // remove the line stating that you must agree box->setVisible(TRUE); } }
timer(new QTimer), reflash(new QTimer), rxBuff(new u8[1000]), txBuff(new u8[1000]) { ui->setupUi(this); ui->tabWidget->setCurrentIndex(2); ui->channelBox->clear(); foreach (const QSerialPortInfo &info, QSerialPortInfo::availablePorts()) { ui->serialBox->addItem(info.portName()); } connect(serial, SIGNAL(readText(QString&)), this, SLOT(showText(QString&))); connect(serial, SIGNAL(sendText(QString&)), this, SLOT(showText(QString&))); connect(timer, SIGNAL(timeout()), this, SLOT(dealFrame())); connect(reflash, SIGNAL(timeout()), this, SLOT(refreshUI())); } Widget::~Widget() { delete serial; delete timer; delete reflash; delete rxBuff; delete txBuff; delete ui; } void Widget::dealFrame() { u16 size;
radeon_profile::radeon_profile(QStringList a,QWidget *parent) : QMainWindow(parent), ui(new Ui::radeon_profile) { ui->setupUi(this); timer = new QTimer(this); execsRunning = new QList<execBin*>(); // checks if running as root if (globalStuff::grabSystemInfo("whoami")[0] == "root") { globalStuff::globalConfig.rootMode = true; ui->label_rootWarrning->setVisible(true); } else { globalStuff::globalConfig.rootMode = false; ui->label_rootWarrning->setVisible(false); } // setup ui elemensts ui->mainTabs->setCurrentIndex(0); ui->tabs_systemInfo->setCurrentIndex(0); ui->configGroups->setCurrentIndex(0); ui->list_currentGPUData->setHeaderHidden(false); ui->execPages->setCurrentIndex(0); setupGraphs(); setupForcePowerLevelMenu(); setupOptionsMenu(); setupContextMenus(); setupTrayIcon(); loadConfig(); //figure out parameters QString params = a.join(" "); if (params.contains("--driver xorg")) { device.driverByParam(gpu::XORG); ui->combo_gpus->addItems(device.initialize(true)); } else if (params.contains("--driver fglrx")) { device.driverByParam(gpu::FGLRX); ui->combo_gpus->addItems(device.initialize(true)); } else // driver object detects cards in pc and fill the list in ui // ui->combo_gpus->addItems(device.initialize()); ui->configGroups->setTabEnabled(2,device.daemonConnected()); setupUiEnabledFeatures(device.features); if(ui->cb_enableOverclock->isChecked() && ui->cb_overclockAtLaunch->isChecked()) ui->btn_applyOverclock->click(); connectSignals(); // timer init timer->setInterval(ui->spin_timerInterval->value()*1000); // fill tables with data at the start // refreshGpuData(); ui->list_glxinfo->addItems(device.getGLXInfo(ui->combo_gpus->currentText())); ui->list_connectors->addTopLevelItems(device.getCardConnectors()); ui->list_connectors->expandToDepth(2); ui->list_modInfo->addTopLevelItems(device.getModuleInfo()); refreshUI(); timer->start(); addRuntimeWidgets(); showWindow(); }
void WidgetBacklight::pwrdValueChanged(int backlight, int value) { if (backlight != blNum) return; refreshUI(value); }