QGIS API Documentation 3.40.0-Bratislava (b56115d8743)
Loading...
Searching...
No Matches
qgsprocessingtoolboxtreeview.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsprocessingtoolboxtreeview.h
3 -----------------------------
4 begin : July 2018
5 copyright : (C) 2018 by Nyall Dawson
6 email : nyall dot dawson at gmail dot com
7 ***************************************************************************
8 * *
9 * This program is free software; you can redistribute it and/or modify *
10 * it under the terms of the GNU General Public License as published by *
11 * the Free Software Foundation; either version 2 of the License, or *
12 * (at your option) any later version. *
13 * *
14 ***************************************************************************/
15
16#ifndef QGSPROCESSINGTOOLBOXTREEVIEW_H
17#define QGSPROCESSINGTOOLBOXTREEVIEW_H
18
19#include "qgis.h"
20#include "qgis_gui.h"
21#include <QTreeView>
23
25class QgsProcessingRecentAlgorithmLog;
27class QgsProcessingFavoriteAlgorithmManager;
28
30
37class GUI_EXPORT QgsProcessingToolboxTreeView : public QTreeView
38{
39 Q_OBJECT
40
41 public:
42
56 QgsProcessingToolboxTreeView( QWidget *parent SIP_TRANSFERTHIS = nullptr,
57 QgsProcessingRegistry *registry = nullptr,
58 QgsProcessingRecentAlgorithmLog *recentLog = nullptr,
59 QgsProcessingFavoriteAlgorithmManager *favoriteManager = nullptr );
60
70 void setRegistry(
71 QgsProcessingRegistry *registry,
72 QgsProcessingRecentAlgorithmLog *recentLog = nullptr,
73 QgsProcessingFavoriteAlgorithmManager *favoriteManager = nullptr );
74
78 void setToolboxProxyModel( QgsProcessingToolboxProxyModel *model SIP_TRANSFER );
79
84 const QgsProcessingAlgorithm *algorithmForIndex( const QModelIndex &index );
85
90 const QgsProcessingAlgorithm *selectedAlgorithm();
91
96 void setFilters( QgsProcessingToolboxProxyModel::Filters filters );
97
104
108 void setInPlaceLayer( QgsVectorLayer *layer );
109
110 public slots:
111
116 void setFilterString( const QString &filter );
117
118 protected:
119
120 void keyPressEvent( QKeyEvent *event ) override;
121
122 private:
123
124 QgsProcessingToolboxProxyModel *mModel = nullptr;
125 QgsProcessingToolboxModel *mToolboxModel = nullptr;
126
130 QModelIndex findFirstVisibleAlgorithm( const QModelIndex &parent );
131
132 friend class TestQgsProcessingModel;
133
134};
135
137#endif // QGSPROCESSINGTOOLBOXTREEVIEW_H
Abstract base class for processing algorithms.
Registry for various processing components, including providers, algorithms and various parameters an...
A model for providers and algorithms shown within the Processing toolbox.
A sort/filter proxy model for providers and algorithms shown within the Processing toolbox,...
Represents a vector layer which manages a vector based data sets.
#define SIP_TRANSFERTHIS
Definition qgis_sip.h:53
#define SIP_TRANSFER
Definition qgis_sip.h:36