Skip to content
Permalink
Browse files

more doc

  • Loading branch information
3nids committed Nov 29, 2018
1 parent c13b419 commit 157c8f498798ea6055205389af5991f04265f643
@@ -57,9 +57,9 @@ Returns true if some text to be search is pending in the queue
Returns true if the a search is currently running
%End

void triggerResult( const QModelIndex &index, const int id = -1 );
void triggerResult( const QModelIndex &index, const int actionId = -1 );
%Docstring
Triggers the result at given ``index`` and with optional ``action`` if context menu entry was triggered
Triggers the result at given ``index`` and with optional ``actionId`` if an additional action was triggered
%End

signals:
@@ -37,14 +37,14 @@ bool QgsLocatorModelBridge::isRunning() const
return mIsRunning;
}

void QgsLocatorModelBridge::triggerResult( const QModelIndex &index, const int id )
void QgsLocatorModelBridge::triggerResult( const QModelIndex &index, const int actionId )
{
mLocator->clearPreviousResults();
QgsLocatorResult result = mProxyModel->data( index, QgsLocatorModel::ResultDataRole ).value< QgsLocatorResult >();
if ( result.filter )
{
if ( id >= 0 )
result.filter->triggerResultFromAction( result, id );
if ( actionId >= 0 )
result.filter->triggerResultFromAction( result, actionId );
else
result.filter->triggerResult( result );
}
@@ -63,8 +63,8 @@ class CORE_EXPORT QgsLocatorModelBridge : public QObject
//! Returns true if the a search is currently running
bool isRunning() const;

//! Triggers the result at given \a index and with optional \a action if context menu entry was triggered
void triggerResult( const QModelIndex &index, const int id = -1 );
//! Triggers the result at given \a index and with optional \a actionId if an additional action was triggered
void triggerResult( const QModelIndex &index, const int actionId = -1 );

signals:
//! Emitted when a result is added

0 comments on commit 157c8f4

Please sign in to comment.
You can’t perform that action at this time.