当前位置: 首页>>代码示例>>C++>>正文


C++ QWizard类代码示例

本文整理汇总了C++中QWizard的典型用法代码示例。如果您正苦于以下问题:C++ QWizard类的具体用法?C++ QWizard怎么用?C++ QWizard使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了QWizard类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: tr

void ProfileDialog::on_profilesButton_clicked()
{
	QString name = QInputDialog::getText(this, tr("Enter name"), tr("Profile name:"), QLineEdit::Normal);
	if (name.isEmpty()) {
		QMessageBox::critical(this, tr("Invalid name"), tr("Name can not be empty!"));
		return;
	}

	QString pass = QInputDialog::getText(this, tr("Enter password"), tr("Password:"), QLineEdit::Password);
	QString passr = QInputDialog::getText(this, tr("Repeat password"), tr("Repeat password:"), QLineEdit::Password);

	if (pass != passr) {
		QMessageBox::critical(this, tr("Incorrect password"), tr("Passwords don't match each other"));
		return;
	}

	if (pass.isEmpty()) {
		QMessageBox::critical(this, tr("Incorrect password"), tr("Password can not be empty!"));
		return;
	}

	QWizard *wizard = new ProfileCreationWizard(m_manager, name, pass);
#if	defined(QUTIM_MOBILE_UI)
	wizard->showMaximized();
#else
	wizard->show();
#endif
	connect(wizard, SIGNAL(accepted()), this, SLOT(deleteLater()));
	connect(wizard, SIGNAL(rejected()), this, SLOT(show()));
	hide();
}
开发者ID:nico-izo,项目名称:qutim,代码行数:31,代码来源:profiledialog.cpp

示例2: setStatus

void ICQSearchResult::setRequestId(unsigned short id)
{
    m_id = id;
    setStatus();
    QWizard *wizard = static_cast<QWizard*>(topLevelWidget());
    wizard->setFinishEnabled(this, (m_id == 0) || (m_id == SEARCH_FAIL));
}
开发者ID:,项目名称:,代码行数:7,代码来源:

示例3: current

void HierarchyList::removeTabPage()
{
    QWidget *w = current();
    if ( !w )
  return;
    if ( w->inherits( "QTabWidget" ) ) {
  QTabWidget *tw = (QTabWidget*)w;
  if ( tw->currentPage() ) {
      QDesignerTabWidget *dtw = (QDesignerTabWidget*)tw;
      DeleteTabPageCommand *cmd = new DeleteTabPageCommand( i18n("Delete Page %1 of %2" ).
                  arg( dtw->pageTitle() ).arg( tw->name() ),
                  formWindow, tw, tw->currentPage() );
      formWindow->commandHistory()->addCommand( cmd );
      cmd->execute();
  }
    } else if ( w->inherits( "QWizard" ) ) {
  QWizard *wiz = (QWizard*)formWindow->mainContainer();
  if ( wiz->currentPage() ) {
      QDesignerWizard *dw = (QDesignerWizard*)wiz;
      DeleteWizardPageCommand *cmd = new DeleteWizardPageCommand( i18n("Delete Page %1 of %2" ).
                  arg( dw->pageTitle() ).arg( wiz->name() ),
                  formWindow, wiz,
                  wiz->indexOf( wiz->currentPage() ), true );
      formWindow->commandHistory()->addCommand( cmd );
      cmd->execute();
  }
    }
}
开发者ID:serghei,项目名称:kde3-kdewebdev,代码行数:28,代码来源:hierarchyview.cpp

示例4: setText

void ICQSearchResult::setText(const QString &text)
{
    lblStatus->setText(text);
    tblUser->hide();
    QWizard *wizard = static_cast<QWizard*>(topLevelWidget());
    wizard->setFinishEnabled(this, true);
}
开发者ID:,项目名称:,代码行数:7,代码来源:

示例5: setRequestId

void ICQSearchResult::clear()
{
    setRequestId(SEARCH_DONE, SEARCH_DONE);
    m_nFound = 0;
    tblUser->clear();
    QWizard *wizard = static_cast<QWizard*>(topLevelWidget());
    wizard->setFinishEnabled(this, false);
}
开发者ID:,项目名称:,代码行数:8,代码来源:

示例6: QMainWindow

//=============================================================
MainWindow::MainWindow(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::MainWindow)
{
    ui -> setupUi(this);

    //zaczytanie konfiguracji
    string fileName = "config.conf";
    config = new ConfigManager(fileName);

    //je¿eli konfiguracja istnieje
    if (config -> ReadConfigFile() == ConfigManager::ACTION_OK)
    {
        // SprawdŸ czy istnieje baza
        sqLiteMaper = new SqLiteMaper(config -> configDictionary["DbName"]);

        if (sqLiteMaper -> CheckDatabase())
        {
            if(sqLiteMaper -> Connect())
            {
                // baza danych istnieje i mo¿na nawi¹zaæ po³¹czenie
                ui -> textEdit -> append("Nawi¹za³em po³¹czenie !");
            }
        }
        else
        {
            // baza danych nie istnieje
            // utwórz now¹ bazê danych
            ui -> textEdit -> append(QString::fromStdString(sqLiteMaper -> lastError));
            sqLiteMaper -> CreateDatabase("create.sql");

            // wyœwietl treœæ zapytañ
            for(vector<string>::iterator it = sqLiteMaper->sqlList.begin(); it != sqLiteMaper->sqlList.end(); it++)
            {
                ui -> textEdit -> append(QString::fromStdString(*it));
            }
        }
    }
    // konfiguracja nie istnieje
    else
    {
        QWizard wizard;
        Ui::FirstStartWizard wizardFirstStart;
        wizardFirstStart.setupUi(&wizard);

        if (wizard.exec() == QWizard::Accepted)
        {

        }

        //stwórz domyœln¹ konfiguracjê
        //QMessageBox::warning(this, "Ostrze¿enie", "B³¹d otwierania pliku konfiguracyjnego");
        map<string, string> defaultDeictionary;
        defaultDeictionary["DbName"] = "comics.db";
        config -> SetDefaultConfig(defaultDeictionary);
        config -> SaveConfigFile();
    }
}
开发者ID:jopat,项目名称:BazaKomiksow,代码行数:59,代码来源:mainwindow.cpp

示例7: InitiateAccountAddition

	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 ();
	}
开发者ID:MellonQ,项目名称:leechcraft,代码行数:9,代码来源:util.cpp

示例8: QWizard

	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 ();
	}
开发者ID:Kalarel,项目名称:leechcraft,代码行数:9,代码来源:accountslistwidget.cpp

示例9: GT_CHECK_RESULT

QToolButton* WizardFiller::getExpandButton(HI::GUITestOpStatus &os){
    QToolButton* expandButton = NULL;
    QWidget* dialog = QApplication::activeModalWidget();
    GT_CHECK_RESULT(dialog, "activeModalWidget is NULL",NULL);
    QWizard* wizard = qobject_cast<QWizard*>(dialog);
    GT_CHECK_RESULT(wizard, "activeModalWidget is not of wizard type",NULL);

    QList<QWidget*> widList = wizard->currentPage()->findChildren<QWidget*>();
    QList<QToolButton*> plusList;
    foreach(QWidget* w, widList){
        QToolButton* but = qobject_cast<QToolButton*>(w);
        if (but && but->text()=="+" && abs(but->rect().width()-19)<2)
            plusList.append(but);
    }
开发者ID:m-angelov,项目名称:ugene,代码行数:14,代码来源:WizardFiller.cpp

示例10: sceneFile

void GameControllerAttachment::sceneFileConfig()
{
	QDomDocument sceneFile(m_sceneFile->sceneFileDom());
	QDomElement pathNode(sceneFile.documentElement().firstChildElement("EnginePath"));
	// Create a wizard for the configuration of the directories
	QWizard wizard;
	PathPage* page = new PathPage(&wizard);	
	page->setDirectories( 
		pathNode.attribute("mediapath"), 
		pathNode.attribute("scriptpath")
	);
	wizard.addPage(page);
	if (wizard.exec() == QDialog::Accepted)
	{
		pathNode.setAttribute("mediapath", wizard.field("mediadir").toString());
		pathNode.setAttribute("scriptpath", wizard.field("scriptdir").toString());
	}
}
开发者ID:algts,项目名称:Horde3D,代码行数:18,代码来源:GameControllerAttachment.cpp

示例11: QWizard

QWizard *ModelClassWizard::createWizardDialog(QWidget *parent,
    const QString &defaultPath, const WizardPageList &extensionPages) const
{
    // Create a wizard
    QWizard *wizard = new QWizard(parent);
    wizard->setWindowTitle(tr("Model Class Wizard"));

    // Make our page as first page
    ModelNamePage *page = new ModelNamePage(wizard);
    int pageId = wizard->addPage(page);
    wizard->setProperty("_PageId_", pageId);
    page->setPath(defaultPath);

    // Now add the remaining pages
    foreach (QWizardPage *p, extensionPages)
        wizard->addPage(p);
    return wizard;
}
开发者ID:anchowee,项目名称:QtCreator,代码行数:18,代码来源:modelclasswizard.cpp

示例12: ProfileCreationWizard

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);
    }
}
开发者ID:akahan,项目名称:qutim,代码行数:43,代码来源:modulemanagerimpl.cpp

示例13: finishEnable

void AddResult::finishEnable(bool state)
{
    QWizard *w = NULL;
    for (QWidget *p = parentWidget(); p; p = p->parentWidget()){
        if (p->inherits("QWizard")){
            w = static_cast<QWizard*>(p);
			break;
		}
    }
    if (w == NULL)
        return;
    if (state != m_bConnect){
        m_bConnect = state;
        if (m_bConnect){
            connect(w->finishButton(), SIGNAL(clicked()), this, SLOT(finish()));
        }else{
            disconnect(w->finishButton(), SIGNAL(clicked()), this, SLOT(finish()));
        }
    }
    w->setFinishEnabled(this, state);
}
开发者ID:,项目名称:,代码行数:21,代码来源:

示例14: ICQSearchResultBase

ICQSearchResult::ICQSearchResult(QWidget *parent, ICQClient *client)
        : ICQSearchResultBase(parent)
{
    m_id1 = SEARCH_DONE;
    m_id2 = SEARCH_DONE;
    m_nFound = 0;
    m_client = client;
    int wChar = QFontMetrics(font()).width('0');
    tblUser->addColumn("", -10*wChar);
    tblUser->setColumnAlignment(0, AlignRight);
    tblUser->addColumn(i18n("Alias"), 20*wChar);
    tblUser->addColumn(i18n("Name"));
    tblUser->setExpandingColumn(COL_NAME);
    tblUser->setSorting(COL_SCREEN);
    tblUser->setMenu(MenuSearchResult);
    tblUser->header()->hide();
    connect(tblUser, SIGNAL(dragStart()), this, SLOT(dragStart()));
    connect(tblUser, SIGNAL(doubleClicked(QListViewItem*)), this, SLOT(doubleClicked(QListViewItem*)));
	connect(tblUser, SIGNAL(selectionChanged()), this, SLOT(selectChanged()));
    QWizard *wizard = static_cast<QWizard*>(topLevelWidget());
    wizard->setFinishEnabled(this, false);
	connect(wizard->finishButton(), SIGNAL(clicked()), this, SLOT(finishClicked()));
}
开发者ID:,项目名称:,代码行数:23,代码来源:

示例15: main

//! [9] //! [10]
int main(int argc, char *argv[])
//! [9] //! [11]
{
    QApplication app(argc, argv);

    QString translatorFileName = QLatin1String("qt_");
    translatorFileName += QLocale::system().name();
    QTranslator *translator = new QTranslator(&app);
    if (translator->load(translatorFileName, QLibraryInfo::location(QLibraryInfo::TranslationsPath)))
        app.installTranslator(translator);


    QWizard wizard;
    wizard.addPage(createIntroPage());
    wizard.addPage(createRegistrationPage());
    wizard.addPage(createConclusionPage());

    wizard.setWindowTitle("Trivial Wizard");
    wizard.show();

    return app.exec();
}
开发者ID:Mr-Kumar-Abhishek,项目名称:qt,代码行数:23,代码来源:trivialwizard.cpp


注:本文中的QWizard类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。