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

C++ setPage函数代码示例

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

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



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

示例1: setPage

void
ShootingMode::updateList( Camera *camera )
{
    /*
     *  Get the updated list of choices for shooting mode.
     *  For cameras where the shooting mode can only be changed
     *  on the camera itself, n = 0 always and this code has
     *  no effect.
     */
    camera->getShootingMode_List( &n, &v );

    for( int i = 0; i < n; i++ ) {
	setPage( i, v[i] );
    }
    stackedWidget->setCurrentIndex( 0 );
    update();
}
开发者ID:rudi-c,项目名称:computational-photography-research,代码行数:17,代码来源:ShootingMode.cpp


示例2: QWizard

FirstRunWizard::FirstRunWizard(QWidget *parent) :
    QWizard(parent)
{
    setPage(Page_Intro, new IntroPage);
    setPage(Page_Login, new LoginPage);
    setPage(Page_NewAccount, new NewAccountPage);
    setPage(Page_Activate, new ActivatePage);
    setPage(Page_Welcome, new WelcomePage);
    setPage(Page_KeyboardShortcuts, new ShortcutsPage);
    setPage(Page_OnlineServices, new OnlineServicesPage);
    setPage(Page_Finished, new FinishedPage);

    setStartId(Page_Intro);

    setWindowTitle(tr("ScreenCloud"));
    setOptions(QWizard::CancelButtonOnLeft);
    background = QPixmap(":/images/wizard_background.png");
    setPixmap(QWizard::BackgroundPixmap, background);
}
开发者ID:MarekAG,项目名称:screencloud,代码行数:19,代码来源:firstrunwizard.cpp


示例3: TabView

HomeView::HomeView(Context *context, QStackedWidget *controls) : TabView(context, VIEW_HOME)
{
    LTMSidebar *s = new LTMSidebar(context);
    HomeWindow *h = new HomeWindow(context, "home", "Trends");
    controls->addWidget(h->controls());
    controls->setCurrentIndex(0);
    BlankStateHomePage *b = new BlankStateHomePage(context);

    setSidebar(s);
    setPage(h);
    setBlank(b);
    setBottom(new ComparePane(context, this, ComparePane::season));

    connect(s, SIGNAL(dateRangeChanged(DateRange)), this, SLOT(dateRangeChanged(DateRange)));
    connect(this, SIGNAL(onSelectionChanged()), this, SLOT(justSelected()));
    connect(bottomSplitter(), SIGNAL(compareChanged(bool)), this, SLOT(compareChanged(bool)));
    connect(bottomSplitter(), SIGNAL(compareClear()), bottom(), SLOT(clear()));
}
开发者ID:chet0xhenry,项目名称:GoldenCheetah,代码行数:18,代码来源:Views.cpp


示例4: Q_ASSERT

bool VCWidget::loadXMLCommon(const QDomElement *root)
{
    Q_ASSERT(root != NULL);

    /* ID */
    if (root->hasAttribute(KXMLQLCVCWidgetID))
        setID(root->attribute(KXMLQLCVCWidgetID).toUInt());

    /* Caption */
    if (root->hasAttribute(KXMLQLCVCCaption))
        setCaption(root->attribute(KXMLQLCVCCaption));

    /* Page */
    if (root->hasAttribute(KXMLQLCVCWidgetPage))
        setPage(root->attribute(KXMLQLCVCWidgetPage).toInt());

    return true;
}
开发者ID:joepadmiraal,项目名称:qlcplus,代码行数:18,代码来源:vcwidget.cpp


示例5: setPage

void HelpBrowser::setHelpEngine(QHelpEngine* helpEngine)
{
  mpHelpEngine = helpEngine;

  setPage(new HelpPage((QWidget*)parent(), helpEngine, this));

  page()->setNetworkAccessManager(new HelpNetworkAccessManager(helpEngine, this));

  QAction* action = pageAction(QWebPage::OpenLinkInNewWindow);
  action->setText(tr("Open Link in New Tab"));
  if (!parent())
    action->setVisible(false);

  pageAction(QWebPage::DownloadLinkToDisk)->setVisible(false);
  pageAction(QWebPage::DownloadImageToDisk)->setVisible(false);
  pageAction(QWebPage::OpenImageInNewWindow)->setVisible(false);

}
开发者ID:sbmlteam,项目名称:QtDeviser,代码行数:18,代码来源:helpbrowser.cpp


示例6: removePage

void QtUserSearchWindow::setFirstPage(QString title) {
    if (page(1) != nullptr) {
        removePage(1);
    }
    if (type_ == AddContact) {
        firstPage_ = new QtUserSearchFirstPage(type_, title.isEmpty() ? firstPage_->title() : title, settings_);
        connect(firstPage_->jid_, SIGNAL(textEdited(QString)), this, SLOT(handleContactSuggestionRequested(QString)));
        connect(firstPage_->jid_, SIGNAL(textEdited(QString)), this, SLOT(handleJIDEditingDone()), Qt::UniqueConnection);
        firstPage_->jid_->onUserSelected.connect(boost::bind(&QtUserSearchWindow::handleOnSearchedJIDSelected, this, _1));
        connect(firstPage_->byJID_, SIGNAL(toggled(bool)), this, SLOT(handleFirstPageRadioChange()));
        connect(firstPage_->byLocalSearch_, SIGNAL(toggled(bool)), this, SLOT(handleFirstPageRadioChange()));
        connect(firstPage_->byRemoteSearch_, SIGNAL(toggled(bool)), this, SLOT(handleFirstPageRadioChange()));
#if QT_VERSION >= 0x040700
        firstPage_->jid_->setPlaceholderText(tr("[email protected]"));
#endif
        firstPage_->service_->setEnabled(false);
        setPage(1, firstPage_);
    } else {
开发者ID:jakjothi,项目名称:swift,代码行数:18,代码来源:QtUserSearchWindow.cpp


示例7: oname

void kdvi::openFile( QString name)
{
    if ( name.isEmpty() )
        return;
    QString oname( name );
    name.detach();
    if ( ! QFileInfo( name ).isReadable() )
        name.append( ".dvi" );
    if ( ! QFileInfo( name ).isReadable() )
    {
        QMessageBox::information( this, i18n("Notice"),
                                  QString(i18n("Can't read file:\n")) +
                                  oname, i18n("OK"));
        return;
    }
    QDir::setCurrent( QFileInfo( name ).dirPath() );
    dviName = name.copy();
    message( i18n("Opening ") + name + " ...");

    makeStatusBar( dviName );
    applyShowStatusbar();
    dviwin->setFile( name );
    dviwin->repaint();
    setCaption( QString()+kapp->getCaption()+": "+name );
    setPage();
    shrinkChanged( dviwin->shrink() );
    if (-1==recent.find(name))
    {
        recent.insert(0,name);
        if (recent.count()>(unsigned)recentmax)
            recent.removeLast();
        config->setGroup("RecentFiles");
        int i=recent.count();
        while ( i-->0 )
            config->writeEntry(QString().setNum(i),
                               recent.at(i));
        config->setGroup( "kdvi" );
        recentmenu->clear();
        for (int n=recent.count(); n-->0;)
            recentmenu->insertItem( recent.at(n), n, 0 );
    }
    updateMarklist();
    message( i18n("Opened ") + name );
}
开发者ID:xwizard,项目名称:kde1,代码行数:44,代码来源:kdvi.cpp


示例8: QWizard

BtBookshelfWizard::BtBookshelfWizard(QWidget * parent, Qt::WindowFlags flags)
    : QWizard(parent, flags)
    , m_downloadInProgress(false)
    , m_closeRequested(false)
    , m_closeMessageBox(new QMessageBox(this))
    , m_taskPage(new BtBookshelfTaskPage(this))
    , m_sourcesPage(new BtBookshelfSourcesPage(this))
    , m_sourcesProgressPage(new BtBookshelfSourcesProgressPage(this))
    , m_languagesPage(new BtBookshelfLanguagesPage(this))
    , m_installWorksPage(new BtBookshelfWorksPage(WizardTaskType::installWorks, this))
    , m_updateWorksPage(new BtBookshelfWorksPage(WizardTaskType::updateWorks, this))
    , m_removeWorksPage(new BtBookshelfWorksPage(WizardTaskType::removeWorks, this))
    , m_installFinalPage(new BtBookshelfInstallFinalPage(this))  // For install and update
{
    setPage(WizardPage::taskPage, m_taskPage);
    setPage(WizardPage::sourcesProgressPage,m_sourcesProgressPage);
    setPage(WizardPage::sourcesPage, m_sourcesPage);
    setPage(WizardPage::languagesPage, m_languagesPage);
    setPage(WizardPage::installWorksPage, m_installWorksPage);
    setPage(WizardPage::updateWorksPage, m_updateWorksPage);
    setPage(WizardPage::removeWorksPage, m_removeWorksPage);
    setPage(WizardPage::removeFinalPage, new BtBookshelfRemoveFinalPage(this));
    setPage(WizardPage::installFinalPage, m_installFinalPage);
    setStartId(WizardPage::taskPage);

    QRect rect = geometry();
    rect.setWidth(780);
    rect.setHeight(600);
    setGeometry(rect);
    setOption(QWizard::NoBackButtonOnLastPage);

    retranslateUi();

    // Load wizard geometry:
    restoreGeometry(btConfig().value<QByteArray>(GeometryKey, QByteArray()));
}
开发者ID:bibletime,项目名称:bibletime,代码行数:36,代码来源:btbookshelfwizard.cpp


示例9: redisplayPage

bool MagicSwitchPage::handleEvent(gui_event_t *event) {
  if (BUTTON_DOWN(Buttons.BUTTON4)) {
    if (EVENT_PRESSED(event, Buttons.BUTTON1)) {
      GUI.flash_strings_fill("CLEAR ALL", "");
      for (int i = 0; i < 4; i++) {
        magicPages[i].clearRecording();
      }
      return true;
    }
  }
  if (EVENT_PRESSED(event, Buttons.BUTTON2)) {
    MidiUart.printfString("SELECT PAGE");
    selectPage = true;
    redisplayPage();
    return true;
  }
  if (EVENT_RELEASED(event, Buttons.BUTTON2)) {
    selectPage = false;
    if (currentPage != NULL) {
      redisplayPage();
    }
    return true;
  }
  if (selectPage) {
    for (int i = Buttons.ENCODER1; i <= Buttons.ENCODER4; i++) {
      if (pages[i] != NULL && EVENT_PRESSED(event, i)) {
        setPage(pages[i]);
        return true;
      }
    }
    if (EVENT_PRESSED(event, Buttons.BUTTON1)) {
      setToCurrentTrack();
      return true;
    }
  }

  if (currentPage != NULL) {
    return currentPage->handleEvent(event);
  } 
  else {
    return false;
  }
}
开发者ID:jmamma,项目名称:mididuino,代码行数:43,代码来源:MNMMagicPage.cpp


示例10: setPage

void TabbedWebView::setWebPage(WebPage* page)
{
    if (m_page == page) {
        return;
    }

    if (m_page) {
        delete m_page;
        m_page = 0;
    }

    m_page = page;
    m_page->setWebView(this);
    m_page->setParent(this);
    setPage(m_page);

    connect(m_page, SIGNAL(linkHovered(QString, QString, QString)), this, SLOT(linkHovered(QString, QString, QString)));
    connect(m_page, SIGNAL(windowCloseRequested()), this, SLOT(closeView()));
}
开发者ID:Shadowmeph,项目名称:QupZilla,代码行数:19,代码来源:tabbedwebview.cpp


示例11: QWebView

QmitkHistogramJSWidget::QmitkHistogramJSWidget(QWidget *parent) :
  QWebView(parent)
{
  // set histogram type to barchart in first instance
  m_UseLineGraph = false;
  m_Page = new QmitkJSWebPage(this);
  setPage(m_Page);
  // set html from source
  connect(page()->mainFrame(), SIGNAL(javaScriptWindowObjectCleared()), this, SLOT(AddJSObject()));
  QUrl myUrl = QUrl("qrc:///QtWidgetsExt/Histogram.html");
  setUrl(myUrl);

  // set Scrollbars to be always disabled
  page()->mainFrame()->setScrollBarPolicy(Qt::Horizontal, Qt::ScrollBarAlwaysOff);
  page()->mainFrame()->setScrollBarPolicy(Qt::Vertical, Qt::ScrollBarAlwaysOff);

  m_ParametricPath = ParametricPathType::New();

}
开发者ID:GHfangxin,项目名称:MITK,代码行数:19,代码来源:QmitkHistogramJSWidget.cpp


示例12: switch

//void GuidoViewer::export2Image (const File& file, ImageFileFormat* format)
int guido2img::convert (guidosession* const currentSession)
{

  ImageFileFormat *format;
  switch (currentSession->format_) {
    case GUIDO_WEB_API_PNG :
        format = new PNGImageFormat ();
        break;
    case GUIDO_WEB_API_JPEG :
        format = new JPEGImageFormat ();
        break;
    case GUIDO_WEB_API_GIF :
        format = new GIFImageFormat ();
        break;
    case GUIDO_WEB_API_SVG :
        assert (false);
    default :
        format = new PNGImageFormat ();
        break;
  }
  setGMNCode (currentSession->gmn_.c_str());
  setPage (currentSession->page_);
  setResizePageToMusic (currentSession->resizeToPage_);
  GuidoPageFormat pagef;
  currentSession->fillGuidoPageFormatUsingCurrentSettings(&pagef);
  setGuidoPageFormat(pagef);

  Image::PixelFormat pf = Image::RGB;
  if (currentSession->format_ == GUIDO_WEB_API_PNG)
    pf = Image::ARGB;	

  SoftwareImageType type;
  Image img (pf, currentSession->width_, currentSession->height_, true, type);
  Graphics g (img);
  if (pf == Image::RGB) {
    g.setColour (Colours::white);
    g.fillRect (0, 0, currentSession->width_, currentSession->height_);
  }
  GuidoComponent::paint(g);
  format->writeImageToStream (img, fBuffer);
  delete format;
  return 0; // need to fix this...
}
开发者ID:k4rm,项目名称:ofxGuido,代码行数:44,代码来源:guido2img.cpp


示例13: QWebView

MyWebView::MyWebView(QWidget *parent):
    QWebView(parent),
    m_page(this)
{
    // Set the page of our own PageView class, MyPageView,
    // because only objects of this class will handle
    // object-tags correctly.

    m_page.setLinkDelegationPolicy(QWebPage::DelegateAllLinks);
    QNetworkAccessManager *networkManager = new MyNetworkAccessManager(this);
    m_page.setNetworkAccessManager(networkManager);
    setPage(&m_page);

    //set cookie jar for persistent cookies
    CookieJar* jar = new CookieJar(QString(dataPath + "/cookies.txt"));
    page()->networkAccessManager()->setCookieJar(jar);

    progressBar = 0;
    connect(this, SIGNAL(linkClicked(const QUrl&)), SLOT(link(const QUrl&)));
}
开发者ID:bojan88,项目名称:MuseScore,代码行数:20,代码来源:webpage.cpp


示例14: QWebView

WebView::WebView(QUrl baseUrl, QWidget *parent) :
    QWebView(parent),
    baseUrl_(baseUrl)
{
#ifdef Q_WS_X11
   if (!core::system::getenv("KDE_FULL_SESSION").empty())
      setStyle(new QPlastiqueStyle());
#endif
   pWebPage_ = new WebPage(baseUrl, this);
   setPage(pWebPage_);

   page()->setForwardUnsupportedContent(true);
   if (desktop::options().webkitDevTools())
      page()->settings()->setAttribute(QWebSettings::DeveloperExtrasEnabled, true);

   connect(page(), SIGNAL(downloadRequested(QNetworkRequest)),
           this, SLOT(downloadRequested(QNetworkRequest)));
   connect(page(), SIGNAL(unsupportedContent(QNetworkReply*)),
           this, SLOT(unsupportedContent(QNetworkReply*)));
}
开发者ID:psibre,项目名称:rstudio,代码行数:20,代码来源:DesktopWebView.cpp


示例15: printImage

void printImage(uint8_t * image)
{
        int column;
        int row;
        int imageWidth = image[0];
        int imageHeight = image[1];
        
        for(row = 0; row < imageHeight; row++)
        {
                setColumn(0);
                setPage(row);
        
                uint8_t imageRow[imageWidth];
                for(column = 0; column < imageWidth; column++)
                {
                        imageRow[column] = image[2 + imageWidth*row + column];
                }
            LCD_writeData(imageRow,imageWidth);        
        }
}
开发者ID:enaguero,项目名称:labarqui-aguero-nunez,代码行数:20,代码来源:HAL_LCD.c


示例16: TabView

TrainView::TrainView(Context *context, QStackedWidget *controls) : TabView(context, VIEW_TRAIN)
{
    trainTool = new TrainSidebar(context);
    trainTool->hide();

    HomeWindow *t = new HomeWindow(context, "train", "train");
    controls->addWidget(t->controls());
    controls->setCurrentIndex(0);
    BlankStateTrainPage *b = new BlankStateTrainPage(context);

    setSidebar(trainTool->controls());
    setPage(t);
    setBlank(b);

    trainBottom = new TrainBottom(trainTool, this);
    setBottom(trainBottom);
    setHideBottomOnIdle(false);

    connect(this, SIGNAL(onSelectionChanged()), this, SLOT(onSelectionChanged()));
    connect(trainBottom, SIGNAL(autoHideChanged(bool)), this, SLOT(onAutoHideChanged(bool)));
}
开发者ID:27sparks,项目名称:GoldenCheetah,代码行数:21,代码来源:Views.cpp


示例17: TRSCOPE

void qPBReaderDocView::InitializeView()
{
   TRSCOPE(view, "qPBReaderDocView::InitializeView");

   setRenderHints(QPainter::Antialiasing | QPainter::TextAntialiasing |
                  QPainter::SmoothPixmapTransform);
   setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding));

   _sizeHint = QSize(510, 680);
   _initialPos = 0.;
   _toBottom = false;

   _pDoc = new qPBReaderDoc(this);

   setPage(_pDoc);

   // signal handling

   connect(this, SIGNAL(loadFinished(bool)),
           this, SLOT(LoadFinished(bool)));
}
开发者ID:m4mmon,项目名称:qPBReader,代码行数:21,代码来源:qPBReaderDocView.cpp


示例18: toggleDraw

void ofxSimpleGuiToo::keyPressed(ofKeyEventArgs &e) {
	if(doDefaultKeys) {
		if(e.key == ' ') {
			toggleDraw();
		} else if(e.key>='0' && e.key<='9') {
			setPage((int)(e.key - '0'));
			setDraw(true);
		} else if(doDraw) {
			switch(e.key) {
				case '[': prevPage(); break;
				case ']': nextPage(); break;
			}
		}
	}
	
	if(doDraw) {
		headerPage->keyPressed(e);
		pages[currentPageIndex]->keyPressed(e);
	}
	
}
开发者ID:HellicarAndLewis,项目名称:Hub,代码行数:21,代码来源:ofxSimpleGuiToo.cpp


示例19: defined

void XimCandidateWindow::setIndex(int index)
{
#if defined(ENABLE_DEBUG)
    qDebug("setIndex : index = %d", index);
#endif
    // validity check
    if (index < 0)
        candidateIndex = nrCandidates - 1;
    else if (index >= nrCandidates)
        candidateIndex = 0;
    else
        candidateIndex = index;

    // set page
    int newpage = 0;
    if (displayLimit)
        newpage = candidateIndex / displayLimit;
    if (pageIndex != newpage)
        setPage(newpage);

    // select item
    if (candidateIndex >= 0 && needHighlight)
    {
        int pos = index;
        if (displayLimit)
            pos = candidateIndex % displayLimit;

        if (cList->item(pos, 0) && !cList->item(pos, 0)->isSelected())
        {
            cList->clearSelection();
            cList->selectRow(pos);
        }
    }
    else
    {
        cList->clearSelection();
    }

    updateLabel();
}
开发者ID:doughdemon,项目名称:uim,代码行数:40,代码来源:ximcandidatewindow.cpp


示例20: QWidget

FormRulesViewer::FormRulesViewer(QWidget* parent, Qt::WindowFlags flags )
	: QWidget(parent, flags)
	, ui(new Ui::FormRulesViewer)
{
	if (Rules::sample()->doc()) {
		close();
	}
	ui->setupUi(this);
	ui->graphicsView->setScene(Rules::sample());
	ui->lineEditPageLimit->setText(QString::number(Rules::sample()->doc()->numPages()));
	ui->spinBoxCurrentPage->setMaximum(Rules::sample()->doc()->numPages());

	setWindowTitle(tr("Competition rules"));
	
	for (int id = 0; id< Rules::sample()->doc()->infoKeys().count(); id++) {
		if (Rules::sample()->doc()->infoKeys().at(id) == "Title") {
			if (Rules::sample()->doc()->info("Title").length() >= 3) setWindowTitle(Rules::sample()->doc()->info("Title"));
		}
	}


	connect(ui->spinBoxCurrentPage, SIGNAL(valueChanged(int)), SLOT(setPage(int)));

	ui->graphicsView->installEventFilter(this);
	ui->graphicsView->adjustSize();
	setPage(current_page);

	ui->lineEditFind->setText(Rules::sample()->searchText());
	if (Rules::sample()->searched()->isEmpty()) {
		ui->widgetItemsInfo->setHidden(true);
		ui->toolButtonNext->setDisabled(true);
		ui->toolButtonPrevious->setDisabled(true);
	} else {
		ui->toolButtonNext->setEnabled(true);
		ui->toolButtonPrevious->setEnabled(true);
		ui->widgetItemsInfo->setShown(true);
		ui->labelCountItem->setText(QString::number(Rules::sample()->searched()->count()));
		ui->labelCurrentItem->setText(QString::number(Rules::sample()->currentResult()+1));
	}
}
开发者ID:pitikov,项目名称:cwall.qt4,代码行数:40,代码来源:rulesviewer.cpp



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ setParam函数代码示例发布时间:2022-05-30
下一篇:
C++ setPCode函数代码示例发布时间: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