本文整理汇总了C++中ktexteditor::View::setStatusBarEnabled方法的典型用法代码示例。如果您正苦于以下问题:C++ View::setStatusBarEnabled方法的具体用法?C++ View::setStatusBarEnabled怎么用?C++ View::setStatusBarEnabled使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ktexteditor::View
的用法示例。
在下文中一共展示了View::setStatusBarEnabled方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: createView
KTextEditor::View* TextInfo::createView(QWidget *parent, const char* /* name */)
{
if(!m_doc) {
return Q_NULLPTR;
}
KTextEditor::View *view = m_doc->createView(parent);
installEventFilters(view);
installSignalConnections(view);
registerCodeCompletionModels(view);
view->setStatusBarEnabled(false);
connect(view, SIGNAL(destroyed(QObject*)), this, SLOT(slotViewDestroyed(QObject*)));
return view;
}
示例2: cg
KTextEditor::View *KateViewSpace::createView(KTextEditor::Document *doc)
{
// should only be called if a view does not yet exist
Q_ASSERT(! m_docToView.contains(doc));
/**
* Create a fresh view
*/
KTextEditor::View *v = doc->createView(stack, m_viewManager->mainWindow()->wrapper());
// set status bar to right state
v->setStatusBarEnabled(m_viewManager->mainWindow()->showStatusBar());
// restore the config of this view if possible
if (!m_group.isEmpty()) {
QString fn = v->document()->url().toString();
if (! fn.isEmpty()) {
QString vgroup = QString::fromLatin1("%1 %2").arg(m_group).arg(fn);
KateSession::Ptr as = KateApp::self()->sessionManager()->activeSession();
if (as->config() && as->config()->hasGroup(vgroup)) {
KConfigGroup cg(as->config(), vgroup);
v->readSessionConfig(cg);
}
}
}
// register document, it is shown below through showView() then
if (! m_lruDocList.contains(doc)) {
registerDocument(doc);
Q_ASSERT(m_lruDocList.contains(doc));
}
// insert View into stack
stack->addWidget(v);
m_docToView[doc] = v;
showView(v);
return v;
}