Esempio n. 1
0
void PluginWizardPage::finished()
{
	// TODO: we should check if ns plugin exists
	m_mainWindow.appConfig().setCryptoEnabled(true);

	updateStatus(tr("Plugins installed successfully."));
	showFinished();
}
Esempio n. 2
0
void PluginWizardPage::queryPluginDone()
{
	QStringList pluginList = m_pFileSysClient->getPluginList();
	if (pluginList.isEmpty()) {
		updateStatus(tr("Setup complete."));
		showFinished();
	}
	else {
		m_mainWindow.stopSynergy();
		m_mainWindow.delay(5);
		copyPlugins();
		m_mainWindow.startSynergy();
		m_mainWindow.delay(5);
	}
}
Esempio n. 3
0
void PluginWizardPage::initializePage()
{
	QWizardPage::initializePage();
	if (m_pFileSysClient == NULL) {
		if (m_Email.isEmpty() ||
			m_Password.isEmpty()) {
			updateStatus(tr("Setup complete."));
			showFinished();
			return;
		}

		m_pLabelSpinning->show();

		m_pFileSysClient = new FileSysClient();
		m_pWebClient = new WebClient();
		m_pWebClient->setEmail(m_Email);
		m_pWebClient->setPassword(m_Password);

		QThread* thread = new QThread;

		connect(m_pFileSysClient,
			SIGNAL(error(QString)),
			this,
			SLOT(showError(QString)));

		connect(m_pFileSysClient,
			SIGNAL(queryPluginDone()),
			this,
			SLOT(queryPluginDone()));

		connect(m_pFileSysClient,
			SIGNAL(queryPluginDone()),
			thread,
			SLOT(quit()));

		connect(m_pFileSysClient,
			SIGNAL(error(QString)),
			thread,
			SLOT(quit()));

		connect(thread, SIGNAL(finished()), thread, SLOT(deleteLater()));

		m_pFileSysClient->moveToThread(thread);
		thread->start();

		QMetaObject::invokeMethod(m_pFileSysClient, "queryPluginList", Qt::QueuedConnection);
	}
}
Esempio n. 4
0
void SectionWidget::showAnimated(SlideDirection direction, const SectionSlideParams &params) {
	if (_showAnimation) return;

	showChildren();
	auto myContentCache = grabForShowAnimation(params);
	hideChildren();
	showAnimatedHook();

	_showAnimation = std_::make_unique<SlideAnimation>();
	_showAnimation->setDirection(direction);
	_showAnimation->setRepaintCallback([this] { update(); });
	_showAnimation->setFinishedCallback([this] { showFinished(); });
	_showAnimation->setPixmaps(params.oldContentCache, myContentCache);
	_showAnimation->setTopBarShadow(params.withTopBarShadow);
	_showAnimation->start();

	show();
}
Esempio n. 5
0
void SectionWidget::showFast() {
	show();
	showFinished();
}
Esempio n. 6
0
void PluginWizardPage::showError(QString error)
{
	updateStatus(tr("Error: %1").arg(error));
	showFinished();
}