예제 #1
0
파일: util.cpp 프로젝트: MellonQ/leechcraft
	void InitiateAccountAddition(QWidget *parent)
	{
		QWizard *wizard = new QWizard (parent);
		wizard->setAttribute (Qt::WA_DeleteOnClose);
		wizard->setWindowTitle (QObject::tr ("Add account"));
		wizard->addPage (new AddAccountWizardFirstPage (wizard));

		wizard->show ();
	}
예제 #2
0
	void AccountsListWidget::on_Add__released ()
	{
		QWizard *wizard = new QWizard (this);
		wizard->setAttribute (Qt::WA_DeleteOnClose);
		wizard->setWindowTitle (tr ("Add account"));
		wizard->addPage (new AddAccountWizardFirstPage (wizard));

		wizard->show ();
	}
예제 #3
0
ModuleManagerImpl::ModuleManagerImpl()
{
    ModuleManager::loadPlugins();
    Config config = ProfileDialog::profilesInfo();
#ifdef QUTIM_SINGLE_PROFILE
    bool singleProfile = true;
#else
    bool singleProfile = false;
#endif
    singleProfile = config.value("singleProfile", singleProfile);
    QWizard *wizard = 0;
    StatisticsHelper *helper = 0;
    if (singleProfile) {
        if (!config.hasChildGroup("profile")) {
            wizard = new ProfileCreationWizard(this, QString(), QString(), true);
        } else {
            config.beginGroup("profile");
            helper = new StatisticsHelper();
            if (helper->action() == StatisticsHelper::NeedToAskInit
                    || helper->action() == StatisticsHelper::NeedToAskUpdate) {
                wizard = new QWizard();
                wizard->addPage(new SubmitPage(helper, wizard));
            }

            if(ProfileDialog::acceptProfileInfo(config, QString())) {
                QTimer::singleShot(0, this, SLOT(initExtensions()));
            } else {
                qWarning("Can't login");
                QDialog *dialog = new ProfileDialog(config, this);
                SystemIntegration::show(dialog);
            }
            config.endGroup();
        }
    } else {
        QDialog *dialog = new ProfileDialog(config, this);
        SystemIntegration::show(dialog);
    }
    if (wizard) {
        wizard->setAttribute(Qt::WA_DeleteOnClose, true);
        wizard->setAttribute(Qt::WA_QuitOnClose, false);
        SystemIntegration::show(wizard);
    }
}