本文整理汇总了C++中HelpViewer::source方法的典型用法代码示例。如果您正苦于以下问题:C++ HelpViewer::source方法的具体用法?C++ HelpViewer::source怎么用?C++ HelpViewer::source使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类HelpViewer
的用法示例。
在下文中一共展示了HelpViewer::source方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
CentralWidget::~CentralWidget()
{
TRACE_OBJ
#ifndef QT_NO_PRINTER
delete printer;
#endif
QStringList zoomFactors;
QStringList currentPages;
bool searchAttached = m_searchWidget->isAttached();
int i = searchAttached ? 1 : 0;
for (; i < tabWidget->count(); ++i) {
HelpViewer *viewer = qobject_cast<HelpViewer*>(tabWidget->widget(i));
if (viewer && viewer->source().isValid()) {
currentPages << viewer->source().toString();
zoomFactors << QString::number(viewer->scale());
}
}
HelpEngineWrapper &helpEngine = HelpEngineWrapper::instance();
helpEngine.setLastTabPage(tabWidget->currentIndex());
helpEngine.setLastShownPages(currentPages);
helpEngine.setSearchWasAttached(searchAttached);
helpEngine.setLastZoomFactors(zoomFactors);
}
示例2: engine
CentralWidget::~CentralWidget()
{
QDir dir;
QString currentPages;
QHelpEngineCore engine(collectionFile, 0);
if (engine.setupData()) {
for (int i = 0; i < tabWidget->count(); ++i) {
HelpViewer *viewer = qobject_cast<HelpViewer*>(tabWidget->widget(i));
if (viewer && viewer->source().isValid())
currentPages.append(viewer->source().toString()).append(QLatin1Char('|'));
}
engine.setCustomValue(QLatin1String("LastTabPage"), lastTabPage);
engine.setCustomValue(QLatin1String("LastShownPages"), currentPages);
}
}
示例3: setCurrentPage
void GeneralSettingsPage::setCurrentPage()
{
HelpViewer *viewer = CentralWidget::instance()->currentHelpViewer();
if (viewer)
m_ui->homePageLineEdit->setText(viewer->source().toString());
}
示例4: newTab
void CentralWidget::newTab()
{
HelpViewer* viewer = currentHelpViewer();
if (viewer)
setSourceInNewTab(viewer->source());
}