void PluginWizardPage::finished() { // TODO: we should check if ns plugin exists m_mainWindow.appConfig().setCryptoEnabled(true); updateStatus(tr("Plugins installed successfully.")); showFinished(); }
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); } }
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); } }
void SectionWidget::showAnimated(SlideDirection direction, const SectionSlideParams ¶ms) { 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(); }
void SectionWidget::showFast() { show(); showFinished(); }
void PluginWizardPage::showError(QString error) { updateStatus(tr("Error: %1").arg(error)); showFinished(); }