QGIS API Documentation 4.3.0-Master (16eddb2670e)
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"
22
23#include <QTreeView>
24
26class QgsProcessingRecentAlgorithmLog;
28class QgsProcessingFavoriteAlgorithmManager;
29
31
38class GUI_EXPORT QgsProcessingToolboxTreeView : public QTreeView
39{
40 Q_OBJECT
41
42 public:
56 QgsProcessingToolboxTreeView(
57 QWidget *parent SIP_TRANSFERTHIS = nullptr,
58 QgsProcessingRegistry *registry = nullptr,
59 QgsProcessingRecentAlgorithmLog *recentLog = nullptr,
60 QgsProcessingFavoriteAlgorithmManager *favoriteManager = nullptr
61 );
62
72 void setRegistry( QgsProcessingRegistry *registry, QgsProcessingRecentAlgorithmLog *recentLog = nullptr, QgsProcessingFavoriteAlgorithmManager *favoriteManager = nullptr );
73
77 void setToolboxProxyModel( QgsProcessingToolboxProxyModel *model SIP_TRANSFER );
78
83 const QgsProcessingAlgorithm *algorithmForIndex( const QModelIndex &index );
84
89 const QgsProcessingAlgorithm *selectedAlgorithm();
90
97 const QgsProcessingParameterType *parameterTypeForIndex( const QModelIndex &index );
98
105 const QgsProcessingParameterType *selectedParameterType();
106
107
112 void setFilters( QgsProcessingToolboxProxyModel::Filters filters );
113
120
124 void setInPlaceLayer( QgsVectorLayer *layer );
125
132 void setFilterParameter( const QgsProcessingParameterDefinition *parameterDefinition ) SIP_SKIP;
133
140 void setFilterOutput( const QgsProcessingOutputDefinition *outputDefinition ) SIP_SKIP;
141
142
143 public slots:
144
149 void setFilterString( const QString &filter );
150
154 void reset() override;
155
156 protected:
157 void keyPressEvent( QKeyEvent *event ) override;
158
159 private:
160 QgsProcessingToolboxProxyModel *mModel = nullptr;
161 QgsProcessingToolboxModel *mToolboxModel = nullptr;
162
166 QModelIndex findFirstVisibleAlgorithm( const QModelIndex &parent );
167
168 friend class TestQgsProcessingModel;
169};
170
172#endif // QGSPROCESSINGTOOLBOXTREEVIEW_H
Abstract base class for processing algorithms.
Registry for various processing components, including providers, algorithms and various parameters an...
#define SIP_TRANSFERTHIS
Definition qgis_sip.h:52
#define SIP_SKIP
Definition qgis_sip.h:138
#define SIP_TRANSFER
Definition qgis_sip.h:35