void MapSourceYandex::onOptionsChanged(const OptionsNode &ANode)
{
	if (ANode.path() == OPV_MAP_SOURCE_YANDEX_VERSION_SATELLITE)
		setVersionSattellite(ANode.value().toString());
	else if (ANode.path() == OPV_MAP_SOURCE_YANDEX_VERSION_SCHEME)
		setVersionScheme(ANode.value().toString());
}
Exemplo n.º 2
0
void MainWindowPlugin::onOptionsChanged(const OptionsNode &ANode)
{
	if (ANode.path() == OPV_MAINWINDOW_STAYONTOP)
	{
#ifdef Q_WS_MAC
		setWindowOntop(FMainWindow, ANode.value().toBool());
#else
		QWidget *widget = mainWindowTopWidget();
		bool show = widget->isVisible();
		if (ANode.value().toBool())
			widget->setWindowFlags(widget->windowFlags() | Qt::WindowStaysOnTopHint);
		else
			widget->setWindowFlags(widget->windowFlags() & ~Qt::WindowStaysOnTopHint);
		if (show)
			showMainWindow();
#endif
	}
	else if (ANode.path() == OPV_MAINWINDOW_MINIMIZETOTRAY_W7)
	{
		if (isMinimizeToTray())
		{
			Options::node(OPV_MAINWINDOW_MINIMIZENOTIFY_SHOWCOUNT).setValue(MINIMIZENOTIFY_MAX_SHOWCOUNT+1);
		}
		if (FMainWindowBorder)
		{
			FMainWindowBorder->setMinimizeOnClose(!isMinimizeToTray());
		}
		if (!isMinimizeToTray() && !mainWindowTopWidget()->isVisible())
		{
			hideMainWindow();
		}
	}
}
void TuneListenerFile::onOptionsChanged(const OptionsNode &ANode)
{
    if (ANode.path() == OPV_TUNE_LISTENER_FILE_NAME)
        FFileName=ANode.value().toString();
    else if (ANode.path() == OPV_TUNE_LISTENER_FILE_FORMAT)
        FFileFormat=(FileFormat)ANode.value().toInt();
}
Exemplo n.º 4
0
void MainWindowPlugin::onOptionsChanged(const OptionsNode &ANode)
{
	QWidget * widget = FMainWindowBorder ? (QWidget*)FMainWindowBorder : (QWidget*)FMainWindow;
	if (ANode.path() == OPV_MAINWINDOW_STAYONTOP)
	{
		bool show = widget->isVisible();
		if (ANode.value().toBool())
			widget->setWindowFlags(widget->windowFlags() | Qt::WindowStaysOnTopHint);
		else
			widget->setWindowFlags(widget->windowFlags() & ~Qt::WindowStaysOnTopHint);
		if (show)
			showMainWindow();
	}
#ifdef Q_OS_WIN
	else if (ANode.path() == OPV_MAINWINDOW_MINIMIZETOTRAY_W7)
	{
		if (QSysInfo::windowsVersion() == QSysInfo::WV_WINDOWS7)
		{
			bool minimize = ANode.value().toBool();
			FMainWindowBorder->setMinimizeOnClose(!minimize);
			FMainWindowBorder->setShowInTaskBar(!minimize);
			if (minimize)
				disconnect(FMainWindowBorder ? (QObject*)FMainWindowBorder : (QObject*)FMainWindow, SIGNAL(closed()), this, SLOT(onMainWindowClosed()));
			else
				connect(FMainWindowBorder ? (QObject*)FMainWindowBorder : (QObject*)FMainWindow, SIGNAL(closed()), SLOT(onMainWindowClosed()));
		}
		else
			FMainWindowBorder->setShowInTaskBar(false);
	}
#endif
}
Exemplo n.º 5
0
void EditWidget::onOptionsChanged(const OptionsNode &ANode)
{
	if (ANode.path() == OPV_MESSAGES_EDITORAUTORESIZE)
	{
		setAutoResize(ANode.value().toBool());
	}
	else if (ANode.path() == OPV_MESSAGES_EDITORMINIMUMLINES)
	{
		setMinimumHeightLines(ANode.value().toInt());
	}
}
void MapSourceGoogle::onOptionsChanged(const OptionsNode &ANode)
{
	if (ANode.path() == OPV_MAP_SOURCE_GOOGLE_VERSION_MAP)
		setVersionMap(ANode.value().toInt());
	else if (ANode.path() == OPV_MAP_SOURCE_GOOGLE_VERSION_SATELLITE)
		setVersionSatellite(ANode.value().toInt());
	else if (ANode.path() == OPV_MAP_SOURCE_GOOGLE_VERSION_TERRAIN_R)
		setVersionTerrainR(ANode.value().toInt());
	else if (ANode.path() == OPV_MAP_SOURCE_GOOGLE_VERSION_TERRAIN_T)
		setVersionTerrainT(ANode.value().toInt());
}
Exemplo n.º 7
0
void UserTuneHandler::onOptionsChanged(const OptionsNode &ANode)
{
	if (ANode.path() == OPV_USERTUNE_SHOW_ROSTER_LABEL) {
		FTuneLabelVisible = ANode.value().toBool();
		if (FTuneLabelVisible) {
			foreach (const Jid streamJid, FRostersModel->streams()) {
				updateDataHolder(streamJid, Jid::null);
			}
		}
	} else if (ANode.path() == OPV_USERTUNE_TAG_FORMAT) {
Exemplo n.º 8
0
void EditWidget::onOptionsChanged(const OptionsNode &ANode)
{
	if (ANode.path() == OPV_MESSAGES_EDITORAUTORESIZE)
	{
		setAutoResize(ANode.value().toBool());
	}
	else if (ANode.path() == OPV_MESSAGES_EDITORMINIMUMLINES)
	{
		setMinimumLines(ANode.value().toInt());
	}
	else if (ANode.path() == OPV_MESSAGES_EDITORMAXIMUMLINES)
	{
		setMaximumLines(ANode.value().toInt());
	}
	else if (ANode.path() == OPV_MESSAGES_EDITORSENDKEY)
	{
		QKeySequence key = ANode.value().value<QKeySequence>();
		if (key.isEmpty())
			key = Options::defaultValue(OPV_MESSAGES_EDITORSENDKEY).value<QKeySequence>();
		setSendKey(key);
		;
	}
}