QGIS API Documentation 3.99.0-Master (2fe06baccd8)
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( QWidget *parent SIP_TRANSFERTHIS = nullptr, QgsProcessingRegistry *registry = nullptr, QgsProcessingRecentAlgorithmLog *recentLog = nullptr, QgsProcessingFavoriteAlgorithmManager *favoriteManager = nullptr );
57
67 void setRegistry(
68 QgsProcessingRegistry *registry,
69 QgsProcessingRecentAlgorithmLog *recentLog = nullptr,
70 QgsProcessingFavoriteAlgorithmManager *favoriteManager = nullptr
71 );
72
76 void setToolboxProxyModel( QgsProcessingToolboxProxyModel *model SIP_TRANSFER );
77
82 const QgsProcessingAlgorithm *algorithmForIndex( const QModelIndex &index );
83
88 const QgsProcessingAlgorithm *selectedAlgorithm();
89
96 const QgsProcessingParameterType *parameterTypeForIndex( const QModelIndex &index );
97
104 const QgsProcessingParameterType *selectedParameterType();
105
106
111 void setFilters( QgsProcessingToolboxProxyModel::Filters filters );
112
119
123 void setInPlaceLayer( QgsVectorLayer *layer );
124
125 public slots:
126
131 void setFilterString( const QString &filter );
132
136 void reset() override;
137
138 protected:
139 void keyPressEvent( QKeyEvent *event ) override;
140
141 private:
142 QgsProcessingToolboxProxyModel *mModel = nullptr;
143 QgsProcessingToolboxModel *mToolboxModel = nullptr;
144
148 QModelIndex findFirstVisibleAlgorithm( const QModelIndex &parent );
149
150 friend class TestQgsProcessingModel;
151};
152
154#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:53
#define SIP_TRANSFER
Definition qgis_sip.h:36