本文整理汇总了C++中KActionCollection::setHighlightingEnabled方法的典型用法代码示例。如果您正苦于以下问题:C++ KActionCollection::setHighlightingEnabled方法的具体用法?C++ KActionCollection::setHighlightingEnabled怎么用?C++ KActionCollection::setHighlightingEnabled使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类KActionCollection
的用法示例。
在下文中一共展示了KActionCollection::setHighlightingEnabled方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: QWidget
KoView::KoView( KoDocument *document, QWidget *parent, const char *name )
: QWidget( parent, name )
{
Q_ASSERT( document );
//kdDebug(30003) << "KoView::KoView " << this << endl;
d = new KoViewPrivate;
d->m_doc = document;
KParts::PartBase::setPartObject( this );
setFocusPolicy( StrongFocus );
setMouseTracking( true );
connect( d->m_doc, SIGNAL( childChanged( KoDocumentChild * ) ),
this, SLOT( slotChildChanged( KoDocumentChild * ) ) );
connect( d->m_doc, SIGNAL( sigBeginOperation() ),
this, SLOT( beginOperation() ) );
connect( d->m_doc, SIGNAL( sigEndOperation() ),
this, SLOT( endOperation() ) );
actionCollection()->setWidget( this );
setupGlobalActions();
KActionCollection *coll = actionCollection();
/**** not needed anymore, according to David (Werner)
QValueList<KAction*> docActions = document->actionCollection()->actions();
QValueList<KAction*>::ConstIterator it = docActions.begin();
QValueList<KAction*>::ConstIterator end = docActions.end();
for (; it != end; ++it )
coll->insert( *it );
*/
KStatusBar * sb = statusBar();
if ( sb ) // No statusbar in e.g. konqueror
{
coll->setHighlightingEnabled( true );
connect( coll, SIGNAL( actionStatusText( const QString & ) ),
this, SLOT( slotActionStatusText( const QString & ) ) );
connect( coll, SIGNAL( clearStatusText() ),
this, SLOT( slotClearStatusText() ) );
connect( d->m_doc, SIGNAL( sigStatusBarMessage( const QString& ) ),
this, SLOT( slotActionStatusText( const QString& ) ) );
connect( d->m_doc, SIGNAL( sigClearStatusBarMessage() ),
this, SLOT( slotClearStatusText() ) );
}
d->m_doc->setCurrent();
d->m_scrollTimer = new QTimer( this );
connect (d->m_scrollTimer, SIGNAL( timeout() ), this, SLOT( slotAutoScroll() ) );
}