• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ setCurrentPage函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: updateButtonState

void Wizard::next()
{
    if (currentPageIsComplete() && validateCurrentPage())
    {

        updateButtonState();
        int nId = nextId();

        if ((nId == -1) && (m_currentId < m_pages.size()))
        {
            setCurrentPage(m_currentId + 1);
        }

        if (nId > -1 && nId < m_pages.size())
        {
            setCurrentPage(nId);
        }
    }
}
开发者ID:RPG-18,项目名称:WtComponents,代码行数:19,代码来源:Wizard.cpp


示例2: connect

void EditGroupWidget::loadGroup(Group* group, bool create, const QSharedPointer<Database>& database)
{
    m_group = group;
    m_db = database;

    m_temporaryGroup.reset(group->clone(Entry::CloneNoFlags, Group::CloneNoFlags));
    connect(m_temporaryGroup->customData(), SIGNAL(customDataModified()), SLOT(setModified()));

    if (create) {
        setHeadline(tr("Add group"));
    } else {
        setHeadline(tr("Edit group"));
    }

    if (m_group->parentGroup()) {
        addTriStateItems(m_mainUi->searchComboBox, m_group->parentGroup()->resolveSearchingEnabled());
        addTriStateItems(m_mainUi->autotypeComboBox, m_group->parentGroup()->resolveAutoTypeEnabled());
    } else {
        addTriStateItems(m_mainUi->searchComboBox, true);
        addTriStateItems(m_mainUi->autotypeComboBox, true);
    }

    m_mainUi->editName->setText(m_group->name());
    m_mainUi->editNotes->setPlainText(m_group->notes());
    m_mainUi->expireCheck->setChecked(group->timeInfo().expires());
    m_mainUi->expireDatePicker->setDateTime(group->timeInfo().expiryTime().toLocalTime());
    m_mainUi->searchComboBox->setCurrentIndex(indexFromTriState(group->searchingEnabled()));
    m_mainUi->autotypeComboBox->setCurrentIndex(indexFromTriState(group->autoTypeEnabled()));
    if (group->defaultAutoTypeSequence().isEmpty()) {
        m_mainUi->autoTypeSequenceInherit->setChecked(true);
    } else {
        m_mainUi->autoTypeSequenceCustomRadio->setChecked(true);
    }
    m_mainUi->autoTypeSequenceCustomEdit->setText(group->effectiveAutoTypeSequence());

    IconStruct iconStruct;
    iconStruct.uuid = m_temporaryGroup->iconUuid();
    iconStruct.number = m_temporaryGroup->iconNumber();
    m_editGroupWidgetIcons->load(m_temporaryGroup->uuid(), m_db, iconStruct);
    m_editWidgetProperties->setFields(m_temporaryGroup->timeInfo(), m_temporaryGroup->uuid());
    m_editWidgetProperties->setCustomData(m_temporaryGroup->customData());

    for (const ExtraPage& page : asConst(m_extraPages)) {
        page.set(m_temporaryGroup.data(), m_db);
    }

    setCurrentPage(0);

    m_mainUi->editName->setFocus();

    // Force the user to Save/Discard new groups
    showApplyButton(!create);

    setModified(false);
}
开发者ID:droidmonkey,项目名称:keepassx_http,代码行数:55,代码来源:EditGroupWidget.cpp


示例3: setCurrentPage

void PreferencesPanel::clickedPage()
{
    for (auto* b : buttons)
    {
        if (b->getToggleState())
        {
            setCurrentPage (b->getName());
            break;
        }
    }
}
开发者ID:imekon,项目名称:SampleBrowser2,代码行数:11,代码来源:juce_PreferencesPanel.cpp


示例4: setCurrentPage

void PreferencesPanel::buttonClicked (Button*)
{
    for (int i = 0; i < buttons.size(); ++i)
    {
        if (buttons.getUnchecked(i)->getToggleState())
        {
            setCurrentPage (buttons.getUnchecked(i)->getName());
            break;
        }
    }
}
开发者ID:AlessandroGiacomini,项目名称:pyplasm,代码行数:11,代码来源:juce_PreferencesPanel.cpp


示例5: sendCommand

void DiscoverAction::execute()
{
    RemoteInterface::instance().setActiveThumbnailModel(RemoteInterface::ModelType::Discovery);

    if (m_currentSelection.isEmpty())
        sendCommand(SearchRequest(SearchType::Images, m_searchInfo));
    else
        m_model->setCurrentSelection(m_currentSelection, m_allImages);

    m_model->setCurrentAction(this);
    setCurrentPage(Page::DiscoverPage);
}
开发者ID:Df458,项目名称:kphotoalbum-multitags-branch,代码行数:12,代码来源:Action.cpp


示例6: KexiAssistantWidget

KexiImportExportAssistant::KexiImportExportAssistant(
    const QAction *action_project_import_export_send_,
    const QAction *action_import_project_,
    QWidget* parent)
 : KexiAssistantWidget(parent)
 , action_project_import_export_send(action_project_import_export_send_)
 , action_import_project(action_import_project_)
 , d(new Private(this))
{
    setCurrentPage(d->mainPage());
    setFocusProxy(d->mainPage());
}
开发者ID:crayonink,项目名称:calligra-2,代码行数:12,代码来源:KexiImportExportAssistant.cpp


示例7: switch

bool QTabWidget::qt_invoke( int _id, QUObject* _o )
{
    switch ( _id - staticMetaObject()->slotOffset() ) {
    case 0: setCurrentPage((int)static_QUType_int.get(_o+1)); break;
    case 1: showPage((QWidget*)static_QUType_ptr.get(_o+1)); break;
    case 2: removePage((QWidget*)static_QUType_ptr.get(_o+1)); break;
    case 3: showTab((int)static_QUType_int.get(_o+1)); break;
    default:
	return QWidget::qt_invoke( _id, _o );
    }
    return TRUE;
}
开发者ID:OS2World,项目名称:LIB-QT3_Toolkit_Vbox,代码行数:12,代码来源:moc_qtabwidget.cpp


示例8: setCurrentPage

void KviTalWizard::setBackEnabled(QWidget * pWidget,bool bEnabled)
{
	KviTalWizardPageData * pData = m_p->findPage(pWidget);
	if(!pData)
		return;
	if(bEnabled)
		pData->iEnableFlags |= KviTalWizardPageData::EnableBack;
	else
		pData->iEnableFlags &= ~KviTalWizardPageData::EnableBack;
	if(pData == m_p->pCurrentPage)
		setCurrentPage(pData);
}
开发者ID:kartagis,项目名称:KVIrc,代码行数:12,代码来源:KviTalWizard.cpp


示例9: ConfigDialog

PreferencesDialog::PreferencesDialog(QWidget *parent)
    : ConfigDialog(parent, "PreferencesDialog")
{
    iCount++;
    server = new ServerSettings(this);
    playback = new PlaybackSettings(this);
    files = new FileSettings(this);
    interface = new InterfaceSettings(this);
    context = new ContextSettings(this);
    cache = new CacheSettings(this);
    scrobbling = new ScrobblingSettings(this);
    custom = new CustomActionsSettings(this);
    server->load();
    playback->load();
    files->load();
    interface->load();
    context->load();
    scrobbling->load();
    custom->load();
    addPage(QLatin1String("collection"), server, i18n("Collection"), Icons::self()->audioFileIcon, i18n("Collection Settings"));
    addPage(QLatin1String("playback"), playback, i18n("Playback"), Icons::self()->speakerIcon, i18n("Playback Settings"));
    addPage(QLatin1String("files"), files, i18n("Downloaded Files"), Icons::self()->filesIcon, i18n("Downloaded Files Settings"));
    addPage(QLatin1String("interface"), interface, i18n("Interface"), Icon("preferences-other"), i18n("Interface Settings"));
    addPage(QLatin1String("info"), context, i18n("Info"), Icons::self()->contextIcon, i18n("Info View Settings"));
    addPage(QLatin1String("scrobbling"), scrobbling, i18n("Scrobbling"), Icons::self()->lastFmIcon, i18n("Scrobbling Settings"));
    #if defined CDDB_FOUND || defined MUSICBRAINZ5_FOUND
    audiocd = new AudioCdSettings(0);
    audiocd->load();
    addPage(QLatin1String("cd"), audiocd, i18n("Audio CD"), Icon("media-optical"), i18n("Audio CD Settings"));
    #endif
    #ifdef ENABLE_PROXY_CONFIG
    proxy = new ProxySettings(0);
    proxy->load();
    addPage(QLatin1String("proxy"), proxy, i18n("Proxy"), Icon("preferences-system-network"), i18nc("Qt-only", "Proxy Settings"));
    #endif
    #ifndef ENABLE_KDE_SUPPORT
    shortcuts = new ShortcutsSettingsPage(0);
    addPage(QLatin1String("shortcuts"), shortcuts, i18nc("Qt-only", "Shortcuts"), Icon(QStringList() << "preferences-desktop-keyboard" << "keyboard"),
            i18nc("Qt-only", "Keyboard Shortcut Settings"));
    shortcuts->load();
    #endif
    addPage(QLatin1String("cache"), cache, i18n("Cache"), Icon(QStringList() << "folder-temp" << "folder"), i18n("Cached Items"));
    addPage(QLatin1String("custom"), custom, i18n("Custom Actions"), Icon(QStringList() << "fork" << "gtk-execute"), i18n("Custom Actions"));
    #ifdef Q_OS_MAC
    setCaption(i18n("Cantata Preferences"));
    #else
    setCaption(i18n("Configure"));
    #endif
    setAttribute(Qt::WA_DeleteOnClose);
    setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum);
    setCurrentPage(QLatin1String("collection"));
}
开发者ID:BinChengfei,项目名称:cantata,代码行数:52,代码来源:preferencesdialog.cpp


示例10: OtpPage

void MainWindow::createPages() {
    //Create pages
    m_otpPage = new OtpPage(this);
    m_oathPage = new OathPage(this);
    m_staticPage = new StaticPage(this);
    m_chalRespPage = new ChalRespPage(this);
    m_settingPage = new SettingPage(this);
    m_toolPage = new ToolPage(this);
    m_aboutPage = new AboutPage(this);

    //Add pages to the pages widget
    ui->pagesWidget->addWidget(m_otpPage);
    ui->pagesWidget->addWidget(m_oathPage);
    ui->pagesWidget->addWidget(m_staticPage);
    ui->pagesWidget->addWidget(m_chalRespPage);
    ui->pagesWidget->addWidget(m_settingPage);
    ui->pagesWidget->addWidget(m_toolPage);
    ui->pagesWidget->addWidget(m_aboutPage);

    //Map the values of menu buttons with the indexes of the pages widget

    //Create a QMapper
    QSignalMapper *mapper = new QSignalMapper(this);

    //Connect the clicked signal with the QSignalMapper
    connect(ui->otpMenuBtn, SIGNAL(clicked()), mapper, SLOT(map()));
    connect(ui->oathHotpMenuBtn, SIGNAL(clicked()), mapper, SLOT(map()));
    connect(ui->staticMenuBtn, SIGNAL(clicked()), mapper, SLOT(map()));
    connect(ui->chalRespMenuBtn, SIGNAL(clicked()), mapper, SLOT(map()));
    connect(ui->settingsMenuBtn, SIGNAL(clicked()), mapper, SLOT(map()));
    connect(ui->toolsMenuBtn, SIGNAL(clicked()), mapper, SLOT(map()));
    connect(ui->aboutMenuBtn, SIGNAL(clicked()), mapper, SLOT(map()));

    //Set a value for each button
    mapper->setMapping(ui->otpMenuBtn, Page_Otp);
    mapper->setMapping(ui->oathHotpMenuBtn, Page_Oath);
    mapper->setMapping(ui->staticMenuBtn, Page_Static);
    mapper->setMapping(ui->chalRespMenuBtn, Page_ChalResp);
    mapper->setMapping(ui->settingsMenuBtn, Page_Settings);
    mapper->setMapping(ui->toolsMenuBtn, Page_Tools);
    mapper->setMapping(ui->aboutMenuBtn, Page_About);

    //Connect the mapper to the pages widget
    //The mapper will set a value to each button and set that value to
    //the pages widget
    //connect(mapper, SIGNAL(mapped(int)), ui->pagesWidget, SLOT(setCurrentIndex(int)));
    connect(mapper, SIGNAL(mapped(int)), this, SLOT(setCurrentPage(int)));

    //Set the current page
    m_currentPage = 0;
    setCurrentPage(Page_About);
}
开发者ID:wzzrd,项目名称:yubikey-personalization-gui,代码行数:52,代码来源:mainwindow.cpp


示例11: setCurrentPage

/**
 * Displays a context menu for page operations.
 * This slot is connected to the contextMenu() signal, emitted by m_pQueryTabs.
 * @param	pWidget	The page under the mouse
 * @param	pt	The point over which the mouse was clicked in request for
 *			the context menu
 */
void QueryWidget::slotContextMenu(QWidget* pWidget, const QPoint& pt)
{

    // Operations are on the current page, so we must ensure the clicked
    // tab becomes the current one
    setCurrentPage(pWidget);

    QList<QAction*> lActions = m_pPageMenu->actions();
    for (int i = 1; i < lActions.count(); lActions.at(i++)->setEnabled(true)) {}

    // Show the menu
    m_pPageMenu->popup(pt);
}
开发者ID:bms,项目名称:kscope4,代码行数:20,代码来源:querywidget.cpp


示例12: showPage

void PreferencesDialog::showPage(const QString &page)
{
    QStringList parts=page.split(QLatin1Char(':'));
    if (setCurrentPage(parts.at(0))) {
        if (parts.count()>1) {
            QWidget *cur=getPage(parts.at(0));
            if (qobject_cast<InterfaceSettings *>(cur)) {
                static_cast<InterfaceSettings *>(cur)->showPage(parts.at(1));
            }
        }
    }
    Utils::raiseWindow(this);
}
开发者ID:BinChengfei,项目名称:cantata,代码行数:13,代码来源:preferencesdialog.cpp


示例13: KexiAssistantWidget

KexiWelcomeAssistant::KexiWelcomeAssistant(
    KexiRecentProjects* projects, KexiMainWindow* parent)
 : KexiAssistantWidget(parent)
 , d(new Private(this))
{
    d->mainWindow = parent;
    d->mainWindow->redirectMessagesTo(this);
    d->messageWidgetActionNo = 0;
    d->messageWidgetActionTryAgain = 0;
    d->projects = projects;
    setCurrentPage(d->mainWelcomePage());
    setFocusProxy(d->mainWelcomePage());
}
开发者ID:crayonink,项目名称:calligra-2,代码行数:13,代码来源:KexiWelcomeAssistant.cpp


示例14: setResizePageToMusic

//-------------------------------------------------------------------------
void QGuidoItemContainer::loadFromOtherContainer( const QGuidoItemContainer * otherContainer )
{
	setResizePageToMusic( otherContainer->mGuidoItem->isResizePageToMusic() );
	load( otherContainer );
	mIsOptimalPageFillOn	= otherContainer->mIsOptimalPageFillOn;
	mIsProportionalOn		= otherContainer->mIsProportionalOn;

	mGuidoItem->scale( otherContainer->mGuidoItem->transform().m11() , otherContainer->mGuidoItem->transform().m22() );
	updateLayoutSettings();
	mGuidoItem->setGridWidth(otherContainer->mGuidoItem->gridWidth());
	mGuidoItem->setGridHeight(otherContainer->mGuidoItem->gridHeight());
	setCurrentPage( otherContainer->mGuidoItem->firstVisiblePage());
}
开发者ID:EQ4,项目名称:guido-engine,代码行数:14,代码来源:QGuidoItemContainer.cpp


示例15: setCurrentPage

void Wizard::addPage(WizardPage* page)
{

    m_pages.push_back(page);
    m_stack->addWidget(page);
    page->setWizard(this);

    if (m_currentId == -1)
    {
        setCurrentPage(0);
    }

    updateButtonState();
}
开发者ID:RPG-18,项目名称:WtComponents,代码行数:14,代码来源:Wizard.cpp


示例16: switch

void IPTCEditWidget::showPage(int page)
{
    switch(page)
    {
        case 0:
            setCurrentPage(d->page_content);
            break;
        case 1:
            setCurrentPage(d->page_origin);
            break;
        case 2:
            setCurrentPage(d->page_credits);
            break;
        case 3:
            setCurrentPage(d->page_subjects);
            break;
        case 4:
            setCurrentPage(d->page_keywords);
            break;
        case 5:
            setCurrentPage(d->page_categories);
            break;
        case 6:
            setCurrentPage(d->page_status);
            break;
        case 7:
            setCurrentPage(d->page_properties);
            break;
        case 8:
            setCurrentPage(d->page_envelope);
            break;
        default:
            setCurrentPage(d->page_content);
            break;
    }
}
开发者ID:Match-Yang,项目名称:digikam,代码行数:36,代码来源:iptceditwidget.cpp


示例17: setCurrentPage

/**
 * Displays a context menu for page operations.
 * This slot is connected to the contextMenu() signal, emitted by 
 * m_pQueryTabs.
 * @param	pWidget	The page under the mouse
 * @param	pt		The point over which the mouse was clicked in request for 
 *					the	context menu
 */
void QueryWidget::slotContextMenu(QWidget* pWidget, const QPoint& pt)
{
	uint i;
	
	// Operations are on the current page, so we must ensure the clicked
	// tab becomes the current one
	setCurrentPage(pWidget);
	
	// Enable all operations
	for (i = 1; i < m_pPageMenu->count(); i++)
		m_pPageMenu->setItemEnabled(m_pPageMenu->idAt(i), true);
	
	// Show the menu
	m_pPageMenu->popup(pt);
}
开发者ID:VicHao,项目名称:kkscope,代码行数:23,代码来源:querywidget.cpp


示例18: ErrorItem

void OutputWindow::setErrorMessages( const QStringList &errors, const QValueList<uint> &lines,
				     bool clear, const QStringList &locations,
				     const QObjectList &locationObjects )
{
    if ( clear )
	errorView->clear();
    QStringList::ConstIterator mit = errors.begin();
    QValueList<uint>::ConstIterator lit = lines.begin();
    QStringList::ConstIterator it = locations.begin();
    QObjectList objects = (QObjectList)locationObjects;
    QObject *o = objects.first();
    QListViewItem *after = 0;
    for ( ; lit != lines.end() && mit != errors.end(); ++lit, ++mit, ++it, o = objects.next() )
	after = new ErrorItem( errorView, after, *mit, *lit, *it, o );
    setCurrentPage( 1 );
}
开发者ID:AliYousuf,项目名称:univ-aca-mips,代码行数:16,代码来源:outputwindow.cpp


示例19: QueryPage

/**
 * Creates a new query page, and adds it to the tab widget.
 * The new page is set as the current one.
 */
void QueryWidget::addQueryPage()
{
    QueryPage* pPage;
    QString sTitle;

    // Create the page
    pPage = new QueryPage(this);

    // Add the page, and set it as the current one
    m_pQueryTabs->insertTab(m_nQueryPages++, pPage, GET_PIXMAP(TabUnlocked),
                            "Query");
    setCurrentPage(pPage);

    // Emit the lineRequested() signal when a query record is selected on
    // this page
    connect(pPage, SIGNAL(lineRequested(const QString&, uint)), this,
            SLOT(slotRequestLine(const QString&, uint)));
}
开发者ID:bms,项目名称:kscope4,代码行数:22,代码来源:querywidget.cpp


示例20: PLATFORM

bool PDFDocumentImage::dataChanged(bool allDataReceived)
{
    if (allDataReceived && !m_document) {
#if PLATFORM(MAC)
        // On Mac the NSData inside the SharedBuffer can be secretly appended to without the SharedBuffer's knowledge.  We use SharedBuffer's ability
        // to wrap itself inside CFData to get around this, ensuring that ImageIO is really looking at the SharedBuffer.
        RetainPtr<CFDataRef> data(AdoptCF, this->data()->createCFData());
#else
        // If no NSData is available, then we know SharedBuffer will always just be a vector.  That means no secret changes can occur to it behind the
        // scenes.  We use CFDataCreateWithBytesNoCopy in that case.
        RetainPtr<CFDataRef> data(AdoptCF, CFDataCreateWithBytesNoCopy(0, reinterpret_cast<const UInt8*>(this->data()->data()), this->data()->size(), kCFAllocatorNull));
#endif
        RetainPtr<CGDataProviderRef> dataProvider(AdoptCF, CGDataProviderCreateWithCFData(data.get()));
        m_document = CGPDFDocumentCreateWithProvider(dataProvider.get());
        setCurrentPage(0);
    }
    return m_document; // return true if size is available
}
开发者ID:dzip,项目名称:webkit,代码行数:18,代码来源:PDFDocumentImage.cpp



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ setCurrentRow函数代码示例发布时间:2022-05-30
下一篇:
C++ setCurrentItem函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap