Exemplo n.º 1
0
void LLEnvManagerNew::onRegionSettingsResponse(const LLSD& content)
{
	// If the message was valid, grab the UUID from it and save it for next outbound update message.
	mLastReceivedID = content[0]["messageID"].asUUID();

	// Refresh cached region settings.
	LL_DEBUGS("Windlight") << "Caching region environment settings: " << content << LL_ENDL;
	F32 sun_hour = 0; // *TODO
	LLEnvironmentSettings new_settings(content[1], content[2], content[3], sun_hour);
	mCachedRegionPrefs = new_settings;

	// Load region sky presets.
	LLWLParamManager::instance().refreshRegionPresets();

	// If using server settings, update managers.
	if (getUseRegionSettings())
	{
		updateManagersFromPrefs(mInterpNextChangeMessage);
	}

	// Let interested parties know about the region settings update.
	mRegionSettingsChangeSignal();

	// reset
	mInterpNextChangeMessage = false;
}
Exemplo n.º 2
0
void LLEnvManagerNew::onRegionSettingsResponse(const LLSD& content)
{
	// If the message was valid, grab the UUID from it and save it for next outbound update message.
	mLastReceivedID = content[0]["messageID"].asUUID();

	// Refresh cached region settings.
	LL_DEBUGS("Windlight") << "Caching region environment settings: " << content << LL_ENDL;
	F32 sun_hour = 0; // *TODO
	LLEnvironmentSettings new_settings(content[1], content[2], content[3], sun_hour);
	mCachedRegionPrefs = new_settings;

	// Load region sky presets.
	LLWLParamManager::instance()->refreshRegionPresets();

	// Use the region settings if parcel settings didnt override it already -KC
	if (KCWindlightInterface::instance().haveParcelOverride(new_settings))
	{
		// If using server settings, update managers.
		if (getUseRegionSettings())
		{
			updateManagersFromPrefs(mInterpNextChangeMessage);
		}
		//bit of a hacky override since I've repurposed many of the settings and methods here -KC
		else if (gSavedSettings.getBOOL("UseEnvironmentFromRegionAlways"))
		{
			setUseRegionSettings(true, mInterpNextChangeMessage);
		}
	}

	// Let interested parties know about the region settings update.
	mRegionSettingsChangeSignal();

	// reset
	mInterpNextChangeMessage = false;
}
Exemplo n.º 3
0
void LLEnvManagerNew::onRegionSettingsResponse(const LLSD& content)
{
	// If the message was valid, grab the UUID from it and save it for next outbound update message.
	mLastReceivedID = content[0]["messageID"].asUUID();

	// Refresh cached region settings.
	LL_DEBUGS("Windlight") << "Caching region environment settings: " << content << LL_ENDL;
	F32 sun_hour = 0; // *TODO
	LLEnvironmentSettings new_settings(content[1], content[2], content[3], sun_hour);
	mCachedRegionPrefs = new_settings;

	// Load region sky presets.
	LLWLParamManager::instance().refreshRegionPresets();

	bool bOverridden = M7WindlightInterface::getInstance()->hasOverride();

	// If using server settings, update managers.
//	if (getUseRegionSettings())
// [RLVa:KB] - Checked: 2011-08-29 (RLVa-1.4.1a) | Added: RLVa-1.4.1a
	if (!bOverridden && (getUseRegionSettings()) && (LLWLParamManager::getInstance()->mAnimator.getIsRunning()) )
// [/RLVa:KB]
	{
		updateManagersFromPrefs(mInterpNextChangeMessage);
	}

	// Let interested parties know about the region settings update.
	mRegionSettingsChangeSignal();

	// reset
	if (!gHippoGridManager->getConnectedGrid()->isAurora()) // On Aurora, the region says when to refresh
		mInterpNextChangeMessage = false;
}
void FullSettingsDialog::dialog_accept(){
	ApplicationSettings mngr;
	mngr.userId = p_number->text().toInt();
	mngr.userPassword = p_password->text();
	mngr.boundaryLimitAlert = p_alert_lim->text().toInt();
	mngr.useLimitAlert = p_use_alerts->isChecked();
	mngr.balanceUpdatePeriod = p_uptime->value();
	mngr.saveActual();
	emit new_settings();
	accept();
}
NotificationIcon::NotificationIcon()
{
    currentState = STARTING;
	
    consumptionTraffic = 0;
    alertWasShowed = false;

    p_settingsData = new ApplicationSettings();
    p_settingsData ->restoreSaved();

    p_settingsDialog = new FullSettingsDialog();
    QObject::connect(p_settingsDialog, SIGNAL(new_settings()), this, SIGNAL(new_settings()));

	QAction *showSettings	= new QAction("Settings", this);
    QAction *showAuthors	= new QAction("About"   , this);
	QAction *appExit		= new QAction("Exit"    , this);
	
	p_trayMenu = new QMenu();
	p_trayMenu ->addAction(showSettings);
	p_trayMenu ->addAction(showAuthors);
	p_trayMenu ->addAction(appExit);

	QObject::connect(showSettings, SIGNAL(triggered()), this, SLOT(SettingsDialog()));
	QObject::connect(showAuthors , SIGNAL(triggered()), this, SLOT(about_dialog())   );
	QObject::connect(appExit     , SIGNAL(triggered()), this, SLOT(ApplicationExit()));

    p_iconImage = new QPixmap;
	p_iconImage->load(AttentionPath);

    p_toolTipText  = new QString("Starting...");
    
    p_trayIcon = new QSystemTrayIcon(this);
	p_trayIcon->setContextMenu(p_trayMenu);
    p_trayIcon->setIcon( *p_iconImage );
    p_trayIcon->setToolTip( *p_toolTipText );
    p_trayIcon->show();
}
Exemplo n.º 6
0
void LLEnvManagerNew::onRegionSettingsResponse(const LLSD& content)
{
	// If the message was valid, grab the UUID from it and save it for next outbound update message.
	mLastReceivedID = content[0]["messageID"].asUUID();

	// Refresh cached region settings.
	LL_DEBUGS("Windlight") << "Received region environment settings: " << content << LL_ENDL;
	F32 sun_hour = 0; // *TODO
	LLEnvironmentSettings new_settings(content[1], content[2], content[3], sun_hour);
	mCachedRegionPrefs = new_settings;

	// Load region sky presets.
	LLWLParamManager::instance().refreshRegionPresets();

	// Use the region settings if parcel settings didnt override it already -KC
	if (KCWindlightInterface::instance().haveParcelOverride(new_settings))
	{
		// If using server settings, update managers.
//	if (getUseRegionSettings())
// [RLVa:KB] - Checked: 2011-08-29 (RLVa-1.4.1a) | Added: RLVa-1.4.1a
	if ( (getUseRegionSettings()) && (LLWLParamManager::getInstance()->mAnimator.getIsRunning()) )
// [/RLVa:KB]
		{
			updateManagersFromPrefs(mInterpNextChangeMessage);
		}
		//bit of a hacky override since I've repurposed many of the settings and methods here -KC
		//NOTE* It might not be a good idea to do this if under RLV_BHVR_SETENV -KC
		else if (gSavedSettings.getBOOL("UseEnvironmentFromRegionAlways") 
			&& !(rlv_handler_t::isEnabled() && gRlvHandler.hasBehaviour(RLV_BHVR_SETENV)))
		{
			// reset all environmental settings to track the region defaults, make this reset 'sticky' like the other sun settings.
			setUserPrefs(getWaterPresetName(), getSkyPresetName(), getDayCycleName(), false, true, mInterpNextChangeMessage);
		}
	}

	// Let interested parties know about the region settings update.
	mRegionSettingsChangeSignal();
	
// <FS:CR> FIRE-8063: Aurora-sim windlight refresh
	// reset
	//mInterpNextChangeMessage = false;
// </FS:CR>
}