本文整理汇总了C++中kparts::ReadOnlyPart::objectName方法的典型用法代码示例。如果您正苦于以下问题:C++ ReadOnlyPart::objectName方法的具体用法?C++ ReadOnlyPart::objectName怎么用?C++ ReadOnlyPart::objectName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类kparts::ReadOnlyPart
的用法示例。
在下文中一共展示了ReadOnlyPart::objectName方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: switchView
void KonqView::switchView( KonqViewFactory &viewFactory )
{
//kDebug();
if ( m_pPart )
m_pPart->widget()->hide();
KParts::ReadOnlyPart *oldPart = m_pPart;
m_pPart = m_pKonqFrame->attach( viewFactory ); // creates the part
// Set the statusbar in the BE asap to avoid a KMainWindow statusbar being created.
KParts::StatusBarExtension* sbext = statusBarExtension();
if ( sbext )
sbext->setStatusBar( frame()->statusbar() );
// Activate the new part
if ( oldPart )
{
m_pPart->setObjectName( oldPart->objectName() );
emit sigPartChanged( this, oldPart, m_pPart );
delete oldPart;
}
connectPart();
QVariant prop;
prop = m_service->property( "X-KDE-BrowserView-FollowActive");
if (prop.isValid() && prop.toBool())
{
//kDebug() << "X-KDE-BrowserView-FollowActive -> setFollowActive";
setFollowActive(true);
}
prop = m_service->property( "X-KDE-BrowserView-Built-Into" );
m_bBuiltinView = (prop.isValid() && prop.toString() == "konqueror");
if ( !m_pMainWindow->viewManager()->isLoadingProfile() )
{
// Honor "non-removeable passive mode" (like the dirtree)
prop = m_service->property( "X-KDE-BrowserView-PassiveMode");
if ( prop.isValid() && prop.toBool() )
{
kDebug() << "X-KDE-BrowserView-PassiveMode -> setPassiveMode";
setPassiveMode( true ); // set as passive
}
// Honor "linked view"
prop = m_service->property( "X-KDE-BrowserView-LinkedView");
if ( prop.isValid() && prop.toBool() )
{
setLinkedView( true ); // set as linked
// Two views : link both
if (m_pMainWindow->viewCount() <= 2) // '1' can happen if this view is not yet in the map
{
KonqView * otherView = m_pMainWindow->otherView( this );
if (otherView)
otherView->setLinkedView( true );
}
}
}
prop = m_service->property( "X-KDE-BrowserView-HierarchicalView");
if ( prop.isValid() && prop.toBool() )
{
kDebug() << "X-KDE-BrowserView-HierarchicalView -> setHierarchicalView";
setHierarchicalView( true ); // set as hierarchial
}
else
{
setHierarchicalView( false );
}
}